mirror of https://github.com/stella-emu/stella.git
Only use static libgcc/libstdc++ if they're present
This commit is contained in:
parent
87bbf20c11
commit
7199ab7feb
|
@ -54,10 +54,11 @@ ifneq ($(GIT_VERSION)," unknown")
|
||||||
CXXFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\"
|
CXXFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
GET_STATIC_ARG=$(if $(filter $(shell $(CXX) -print-file-name=$1.a),$1.a),,-static-$1)
|
||||||
# Unix
|
# Unix
|
||||||
ifneq (,$(findstring unix,$(platform)))
|
ifneq (,$(findstring unix,$(platform)))
|
||||||
CXXFLAGS += $(LTO)
|
CXXFLAGS += $(LTO)
|
||||||
LDFLAGS += $(LTO) $(PTHREAD_FLAGS) -static-libgcc -static-libstdc++
|
LDFLAGS += $(LTO) $(PTHREAD_FLAGS) $(call GET_STATIC_ARG,libgcc) $(call GET_STATIC_ARG,libstdc++)
|
||||||
TARGET := $(TARGET_NAME)_libretro.so
|
TARGET := $(TARGET_NAME)_libretro.so
|
||||||
fpic := -fPIC
|
fpic := -fPIC
|
||||||
ifneq ($(findstring SunOS,$(shell uname -a)),)
|
ifneq ($(findstring SunOS,$(shell uname -a)),)
|
||||||
|
|
Loading…
Reference in New Issue