Preparing GCC Build: Difference between revisions

m
Bot: Replace deprecated source tag with syntaxhighlight
[unchecked revision][unchecked revision]
m (Bot: Replace deprecated source tag with syntaxhighlight)
m (Bot: Replace deprecated source tag with syntaxhighlight)
Line 170:
Install a new version (compile it yourself or use MacPorts) and add <tt>--with-libiconv-prefix=/opt/local</tt> (or <tt>/usr/local</tt> if you compiled it yourself) to GCC's <tt>./configure</tt> line. Alternatively you may place the libiconv source as gcc-x.y.z/libiconv and it will be compiled as part of the GCC compilation process. (This trick also works for MPFR, GMP, and MPC).
 
The makefiles of Binutils and GCC use the <sourcesyntaxhighlight lang="make" enclose="none">$(CC)</sourcesyntaxhighlight> variable to invoke the compiler. On OS X, this resolves to <sourcesyntaxhighlight lang="text" enclose="none">gcc</sourcesyntaxhighlight> by default, which is actually <sourcesyntaxhighlight lang="bash" enclose="none">clang</sourcesyntaxhighlight>. Prior to OS X 10.8, the Clang that came with Xcode's Command Line Tools package was not able to build a working GCC. Users running OS X 10.7 or below may need to find and install GCC, either from [https://brew.sh Homebrew], or from somewhere on Apple's website. You can try with the old GCC that comes preinstalled on some macOS versions.
 
<syntaxhighlight lang="bash">