aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'upstream/Makefile.patch')
-rw-r--r--upstream/Makefile.patch29
1 files changed, 15 insertions, 14 deletions
diff --git a/upstream/Makefile.patch b/upstream/Makefile.patch
index a116e5f..0e17143 100644
--- a/upstream/Makefile.patch
+++ b/upstream/Makefile.patch
@@ -38,23 +38,23 @@
INTERNAL_CFLAGS = -DIN_GCC @CROSS@
+# We don't want to compile the compiler with -fPIE, it make PCH fail.
-+enable_espf = @enable_espf@
-+ifeq ($(enable_espf),yes)
-+ESPF_NOPIE_CFLAGS = -fno-PIE
++enable_pie_default= @enable_pie_default@
++ifeq ($(enable_pie_default),yes)
++PIE_DEFAULT_CFLAGS = -fno-PIE
+else
-+ESPF_NOPIE_CFLAGS=
++PIE_DEFAULT_CFLAGS=
+endif
+
# This is the variable actually used when we compile. If you change this,
# you probably want to update BUILD_CFLAGS in configure.ac
-ALL_CFLAGS = $(T_CFLAGS) $(CFLAGS-$@) \
-+ALL_CFLAGS = $(ESPF_NOPIE_CFLAGS) $(T_CFLAGS) $(CFLAGS-$@) \
++ALL_CFLAGS = $(PIE_DEFAULT_CFLAGS) $(T_CFLAGS) $(CFLAGS-$@) \
$(CFLAGS) $(INTERNAL_CFLAGS) $(COVERAGE_FLAGS) $(WARN_CFLAGS) @DEFS@
# The C++ version.
-ALL_CXXFLAGS = $(T_CFLAGS) $(CFLAGS-$@) $(CXXFLAGS) $(INTERNAL_CFLAGS) \
- $(COVERAGE_FLAGS) $(NOEXCEPTION_FLAGS) $(WARN_CXXFLAGS) @DEFS@
-+ALL_CXXFLAGS =$(ESPF_NOPIE_CFLAGS) $(T_CFLAGS) $(CFLAGS-$@) $(CXXFLAGS) \
++ALL_CXXFLAGS =$(PIE_DEFAULT_CFLAGS) $(T_CFLAGS) $(CFLAGS-$@) $(CXXFLAGS) \
+ $(INTERNAL_CFLAGS) $(COVERAGE_FLAGS) $(NOEXCEPTION_FLAGS) \
+ $(WARN_CXXFLAGS) @DEFS@
@@ -64,7 +64,7 @@
echo GCC_CFLAGS = '$(GCC_CFLAGS)' >> tmp-libgcc.mvars
echo INHIBIT_LIBC_CFLAGS = '$(INHIBIT_LIBC_CFLAGS)' >> tmp-libgcc.mvars
echo TARGET_SYSTEM_ROOT = '$(TARGET_SYSTEM_ROOT)' >> tmp-libgcc.mvars
-+ echo enable_espf = '$(enable_espf)' >> tmp-libgcc.mvars
++ echo enable_pie_default) = '$(enable_pie_default))' >> tmp-libgcc.mvars
mv tmp-libgcc.mvars libgcc.mvars
@@ -72,29 +72,30 @@
@if test "@enable_lto@" = "yes" ; then \
echo "set ENABLE_LTO 1" >> ./site.tmp; \
fi
-+ @if test "@enable_espf@" = "yes" ; then \
-+ echo "set ENABLE_ESPF 1" >> ./site.tmp; \
++ @if test "@enable_pie_default)@" = "yes" ; then \
++ echo "set ENABLE_PIE_DEFAULT 1" >> ./site.tmp; \
+ fi
# If newlib has been configured, we need to pass -B to gcc so it can find
# newlib's crt0.o if it exists. This will cause a "path prefix not used"
# message if it doesn't, but the testsuite is supposed to ignore the message -
--- a/libgcc/Makefile.in 2011-11-22 04:01:02.000000000 +0100
+++ b/libgcc/Makefile.in 2012-06-29 00:15:04.534016511 +0200
-@@ -275,11 +275,16 @@ override CFLAGS := $(filter-out -fprofil
+@@ -275,11 +275,17 @@ override CFLAGS := $(filter-out -fprofil
INTERNAL_CFLAGS = $(CFLAGS) $(LIBGCC2_CFLAGS) $(HOST_LIBGCC2_CFLAGS) \
$(INCLUDES) @set_have_cc_tls@ @set_use_emutls@
-+ifeq ($(enable_espf),yes)
-+ESPF_NOPIE_CFLAGS = -fno-PIE
++We don't want to compile crt* with -fPIE.
++ifeq ($(enable_pie_default)),yes)
++PIE_DEFAULT_CFLAGS = -fno-PIE
+else
-+ESPF_NOPIE_CFLAGS=
++PIE_DEFAULT_CFLAGS=
+endif
# Options to use when compiling crtbegin/end.
CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \
-finhibit-size-directive -fno-inline -fno-exceptions \
-fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize \
- -fno-stack-protector \
-+ -fno-stack-protector $(ESPF_NOPIE_CFLAGS) \
++ -fno-stack-protector $(PIE_DEFAULT_CFLAGS) \
$(INHIBIT_LIBC_CFLAGS)
# Extra flags to use when compiling crt{begin,end}.o.