From beaf9299fca6296ac8e407c5c090e2e43c65cf3f Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Mon, 23 Feb 2009 20:51:17 +0000 Subject: [PATCH] * Amend link and startfile specs for the -shared option. * Remove the part of the link specs that automatically names the output after the last source file. Therefore we'll produce a.out for now. Sadly the %b variable does also evaluate to libraries in GCC4 which makes it unusable for this case. A "gcc file.cpp -lstdc++" would for example produce an output named libstdc++... git-svn-id: file:///srv/svn/repos/haiku/buildtools/trunk@29297 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- gcc/gcc/config/haiku.h | 2 +- gcc/gcc/config/i386/haiku.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/gcc/config/haiku.h b/gcc/gcc/config/haiku.h index 88fb6fe..6d6b87c 100644 --- a/gcc/gcc/config/haiku.h +++ b/gcc/gcc/config/haiku.h @@ -62,7 +62,7 @@ it was i386-mcount.o, but that doesn't exist in gcc 2.95.3 either. */ #undef STARTFILE_SPEC -#define STARTFILE_SPEC "crti.o%s crtbegin.o%s %{!nostart:start_dyn.o%s} init_term_dyn.o%s %{p:mcount.o%s}" +#define STARTFILE_SPEC "crti.o%s crtbegin.o%s %{!shared:%{!nostart:start_dyn.o%s}} init_term_dyn.o%s %{p:mcount.o%s}" #undef ENDFILE_SPEC #define ENDFILE_SPEC "crtend.o%s crtn.o%s" diff --git a/gcc/gcc/config/i386/haiku.h b/gcc/gcc/config/i386/haiku.h index 08f7db1..46f5c96 100644 --- a/gcc/gcc/config/i386/haiku.h +++ b/gcc/gcc/config/i386/haiku.h @@ -69,7 +69,7 @@ /* If ELF is the default format, we should not use /lib/elf. */ #undef LINK_SPEC -#define LINK_SPEC "%{!o*:-o %b} -m elf_i386_haiku -shared -no-undefined -Bsymbolic %{nostart:-e 0}" +#define LINK_SPEC "-m elf_i386_haiku -shared -no-undefined -Bsymbolic %{nostart:-e 0} %{shared:-e 0}" /* A C statement (sans semicolon) to output to the stdio stream FILE the assembler definition of uninitialized global DECL named -- gitore 0.2.2