⛏️ index : buildtools.git

author Oliver Tappe <zooey@hirschkaefer.de> 2014-07-22 16:03:46.0 +02:00:00
committer Oliver Tappe <zooey@hirschkaefer.de> 2014-07-23 9:18:18.0 +02:00:00
commit
ec31cc6bfcc5cd3f93208fbf2c667074a19c9ba4 [patch]
tree
87a8d0fad9398d4ae65e0c2ff486364bd233bdd9
parent
affbe90c4cdaa78bec5e37c4ab25c6c8c2e32600
download
ec31cc6bfcc5cd3f93208fbf2c667074a19c9ba4.tar.gz

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(-)

diff --git a/gcc/gcc/config/haiku.h b/gcc/gcc/config/haiku.h
index 9dcda0e..0331d2d 100644
--- a/gcc/gcc/config/haiku.h
+++ b/gcc/gcc/config/haiku.h
@@ -55,13 +55,11 @@
#undef LIB_SPEC
#define LIB_SPEC "-lroot"

/* gcc runtime lib is built into libroot.so on Haiku */
/* ??? 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 ""
/* Use --as-needed -lgcc_s for eh support.  */
#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
/* For a secondary compiler on a hybrid system, use alternative search paths.*/
#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 /* HYBRID_SECONDARY */
#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 /* HYBRID_SECONDARY */

/* Haiku doesn't have a separate math library.  */