[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: turning off dependency tracking when building fat binaries on Mac OS
From: |
Ralf Wildenhues |
Subject: |
Re: turning off dependency tracking when building fat binaries on Mac OSX |
Date: |
Sun, 13 Feb 2011 09:32:17 +0100 |
User-agent: |
Mutt/1.5.20 (2010-08-04) |
Hello Peter,
* Peter Johansson wrote on Sat, Jan 22, 2011 at 05:18:10PM CET:
> The `INSTALL' file provided by autotools has the following blurp
>
> > On MacOS X 10.5 and later systems, you can create libraries and
> >executables that work on multiple system types--known as "fat" or
> >"universal" binaries--by specifying multiple `-arch' options to the
> >compiler but only a single `-arch' option to the preprocessor. Like
> >this:
> >
> > ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
> > CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
> > CPP="gcc -E" CXXCPP="g++ -E"
> >
> I noticed that when configuring like that automake automagically
> turns off dependency-tracking, for good reasons.
>
> However, it is not uncommon that people instead issue
>
> ./configure CFLAGS="-arch i386 -arch x86_64 -arch ppc -arch ppc64" \
> CXXFLAGS="-arch i386 -arch x86_64 -arch ppc -arch ppc64" \
> LDFLAGS="-arch i386 -arch x86_64 -arch ppc -arch ppc64"
>
> which will not works. See for example
>
> http://www.mail-archive.com/address@hidden/msg03121.html
Yep. I think that was one reason we explicitly documented the thing in
INSTALL. With this configuration, your preprocessor will be wrong
(because CFLAGS are not passed to it) which means macro values may be
computed wrongly.
That doesn't mean we should break automake dependency tracking in this
configuration, but it does mean you shouldn't do it when it hurts. ;-)
> You need to explicitly turn off dependency tracking. My question is
> simply is there a good reason why automake does not turn off the
> dependency tracking automagically in this case, or should I consider
> it a missing feature.
I suppose I'll accept a patch that enhances automake/m4/depend.m4 to
address this. Are you motivated?
Cheers, and thanks for the report,
Ralf
- Re: turning off dependency tracking when building fat binaries on Mac OSX,
Ralf Wildenhues <=