From 83629b4d4794ce770d4fa36238320f10a521d59b Mon Sep 17 00:00:00 2001 From: Alex Miller Date: Thu, 28 Feb 2019 14:50:22 -0800 Subject: [PATCH] Force Make to push $CC into the environment. This fixes a long standing weird issue of doing non-docker builds of FDB can hit problems of $CC not being defined in link-wrapper.sh. It turns out that this is because the official docker image defines CC in the environment, and no one else does that. Instead, we can just force Make to propagate its setting of CC into the environment, thus requiring no extra configuration to be able to do a build. --- Makefile | 6 ++++++ build/link-wrapper.sh | 5 ----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 4177bd2e4a..95828f5b85 100644 --- a/Makefile +++ b/Makefile @@ -77,6 +77,12 @@ else CCACHE_CXX := $(CXX) endif +# Default variables don't get pushed into the environment, but scripts in build/ +# rely on the existence of CC in the environment. +ifeq ($(origin CC), default) + CC := $(CC) +endif + ACTORCOMPILER := bin/actorcompiler.exe # UNSTRIPPED := 1 diff --git a/build/link-wrapper.sh b/build/link-wrapper.sh index 9c80359e68..5d24fc83d5 100755 --- a/build/link-wrapper.sh +++ b/build/link-wrapper.sh @@ -2,11 +2,6 @@ set -e -if [ -z ${CC+x} ] -then - CC=gcc -fi - case $1 in Application | DynamicLibrary) echo "Linking $3"