diff options
author | H.J. Lu <hongjiu.lu@intel.com> | 2015-10-29 12:29:43 +0000 |
---|---|---|
committer | H.J. Lu <hjl@gcc.gnu.org> | 2015-10-29 05:29:43 -0700 |
commit | 5148d2e38fa5ff6427fca48cb592ca34a46af3f9 (patch) | |
tree | 8d713006ef3d7505ce82f73c5489cda89f7dd071 /gcc/configure | |
parent | 41e977ac9054519259a7740d0f4b434105cd366a (diff) | |
download | gcc-5148d2e38fa5ff6427fca48cb592ca34a46af3f9.zip gcc-5148d2e38fa5ff6427fca48cb592ca34a46af3f9.tar.gz gcc-5148d2e38fa5ff6427fca48cb592ca34a46af3f9.tar.bz2 |
Add BUILD_NO_PIE_CFLAGS and BUILD_NO_PIE_FLAG
We shouldn't use NO_PIE_CFLAGS and NO_PIE_FLAG with CXX_FOR_BUILD
when CXX_FOR_BUILD != CXX. This patch adds BUILD_NO_PIE_CFLAGS
and BUILD_NO_PIE_FLAG to use with CXX_FOR_BUILD. They are set to
NO_PIE_CFLAGS and NO_PIE_FLAG when build machine == host machine.
Otherwise, they are set to NO_PIE_CFLAGS_FOR_BUILD and
NO_PIE_FLAG_FOR_BUILD.
* Makefile.in (NO_PIE_CFLAGS): New.
(NO_PIE_FLAG): Likewise.
(NO_PIE_CFLAGS_FOR_BUILD): Likewise.
(NO_PIE_FLAG_FOR_BUILD): Likewise.
(BUILD_NO_PIE_CFLAGS): Likewise.
(BUILD_NO_PIE_FLAG): Likewise.
(COMPILER): Replace @NO_PIE_CFLAGS@ with $(NO_PIE_CFLAGS).
(LINKER): Replace @NO_PIE_FLAG@ with $(NO_PIE_FLAG).
(BUILD_CFLAGS): Replace @NO_PIE_CFLAGS@ with
$(BUILD_NO_PIE_CFLAGS).
(BUILD_CXXFLAGS): Likewise.
(BUILD_LDFLAGS ): Replace @NO_PIE_FLAG@ with
$(BUILD_NO_PIE_FLAG).
* configure.ac (BUILD_NO_PIE_CFLAGS): New. AC_SUBST.
(BUILD_NO_PIE_FLAG): Likewise.
(NO_PIE_CFLAGS_FOR_BUILD): Likewise.
(NO_PIE_FLAG_FOR_BUILD): Likewise.
* configure: Regenerated.
From-SVN: r229522
Diffstat (limited to 'gcc/configure')
-rwxr-xr-x | gcc/configure | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/gcc/configure b/gcc/configure index 3122499..92bda6c 100755 --- a/gcc/configure +++ b/gcc/configure @@ -707,6 +707,10 @@ FGREP SED LIBTOOL collect2 +NO_PIE_FLAG_FOR_BUILD +NO_PIE_CFLAGS_FOR_BUILD +BUILD_NO_PIE_FLAG +BUILD_NO_PIE_CFLAGS STMP_FIXINC BUILD_LDFLAGS BUILD_CXXFLAGS @@ -7096,7 +7100,8 @@ if test x$ac_checking != x ; then $as_echo "#define ENABLE_CHECKING 1" >>confdefs.h - $as_echo "#define CHECKING_P 1" >>confdefs.h + +$as_echo "#define CHECKING_P 1" >>confdefs.h nocommon_flag=-fno-common else @@ -12253,14 +12258,24 @@ BUILD_CXXFLAGS='$(ALL_CXXFLAGS)' BUILD_LDFLAGS='$(LDFLAGS)' STMP_FIXINC=stmp-fixinc +BUILD_NO_PIE_CFLAGS='$(NO_PIE_CFLAGS)' +BUILD_NO_PIE_FLAG='$(NO_PIE_FLAG)' + # And these apply if build != host, or we are generating coverage data if test x$build != x$host || test "x$coverage_flags" != x then BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)' BUILD_CXXFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CXXFLAGS_FOR_BUILD)' BUILD_LDFLAGS='$(LDFLAGS_FOR_BUILD)' + + NO_PIE_CFLAGS_FOR_BUILD=${NO_PIE_CFLAGS_FOR_BUILD-${NO_PIE_CFLAGS}} + NO_PIE_FLAG_FOR_BUILD=${NO_PIE_FLAG_FOR_BUILD-${NO_PIE_FLAG}} + BUILD_NO_PIE_CFLAGS='$(NO_PIE_CFLAGS_FOR_BUILD)' + BUILD_NO_PIE_FLAG='$(NO_PIE_FLAG_FOR_BUILD)' fi + + # Expand extra_headers to include complete path. # This substitutes for lots of t-* files. extra_headers_list= @@ -18390,7 +18405,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 18393 "configure" +#line 18408 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -18496,7 +18511,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 18499 "configure" +#line 18514 "configure" #include "confdefs.h" #if HAVE_DLFCN_H |