summaryrefslogtreecommitdiffstats
path: root/libelf
diff options
context:
space:
mode:
Diffstat (limited to 'libelf')
-rw-r--r--libelf/ChangeLog4
-rw-r--r--libelf/Makefile.am6
2 files changed, 7 insertions, 3 deletions
diff --git a/libelf/ChangeLog b/libelf/ChangeLog
index 9165634a..1c6cce29 100644
--- a/libelf/ChangeLog
+++ b/libelf/ChangeLog
@@ -1,5 +1,9 @@
2017-04-27 Ulf Hermann <[email protected]>
+ * Makefile.am: Use fpic_CFLAGS and dso_LDFLAGS.
+
+2017-04-27 Ulf Hermann <[email protected]>
+
* elf_getarsym.c: Don't replace rawmemchr.
* elf_strptr.c: Don't replace memrchr.
diff --git a/libelf/Makefile.am b/libelf/Makefile.am
index d141c641..78d68532 100644
--- a/libelf/Makefile.am
+++ b/libelf/Makefile.am
@@ -29,7 +29,7 @@
##
include $(top_srcdir)/config/eu.am
if BUILD_STATIC
-AM_CFLAGS += -fPIC
+AM_CFLAGS += $(fpic_CFLAGS)
endif
GCC_INCLUDE = -I$(shell $(CC) -print-file-name=include)
VERSION = 1
@@ -105,9 +105,9 @@ endif
libelf_so_SOURCES =
libelf.so$(EXEEXT): libelf_pic.a libelf.map
- $(AM_V_CCLD)$(LINK) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \
+ $(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $@ -Wl,--whole-archive,$<,--no-whole-archive \
-Wl,--version-script,$(srcdir)/libelf.map,--no-undefined \
- -Wl,--soname,$@.$(VERSION),-z,defs,-z,relro $(libelf_so_LDLIBS)
+ -Wl,--soname,$@.$(VERSION) $(libelf_so_LDLIBS)
@$(textrel_check)
$(AM_V_at)ln -fs $@ $@.$(VERSION)