+2015-10-29 H.J. Lu <hongjiu.lu@intel.com>
+
+ * 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.
+
2015-10-29 Richard Biener <rguenther@suse.de>
PR middle-end/56956
LINKER_FLAGS = $(CFLAGS)
endif
+NO_PIE_CFLAGS = @NO_PIE_CFLAGS@
+NO_PIE_FLAG = @NO_PIE_FLAG@
+
# We don't want to compile the compilers with -fPIE, it make PCH fail.
-COMPILER += @NO_PIE_CFLAGS@
+COMPILER += $(NO_PIE_CFLAGS)
# Link with -no-pie since we compile the compiler with -fno-PIE.
-LINKER += @NO_PIE_FLAG@
+LINKER += $(NO_PIE_FLAG)
# Like LINKER, but use a mutex for serializing front end links.
ifeq (@DO_LINK_MUTEX@,true)
# Native compiler for the build machine and its switches.
CC_FOR_BUILD = @CC_FOR_BUILD@
CXX_FOR_BUILD = @CXX_FOR_BUILD@
+NO_PIE_CFLAGS_FOR_BUILD = @NO_PIE_CFLAGS_FOR_BUILD@
+NO_PIE_FLAG_FOR_BUILD = @NO_PIE_FLAG_FOR_BUILD@
BUILD_CFLAGS= @BUILD_CFLAGS@ -DGENERATOR_FILE
BUILD_CXXFLAGS = @BUILD_CXXFLAGS@ -DGENERATOR_FILE
-BUILD_CFLAGS += @NO_PIE_CFLAGS@
-BUILD_CXXFLAGS += @NO_PIE_CFLAGS@
+BUILD_NO_PIE_CFLAGS = @BUILD_NO_PIE_CFLAGS@
+BUILD_CFLAGS += $(BUILD_NO_PIE_CFLAGS)
+BUILD_CXXFLAGS += $(BUILD_NO_PIE_CFLAGS)
# Native compiler that we use. This may be C++ some day.
COMPILER_FOR_BUILD = $(CXX_FOR_BUILD)
# Native linker and preprocessor flags. For x-fragment overrides.
BUILD_LDFLAGS=@BUILD_LDFLAGS@
-BUILD_LDFLAGS += @NO_PIE_FLAG@
+BUILD_NO_PIE_FLAG = @BUILD_NO_PIE_FLAG@
+BUILD_LDFLAGS += $(BUILD_NO_PIE_FLAG)
BUILD_CPPFLAGS= -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \
-I$(srcdir)/../include @INCINTL@ $(CPPINC) $(CPPFLAGS)
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
$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
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=
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
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
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.