From 9eea60f5bf6259a9d99a17bac56884652a14d8ba Mon Sep 17 00:00:00 2001 From: Julien Fischer Date: Fri, 17 Jan 2020 20:44:45 +1100 Subject: [PATCH] Apply workaround for bug #492 to all GCC 9 versions. As mentioned on the reviews list, the fix for the bug is not (currently) present on the gcc-9 branch. compiler/compile_target_code.m: scripts/mgnuc.in: As above. --- compiler/compile_target_code.m | 3 +-- scripts/mgnuc.in | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/compiler/compile_target_code.m b/compiler/compile_target_code.m index 8cf0ff9a1..bd31a3995 100644 --- a/compiler/compile_target_code.m +++ b/compiler/compile_target_code.m @@ -467,8 +467,7 @@ gather_c_compiler_flags(Globals, PIC, AllCFlags) :- % See: % GlobalRegisters = yes, - C_CompilerType = cc_gcc(yes(9), yes(GCCMinorVersion), _), - ( GCCMinorVersion = 1 ; GCCMinorVersion = 2), + C_CompilerType = cc_gcc(yes(9), _, _), string.prefix(TargetArch, "x86_64") ) then diff --git a/scripts/mgnuc.in b/scripts/mgnuc.in index 364b18043..4d7034ac0 100755 --- a/scripts/mgnuc.in +++ b/scripts/mgnuc.in @@ -603,7 +603,7 @@ esac case "$FULLARCH" in x86_64*) case $global_regs,$debug in true,true) - case "$C_COMPILER_TYPE" in gcc_9_[12]*) + case "$C_COMPILER_TYPE" in gcc_9_*) ARCH_OPTS="$ARCH_OPTS -O0" ;; esac ;; esac ;;