How to build OpenSSL using gcc or clang on OS X
<p>I am building OpenSSL on OS X. I would like to understand more about modifying the build settings as described in the <a href="https://wiki.openssl.org/index.php/Compilation_and_Installation#Modifying_Build_Settings" rel="nofollow">Wiki</a>.</p>

<p>I'm configuring the build as follows:</p>

<pre><code>./Configure darwin64-x86_64-cc
make
</code></pre>

<p>How do I know which compiler this is going to use? </p>

<p>The Wiki has an example that indicates how to modify the build to use the clang compiler rather than gcc under the iOS 7.0 SDK. </p>

<p>I would like to modify my build to select one or the other of clang or gcc on OS X. The equivalent line in Configure is:</p>

<pre><code>"darwin64-x86_64-cc","cc:-arch x86_64 -O3 -DL_ENDIAN -Wall::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:".eval{my $asm=$x86_64_asm;$asm=~s/rc4\-[^:]+//;$asm}.":macosx:dlfcn:darwin-shared:-fPIC -fno-common:-arch x86_64 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
</code></pre>

<p>What do I need to change?</p>