diff options
author | Yurii Rashkovskii <[email protected]> | 2011-07-25 18:42:35 -0700 |
---|---|---|
committer | Yurii Rashkovskii <[email protected]> | 2011-07-25 18:42:35 -0700 |
commit | 3a7056839f498e53c6173145478b8a1677c34f76 (patch) | |
tree | c6fc4f93fc4771adeef555668da445b8b655ffe0 /kerl | |
parent | f2c9fd68276597c3cf6dd3cd5fd469c36f126d1e (diff) | |
download | kerl-3a7056839f498e53c6173145478b8a1677c34f76.tar.gz kerl-3a7056839f498e53c6173145478b8a1677c34f76.tar.bz2 kerl-3a7056839f498e53c6173145478b8a1677c34f76.zip |
On OS X, when the default gcc available is llvm-gcc, switch to either gcc-4.2 or disable all optimizations (should allow the build to complete as well)
Diffstat (limited to 'kerl')
-rwxr-xr-x | kerl | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -1,5 +1,6 @@ #! /bin/sh +# Copyright (c) 2011 Spawngrid, Inc # Copyright (c) 2011 Evax Software <contact(at)evax(dot)org> # # Permission is hereby granted, free of charge, to any person obtaining a copy @@ -67,6 +68,15 @@ case "$KERL_SYSTEM" in MD5SUM="openssl md5" MD5SUM_FIELD=2 SED_OPT=-E + if [ `gcc --version | grep llvm | wc -l` = "1" ]; then + if [ -x `which gcc-4.2` ]; then + echo "Adjust compiler settings for OS X: using gcc-4.2" + KERL_CONFIGURE_OPTIONS="CC=gcc-4.2 $KERL_CONFIGURE_OPTIONS" + else + echo "Adjust compiler settings for OS X: using -O0" + KERL_CONFIGURE_OPTIONS="CFLAGS=-O0 $KERL_CONFIGURE_OPTIONS" + fi + fi ;; *) MD5SUM=md5sum |