Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'Compile universal binaries by default' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Compile universal binaries by default
Authored by: wgscott on Oct 31, '06 10:12:32AM

It appears to work.

Any chance of this for g++ and gfortran?

[ Reply to This | # ]
Authored by: gshenaut on Nov 01, '06 07:10:04AM

OK, I set it up to do the same thing to c++, and there is also an "install-as-c++" option. It's in the new version of ccub.tgz.

However, I actually don't use c++, and so it's been tested extremely lightly.

As for gfortran, I don't even have that installed on my system. But if the compiler works the same as gcc, it should be easy to add the capability in the same way I added c++. You may have to think about whether to install links, like fortran/gfortran pointing to gfortran-4.0 (maybe that's how they install it already?). If this is done, and if the compiler's command line is the same, then it should be simple to add fortran. Otherwise, it might take a bit more work.

Greg Shenaut

[ Reply to This | # ]
Authored by: wgscott on Nov 01, '06 05:58:31PM

I'll give it a try, but I won't have time for a few days.

For what it is worth, I did my own install and just installed using the real name into /usr/local/bin.

Then if I specify CC=ccub make, most Makefiles do the right thing.

One of the reasons is that this will wreak havok on programs that expect the normal cc, such as fink (and I assume darwinports).

The other thing one rapidly runs into is linking against libraries that are platform-specific. There is a lot of opportunity for pain, which is why fink (and I assume darwinports) made the decision not to do the universal binary thing.

Anyway, thanks for doing this.

[ Reply to This | # ]