From 4c6604e730ee786709e8c39ab9e54eec06990e49 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Sat, 1 Jan 2022 16:23:19 -0800 Subject: [PATCH] Remove gcc-oracle-4.8-44.0.5 GCC 4.8 and its prerequisites have been removed by 04dce680, 41d4583a and e4221734; as a result, 4.8-based version of gcc-oracle became unbuildable (no valid versions for the prerequisites). Update the samples to use 4.9.4; which however fails to build on a modern host GCC. Build fix backported to gcc-4.9 and gcc-5 versions. Fix binutils-oracle build with host GCC11. Signed-off-by: Alexey Neyman --- ...0012-Fix-a-missing-include-of-string.patch | 26 +++++++++++++++++++ packages/gcc-oracle/4.8.5-44.0.5/version.desc | 2 -- packages/gcc-oracle/package.desc | 5 ---- .../gcc/4.9.4/0034-c++17-build-failure.patch | 17 ++++++++++++ .../gcc/5.5.0/0035-c++17-build-failure.patch | 21 +++++++++++++++ .../aarch64-ol7u9-linux-gnu/crosstool.config | 10 +++---- .../arm-ol7u9-linux-gnueabi/crosstool.config | 12 +++------ .../crosstool.config | 13 +++------- 8 files changed, 75 insertions(+), 31 deletions(-) create mode 100644 packages/binutils-oracle/git-889339ab/0012-Fix-a-missing-include-of-string.patch delete mode 100644 packages/gcc-oracle/4.8.5-44.0.5/version.desc delete mode 100644 packages/gcc-oracle/package.desc create mode 100644 packages/gcc/4.9.4/0034-c++17-build-failure.patch create mode 100644 packages/gcc/5.5.0/0035-c++17-build-failure.patch diff --git a/packages/binutils-oracle/git-889339ab/0012-Fix-a-missing-include-of-string.patch b/packages/binutils-oracle/git-889339ab/0012-Fix-a-missing-include-of-string.patch new file mode 100644 index 00000000..b04033a7 --- /dev/null +++ b/packages/binutils-oracle/git-889339ab/0012-Fix-a-missing-include-of-string.patch @@ -0,0 +1,26 @@ +From 23272f9927dc95c0cf6f7c5aabcc0551eca572c5 Mon Sep 17 00:00:00 2001 +From: Martin Liska +Date: Fri, 7 Jun 2019 07:36:52 +0200 +Subject: [PATCH] Fix a missing include of + +gold/ChangeLog: + +2019-06-07 Martin Liska + + * errors.h: Include string. +--- + gold/errors.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/gold/errors.h b/gold/errors.h +index 1e61c8dbb5..805b25fc9c 100644 +--- a/gold/errors.h ++++ b/gold/errors.h +@@ -24,6 +24,7 @@ + #define GOLD_ERRORS_H + + #include ++#include + + #include "gold-threads.h" + diff --git a/packages/gcc-oracle/4.8.5-44.0.5/version.desc b/packages/gcc-oracle/4.8.5-44.0.5/version.desc deleted file mode 100644 index 2f2ac61a..00000000 --- a/packages/gcc-oracle/4.8.5-44.0.5/version.desc +++ /dev/null @@ -1,2 +0,0 @@ -repository_branch='oracle/gcc/ol7-u9' -version_number='4.8' diff --git a/packages/gcc-oracle/package.desc b/packages/gcc-oracle/package.desc deleted file mode 100644 index 6ccf4ccf..00000000 --- a/packages/gcc-oracle/package.desc +++ /dev/null @@ -1,5 +0,0 @@ -master='gcc' -repository='git https://github.com/oracle/gcc.git' -origin='Oracle' -src_release='n' -src_devel='y' diff --git a/packages/gcc/4.9.4/0034-c++17-build-failure.patch b/packages/gcc/4.9.4/0034-c++17-build-failure.patch new file mode 100644 index 00000000..cc56acab --- /dev/null +++ b/packages/gcc/4.9.4/0034-c++17-build-failure.patch @@ -0,0 +1,17 @@ +Fixes + +.../gcc/reload1.c:89:24: error: use of an operand of type 'bool' in 'operator++' is forbidden in C++17 + +Fixed upstream in GCC6+ in d57c99458933. + +--- gcc-4.9.4/gcc/reload.h 2022-01-01 15:51:43.293254281 -0800 ++++ gcc-4.9.4/gcc/reload.h 2022-01-01 15:51:58.437424873 -0800 +@@ -166,7 +166,7 @@ + value indicates the level of indirect addressing supported, e.g., two + means that (MEM (MEM (REG n))) is also valid if (REG n) does not get + a hard register. */ +- bool x_spill_indirect_levels; ++ unsigned char x_spill_indirect_levels; + + /* True if caller-save has been reinitialized. */ + bool x_caller_save_initialized_p; diff --git a/packages/gcc/5.5.0/0035-c++17-build-failure.patch b/packages/gcc/5.5.0/0035-c++17-build-failure.patch new file mode 100644 index 00000000..a99af49e --- /dev/null +++ b/packages/gcc/5.5.0/0035-c++17-build-failure.patch @@ -0,0 +1,21 @@ +Fixes + +.../gcc/reload1.c:89:24: error: use of an operand of type 'bool' in 'operator++' is forbidden in C++17 + +Fixed upstream in GCC6+ in d57c99458933. + +--- + gcc/reload.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/gcc/reload.h ++++ b/gcc/reload.h +@@ -168,7 +168,7 @@ + value indicates the level of indirect addressing supported, e.g., two + means that (MEM (MEM (REG n))) is also valid if (REG n) does not get + a hard register. */ +- bool x_spill_indirect_levels; ++ unsigned char x_spill_indirect_levels; + + /* True if caller-save has been reinitialized. */ + bool x_caller_save_initialized_p; diff --git a/samples/aarch64-ol7u9-linux-gnu/crosstool.config b/samples/aarch64-ol7u9-linux-gnu/crosstool.config index 165468c9..ae644e66 100644 --- a/samples/aarch64-ol7u9-linux-gnu/crosstool.config +++ b/samples/aarch64-ol7u9-linux-gnu/crosstool.config @@ -5,17 +5,13 @@ CT_ARCH_64=y CT_TARGET_VENDOR="ol7u9" CT_KERNEL_LINUX=y CT_LINUX_USE_ORACLE=y -CT_LINUX_ORACLE_V_4_14=y -CT_LINUX_ORACLE_VERSION="4.14.35-2025.400.8" CT_BINUTILS_USE_ORACLE=y -CT_BINUTILS_ORACLE_V_2_27_44=y CT_BINUTILS_LINKER_LD_GOLD=y CT_BINUTILS_GOLD_THREADS=y CT_BINUTILS_LD_WRAPPER=y CT_BINUTILS_PLUGINS=y CT_GLIBC_USE_ORACLE=y -CT_GLIBC_ORACLE_V_2_17_317_0_3=y -CT_GCC_USE_ORACLE=y -CT_GCC_ORACLE_V_4_8=y -CT_GCC_ORACLE_VERSION="4.8.5-44.0.5" +CT_GLIBC_EXTRA_CFLAGS="-Wno-missing-attributes -Wno-array-bounds -Wno-array-parameter -Wno-stringop-overflow -Wno-maybe-uninitialized" +CT_GLIBC_ENABLE_COMMON_FLAG=y +CT_GCC_V_4_9=y CT_CC_LANG_CXX=y diff --git a/samples/arm-ol7u9-linux-gnueabi/crosstool.config b/samples/arm-ol7u9-linux-gnueabi/crosstool.config index 1894fe85..93961af6 100644 --- a/samples/arm-ol7u9-linux-gnueabi/crosstool.config +++ b/samples/arm-ol7u9-linux-gnueabi/crosstool.config @@ -1,21 +1,17 @@ CT_CONFIG_VERSION="3" CT_OBSOLETE=y CT_ARCH_ARM=y -CT_TARGET_VENDOR="ol7u9" CT_ARCH_FLOAT_SW=y +CT_TARGET_VENDOR="ol7u9" CT_KERNEL_LINUX=y CT_LINUX_USE_ORACLE=y -CT_LINUX_ORACLE_V_4_14=y -CT_LINUX_ORACLE_VERSION="4.14.35-2025.400.8" CT_BINUTILS_USE_ORACLE=y -CT_BINUTILS_ORACLE_V_2_27_44=y CT_BINUTILS_LINKER_LD_GOLD=y CT_BINUTILS_GOLD_THREADS=y CT_BINUTILS_LD_WRAPPER=y CT_BINUTILS_PLUGINS=y CT_GLIBC_USE_ORACLE=y -CT_GLIBC_ORACLE_V_2_17_317_0_3=y -CT_GCC_USE_ORACLE=y -CT_GCC_ORACLE_V_4_8=y -CT_GCC_ORACLE_VERSION="4.8.5-44.0.5" +CT_GLIBC_EXTRA_CFLAGS="-Wno-missing-attributes -Wno-array-bounds -Wno-array-parameter -Wno-stringop-overflow -Wno-maybe-uninitialized" +CT_GLIBC_ENABLE_COMMON_FLAG=y +CT_GCC_V_4_9=y CT_CC_LANG_CXX=y diff --git a/samples/arm-ol7u9-linux-gnueabihf/crosstool.config b/samples/arm-ol7u9-linux-gnueabihf/crosstool.config index 16731296..fd33aeee 100644 --- a/samples/arm-ol7u9-linux-gnueabihf/crosstool.config +++ b/samples/arm-ol7u9-linux-gnueabihf/crosstool.config @@ -1,21 +1,16 @@ -CT_CONFIG_VERSION="3" CT_OBSOLETE=y CT_ARCH_ARM=y -CT_TARGET_VENDOR="ol7u9" CT_ARCH_FLOAT_HW=y +CT_TARGET_VENDOR="ol7u9" CT_KERNEL_LINUX=y CT_LINUX_USE_ORACLE=y -CT_LINUX_ORACLE_V_4_14=y -CT_LINUX_ORACLE_VERSION="4.14.35-2025.400.8" CT_BINUTILS_USE_ORACLE=y -CT_BINUTILS_ORACLE_V_2_27_44=y CT_BINUTILS_LINKER_LD_GOLD=y CT_BINUTILS_GOLD_THREADS=y CT_BINUTILS_LD_WRAPPER=y CT_BINUTILS_PLUGINS=y CT_GLIBC_USE_ORACLE=y -CT_GLIBC_ORACLE_V_2_17_317_0_3=y -CT_GCC_USE_ORACLE=y -CT_GCC_ORACLE_V_4_8=y -CT_GCC_ORACLE_VERSION="4.8.5-44.0.5" +CT_GLIBC_EXTRA_CFLAGS="-Wno-missing-attributes -Wno-array-bounds -Wno-array-parameter -Wno-stringop-overflow -Wno-maybe-uninitialized" +CT_GLIBC_ENABLE_COMMON_FLAG=y +CT_GCC_V_4_9=y CT_CC_LANG_CXX=y