[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Solaris build broken

From: Dave Love
Subject: Solaris build broken
Date: Thu, 18 Mar 2004 15:15:23 +0000
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.2 (gnu/linux)

You can't currently build on Solaris under normal circumstances
because -znocombreloc is added to the linker flags.  That isn't valid
for the Sun linker.  A comment says it's to build with GNU ld, but as
far as I know, you shouldn't actually use GNU ld on Solaris -- that
was certainly the case in the past.  (eggert could doubtless say.)
Anyhow, I'm sure most don't.

-znocombreloc should only be used with GNU ld (or, I guess, another
linker that accepts it), and must be used with a recent GNU ld on any
platform.  Thus configure should test for it.

This change does that to work generally.  (Just adding to LDFLAGS is
probably perfectly fine and avoids more messing with the horrid cpp
stuff.)  Other s/*.h files should be changed accordingly.  Tested on
Solaris 9 and Debian/SPARC after purging s/gnu-linux.h.

2004-03-18  Dave Love  <address@hidden>

        * configure.in: Test ld -znocombreloc.

--- configure.in~       27 Jan 2004 16:46:34 -0000
+++ configure.in        18 Mar 2004 15:04:28 -0000
@@ -1273,6 +1277,18 @@ then
   ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
+dnl We need -znocombreloc if we're using a relatively recent GNU ld.
+dnl If we can link with the flag, it shouldn't do any harm anyhow.
+dnl (Don't use `-z nocombreloc' as -z has not arg on Irix.)
+LDFLAGS="$LDFLAGS -znocombreloc"
+AC_MSG_CHECKING([For -znocombreloc])
+AC_LINK_IFELSE([main(){return 0;}],
+  [AC_MSG_RESULT(yes)],
+  [AC_MSG_RESULT(no)])
 dnl checks for Unix variants
2004-03-18  Dave Love  <address@hidden>

        * s/sol2-6.h: Revert last change.

--- src/s/sol2-6.h~    4 Mar 2004 17:18:38 -0000
+++ src/s/sol2-6.h    18 Mar 2004 14:44:38 -0000
@@ -7,10 +7,5 @@
 #define UNEXEC unexsol.o
-/* "Dennis McRitchie" <address@hidden> reported failures
-   with GNU ld without this.  */
-#define LD_SWITCH_SYSTEM_TEMACS -znocombreloc
 /* arch-tag: 71ea3857-89dc-4395-9623-77964e6ed3ca
    (do not change this comment) */

reply via email to

[Prev in Thread] Current Thread [Next in Thread]