aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xkerl10
1 files changed, 10 insertions, 0 deletions
diff --git a/kerl b/kerl
index d1f569a..9aff059 100755
--- a/kerl
+++ b/kerl
@@ -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