From b165e2bc0d38a73f9c82c2c1746adb1a7d2f9dac Mon Sep 17 00:00:00 2001 From: Bruce Cran Date: Tue, 18 Dec 2012 23:07:47 +0000 Subject: [PATCH] Fix $(CC) override: use system compiler except on HP-UX and Solaris. $(CC) was being overridden, preventing the system compiler from being used. This caused a problem on FreeBSD systems where gcc has been removed. Since fio requires gcc on HP-UX and Solaris, always set $(CC) on those platforms. Signed-off-by: Jens Axboe --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 6a1440c1..74335046 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,4 @@ -ifneq ($(origin CC), environment) -CC = $(CROSS_COMPILE)gcc -endif +CC ?= gcc DEBUGFLAGS = -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG CPPFLAGS= -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \ $(DEBUGFLAGS) @@ -37,6 +35,7 @@ ifeq ($(UNAME), Android) CPPFLAGS += -DFIO_NO_HAVE_SHM_H endif ifeq ($(UNAME), SunOS) + CC = gcc SOURCE += fifo.c lib/strsep.c helpers.c engines/posixaio.c \ engines/solarisaio.c LIBS += -lpthread -ldl -laio -lrt -lnsl -lsocket @@ -59,6 +58,7 @@ ifeq ($(UNAME), AIX) LDFLAGS += -L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000 endif ifeq ($(UNAME), HP-UX) + CC = gcc SOURCE += fifo.c helpers.c lib/getopt_long.c lib/strsep.c engines/posixaio.c LIBS += -lpthread -ldl -lrt CFLAGS += -D_LARGEFILE64_SOURCE -- 2.25.1