gcc/config: Fix LINK_SPEC on aarch64,m68k,mips,riscv,rs6000
* Results in an internal compiler error: in do_spec_1, at gcc.c:5971
* %{!o*:-o %b} is "no output flag to linker, add one with input name"
* ld blah.o becomes ld blah.o -o blah
* We really shouldn't be playing with this in linker specs... It also
breaks on gcc 11.
Change-Id: I63d0afecd16f25423874419c0ac9496404b2069e
Reviewed-on: https://review.haiku-os.org/c/buildtools/+/4834
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Diff
gcc/gcc/config/aarch64/aarch64-haiku.h | 2 +-
gcc/gcc/config/m68k/haiku.h | 2 +-
gcc/gcc/config/mips/haiku.h | 2 +-
gcc/gcc/config/riscv/haiku.h | 2 +-
gcc/gcc/config/rs6000/haiku.h | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
@@ -67,7 +67,7 @@
#undef LINK_SPEC
#define LINK_SPEC "%{!o*:-o %b} -m " TARGET_LINKER_EMULATION " %{!r:-shared} %{nostart:-e 0} %{shared:-e 0} %{!shared: %{!nostart: -no-undefined}}\
#define LINK_SPEC "-m " TARGET_LINKER_EMULATION " %{!r:-shared} %{nostart:-e 0} %{shared:-e 0} %{!shared: %{!nostart: -no-undefined}}\
%{mbig-endian:-EB} %{mlittle-endian:-EL} " CA53_ERR_835769_SPEC " " CA53_ERR_843419_SPEC " -X"
#endif
@@ -108,7 +108,7 @@
#undef LINK_SPEC
#define LINK_SPEC "%{!o*:-o %b} -m m68kelf %{!r:-shared} %{nostart:-e 0} %{shared:-e 0} %{!shared: %{!nostart: -no-undefined}}"
#define LINK_SPEC "-m m68kelf %{!r:-shared} %{nostart:-e 0} %{shared:-e 0} %{!shared: %{!nostart: -no-undefined}}"
@@ -40,5 +40,5 @@
while (0)
#undef LINK_SPEC
#define LINK_SPEC "%{!o*:-o %b} -m elf_mipsel_haiku %{!r:-shared} %{nostart:-e 0}"
#define LINK_SPEC "-m elf_mipsel_haiku %{!r:-shared} %{nostart:-e 0}"
@@ -54,4 +54,4 @@
#define ICACHE_FLUSH_FUNC "__riscv_flush_icache"
#undef LINK_SPEC
#define LINK_SPEC "%{!o*:-o %b} -melf" XLEN_SPEC "lriscv %{!r:-shared} %{nostart:-e 0} %{shared:-e 0} %{!shared: %{!nostart: -no-undefined}} -X"
#define LINK_SPEC "-melf" XLEN_SPEC "lriscv %{!r:-shared} %{nostart:-e 0} %{shared:-e 0} %{!shared: %{!nostart: -no-undefined}} -X"
@@ -53,4 +53,4 @@
#undef LINK_SPEC
#define LINK_SPEC "%{!o*:-o %b} -m elf32ppchaiku %{!r:-shared} %{nostart:-e 0} %{shared:-e 0} %{!shared: %{!nostart: -no-undefined}}"
#define LINK_SPEC "-m elf32ppchaiku %{!r:-shared} %{nostart:-e 0} %{shared:-e 0} %{!shared: %{!nostart: -no-undefined}}"