autoconf
[Top][All Lists]
Advanced

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

How can I test if the GNU or Sun linker is used?


From: Dr. David Kirkby
Subject: How can I test if the GNU or Sun linker is used?
Date: Fri, 07 Aug 2009 02:51:11 +0100
User-agent: Thunderbird 2.0.0.19 (X11/20090218)

When building gcc on Solaris, its possible to built it 4 ways.

* Use the Sun linker and Sun assembler
* Use the Sun linker and GNU assembler
* Use the GNU assembler and Sun linker
* Use the GNU linker and GNU assembler.

I'd like to be able to test whether gcc uses the Sun or GNU linker, and Sun or GNU assembler (the linker being the more important of the two to me).

This gcc on Solaris (SPARC) for example is build with both the Sun linker and assembler.

../gcc-4.2.4/configure --prefix=/usr/local/gcc-4.2.4-sun-linker/ --with-as=/usr/ccs/bin/as --without-gnu-as --with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-languages=c,c++,fortran --with-mpfr-include=/usr/local/include --with-mpfr-lib=/usr/local/lib --with-gmp-include=/usr/local/include --with-gmp-lib=/usr/local/lib
Thread model: posix
gcc version 4.2.4

This version of gcc on an OpenSolaris machine uses the GNU assembler, but the Sun linker.

gcc -v
Reading specs from /usr/sfw/lib/gcc/i386-pc-solaris2.11/3.4.3/specs
Configured with: /builds2/sfwnv-gate/usr/src/cmd/gcc/gcc-3.4.3/configure --prefix=/usr/sfw --with-as=/usr/sfw/bin/gas --with-gnu-as --with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-languages=c,c++,f77,objc --enable-shared
Thread model: posix
gcc version 3.4.3 (csl-sol210-3_4-20050802)



Parsing the output of gcc -v is not an option, as its not necessary for these to be specified - one could leave them, and let the gcc configure script chose one.





reply via email to

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