summaryrefslogtreecommitdiff
path: root/gcc/configure.ac
diff options
context:
space:
mode:
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2015-10-29 12:29:43 +0000
committerhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2015-10-29 12:29:43 +0000
commit571e5fe1b51a6c1b693218394fc7f82be06e99a0 (patch)
tree8d713006ef3d7505ce82f73c5489cda89f7dd071 /gcc/configure.ac
parente8ec2b06072a532b8d7319ed598ac1dad2584fea (diff)
downloadgcc-571e5fe1b51a6c1b693218394fc7f82be06e99a0.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229522 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/configure.ac')
-rw-r--r--gcc/configure.ac10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/configure.ac b/gcc/configure.ac
index a30bb3b89e8..7e22267e3bb 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -2041,13 +2041,23 @@ BUILD_CXXFLAGS='$(ALL_CXXFLAGS)' AC_SUBST(BUILD_CXXFLAGS)
BUILD_LDFLAGS='$(LDFLAGS)' AC_SUBST(BUILD_LDFLAGS)
STMP_FIXINC=stmp-fixinc AC_SUBST(STMP_FIXINC)
+BUILD_NO_PIE_CFLAGS='$(NO_PIE_CFLAGS)' AC_SUBST(BUILD_NO_PIE_CFLAGS)
+BUILD_NO_PIE_FLAG='$(NO_PIE_FLAG)' AC_SUBST(BUILD_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
+AC_SUBST(NO_PIE_CFLAGS_FOR_BUILD)
+AC_SUBST(NO_PIE_FLAG_FOR_BUILD)
# Expand extra_headers to include complete path.
# This substitutes for lots of t-* files.