[m-rev.] diff: fix bug #293: asm_fast grades and GCC 4.8
Julien Fischer
jfischer at opturion.com
Wed Jul 10 17:28:16 AEST 2013
Branches: 13.05, master
Fix bug #293: GCC 4.8 and the asm_fast grades.
configure.ac:
Pass -fno-tree-dominator-opts to GCC 4.8 on x86-64 and x86; gcc labels
are not working correctly in the presence of that optimisation.
NEWS:
Announce the above.
Julien.
diff --git a/NEWS b/NEWS
index d3c6eac..18ca7e0 100644
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,8 @@ This is a bug-fix release.
are now applied to all executables in the Mercury system. Likewise,
for shared libraries and the LD_LIBFLAGS and EXTRA_LD_LIBFLAGS mmake
variables. (Bug #288)
+* We have added a workaround for a problem that was preventing the
+ asm_fast grades working with GCC 4.8. (Bug #293)
NEWS for Mercury 13.05.1
diff --git a/configure.ac b/configure.ac
index 67489a9..1a01d5e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2470,6 +2470,14 @@ case "$ac_cv_prog_gcc" in yes)
CFLAGS_FOR_GOTOS="$CFLAGS_FOR_GOTOS -fomit-frame-pointer"
;;
i*86-*|x86_64*)
+ # On x86-64 with GCC 4.8, gcc labels do not work correctly with
+ # -ftree-dominator-opts -- we disable it for x86 in this case too.
+ #
+ case "$C_COMPILER_TYPE" in
+ gcc_4_8_*)
+ CFLAGS_FOR_GOTOS="$CFLAGS_FOR_GOTOS -fno-tree-dominator-opts"
+ ;;
+ esac
CFLAGS_FOR_REGS="-fno-builtin -fno-omit-frame-pointer"
;;
# We need a special-case hack here, because the auto-config
More information about the reviews
mailing list