From fb0b63b39e9cb74fa220f8402981b736123b24ee Mon Sep 17 00:00:00 2001 From: Vladimir Smirnov Date: Mon, 19 May 2014 19:59:52 +0400 Subject: [PATCH] darwin: Use $CC to link Use $CC to link (and check for broken compilers), such that we don't get linked modules of a different bitness. Bug-Gentoo: https://bugs.gentoo.org/297751 Patch-Name: gentoo/darwin-cc-ld.diff Original-By: Torsten Veller --- hints/darwin.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hints/darwin.sh b/hints/darwin.sh index 7c3f818..fa87f4c 100644 --- a/hints/darwin.sh +++ b/hints/darwin.sh @@ -137,7 +137,7 @@ if [ "X`echo | ${cc} -no-cpp-precomp -E - 2>&1 >/dev/null`" = "X" ]; then fi # Known optimizer problems. -case "`cc -v 2>&1`" in +case "`${cc:-gcc} -v 2>&1`" in *"3.1 20020105"*) toke_cflags='optimize=""' ;; esac @@ -168,7 +168,7 @@ esac # Allow the user to override ld, but modify it as necessary below case "$ld" in - '') case "$cc" in + '') case "${cc:-gcc}" in # If the cc is explicitly something else than cc (or empty), # set the ld to be that explicitly something else. Conversely, # if the cc is 'cc' (or empty), set the ld to be 'cc'. -- 1.9.3