Re: problem with example from Technical Note 2137 (Universal Binaries and Autoconf)
Re: problem with example from Technical Note 2137 (Universal Binaries and Autoconf)
- Subject: Re: problem with example from Technical Note 2137 (Universal Binaries and Autoconf)
- From: "Peter O'Gorman" <email@hidden>
- Date: Wed, 15 Feb 2006 11:59:47 +0900
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Heath Raftery wrote:
| As I had fortunately already discovered with other autoconf projects,
| the accepted way to _add_ compiler and linker flags is via the XCFLAGS
| and XLDFLAGS variables respectively. I think you blow away the defaults
| otherwise.
|
The autotools themselves do not know anything about XCFLAGS or XLDFLAGS, if
you happen to be building a project where the developer added these flags,
then it may work, but autoconf and automake recommend that you do:
env CFLAGS=fooo CXXFLAGS=bar LDFLAGS=baz ./configure
or, for modern autoconf versions:
./configure CFLAGS=fooo CXXFLAGS=bar LDFLAGS=baz
Unfortunately, some developers put lines like:
CFLAGS="-Wall"
into their configure.ac. This is not only non-portable (-Wall does not work
on all compilers), it stomps on the flags the user passed to configure.
Anyway, the answer really is to drop the LDFLAGS part. Automake based
projects will have the CFLAGS on the link line if the objects contains only
C code, CXXFLAGS if there are c++ objects, and since -isysroot is in CFLAGS
and CXXFLAGS the compiler driver will pass -isyslibroot to the linker (and
the linker will die *sigh*).
Peter
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Darwin)
iQCVAwUBQ/KZI7iDAg3OZTLPAQIq2wP/SRaCW2rKvOp46rhK0GjGccklkrN9uKAG
TyrMpxnRd2g26Y8SrCgRBwJiRPEHyRopjlCmkddBIB/k9Nir+GbumSSqVzT3zJqW
n2MVTiYQXdVtCkd25ofYlef5D2+xyVYtm511kDcFpN1JDYBe6yi4NHa6lHI6SUMV
KMDdECU4w3o=
=uQO1
-----END PGP SIGNATURE-----
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden