From 5dfaec766971f43bc3d64296983a780e7b83397c Mon Sep 17 00:00:00 2001 From: rofl0r Date: Tue, 22 Oct 2019 16:32:35 +0000 Subject: [PATCH 1/2] gcc 4.2.1: add patch to fix configure env var breakage when GCC_CONFIG_FULL contains variable assignment items like AR=foo, it chokes. add hunk fixing that from more recent autoconf output. --- patches/gcc-4.2.1/0013-configureenv.diff | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 patches/gcc-4.2.1/0013-configureenv.diff diff --git a/patches/gcc-4.2.1/0013-configureenv.diff b/patches/gcc-4.2.1/0013-configureenv.diff new file mode 100644 index 00000000..93593b4b --- /dev/null +++ b/patches/gcc-4.2.1/0013-configureenv.diff @@ -0,0 +1,19 @@ +--- gcc-4.2.1.org/configure ++++ gcc-4.2.1/configure +@@ -436,6 +436,16 @@ + -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } + ;; + ++ *=*) ++ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` ++ # Reject names that are not valid shell variable names. ++ case $ac_envvar in #( ++ '' | [0-9]* | *[!_$as_cr_alnum]* ) ++ as_fn_error "invalid variable name: \`$ac_envvar'" ;; ++ esac ++ eval $ac_envvar=\$ac_optarg ++ export $ac_envvar ;; ++ + *) + if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then + echo "configure: warning: $ac_option: invalid host type" 1>&2 From 3889a9b28a10dd0a130b3ba3446b930e9bc6eb7e Mon Sep 17 00:00:00 2001 From: rofl0r Date: Tue, 22 Oct 2019 17:12:26 +0000 Subject: [PATCH 2/2] gcc 4.2.1: backport cfns inline fix --- patches/gcc-4.2.1/0014-cfns-inline-fix.diff | 22 +++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 patches/gcc-4.2.1/0014-cfns-inline-fix.diff diff --git a/patches/gcc-4.2.1/0014-cfns-inline-fix.diff b/patches/gcc-4.2.1/0014-cfns-inline-fix.diff new file mode 100644 index 00000000..633bb093 --- /dev/null +++ b/patches/gcc-4.2.1/0014-cfns-inline-fix.diff @@ -0,0 +1,22 @@ +--- gcc-4.2.1.orig/gcc/cp/cfns.h ++++ gcc-4.2.1/gcc/cp/cfns.h +@@ -37,6 +37,9 @@ + #ifdef __GNUC__ + __inline + #endif ++#ifdef __GNUC_STDC_INLINE__ ++__attribute__ ((__gnu_inline__)) ++#endif + const char * libc_name_p (const char *, unsigned int); + /* maximum key range = 391, duplicates = 0 */ + +@@ -107,6 +110,9 @@ + + #ifdef __GNUC__ + __inline ++#endif ++#ifdef __GNUC_STDC_INLINE__ ++__attribute__ ((__gnu_inline__)) + #endif + const char * + libc_name_p (register const char *str, register unsigned int len)