diff options
| author | Ulf Hermann <[email protected]> | 2017-02-24 13:11:03 +0100 |
|---|---|---|
| committer | Ulf Hermann <[email protected]> | 2017-04-28 09:21:43 +0000 |
| commit | 76acde30382254f7ca51af67ea91433719080edd (patch) | |
| tree | 71564ca688cff175381ecd3e51b1c8e2507db998 /libdw | |
| parent | ffb6a77fc4f0533126a3ff49ec5c03ef8e674520 (diff) | |
Check for -z,defs, -z,relro, -fPIC, -fPIE before using them
On windows those aren't needed because the link results are no ELF
files and all code is position independent anyway. gcc then complains
about them, which is in turn caught by -Werror.
Change-Id: Ie3d600b7c430698fc3d867a986a4d48f7ad1bbec
Reviewed-by: Christian Kandeler <[email protected]>
Diffstat (limited to 'libdw')
| -rw-r--r-- | libdw/ChangeLog | 4 | ||||
| -rw-r--r-- | libdw/Makefile.am | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/libdw/ChangeLog b/libdw/ChangeLog index 6e11181e..d15c861b 100644 --- a/libdw/ChangeLog +++ b/libdw/ChangeLog @@ -1,5 +1,9 @@ 2017-02-27 Ulf Hermann <[email protected]> + * Makefile.am: Use fpic_CFLAGS and dso_LDFLAGS. + +2017-02-27 Ulf Hermann <[email protected]> + * Makefile.am: Remove argp_LDADD. 2017-02-21 Ulf Hermann <[email protected]> diff --git a/libdw/Makefile.am b/libdw/Makefile.am index 88430627..7b69f6a6 100644 --- a/libdw/Makefile.am +++ b/libdw/Makefile.am @@ -29,7 +29,7 @@ ## include $(top_srcdir)/config/eu.am if BUILD_STATIC -AM_CFLAGS += -fPIC +AM_CFLAGS += $(fpic_CFLAGS) endif AM_CPPFLAGS += -I$(srcdir)/../libelf VERSION = 1 @@ -114,7 +114,7 @@ libdw.so$(EXEEXT): $(srcdir)/libdw.map libdw_pic.a ../libdwelf/libdwelf_pic.a \ ../libelf/libelf.so # The rpath is necessary for libebl because its $ORIGIN use will # not fly in a setuid executable that links in libdw. - $(AM_V_CCLD)$(LINK) -shared -o $@ -Wl,--soname,$@.$(VERSION),-z,defs \ + $(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $@ -Wl,--soname,$@.$(VERSION) \ -Wl,--enable-new-dtags,-rpath,$(pkglibdir) \ -Wl,--version-script,$<,--no-undefined \ -Wl,--whole-archive $(filter-out $<,$^) -Wl,--no-whole-archive\ |
