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>
This commit is contained in:
Alexander von Gluck IV 2021-12-28 10:44:56 -06:00 committed by Alex von Gluck IV
parent 55771191ca
commit 7b6c9e88a2
5 changed files with 5 additions and 5 deletions

View File

@ -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 /* GCC_AARCH64_HAIKU_H */

View File

@ -108,7 +108,7 @@ Boston, MA 02110-1301, USA. */
#undef LINK_SPEC
/*#define LINK_SPEC "%{!o*:-o %b} -m elf_m68k_haiku -shared -no-undefined %{nostart:-e 0}"*/
#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}}"
/* XXX: not sure for the rest there... */

View File

@ -40,5 +40,5 @@ Boston, MA 02111-1307, USA. */
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}"

View File

@ -54,4 +54,4 @@ along with GCC; see the file COPYING3. If not see
#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"

View File

@ -53,4 +53,4 @@ Boston, MA 02111-1307, USA. */
/* If ELF is the default format, we should not use /lib/elf. */
#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}}"