Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 641474
Collapse All | Expand All

(-)a/gcc/config/gnu-user.h (-10 / +24 lines)
Lines 50-68 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see Link Here
50
50
51
#if defined HAVE_LD_PIE
51
#if defined HAVE_LD_PIE
52
#define GNU_USER_TARGET_STARTFILE_SPEC \
52
#define GNU_USER_TARGET_STARTFILE_SPEC \
53
  "%{!shared: %{pg|p|profile:gcrt1.o%s;: \
53
  "%{shared:; \
54
    %{" PIE_SPEC ":Scrt1.o%s} %{" NO_PIE_SPEC ":crt1.o%s}}} \
54
     pg|p|profile:gcrt1.o%s; \
55
   crti.o%s %{static:crtbeginT.o%s;: %{shared:crtbeginS.o%s} \
55
     static:crt1.o%s; \
56
	      %{" PIE_SPEC ":crtbeginS.o%s} \
56
     " PIE_SPEC ":Scrt1.o%s; \
57
	      %{" NO_PIE_SPEC ":crtbegin.o%s}} \
57
     :crt1.o%s} \
58
   crti.o%s \
59
   %{static:crtbeginT.o%s; \
60
     shared|" PIE_SPEC ":crtbeginS.o%s; \
61
     :crtbegin.o%s} \
58
   %{fvtable-verify=none:%s; \
62
   %{fvtable-verify=none:%s; \
59
     fvtable-verify=preinit:vtv_start_preinit.o%s; \
63
     fvtable-verify=preinit:vtv_start_preinit.o%s; \
60
     fvtable-verify=std:vtv_start.o%s} \
64
     fvtable-verify=std:vtv_start.o%s} \
61
   " CRTOFFLOADBEGIN
65
   " CRTOFFLOADBEGIN
62
#else
66
#else
63
#define GNU_USER_TARGET_STARTFILE_SPEC \
67
#define GNU_USER_TARGET_STARTFILE_SPEC \
64
  "%{!shared: %{pg|p|profile:gcrt1.o%s;:crt1.o%s}} \
68
  "%{shared:; \
65
   crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s} \
69
     pg|p|profile:gcrt1.o%s; \
70
     :crt1.o%s} \
71
   crti.o%s \
72
   %{static:crtbeginT.o%s; \
73
     shared|pie:crtbeginS.o%s; \
74
     :crtbegin.o%s} \
66
   %{fvtable-verify=none:%s; \
75
   %{fvtable-verify=none:%s; \
67
     fvtable-verify=preinit:vtv_start_preinit.o%s; \
76
     fvtable-verify=preinit:vtv_start_preinit.o%s; \
68
     fvtable-verify=std:vtv_start.o%s} \
77
     fvtable-verify=std:vtv_start.o%s} \
Lines 82-96 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see Link Here
82
  "%{fvtable-verify=none:%s; \
91
  "%{fvtable-verify=none:%s; \
83
     fvtable-verify=preinit:vtv_end_preinit.o%s; \
92
     fvtable-verify=preinit:vtv_end_preinit.o%s; \
84
     fvtable-verify=std:vtv_end.o%s} \
93
     fvtable-verify=std:vtv_end.o%s} \
85
   %{shared:crtendS.o%s;: %{" PIE_SPEC ":crtendS.o%s} \
94
   %{static:crtend.o%s; \
86
   %{" NO_PIE_SPEC ":crtend.o%s}} crtn.o%s \
95
     shared|" PIE_SPEC ":crtendS.o%s; \
96
     :crtend.o%s} \
97
   crtn.o%s \
87
   " CRTOFFLOADEND
98
   " CRTOFFLOADEND
88
#else
99
#else
89
#define GNU_USER_TARGET_ENDFILE_SPEC \
100
#define GNU_USER_TARGET_ENDFILE_SPEC \
90
  "%{fvtable-verify=none:%s; \
101
  "%{fvtable-verify=none:%s; \
91
     fvtable-verify=preinit:vtv_end_preinit.o%s; \
102
     fvtable-verify=preinit:vtv_end_preinit.o%s; \
92
     fvtable-verify=std:vtv_end.o%s} \
103
     fvtable-verify=std:vtv_end.o%s} \
93
   %{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s \
104
   %{static:crtend.o%s; \
105
     shared|pie:crtendS.o%s; \
106
     :crtend.o%s} \
107
   crtn.o%s \
94
   " CRTOFFLOADEND
108
   " CRTOFFLOADEND
95
#endif
109
#endif
96
#undef  ENDFILE_SPEC
110
#undef  ENDFILE_SPEC
(-)a/gcc/config/sol2.h (-6 / +6 lines)
Lines 159-167 along with GCC; see the file COPYING3. If not see Link Here
159
			    %{!ansi:values-Xa.o%s}"
159
			    %{!ansi:values-Xa.o%s}"
160
160
161
#if defined(HAVE_LD_PIE) && defined(HAVE_SOLARIS_CRTS)
161
#if defined(HAVE_LD_PIE) && defined(HAVE_SOLARIS_CRTS)
162
#define STARTFILE_CRTBEGIN_SPEC "%{shared:crtbeginS.o%s} \
162
#define STARTFILE_CRTBEGIN_SPEC "%{static:crtbegin.o%s; \
163
				 %{" PIE_SPEC ":crtbeginS.o%s} \
163
				   shared|" PIE_SPEC ":crtbeginS.o%s; \
164
				 %{" NO_PIE_SPEC ":crtbegin.o%s}"
164
				   :crtbegin.o%s}"
165
#else
165
#else
166
#define STARTFILE_CRTBEGIN_SPEC	"crtbegin.o%s"
166
#define STARTFILE_CRTBEGIN_SPEC	"crtbegin.o%s"
167
#endif
167
#endif
Lines 204-212 along with GCC; see the file COPYING3. If not see Link Here
204
#endif
204
#endif
205
205
206
#if defined(HAVE_LD_PIE) && defined(HAVE_SOLARIS_CRTS)
206
#if defined(HAVE_LD_PIE) && defined(HAVE_SOLARIS_CRTS)
207
#define ENDFILE_CRTEND_SPEC "%{shared:crtendS.o%s;: \
207
#define ENDFILE_CRTEND_SPEC "%{static:crtend.o%s; \
208
			       %{" PIE_SPEC ":crtendS.o%s} \
208
			       shared|" PIE_SPEC ":crtendS.o%s; \
209
			       %{" NO_PIE_SPEC ":crtend.o%s}}"
209
			       :crtend.o%s}"
210
#else
210
#else
211
#define ENDFILE_CRTEND_SPEC "crtend.o%s"
211
#define ENDFILE_CRTEND_SPEC "crtend.o%s"
212
#endif
212
#endif
(-)a/gcc/gcc.c (-8 / +7 lines)
Lines 869-876 proper position among the other output files. */ Link Here
869
#endif
869
#endif
870
870
871
#ifdef ENABLE_DEFAULT_PIE
871
#ifdef ENABLE_DEFAULT_PIE
872
#define NO_PIE_SPEC		"no-pie|static"
872
#define PIE_SPEC		"!no-pie"
873
#define PIE_SPEC		NO_PIE_SPEC "|r|shared:;"
874
#define NO_FPIE1_SPEC		"fno-pie"
873
#define NO_FPIE1_SPEC		"fno-pie"
875
#define FPIE1_SPEC		NO_FPIE1_SPEC ":;"
874
#define FPIE1_SPEC		NO_FPIE1_SPEC ":;"
876
#define NO_FPIE2_SPEC		"fno-PIE"
875
#define NO_FPIE2_SPEC		"fno-PIE"
Lines 891-897 proper position among the other output files. */ Link Here
891
#define FPIE_OR_FPIC_SPEC	NO_FPIE_AND_FPIC_SPEC ":;"
890
#define FPIE_OR_FPIC_SPEC	NO_FPIE_AND_FPIC_SPEC ":;"
892
#else
891
#else
893
#define PIE_SPEC		"pie"
892
#define PIE_SPEC		"pie"
894
#define NO_PIE_SPEC		PIE_SPEC "|r|shared:;"
895
#define FPIE1_SPEC		"fpie"
893
#define FPIE1_SPEC		"fpie"
896
#define NO_FPIE1_SPEC		FPIE1_SPEC ":;"
894
#define NO_FPIE1_SPEC		FPIE1_SPEC ":;"
897
#define FPIE2_SPEC		"fPIE"
895
#define FPIE2_SPEC		"fPIE"
Lines 920-926 proper position among the other output files. */ Link Here
920
#else
918
#else
921
#define LD_PIE_SPEC ""
919
#define LD_PIE_SPEC ""
922
#endif
920
#endif
923
#define LINK_PIE_SPEC "%{no-pie:} " "%{" PIE_SPEC ":" LD_PIE_SPEC "} "
921
#define LINK_PIE_SPEC "%{static|shared|r:;" PIE_SPEC ":" LD_PIE_SPEC "} "
924
#endif
922
#endif
925
923
926
#ifndef LINK_BUILDID_SPEC
924
#ifndef LINK_BUILDID_SPEC
Lines 999-1006 proper position among the other output files. */ Link Here
999
#endif
997
#endif
1000
998
1001
/* -u* was put back because both BSD and SysV seem to support it.  */
999
/* -u* was put back because both BSD and SysV seem to support it.  */
1002
/* %{static:} simply prevents an error message if the target machine
1000
/* %{static|no-pie:} simply prevents an error message:
1003
   doesn't handle -static.  */
1001
   1. If the target machine doesn't handle -static.
1002
   2. If PIE isn't enabled by default.
1003
 */
1004
/* We want %{T*} after %{L*} and %D so that it can be used to specify linker
1004
/* We want %{T*} after %{L*} and %D so that it can be used to specify linker
1005
   scripts which exist in user specified directories, or in standard
1005
   scripts which exist in user specified directories, or in standard
1006
   directories.  */
1006
   directories.  */
Lines 1017-1023 proper position among the other output files. */ Link Here
1017
   "%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \
1017
   "%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \
1018
   "%X %{o*} %{e*} %{N} %{n} %{r}\
1018
   "%X %{o*} %{e*} %{N} %{n} %{r}\
1019
    %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}} \
1019
    %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}} \
1020
    %{static:} %{L*} %(mfwrap) %(link_libgcc) " \
1020
    %{static|no-pie:} %{L*} %(mfwrap) %(link_libgcc) " \
1021
    VTABLE_VERIFICATION_SPEC " " SANITIZER_EARLY_SPEC " %o " CHKP_SPEC " \
1021
    VTABLE_VERIFICATION_SPEC " " SANITIZER_EARLY_SPEC " %o " CHKP_SPEC " \
1022
    %{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=*:%*} 1):\
1022
    %{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=*:%*} 1):\
1023
	%:include(libgomp.spec)%(link_gomp)}\
1023
	%:include(libgomp.spec)%(link_gomp)}\
1024
- 

Return to bug 641474