autoconf
[Top][All Lists]
Advanced

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

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


From: Philip Herron
Subject: Re: How can I test if the GNU or Sun linker is used?
Date: Fri, 07 Aug 2009 03:02:41 +0100
User-agent: Thunderbird 2.0.0.22 (X11/20090608)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dr. David Kirkby wrote:
> 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.
>
>
>
> _______________________________________________ Autoconf mailing
> list address@hidden
> http://lists.gnu.org/mailman/listinfo/autoconf

Hey

Not to sound annoying, but are you maybe approaching the problem the
wrong way around? You use autoconf so you don't have to worry about
these problems. So i take it sage is c or c++ etc..

All you should really care about is making sure your environment has a
compatible c compiler or whats needed and autoconf does that for you,
with the prog_c macro then it inserts into the makefile etc. And you
just have to make sure your code is compatible. I would discourage
trying to over-think and separate what compilers, assemblers are being
used to give warnings, because thats not what you want. You want
autoconf to figure out your environment for you so you don't have to
have complicated makefiles and options to build your program.

- --Phil
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkp7iz4ACgkQAhcOgIaQQ2EjpwCdEIfFUonocQvL+bE0jNLCGpgj
OH8AnjbgXdM39kox3cHqTRt3I9fW+gwD
=F06n
-----END PGP SIGNATURE-----





reply via email to

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