Message ID | Pine.LNX.4.64.1101140004300.6059@digraph.polyomino.org.uk |
---|---|
State | New |
Headers | show |
On Fri, Jan 14, 2011 at 1:05 AM, Joseph S. Myers <joseph@codesourcery.com> wrote: > Various */linux*.h headers have %{!ibcs:...} specs, disabling parts of > the linker spec if -ibcs is passed. > > iBCS was the *Intel* Binary Compatibility Standard, making these specs > obviously irrelevant in all but one of the headers containing them. > Even on x86, the option only disabled part of the specs (that included > the Linux dynamic linker specification) rather than otherwise making > anything iBCS-compatible, and iBCS support for Linux has long been > bitrotten (see the log message for Linux kernel commit > 612a95b4e053b8a06319049191fd2dce9c970189, removing some relics of iBCS > support three years ago, "ibcs2 support has never been supported on > 2.6 kernels as far as I know"). Furthermore, the -ibcs option could > not have worked for any compilation command that compiled sources as > well as linking, because -i* options are passed to cc1 etc. and -ibcs > would then have been rejected as an option not known by cc1 since not > listed in any .opt file. Thus, this patch removes the !ibcs > conditionals, simplifying the specs in question. OK to commit? Ok. Thanks, Richard. > > 2011-01-13 Joseph Myers <joseph@codesourcery.com> > > * config/i386/linux.h (LINK_SPEC): Don't use %{!ibcs:} conditional. > * config/m32r/linux.h (LINK_SPEC): Likewise. > * config/mips/linux.h (LINK_SPEC): Likewise. > * config/mips/linux64.h (LINK_SPEC): Likewise. > * config/sparc/linux.h (LINK_SPEC): Likewise. > * config/sparc/linux64.h (LINK_ARCH32_SPEC, LINK_ARCH64_SPEC, > LINK_SPEC): Likewise. > * config/xtensa/linux.h (LINK_SPEC): Likewise. > > diff -rupN --exclude=.svn gcc-mainline-4/gcc/config/i386/linux.h gcc-mainline/gcc/config/i386/linux.h > --- gcc-mainline-4/gcc/config/i386/linux.h 2010-12-09 05:38:51.000000000 -0800 > +++ gcc-mainline/gcc/config/i386/linux.h 2011-01-12 14:05:57.000000000 -0800 > @@ -106,11 +106,10 @@ along with GCC; see the file COPYING3. > #undef LINK_SPEC > #define LINK_SPEC "-m %(link_emulation) %{shared:-shared} \ > %{!shared: \ > - %{!ibcs: \ > - %{!static: \ > - %{rdynamic:-export-dynamic} \ > - -dynamic-linker %(dynamic_linker)} \ > - %{static:-static}}}" > + %{!static: \ > + %{rdynamic:-export-dynamic} \ > + -dynamic-linker %(dynamic_linker)} \ > + %{static:-static}}" > > /* Similar to standard Linux, but adding -ffast-math support. */ > #undef ENDFILE_SPEC > diff -rupN --exclude=.svn gcc-mainline-4/gcc/config/m32r/linux.h gcc-mainline/gcc/config/m32r/linux.h > --- gcc-mainline-4/gcc/config/m32r/linux.h 2010-12-09 05:38:50.000000000 -0800 > +++ gcc-mainline/gcc/config/m32r/linux.h 2011-01-12 14:06:29.000000000 -0800 > @@ -52,19 +52,17 @@ > #if TARGET_LITTLE_ENDIAN > #define LINK_SPEC "%(link_cpu) -m m32rlelf_linux %{shared:-shared} \ > %{!shared: \ > - %{!ibcs: \ > - %{!static: \ > - %{rdynamic:-export-dynamic} \ > - -dynamic-linker " LINUX_DYNAMIC_LINKER "} \ > - %{static:-static}}}" > + %{!static: \ > + %{rdynamic:-export-dynamic} \ > + -dynamic-linker " LINUX_DYNAMIC_LINKER "} \ > + %{static:-static}}" > #else > #define LINK_SPEC "%(link_cpu) -m m32relf_linux %{shared:-shared} \ > %{!shared: \ > - %{!ibcs: \ > - %{!static: \ > - %{rdynamic:-export-dynamic} \ > - -dynamic-linker " LINUX_DYNAMIC_LINKER "} \ > - %{static:-static}}}" > + %{!static: \ > + %{rdynamic:-export-dynamic} \ > + -dynamic-linker " LINUX_DYNAMIC_LINKER "} \ > + %{static:-static}}" > #endif > > #undef LIB_SPEC > diff -rupN --exclude=.svn gcc-mainline-4/gcc/config/mips/linux.h gcc-mainline/gcc/config/mips/linux.h > --- gcc-mainline-4/gcc/config/mips/linux.h 2010-12-09 05:38:56.000000000 -0800 > +++ gcc-mainline/gcc/config/mips/linux.h 2011-01-12 14:06:50.000000000 -0800 > @@ -69,11 +69,10 @@ along with GCC; see the file COPYING3. > "%(endian_spec) \ > %{shared:-shared} \ > %{!shared: \ > - %{!ibcs: \ > - %{!static: \ > - %{rdynamic:-export-dynamic} \ > - -dynamic-linker " LINUX_DYNAMIC_LINKER "} \ > - %{static:-static}}}" > + %{!static: \ > + %{rdynamic:-export-dynamic} \ > + -dynamic-linker " LINUX_DYNAMIC_LINKER "} \ > + %{static:-static}}" > > #undef SUBTARGET_ASM_SPEC > #define SUBTARGET_ASM_SPEC \ > diff -rupN --exclude=.svn gcc-mainline-4/gcc/config/mips/linux64.h gcc-mainline/gcc/config/mips/linux64.h > --- gcc-mainline-4/gcc/config/mips/linux64.h 2010-12-09 05:38:56.000000000 -0800 > +++ gcc-mainline/gcc/config/mips/linux64.h 2011-01-12 14:07:22.000000000 -0800 > @@ -51,13 +51,12 @@ along with GCC; see the file COPYING3. > %{call_shared} %{no_archive} %{exact_version} \ > %(endian_spec) \ > %{!shared: \ > - %{!ibcs: \ > - %{!static: \ > - %{rdynamic:-export-dynamic} \ > - %{mabi=n32: -dynamic-linker " LINUX_DYNAMIC_LINKERN32 "} \ > - %{mabi=64: -dynamic-linker " LINUX_DYNAMIC_LINKER64 "} \ > - %{mabi=32: -dynamic-linker " LINUX_DYNAMIC_LINKER32 "}} \ > - %{static:-static}}} \ > + %{!static: \ > + %{rdynamic:-export-dynamic} \ > + %{mabi=n32: -dynamic-linker " LINUX_DYNAMIC_LINKERN32 "} \ > + %{mabi=64: -dynamic-linker " LINUX_DYNAMIC_LINKER64 "} \ > + %{mabi=32: -dynamic-linker " LINUX_DYNAMIC_LINKER32 "}} \ > + %{static:-static}} \ > %{mabi=n32:-melf32%{EB:b}%{EL:l}tsmipn32} \ > %{mabi=64:-melf64%{EB:b}%{EL:l}tsmip} \ > %{mabi=32:-melf32%{EB:b}%{EL:l}tsmip}" > diff -rupN --exclude=.svn gcc-mainline-4/gcc/config/sparc/linux.h gcc-mainline/gcc/config/sparc/linux.h > --- gcc-mainline-4/gcc/config/sparc/linux.h 2011-01-12 14:03:26.000000000 -0800 > +++ gcc-mainline/gcc/config/sparc/linux.h 2011-01-12 14:07:41.000000000 -0800 > @@ -81,11 +81,10 @@ along with GCC; see the file COPYING3. > #define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \ > %{!mno-relax:%{!r:-relax}} \ > %{!shared: \ > - %{!ibcs: \ > - %{!static: \ > - %{rdynamic:-export-dynamic} \ > - -dynamic-linker " LINUX_DYNAMIC_LINKER "} \ > - %{static:-static}}}" > + %{!static: \ > + %{rdynamic:-export-dynamic} \ > + -dynamic-linker " LINUX_DYNAMIC_LINKER "} \ > + %{static:-static}}" > > /* It's safe to pass -s always, even if -g is not used. */ > #undef ASM_SPEC > diff -rupN --exclude=.svn gcc-mainline-4/gcc/config/sparc/linux64.h gcc-mainline/gcc/config/sparc/linux64.h > --- gcc-mainline-4/gcc/config/sparc/linux64.h 2011-01-12 14:03:46.000000000 -0800 > +++ gcc-mainline/gcc/config/sparc/linux64.h 2011-01-12 14:08:52.000000000 -0800 > @@ -115,20 +115,18 @@ along with GCC; see the file COPYING3. > > #define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,%R/usr/lib %{shared:-shared} \ > %{!shared: \ > - %{!ibcs: \ > - %{!static: \ > - %{rdynamic:-export-dynamic} \ > - -dynamic-linker " LINUX_DYNAMIC_LINKER32 "} \ > - %{static:-static}}} \ > + %{!static: \ > + %{rdynamic:-export-dynamic} \ > + -dynamic-linker " LINUX_DYNAMIC_LINKER32 "} \ > + %{static:-static}} \ > " > > #define LINK_ARCH64_SPEC "-m elf64_sparc -Y P,%R/usr/lib64 %{shared:-shared} \ > %{!shared: \ > - %{!ibcs: \ > - %{!static: \ > - %{rdynamic:-export-dynamic} \ > - -dynamic-linker " LINUX_DYNAMIC_LINKER64 "} \ > - %{static:-static}}} \ > + %{!static: \ > + %{rdynamic:-export-dynamic} \ > + -dynamic-linker " LINUX_DYNAMIC_LINKER64 "} \ > + %{static:-static}} \ > " > > #define LINK_ARCH_SPEC "\ > @@ -205,11 +203,10 @@ along with GCC; see the file COPYING3. > #undef LINK_SPEC > #define LINK_SPEC "-m elf64_sparc -Y P,%R/usr/lib64 %{shared:-shared} \ > %{!shared: \ > - %{!ibcs: \ > - %{!static: \ > - %{rdynamic:-export-dynamic} \ > - -dynamic-linker " LINUX_DYNAMIC_LINKER64 "} \ > - %{static:-static}}} \ > + %{!static: \ > + %{rdynamic:-export-dynamic} \ > + -dynamic-linker " LINUX_DYNAMIC_LINKER64 "} \ > + %{static:-static}} \ > %{mlittle-endian:-EL} \ > %{!mno-relax:%{!r:-relax}} \ > " > diff -rupN --exclude=.svn gcc-mainline-4/gcc/config/xtensa/linux.h gcc-mainline/gcc/config/xtensa/linux.h > --- gcc-mainline-4/gcc/config/xtensa/linux.h 2010-12-15 04:59:41.000000000 -0800 > +++ gcc-mainline/gcc/config/xtensa/linux.h 2011-01-12 14:09:12.000000000 -0800 > @@ -54,11 +54,10 @@ along with GCC; see the file COPYING3. > #define LINK_SPEC \ > "%{shared:-shared} \ > %{!shared: \ > - %{!ibcs: \ > - %{!static: \ > - %{rdynamic:-export-dynamic} \ > - -dynamic-linker " LINUX_DYNAMIC_LINKER "} \ > - %{static:-static}}}" > + %{!static: \ > + %{rdynamic:-export-dynamic} \ > + -dynamic-linker " LINUX_DYNAMIC_LINKER "} \ > + %{static:-static}}" > > #undef LOCAL_LABEL_PREFIX > #define LOCAL_LABEL_PREFIX "." > > -- > Joseph S. Myers > joseph@codesourcery.com >
diff -rupN --exclude=.svn gcc-mainline-4/gcc/config/i386/linux.h gcc-mainline/gcc/config/i386/linux.h --- gcc-mainline-4/gcc/config/i386/linux.h 2010-12-09 05:38:51.000000000 -0800 +++ gcc-mainline/gcc/config/i386/linux.h 2011-01-12 14:05:57.000000000 -0800 @@ -106,11 +106,10 @@ along with GCC; see the file COPYING3. #undef LINK_SPEC #define LINK_SPEC "-m %(link_emulation) %{shared:-shared} \ %{!shared: \ - %{!ibcs: \ - %{!static: \ - %{rdynamic:-export-dynamic} \ - -dynamic-linker %(dynamic_linker)} \ - %{static:-static}}}" + %{!static: \ + %{rdynamic:-export-dynamic} \ + -dynamic-linker %(dynamic_linker)} \ + %{static:-static}}" /* Similar to standard Linux, but adding -ffast-math support. */ #undef ENDFILE_SPEC diff -rupN --exclude=.svn gcc-mainline-4/gcc/config/m32r/linux.h gcc-mainline/gcc/config/m32r/linux.h --- gcc-mainline-4/gcc/config/m32r/linux.h 2010-12-09 05:38:50.000000000 -0800 +++ gcc-mainline/gcc/config/m32r/linux.h 2011-01-12 14:06:29.000000000 -0800 @@ -52,19 +52,17 @@ #if TARGET_LITTLE_ENDIAN #define LINK_SPEC "%(link_cpu) -m m32rlelf_linux %{shared:-shared} \ %{!shared: \ - %{!ibcs: \ - %{!static: \ - %{rdynamic:-export-dynamic} \ - -dynamic-linker " LINUX_DYNAMIC_LINKER "} \ - %{static:-static}}}" + %{!static: \ + %{rdynamic:-export-dynamic} \ + -dynamic-linker " LINUX_DYNAMIC_LINKER "} \ + %{static:-static}}" #else #define LINK_SPEC "%(link_cpu) -m m32relf_linux %{shared:-shared} \ %{!shared: \ - %{!ibcs: \ - %{!static: \ - %{rdynamic:-export-dynamic} \ - -dynamic-linker " LINUX_DYNAMIC_LINKER "} \ - %{static:-static}}}" + %{!static: \ + %{rdynamic:-export-dynamic} \ + -dynamic-linker " LINUX_DYNAMIC_LINKER "} \ + %{static:-static}}" #endif #undef LIB_SPEC diff -rupN --exclude=.svn gcc-mainline-4/gcc/config/mips/linux.h gcc-mainline/gcc/config/mips/linux.h --- gcc-mainline-4/gcc/config/mips/linux.h 2010-12-09 05:38:56.000000000 -0800 +++ gcc-mainline/gcc/config/mips/linux.h 2011-01-12 14:06:50.000000000 -0800 @@ -69,11 +69,10 @@ along with GCC; see the file COPYING3. "%(endian_spec) \ %{shared:-shared} \ %{!shared: \ - %{!ibcs: \ - %{!static: \ - %{rdynamic:-export-dynamic} \ - -dynamic-linker " LINUX_DYNAMIC_LINKER "} \ - %{static:-static}}}" + %{!static: \ + %{rdynamic:-export-dynamic} \ + -dynamic-linker " LINUX_DYNAMIC_LINKER "} \ + %{static:-static}}" #undef SUBTARGET_ASM_SPEC #define SUBTARGET_ASM_SPEC \ diff -rupN --exclude=.svn gcc-mainline-4/gcc/config/mips/linux64.h gcc-mainline/gcc/config/mips/linux64.h --- gcc-mainline-4/gcc/config/mips/linux64.h 2010-12-09 05:38:56.000000000 -0800 +++ gcc-mainline/gcc/config/mips/linux64.h 2011-01-12 14:07:22.000000000 -0800 @@ -51,13 +51,12 @@ along with GCC; see the file COPYING3. %{call_shared} %{no_archive} %{exact_version} \ %(endian_spec) \ %{!shared: \ - %{!ibcs: \ - %{!static: \ - %{rdynamic:-export-dynamic} \ - %{mabi=n32: -dynamic-linker " LINUX_DYNAMIC_LINKERN32 "} \ - %{mabi=64: -dynamic-linker " LINUX_DYNAMIC_LINKER64 "} \ - %{mabi=32: -dynamic-linker " LINUX_DYNAMIC_LINKER32 "}} \ - %{static:-static}}} \ + %{!static: \ + %{rdynamic:-export-dynamic} \ + %{mabi=n32: -dynamic-linker " LINUX_DYNAMIC_LINKERN32 "} \ + %{mabi=64: -dynamic-linker " LINUX_DYNAMIC_LINKER64 "} \ + %{mabi=32: -dynamic-linker " LINUX_DYNAMIC_LINKER32 "}} \ + %{static:-static}} \ %{mabi=n32:-melf32%{EB:b}%{EL:l}tsmipn32} \ %{mabi=64:-melf64%{EB:b}%{EL:l}tsmip} \ %{mabi=32:-melf32%{EB:b}%{EL:l}tsmip}" diff -rupN --exclude=.svn gcc-mainline-4/gcc/config/sparc/linux.h gcc-mainline/gcc/config/sparc/linux.h --- gcc-mainline-4/gcc/config/sparc/linux.h 2011-01-12 14:03:26.000000000 -0800 +++ gcc-mainline/gcc/config/sparc/linux.h 2011-01-12 14:07:41.000000000 -0800 @@ -81,11 +81,10 @@ along with GCC; see the file COPYING3. #define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \ %{!mno-relax:%{!r:-relax}} \ %{!shared: \ - %{!ibcs: \ - %{!static: \ - %{rdynamic:-export-dynamic} \ - -dynamic-linker " LINUX_DYNAMIC_LINKER "} \ - %{static:-static}}}" + %{!static: \ + %{rdynamic:-export-dynamic} \ + -dynamic-linker " LINUX_DYNAMIC_LINKER "} \ + %{static:-static}}" /* It's safe to pass -s always, even if -g is not used. */ #undef ASM_SPEC diff -rupN --exclude=.svn gcc-mainline-4/gcc/config/sparc/linux64.h gcc-mainline/gcc/config/sparc/linux64.h --- gcc-mainline-4/gcc/config/sparc/linux64.h 2011-01-12 14:03:46.000000000 -0800 +++ gcc-mainline/gcc/config/sparc/linux64.h 2011-01-12 14:08:52.000000000 -0800 @@ -115,20 +115,18 @@ along with GCC; see the file COPYING3. #define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,%R/usr/lib %{shared:-shared} \ %{!shared: \ - %{!ibcs: \ - %{!static: \ - %{rdynamic:-export-dynamic} \ - -dynamic-linker " LINUX_DYNAMIC_LINKER32 "} \ - %{static:-static}}} \ + %{!static: \ + %{rdynamic:-export-dynamic} \ + -dynamic-linker " LINUX_DYNAMIC_LINKER32 "} \ + %{static:-static}} \ " #define LINK_ARCH64_SPEC "-m elf64_sparc -Y P,%R/usr/lib64 %{shared:-shared} \ %{!shared: \ - %{!ibcs: \ - %{!static: \ - %{rdynamic:-export-dynamic} \ - -dynamic-linker " LINUX_DYNAMIC_LINKER64 "} \ - %{static:-static}}} \ + %{!static: \ + %{rdynamic:-export-dynamic} \ + -dynamic-linker " LINUX_DYNAMIC_LINKER64 "} \ + %{static:-static}} \ " #define LINK_ARCH_SPEC "\ @@ -205,11 +203,10 @@ along with GCC; see the file COPYING3. #undef LINK_SPEC #define LINK_SPEC "-m elf64_sparc -Y P,%R/usr/lib64 %{shared:-shared} \ %{!shared: \ - %{!ibcs: \ - %{!static: \ - %{rdynamic:-export-dynamic} \ - -dynamic-linker " LINUX_DYNAMIC_LINKER64 "} \ - %{static:-static}}} \ + %{!static: \ + %{rdynamic:-export-dynamic} \ + -dynamic-linker " LINUX_DYNAMIC_LINKER64 "} \ + %{static:-static}} \ %{mlittle-endian:-EL} \ %{!mno-relax:%{!r:-relax}} \ " diff -rupN --exclude=.svn gcc-mainline-4/gcc/config/xtensa/linux.h gcc-mainline/gcc/config/xtensa/linux.h --- gcc-mainline-4/gcc/config/xtensa/linux.h 2010-12-15 04:59:41.000000000 -0800 +++ gcc-mainline/gcc/config/xtensa/linux.h 2011-01-12 14:09:12.000000000 -0800 @@ -54,11 +54,10 @@ along with GCC; see the file COPYING3. #define LINK_SPEC \ "%{shared:-shared} \ %{!shared: \ - %{!ibcs: \ - %{!static: \ - %{rdynamic:-export-dynamic} \ - -dynamic-linker " LINUX_DYNAMIC_LINKER "} \ - %{static:-static}}}" + %{!static: \ + %{rdynamic:-export-dynamic} \ + -dynamic-linker " LINUX_DYNAMIC_LINKER "} \ + %{static:-static}}" #undef LOCAL_LABEL_PREFIX #define LOCAL_LABEL_PREFIX "."