--- gcc-4.1.1/gcc/config/i386/linux.h.mps 2006-10-07 16:24:01 +0200 +++ gcc-4.1.1/gcc/config/i386/linux.h 2006-10-07 16:25:04 +0200 @@ -124,9 +124,15 @@ /* Similar to standard Linux, but adding -ffast-math support. */ #undef ENDFILE_SPEC +#ifdef HAVE_LD_PIE #define ENDFILE_SPEC \ "%{ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \ %{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s" +#else +#define ENDFILE_SPEC \ + "%{ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \ + %{shared:crtendS.o%s;:crtend.o%s} crtn.o%s" +#endif /* A C statement (sans semicolon) to output to the stdio stream FILE the assembler definition of uninitialized global DECL named --- gcc-4.1.1/gcc/config/i386/linux64.h.mps 2006-10-07 16:25:14 +0200 +++ gcc-4.1.1/gcc/config/i386/linux64.h 2006-10-07 16:25:52 +0200 @@ -69,9 +69,15 @@ /* Similar to standard Linux, but adding -ffast-math support. */ #undef ENDFILE_SPEC +#ifdef HAVE_LD_PIE #define ENDFILE_SPEC \ "%{ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \ %{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s" +#else +#define ENDFILE_SPEC \ + "%{ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \ + %{shared:crtendS.o%s;:crtend.o%s} crtn.o%s" +#endif #define MULTILIB_DEFAULTS { "m64" }