Commit 17b1d24d authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont Committed by Rémi Denis-Courmont

contrib: add HOSTVARS_PIC to force PIC build (for CMake)

parent f70d1cac
...@@ -147,19 +147,6 @@ endif ...@@ -147,19 +147,6 @@ endif
# #
# Common helpers # Common helpers
# #
HOSTVARS := CPPFLAGS="$(CPPFLAGS)"
HOSTVARS += CC="$(CC)"
HOSTVARS += CFLAGS="$(CFLAGS)"
HOSTVARS += CXX="$(CXX)"
HOSTVARS += CXXFLAGS="$(CXXFLAGS)"
HOSTVARS += LD="$(LD)"
HOSTVARS += LDFLAGS="$(LDFLAGS)"
HOSTVARS += AR="$(AR)"
HOSTVARS += RANLIB="$(RANLIB)"
HOSTVARS += STRIP="$(STRIP)"
HOSTVARS += PATH="$(PREFIX)/bin:$(PATH)"
HOSTVARS_AR += AR="$(AR) rcvu"
HOSTCONF := --prefix="$(PREFIX)" HOSTCONF := --prefix="$(PREFIX)"
HOSTCONF += --build="$(BUILD)" --host="$(HOST)" --target="$(HOST)" HOSTCONF += --build="$(BUILD)" --host="$(HOST)" --target="$(HOST)"
HOSTCONF += --program-prefix="" HOSTCONF += --program-prefix=""
...@@ -167,10 +154,27 @@ HOSTCONF += --program-prefix="" ...@@ -167,10 +154,27 @@ HOSTCONF += --program-prefix=""
HOSTCONF += --enable-static --disable-shared --disable-dependency-tracking HOSTCONF += --enable-static --disable-shared --disable-dependency-tracking
ifdef HAVE_WIN32 ifdef HAVE_WIN32
HOSTCONF += --without-pic HOSTCONF += --without-pic
PIC :=
else else
HOSTCONF += --with-pic HOSTCONF += --with-pic
PIC := -fPIC
endif endif
HOSTTOOLS := \
CC="$(CC)" CXX="$(CXX)" LD="$(LD)" \
AR="$(AR)" RANLIB="$(RANLIB)" STRIP="$(STRIP)" \
PATH="$(PREFIX)/bin:$(PATH)"
HOSTVARS := $(HOSTTOOLS) \
CPPFLAGS="$(CPPFLAGS)" \
CFLAGS="$(CFLAGS)" \
CXXFLAGS="$(CXXFLAGS)" \
LDFLAGS="$(LDFLAGS)"
HOSTVARS_PIC := $(HOSTTOOLS) \
CPPFLAGS="$(CPPFLAGS) $(PIC)" \
CFLAGS="$(CFLAGS) $(PIC)" \
CXXFLAGS="$(CXXFLAGS) $(PIC)" \
LDFLAGS="$(LDFLAGS)"
download_git = \ download_git = \
rm -Rf $(@:.tar.xz=) && \ rm -Rf $(@:.tar.xz=) && \
$(GIT) clone $(2:%=--branch %) $(1) $(@:.tar.xz=) && \ $(GIT) clone $(2:%=--branch %) $(1) $(@:.tar.xz=) && \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment