From 1483f1032d727fc81ab5e97bc4bd3fba301f9c75 Mon Sep 17 00:00:00 2001 From: Christian Prochaska Date: Thu, 20 Sep 2012 12:36:02 +0200 Subject: [PATCH] Remove broken compiler check The 'build.mk' file checks if the tool chain to be used supports the '-static' and '-fno-stack-protector' flags, but this check always fails for the current Genode tool chain because it cannot create executable files without explicitly specifying the 'crt0' and library files to be linked, which the check doesn't. This patch removes the compiler check. Fixes #358. --- base/mk/global.mk | 2 +- tool/builddir/build.mk | 14 -------------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/base/mk/global.mk b/base/mk/global.mk index 7b02bb439..9cd9a04b9 100644 --- a/base/mk/global.mk +++ b/base/mk/global.mk @@ -92,7 +92,7 @@ CC_WARN ?= -Wall # # Aggregate compiler options that are common for C and C++ # -CC_OPT += $(CC_OPT_NOSTDINC) -g $(CC_MARCH) $(CC_OLEVEL) $(CC_OPT_DEP) $(CC_WARN) $(CC_OPT_CHECKCC) +CC_OPT += $(CC_OPT_NOSTDINC) -g $(CC_MARCH) $(CC_OLEVEL) $(CC_OPT_DEP) $(CC_WARN) # # Incorporate source-file-specific compiler options diff --git a/tool/builddir/build.mk b/tool/builddir/build.mk index 601167170..ab93a86dd 100644 --- a/tool/builddir/build.mk +++ b/tool/builddir/build.mk @@ -71,20 +71,6 @@ select_from_repositories = $(firstword $(foreach REP,$(REPOSITORIES),$(wildcard include $(BASE_DIR)/mk/global.mk -# -# Some compilers do not support the compiler arguments that we use with 'gcc' -# and, consequently, spit errors. Hence, we have to check if the compiler -# arguments are supported and drop them in the other case. We cache the result -# of the check in the CC_OPT_CHECKCC variable. The caching improves the build -# performance by 5 to 10 percent. -# -checkcc = $(shell if $(CUSTOM_CC) $(1) -o /dev/null -xc - <<< 'int main(void){return 0;}' &> /dev/null; then echo "$(1)" ; fi ;) - -CC_OPT_CHECKCC = $(call checkcc, -static) -CC_OPT_CHECKCC += $(call checkcc, -fno-stack-protector) - -export CC_OPT_CHECKCC - export LIBGCC_INC_DIR = $(shell dirname `$(CUSTOM_CXX_LIB) -print-libgcc-file-name`)/include #