Re: PATCH: only generate dependencies if using gcc

Andreas Fink <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
On 08.07.2008, at 06:16, Bostock James wrote:

>> From: Stipe Tolj
>> Sent: 07 July 2008 19:17
>>
>> Stipe Tolj schrieb:
>>>
>>> Can you point out why you need to omit the .depend file creation if
> the
>>> compiler is not gcc?
>>
>> i.e. the Intel CC handles the options and can build without changes.
>>
> The native compilers for AIX, HP-UX and Solaris do not handle these
> options. If a compiler other than gcc supports these options, though,
> then my patch goes from a quick fix to an ugly and inaccurate quick  
> fix
> :(
>
> Other solutions would be to:
> - have autoconf try to detect whether the compiler supports -MM,
> - use the X11 makedepend utility,
> - use automake.
>
> My preference would be for the last of these. What do other people
> think?

MacOS X also often has issues with precompiled headers due to the fact  
that Apple's GCC variant can compile multiple architectures in one go  
(for example if you pass -arch ppc -arch i386 -arch ppc64 -arch  
x86_64). In this case the precompiled headers can be different as  
things like size of () do return different values and endianness is  
different. So instead of one .depend it would have to create multiple  
ones.
So gcc does return:

gcc-4.0: -E, -S, -save-temps and -M options are not allowed with  
multiple -arch flags


So under MacOS X I often use --disable-dependency-tracking or I  
compile for every architecture once and merge the binaries it with  
"lipo" lateron. Kannel doesnt have this issue as I fixed the  
endianness and sizeof issues. In the case of kannel its compiling for  
multiple architectures and disables -M.


>
>
> -james
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.