mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 03:53:32 +01:00
defs-cpp.mk: Some improvements for LIBTYPE=static
Still doesn't compile valdi statically against regular glibc Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
74d53f9fb3
commit
3b75db2867
1 changed files with 19 additions and 9 deletions
|
|
@ -100,7 +100,12 @@ ifneq ($(TARGET_TRIPLET),$(HOST_TRIPLET)) # we're cross-compiling
|
|||
else # we're not cross-compiling
|
||||
|
||||
TC_SYS_ROOT ?= /usr
|
||||
LIBFLAGS += -ldl -lpthread
|
||||
ifeq ($(LIBTYPE),shared)
|
||||
LIBFLAGS += -ldl
|
||||
else
|
||||
LIBFLAGS += -l:libdl.a
|
||||
endif
|
||||
LIBFLAGS += -pthread
|
||||
|
||||
endif
|
||||
|
||||
|
|
@ -257,12 +262,6 @@ ifeq ($(TARGET),mingw)
|
|||
BUILD_LDFLAGS += -fstack-protector
|
||||
endif
|
||||
|
||||
ifeq ($(LIBTYPE),shared)
|
||||
ifneq ($(TARGET),mingw)
|
||||
BUILD_LDFLAGS += -rdynamic
|
||||
endif
|
||||
endif
|
||||
|
||||
# TODO: this shoud be only conditional, but breaks, because not all headers
|
||||
# do a conditional include of timer headers, yet
|
||||
GENERATE_FUNC_TIMERS = $(MODDIR)/YStopWatchThreadList/generate_func_timers.sh
|
||||
|
|
@ -451,8 +450,10 @@ endif
|
|||
|
||||
ifeq ($(USE_EXCEPTIONS_IN_C),true)
|
||||
BUILD_CFLAGS += -fexceptions
|
||||
ifeq ($(LIBTYPE),shared)
|
||||
GCC_LDFLAGS += -shared-libgcc
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(STRIP_SYMBOLS),true)
|
||||
STRIP_DONE ?= strip.done
|
||||
|
|
@ -533,9 +534,18 @@ ifeq ($(TARGET),mingw)
|
|||
endif
|
||||
endif
|
||||
|
||||
LIBTYPE ?= shared
|
||||
INSTALL_LIBDIR ?= $(EXE_PREFIX)/lib
|
||||
|
||||
LIBTYPE ?= shared
|
||||
ifeq ($(LIBTYPE),shared)
|
||||
ifneq ($(TARGET),mingw)
|
||||
BUILD_LDFLAGS += -rdynamic
|
||||
endif
|
||||
else
|
||||
LIB_SO ?=
|
||||
BUILD_LDFLAGS += -static
|
||||
endif
|
||||
|
||||
ifeq ($(USE_PROJECT_LIB),true)
|
||||
LIBNAME ?= $(PROJECT)
|
||||
MEMBERS += $(LIB_A)($(OBJ))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue