From 41bcb5e0669e53510b7d6a7d6885d7b3de8f7c8a Mon Sep 17 00:00:00 2001 From: Jake Carter Date: Sat, 15 Jul 2023 18:19:29 -0500 Subject: [PATCH] Add patch for building make on Ubuntu-22.04 --- .github/workflows/Build_Examples.yml | 10 ++++++---- .github/workflows/patch/glob_patch.patch | 20 ++++++++++++++++++++ 2 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/patch/glob_patch.patch diff --git a/.github/workflows/Build_Examples.yml b/.github/workflows/Build_Examples.yml index 138d14db4af..44a74275ec4 100644 --- a/.github/workflows/Build_Examples.yml +++ b/.github/workflows/Build_Examples.yml @@ -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 diff --git a/.github/workflows/patch/glob_patch.patch b/.github/workflows/patch/glob_patch.patch new file mode 100644 index 00000000000..0faac2d676a --- /dev/null +++ b/.github/workflows/patch/glob_patch.patch @@ -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