Skip to content
Snippets Groups Projects
Verified Commit 3016281b authored by Vladimír Čunát's avatar Vladimír Čunát
Browse files

make: fixup passing export-dynamic flags

It was breaking on Darwin, and clang was throwing warnings.
Problem since ddb699d3.
parent 07a0703a
Branches
Tags
1 merge request!466osx and other fixes
......@@ -40,11 +40,6 @@ BUILD_CFLAGS += -I$(abspath .) -I$(abspath lib/generic) -I$(abspath contrib)
BUILD_CFLAGS += -DPACKAGE_VERSION="\"$(VERSION)\"" -DPREFIX="\"$(PREFIX)\"" -DMODULEDIR="\"$(MODULEDIR)\""
BUILD_CFLAGS += -fvisibility=hidden
# Otherwise Fedora is making kresd symbols inaccessible for modules
# TODO: clang needs different flag name, etc.
BUILD_CFLAGS += -rdynamic
BUILD_LDFLAGS += -export-dynamic
ifeq (,$(findstring -O,$(CFLAGS)))
BUILD_CFLAGS += -O2
endif
......
......@@ -36,6 +36,7 @@ else
PLATFORM := Darwin
LIBEXT := .dylib
MODTYPE := dynamiclib
LDFLAGS += -Wl,-export_dynamic
# OS X specific hardening since -pie doesn't work
ifneq ($(HARDENING),no)
BINFLAGS += -Wl,-pie
......@@ -45,14 +46,18 @@ else
SOVER = $(if $(1), -compatibility_version $(2) -current_version $(1),)
else
PLATFORM := POSIX
LDFLAGS += -pthread -lm -Wl,-E
LDFLAGS += -pthread -lm -Wl,--export-dynamic
# ELF hardening options
ifneq ($(HARDENING),no)
BINFLAGS += -pie
LDFLAGS += -Wl,-z,relro,-z,now
endif
ifeq ($(UNAME),Linux)
LDFLAGS += -ldl
LDFLAGS += -ldl
endif
ifeq ($(firstword $(shell $(CC) --version)),gcc)
# Otherwise Fedora is making kresd symbols inaccessible for modules?
CFLAGS += -rdynamic
endif
endif
endif
......
  • Tomas Krizek @tkrizek

    mentioned in commit 5771a8bbb4f91c1ce50880d9af8dcf7daba20f92

    ·

    mentioned in commit 5771a8bbb4f91c1ce50880d9af8dcf7daba20f92

    Toggle commit list
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