[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
LTO: consistently accept -fwhopr* and -flto* for GCC.
From: |
Ralf Wildenhues |
Subject: |
LTO: consistently accept -fwhopr* and -flto* for GCC. |
Date: |
Fri, 17 Sep 2010 21:53:08 +0200 |
User-agent: |
Mutt/1.5.20 (2010-08-04) |
We were inconsistent in matching flags matching -flto?* or -fwhopr?*
(in glob notation); GCC has more flags matching either. It seems fairly
safe to allow all of these through.
On the other hand, from looking at the semantics it seems like the right
thing to _not_ allow through -fwhole-program for shared library creation
as that flag will let GCC think the library represents the whole program
and may radically optimize away everything, e.g., when there is no entry
point like main.
Pushed to the lto branch, merged into master.
Cheers,
Ralf
LTO: consistently accept -fwhopr* and -flto* for GCC.
* libltdl/config/ltmain.m4sh (func_mode_link): Accept -fwhopr*.
* libltdl/m4/libtool.m4 (_LT_SYS_HIDDEN_LIBDEPS): Also match
-flto*.
diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh
index 5ada0c1..d74b598 100644
--- a/libltdl/config/ltmain.m4sh
+++ b/libltdl/config/ltmain.m4sh
@@ -5014,10 +5014,10 @@ func_mode_link ()
# @file GCC response files
# -tp=* Portland pgcc target processor selection
# --sysroot=* for sysroot support
- # -O*, -flto*, -fwhopr, -fuse-linker-plugin GCC link-time optimization
+ # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
-64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
- -O*|-flto*|-fwhopr|-fuse-linker-plugin)
+ -O*|-flto*|-fwhopr*|-fuse-linker-plugin)
func_quote_for_eval "$arg"
arg="$func_quote_for_eval_result"
func_append compile_command " $arg"
diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4
index 01cd66a..c2803cd 100644
--- a/libltdl/m4/libtool.m4
+++ b/libltdl/m4/libtool.m4
@@ -6836,7 +6836,7 @@ _LT_EOF
_lt_libdeps_save_CFLAGS=$CFLAGS
case "$CC $CFLAGS " in #(
-*\ -flto\ *) CFLAGS="$CFLAGS -fno-lto" ;;
+*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
esac
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- LTO: consistently accept -fwhopr* and -flto* for GCC.,
Ralf Wildenhues <=