aboutsummaryrefslogtreecommitdiffstats
path: root/main/gcc/ada-no-pie.patch
blob: 39cdb85e32e52edae253458c279c9096e49e6bb7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
--- gcc-4.8.3/gcc/ada/gcc-interface/Makefile.in.orig	2013-12-13 00:53:43.000000000 -0200
+++ gcc-4.8.3/gcc/ada/gcc-interface/Makefile.in	2014-08-01 11:17:00.186019299 -0300
@@ -2462,23 +2462,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)"
@@ -2500,7 +2500,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.
@@ -2510,7 +2510,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
@@ -2519,10 +2519,10 @@
 
 # Likewise for the tools
 ../../gnatmake$(exeext): $(P) b_gnatm.o link.o targext.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 link.o targext.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) ] ; \