Explicitly link libgcc and cleanup search paths.
* Adjust the libgcc spec to actually link against libgcc explicitly
(it is no longer included in libroot.so on anything except x86_gcc2).
* Apply --as-needed when linking against libgcc_s.so
* Drop search paths that no longer exist (/boot/common/...).
Diff
gcc/gcc/config/haiku.h | 23 +++++++++--------------
1 file changed, 9 insertions(+), 14 deletions(-)
@@ -55,13 +55,11 @@
#undef LIB_SPEC
#define LIB_SPEC "-lroot"
/* ??? This is gonna be lovely when the next release of gcc has
some new symbol in, so that links start failing. */
#undef LIBGCC_SPEC
#define LIBGCC_SPEC ""
#ifdef HAVE_LD_AS_NEEDED
#define USE_LD_AS_NEEDED 1
#endif
#undef STARTFILE_SPEC
#define STARTFILE_SPEC "crti.o%s crtbeginS.o%s %{!shared:%{!nostart:start_dyn.o%s}} init_term_dyn.o%s"
@@ -181,9 +179,9 @@
cause nasty problems if we override it. */
#define LIBRARY_PATH_ENV "BELIBRARIES"
/* With STANDARD_STARTFILE_PREFIX_{1,2} set to "/boot/common/develop/lib/"
and "/boot/system/develop/lib/", MD_STARTFILE_PREFIX adds the last one of the
standard paths. The user specific paths are set via LIBRARY_PATH_ENV. */
/* Set STANDARD_STARTFILE_PREFIX_1 set to "/boot/system/develop/lib/", or the
respective secondary architecture path. The user specific paths are set via
LIBRARY_PATH_ENV. */
#undef STANDARD_STARTFILE_PREFIX_1
#undef STANDARD_STARTFILE_PREFIX_2
#undef MD_STARTFILE_PREFIX
@@ -191,15 +189,12 @@
#ifdef HYBRID_SECONDARY
#define STANDARD_STARTFILE_PREFIX_1 \
"/boot/common/develop/lib/" HYBRID_SECONDARY "/"
"/boot/system/non-packaged/develop/lib/" HYBRID_SECONDARY "/"
#define STANDARD_STARTFILE_PREFIX_2 \
"/boot/system/develop/lib/" HYBRID_SECONDARY "/"
#define MD_STARTFILE_PREFIX \
"/boot/common/non-packaged/develop/lib/" HYBRID_SECONDARY "/"
#else
#define STANDARD_STARTFILE_PREFIX_1 "/boot/common/develop/lib/"
#define STANDARD_STARTFILE_PREFIX_1 "/boot/system/non-packaged/develop/lib/"
#define STANDARD_STARTFILE_PREFIX_2 "/boot/system/develop/lib/"
#define MD_STARTFILE_PREFIX "/boot/common/non-packaged/develop/lib/"
#endif