[Top][All Lists]

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

lib-ignore: link error with Sun C++ compiler

From: Bruno Haible
Subject: lib-ignore: link error with Sun C++ compiler
Date: Sun, 7 Mar 2010 22:16:39 +0100
User-agent: KMail/1.9.9


With the C++ tests, I'm seeing this link error on Solaris, with Sun C and Sun 

  CC -O    -L/home/haible/prefix-x86/lib -Wl,-z,ignore  -o test-langinfo-c++ 
test-langinfo-c++.o ../gllib/libgnu.a -lm -lm -lm -lm -lm -lm -lm -lm -lm -lm 
  CC: Warning: Option -Wl,-z,ignore passed to ld, if ld is invoked, ignored 
  ld: fatal: option -z has illegal argument `,ignore'
  ld: fatal: Flags processing errors
  *** Error code 1

The reason is that the flag -Wl,-z,ignore is accepted by the C compiler (cc), 
leads to an error with the C++ compiler (CC).

Can someone please look at this? I'm applying this crude workaround below. But
this will not fix the error the next time someone tries to build coreutils with
Solaris tools.

2010-03-07  Bruno Haible  <address@hidden>

        * gnulib-tool (func_create_testdir): Don't use 'lib-ignore' module
        among default module list.

--- gnulib-tool.orig    Sun Mar  7 22:11:17 2010
+++ gnulib-tool Sun Mar  7 22:11:14 2010
@@ -4410,8 +4410,9 @@
     # All modules together.
     # Except config-h, which breaks all modules which use HAVE_CONFIG_H.
     # Except ftruncate, mountlist, which abort the configuration on mingw. 
+    # Except lib-ignore, which leads to link errors when Sun C++ is used. 
-    modules=`for m in $modules; do case $m in config-h | ftruncate | 
mountlist) ;; *) echo $m;; esac; done`
+    modules=`for m in $modules; do case $m in config-h | ftruncate | mountlist 
| lib-ignore) ;; *) echo $m;; esac; done`
   modules=`for m in $modules; do echo $m; done | LC_ALL=C sort -u`

reply via email to

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