From 3a7056839f498e53c6173145478b8a1677c34f76 Mon Sep 17 00:00:00 2001 From: Yurii Rashkovskii Date: Mon, 25 Jul 2011 18:42:35 -0700 Subject: 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) --- kerl | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 # # 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 -- cgit v1.2.3