]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Makefile: make the CC definition conditional
authorMaxin B. John <maxin.john@intel.com>
Mon, 8 Feb 2016 09:59:29 +0000 (11:59 +0200)
committerJes Sorensen <Jes.Sorensen@redhat.com>
Mon, 8 Feb 2016 15:54:34 +0000 (10:54 -0500)
By hardcoding CC's definition in the Makefile, all the external gcc
parameters set by tune settings are lost. This causes compile failure
with x32 toolchain

Signed-off-by: Maxin B. John <maxin.john@intel.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Makefile

index fd79cfbc04baa3760ed16e80d07f17097017b576..5fd7f166e7e14f24078b2394398234342930b227 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -41,7 +41,7 @@ KLIBC=/home/src/klibc/klibc-0.77
 
 KLIBC_GCC = gcc -nostdinc -iwithprefix include -I$(KLIBC)/klibc/include -I$(KLIBC)/linux/include -I$(KLIBC)/klibc/arch/i386/include -I$(KLIBC)/klibc/include/bits32
 
-CC = $(CROSS_COMPILE)gcc
+CC ?= $(CROSS_COMPILE)gcc
 CXFLAGS ?= -ggdb
 CWFLAGS = -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter
 ifdef WARN_UNUSED