Right to the point: I could use a way to get rid of the -nostdlib option to
gcc in Solaris without having to edit SunOS.cmake. Thanks.
The whole story:
A year ago I figured out that I had to get rid of the -nostdlib option to
get VXL execs to run when building using shared libs in Solaris. There was
a big debate on this list over the right way to make shared libs with gcc.
For me, the bottom line is that the programs segfault when I use -nostdlib
and run fine when I omit it.
Here is a link to some advice from Jason Merrill, who should know,
For the past year I've been using the following cache entries to get rid of
I see things have changed. The -nostdlib option has snuck back in, causing
many of my VXL/Solaris/Shared tests to fail. These seem to be the new
relevant cache entries,
However, option -nostdlib is still used no matter what the above entries are
set to. I see that it is added in SunOS.cmake. I tried this in the cache,
But, of course, this will not work since these are ordinary variables, not
in the cache.
So, can a means to remove the -nostdlib option be added to the way
configuration is done in SunOS.cmake?
I build part of VXL with the following commands. vsl_test_all segfaulted.
The, I removed "-nostdlib" from SunOS.cmake and repeated. vsl_test_all ran
perfectly. I'm sure this will fix all of the other segfaulting tests.
# remove and configure
rm -rf $SRW/sol_bld
mkdir -p $SRW/sol_bld
cat > CMakeCache.txt <<EOF
# build vsl tests
# seg fault core dump unless I remove -nostdlib
Here is some information on the system,
0% uname -a
SunOS caleb 5.8 Generic_108528-17 sun4u sparc
0% gcc --version
0% ld --version
GNU ld 2.11.2
Copyright 2001 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License. This program has absolutely no warranty.
I'm using cmake 1.6.0, compiled from the source.