Merge pull request #217 from epsilon-0/master

don't alter toolchain vars if already provided
This commit is contained in:
Elliot Saba 2020-11-30 09:25:02 -08:00 committed by GitHub
commit 3cb804556f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -10,41 +10,41 @@ VERSION = 0.7.0
SOMAJOR = 3 SOMAJOR = 3
SOMINOR = 0 SOMINOR = 0
DESTDIR = DESTDIR =
prefix = /usr/local prefix ?= /usr/local
bindir = $(prefix)/bin bindir ?= $(prefix)/bin
libdir = $(prefix)/lib libdir ?= $(prefix)/lib
includedir = $(prefix)/include includedir ?= $(prefix)/include
ifeq ($(OS), FreeBSD) ifeq ($(OS), FreeBSD)
pkgconfigdir = $(prefix)/libdata/pkgconfig pkgconfigdir ?= $(prefix)/libdata/pkgconfig
else else
pkgconfigdir = $(libdir)/pkgconfig pkgconfigdir ?= $(libdir)/pkgconfig
endif endif
USEGCC = 1 USEGCC ?= 1
USECLANG = 0 USECLANG ?= 0
ifneq (,$(findstring $(OS),Darwin FreeBSD OpenBSD)) ifneq (,$(findstring $(OS),Darwin FreeBSD OpenBSD))
USEGCC = 0 USEGCC ?= 0
USECLANG = 1 USECLANG ?= 1
endif endif
AR = $(TOOLPREFIX)ar AR ?= $(TOOLPREFIX)ar
ifeq ($(ARCH),wasm32) ifeq ($(ARCH),wasm32)
CC = clang-8 CC ?= clang-8
USEGCC = 0 USEGCC ?= 0
CFLAGS_add += -fno-builtin -fno-strict-aliasing CFLAGS_add += -fno-builtin -fno-strict-aliasing
endif endif
ifeq ($(USECLANG),1) ifeq ($(USECLANG),1)
USEGCC = 0 USEGCC ?= 0
CC = clang CC ?= clang
CFLAGS_add += -fno-builtin -fno-strict-aliasing CFLAGS_add += -fno-builtin -fno-strict-aliasing
endif endif
ifeq ($(USEGCC),1) ifeq ($(USEGCC),1)
CC = $(TOOLPREFIX)gcc CC ?= $(TOOLPREFIX)gcc
CFLAGS_add += -fno-gnu89-inline -fno-builtin CFLAGS_add += -fno-gnu89-inline -fno-builtin
endif endif