Skip to content

Commit

Permalink
Add patch for building make on Ubuntu-22.04
Browse files Browse the repository at this point in the history
  • Loading branch information
Jake-Carter committed Jul 15, 2023
1 parent fc7633b commit 41bcb5e
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/Build_Examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,16 +200,18 @@ jobs:
- name: Install Make 3.81
run: |
# Install RISCV tools (updated)
cd /home/runner
cd $HOME
ls -la
wget https://ftp.gnu.org/gnu/make/make-3.81.tar.gz
tar -xvf make-3.81.tar.gz
cd make-3.81
./configure
patch glob/glob.c $HOME/.github/workflows/patch/glob_patch.patch
./configure --prefix=$HOME/make-3.81
make
make install --prefix=/home/runner/make-3.81
make install
# Add 3.81 to path
echo "/home/runner/make-3.81/bin" >> $GITHUB_PATH
echo "$HOME/make-3.81/bin" >> $GITHUB_PATH
- name: Check watch files
id: check_watch
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/patch/glob_patch.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
--- glob-old.c 2023-07-15 18:06:47.276205928 -0500
+++ glob.c 2023-07-15 18:08:24.256204829 -0500
@@ -207,7 +207,7 @@
#endif /* __GNU_LIBRARY__ */


-#if !defined __alloca && !defined __GNU_LIBRARY__
+#if !defined __alloca && defined __GNU_LIBRARY__

# ifdef __GNUC__
# undef alloca
@@ -230,7 +230,7 @@

#endif

-#ifndef __GNU_LIBRARY__
+#ifdef __GNU_LIBRARY__
# define __stat stat
# ifdef STAT_MACROS_BROKEN
# undef S_ISDIR

0 comments on commit 41bcb5e

Please sign in to comment.