Re: [Fink-users] Many packages do not properly test for gcc-4.2 vs. llvm-gcc-4.2

Alexander Hansen <[email protected]>
Newsgroups gmane.os.apple.fink.core,gmane.os.apple.fink.general
Organization Fink Users
Message-ID <[email protected]>
On 1/7/12 1:40 PM, Matthew Bogosian wrote:
> Many packages employ one the following (assumptive) tests to see if
> gcc 4.2 is available:
> 
>> ... if test "$darwin_vers" = 9 ; then export CC=gcc-4.2 export
>> CXX=g++-4.2 ...

That's perfectly acceptable.  Note that this is darwin_9_, i.e. OS
10.5, where (gcc|g++)-4.2 are available (for Xcode >= 3.1).

> 
> -or-
> 
>> ... if [ "%m" == "x86_64" ]; then export CC=gcc-4.2 ...
> 
> This does not play well with llvm-based versions of Xcode (i.e.,
> the above tests will succeed, but the subsequent builds will fail
> because they can't find an executable named gXX-4.2). It's best to
> test whether gXX-4.2 is callable before assuming it can be used
> (most packages do this already).
> 
> The attached is probably both underinclusive and overinclusive, but
> it's a pretty good start. The output is edited from the following:
> 
>> find /sw/fink/10.4 -name \*.info | xargs grep >|~/Desktop/out.txt
>> -C 2 -n '[="'\'']g[c+][c+]-4\.2'
> 
> Creating symlinks somewhere in $PATH may help with some packages.
> E.G.:
> 
>> for i in /usr/bin/llvm-*-4.2 ; do j="$(basename "${i}")" ; echo
>> ln -s "${i}" "[e.g., /sw/bin]/${j#llvm-}" ; done
> 
> I hope this helps.
> 
> 
> --Matt
> 
> 
> 

(cc-ing fink-core)

Here are 2 options:

1)  Packages which use "gcc-4.2" should all be fixed by their
maintainers or others.

2)  We could provide appropriately directed "gcc-4.2" and "g++-4.2"
compiler wrappers as part of fink on 10.6 (basically the symlinks idea
above).

-- 
Alexander Hansen, Ph.D.
Fink User Liaison
http://finkakh.wordpress.com/

------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
fink-core mailing list
[email protected]
List archive:
http://news.gmane.org/gmane.os.apple.fink.core
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-core
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.