Use $CC instead of gcc

Ryan Schmidt <[email protected]> Thu, 2 Apr 2015 22:50:42 -0500
Newsgroups gmane.comp.encryption.cryptlib
Message-ID <[email protected]>
In MacPorts we have for years used this patch for the tools/ccopts.sh script:

https://trac.macports.org/browser/trunk/dports/devel/cryptlib/files/patch-tools-ccopts.sh.diff?rev=85985

It just replaces a hardcoded invocation of "gcc" with "$CC". In MacPorts we want to be in control of what compiler is used, and for cryptlib we do this by specifying the CC environment variable when running make, which has the desired effect everywhere but this one line of this one script.

CC may need to be set to a default value such as "gcc" earlier in this script, as is already done in the companion script ccopts-crosscompile.sh.

Note that "$CC -dumpversion" produces the value "4.2.1" when used with any version of the clang compiler, presumably on the grounds that clang understands code somewhat similarly to gcc 4.2.1. I see you already have code earlier in this file to detect whether clang is being used, however this line with "gcc" was still being run. On recent OS X versions, where clang is the only compiler, "gcc" is usually a symlink to "clang", but the user may have changed this, so assuming "gcc" is any particular compiler is not very reliable and you should be consistent in always using $CC.


_______________________________________________
Cryptlib mailing list
[email protected] via Mail: [email protected]
Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
http://news.gmane.org/gmane.comp.encryption.cryptlib
Posts from non-subscribed addresses are blocked to prevent spam, please
subscribe in order to post messages.