-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 10/21/11 3:44 PM, Jack Howarth wrote: > On Fri, Oct 21, 2011 at 09:02:56PM +0200, Martin Costabel wrote: >> On 21/10/11 16:04 , Jack Howarth wrote: >>> On Fri, Oct 21, 2011 at 10:06:24AM +0200, Martin Costabel >>> wrote: >>>> On 21/10/11 01:05, Jack Howarth wrote: [] >>>>> should upgrade to this version (or revert to Xcode 3.2.6). >>>>> This would allow us to focus on supporting clang in the >>>>> Xcode 4.x releases and encourage unification of any clang >>>>> specific changes to info files between the 10.4 and 10.6 >>>>> trees. It also will likely accelerate the elimination of >>>>> the unstable tree in 10.4 as any clang specific changes are >>>>> backported into 10.4. >>>> >>>> The most common "clang specific changes to info files" are >>>> currently SetCC: llvm-gcc-4.2 SetCXX: llvm-g++ because many >>>> packages won't compile with clang. This is not backportable. >> >>> Martin, Re-reading your response again, I assume you meant that >>> the info files will never been entirely unified. This is true >>> however that shouldn't stand in our way of attempting to make >>> fink usable for SL users who have Xcode 4.2 installed. We >>> really only have two choices there... >>> >>> 1) Leave fink as is and manually check if each info file is >>> miscompiled by llvm-gcc. This is a lot of work for a smallish >>> testing and developer group to deal with. It also requires far >>> more info file changes to switch these problem packages to >>> clang or gcc-4.2. 2) Use my approach of enabling the >>> path-prefix-clang on SL when Xcode 4.2 is detected via the >>> system compiler change. This gives us a well tested package set >>> which already has been checked against clang3.0svn. >> >> What I mean is that a package that does not compile under clang >> needs to include the above fix for xcode-4.2 if your automatic >> switch to clang is implemented. But then it will probably no >> longer work on 10.5 and on 10.6 with xcode-3.2. You would need >> one info file for xcode-4.2 and another one for xcode<=3.2. I >> don't see how this is possible inside the 10.4 tree. > > I don't see why this has to be so complex. If you run into package > that is incompatible with clang, just use... > > if [ `gcc -v 2>&1 | grep -c clang` = "1" ]; then export > CC=llvm-gcc-4.2 export CXX=llvm-g++-4.2 fi >
I assume there's got to be at least one more conditional because there's no llvm* to set anything to use for 10.5: if [ `gcc -v 2>&1 | grep -c clang` = "1" ]; then if [`uname -r | cut -d. -f1` = "10" ]; then export CC=llvm-gcc-4.2 export CXX=llvm-g++-4.2 fi fi Martin's point is that we don't want to break packages in the 10.4 tree for 10.5 users and 10.6 users who don't want to pay to upgrade to 4.2, and it would be a hassle for maintainers to have to introduce constructions like this to allow their packages to continue to work. > We could create a path-prefix-gcc42 to force the SL Xcode 4.2 > compilers under fink to use gcc-4.2/g++-4.2 but that doesn't > promote the general progress by encouraging testing of i386 code > generation from clang. > >> >> -- Martin > That's _your_ priority. The _project's_ priority is trying to keep the whole distribution functioning. I'd imagine most of our developers view the compiler as "that which converts my source code into libraries, executables, etc." I'm not saying that supporting clang under Xcode4.2 is a bad idea, but maybe there is an option which will minimize pain for everybody What about a NoUseClang: true flag for .info files to go along with the compiler wrapper? My thought is that it would subsume the role of the shell conditionals above into the fink code, resulting in, if set: 1) If on 10.7 or 10.6 with Xcode 4.2, the cc and c++ compilers would be set to llvm-gcc-4.2 and llvm-g++-4.2, respectively, rather than using clang. 2) If on 10.5 or 10.6 with Xcode 3.2.x, nothing happens and the default compilers for those configurations are used. Or was this already discussed somewhere? - -- Alexander Hansen, Ph.D. Fink User Liaison http://finkakh.wordpress.com/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk6h7q4ACgkQB8UpO3rKjQ+q4QCdEodHXSFVLCcoPKWr9sW2xE4F 6ZgAn13ih0VcJq91e+KKYJfp+Wd5Zuv2 =xBcR -----END PGP SIGNATURE----- ------------------------------------------------------------------------------ The demand for IT networking professionals continues to grow, and the demand for specialized networking skills is growing even more rapidly. Take a complimentary Learning@Cisco Self-Assessment and learn about Cisco certifications, training, and career opportunities. http://p.sf.net/sfu/cisco-dev2dev _______________________________________________ Fink-devel mailing list Fink-devel@lists.sourceforge.net List archive: http://news.gmane.org/gmane.os.apple.fink.devel Subscription management: https://lists.sourceforge.net/lists/listinfo/fink-devel