$(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 <axboe@kernel.dk>
-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)
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
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