* config/m32r/linux.h (STARTFILE_SPEC): Support PIE.
(ENDFILE_SPEC): Likewise.
* config/m32r/m32r.h (ASM_SPEC): Likewise.
From-SVN: r101757
+2005-07-08 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
+
+ * config/m32r/linux.h (STARTFILE_SPEC): Support PIE.
+ (ENDFILE_SPEC): Likewise.
+ * config/m32r/m32r.h (ASM_SPEC): Likewise.
+
2005-07-08 David Billinghurst <David.Billinghurst@riotinto.com>
* final.c: Include sdbout.h when required.
%{profile:-lc_p} %{!profile: -lc}}"
#undef STARTFILE_SPEC
+#if defined HAVE_LD_PIE
+#define STARTFILE_SPEC \
+ "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \
+ crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
+#else
#define STARTFILE_SPEC \
"%{!shared: \
%{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} %{!p:crt1.o%s}}}\
crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
+#endif
#undef ENDFILE_SPEC
#define ENDFILE_SPEC \
- "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
+ "%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
#undef SUBTARGET_CPP_SPEC
#define SUBTARGET_CPP_SPEC "\
/* Options to pass on to the assembler. */
#undef ASM_SPEC
-#define ASM_SPEC "%{v} %(asm_cpu) %(relax) %{fpic:-K PIC} %{fPIC:-K PIC}"
+#define ASM_SPEC "%{v} %(asm_cpu) %(relax) %{fpic|fpie:-K PIC} %{fPIC|fPIE:-K PIC}"
#define LINK_SPEC "%{v} %(link_cpu) %(relax)"