pmaports/main/gcc4/ada-no-pie.patch
Daniele Debernardi 7b3702e2dd Add gcc4 and gcc4-armhf packages (!216)
Successfully tested both the gcc4 compiler on x86_64 with a simple
program (fbdebug) and the gcc4-armhf cross-compiler to build a very old
u-boot port for Galaxy Nexus (a MR will follow soon) which failed to
boot with either newer version (6 and 8).

[skip ci]: already went through
2019-02-12 21:03:12 +00:00

66 lines
3 KiB
Diff

--- gcc-4.9.2/gcc/ada/gcc-interface/Makefile.in.orig 2014-05-17 13:13:12.000000000 -0300
+++ gcc-4.9.2/gcc/ada/gcc-interface/Makefile.in 2014-12-10 12:01:32.304493855 -0200
@@ -2570,23 +2570,23 @@
gnatchop gnatcmd gnatkr gnatls gnatprep gnatxref gnatfind gnatname \
gnatclean -bargs $(ADA_INCLUDES) $(GNATBIND_FLAGS)
$(GNATLINK) -v gnatcmd -o ../../gnat$(exeext) \
- --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
+ --GCC="$(GCC_LINK)" -fno-PIE $(TOOLS_LIBS)
$(GNATLINK) -v gnatchop -o ../../gnatchop$(exeext) \
- --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
+ --GCC="$(GCC_LINK)" -fno-PIE $(TOOLS_LIBS)
$(GNATLINK) -v gnatkr -o ../../gnatkr$(exeext) \
- --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
+ --GCC="$(GCC_LINK)" -fno-PIE $(TOOLS_LIBS)
$(GNATLINK) -v gnatls -o ../../gnatls$(exeext) \
- --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
+ --GCC="$(GCC_LINK)" -fno-PIE $(TOOLS_LIBS)
$(GNATLINK) -v gnatprep -o ../../gnatprep$(exeext) \
- --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
+ --GCC="$(GCC_LINK)" -fno-PIE $(TOOLS_LIBS)
$(GNATLINK) -v gnatxref -o ../../gnatxref$(exeext) \
- --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
+ --GCC="$(GCC_LINK)" -fno-PIE $(TOOLS_LIBS)
$(GNATLINK) -v gnatfind -o ../../gnatfind$(exeext) \
- --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
+ --GCC="$(GCC_LINK)" -fno-PIE $(TOOLS_LIBS)
$(GNATLINK) -v gnatname -o ../../gnatname$(exeext) \
- --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
+ --GCC="$(GCC_LINK)" -fno-PIE $(TOOLS_LIBS)
$(GNATLINK) -v gnatclean -o ../../gnatclean$(exeext) \
- --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
+ --GCC="$(GCC_LINK)" -fno-PIE $(TOOLS_LIBS)
../../gnatsym$(exeext): ../stamp-tools
$(GNATMAKE) -c $(ADA_INCLUDES) gnatsym --GCC="$(CC) $(ALL_ADAFLAGS)"
@@ -2608,7 +2608,7 @@
$(GNATMAKE) -j0 -c $(ADA_INCLUDES) gnatmake --GCC="$(CC) $(ALL_ADAFLAGS)"
$(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatmake
$(GNATLINK) -v gnatmake -o ../../gnatmake$(exeext) \
- --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
+ --GCC="$(GCC_LINK)" -fno-PIE $(TOOLS_LIBS)
# Note the use of the "mv" command in order to allow gnatlink to be linked with
# with the former version of gnatlink itself which cannot override itself.
@@ -2618,7 +2618,7 @@
$(GNATMAKE) -j0 -c $(ADA_INCLUDES) gnatlink --GCC="$(CC) $(ALL_ADAFLAGS)"
$(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatlink
$(GNATLINK) -v gnatlink -o ../../gnatlinknew$(exeext) \
- --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
+ --GCC="$(GCC_LINK)" -fno-PIE $(TOOLS_LIBS)
$(MV) ../../gnatlinknew$(exeext) ../../gnatlink$(exeext)
# Needs to be built with CC=gcc
@@ -2627,10 +2627,10 @@
# Likewise for the tools
../../gnatmake$(exeext): $(P) b_gnatm.o $(GNATMAKE_OBJS)
- +$(GCC_LINK) $(ALL_CFLAGS) -o $@ b_gnatm.o $(GNATMAKE_OBJS) $(TOOLS_LIBS)
+ +$(GCC_LINK) $(ALL_CFLAGS) -fno-PIE -o $@ b_gnatm.o $(GNATMAKE_OBJS) $(TOOLS_LIBS)
../../gnatlink$(exeext): $(P) b_gnatl.o $(GNATLINK_OBJS)
- +$(GCC_LINK) $(ALL_CFLAGS) -o $@ b_gnatl.o $(GNATLINK_OBJS) $(TOOLS_LIBS)
+ +$(GCC_LINK) $(ALL_CFLAGS) -fno-PIE -o $@ b_gnatl.o $(GNATLINK_OBJS) $(TOOLS_LIBS)
../stamp-gnatlib-$(RTSDIR):
@if [ ! -f stamp-gnatlib-$(RTSDIR) ] ; \