]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
Build installable libraries with -fpic, -fvisibility=hidden pmachata/RH-DTS
authorPetr Machata <pmachata@redhat.com>
Thu, 6 Sep 2012 19:56:49 +0000 (21:56 +0200)
committerPetr Machata <pmachata@redhat.com>
Thu, 17 Oct 2013 14:51:49 +0000 (16:51 +0200)
The test case has to be changed to look for files with different names.
That because per-target rules cause file renaming in autoconf.

libasm/Makefile.am
libdw/Makefile.am
libdwfl/Makefile.am
libebl/Makefile.am
libelf/Makefile.am
tests/run-arextract.sh

index e16d4be0cdbf7fa8988b0fd63b3e933d335503c0..059fddccddb879952abb22e6bf0530cb2cb8904f 100644 (file)
@@ -40,6 +40,7 @@ noinst_PROGRAMS = $(noinst_LIBRARIES:_pic.a=.so)
 endif
 pkginclude_HEADERS = libasm.h
 
+libasm_a_CFLAGS = -fpic -fvisibility=hidden $(AM_CFLAGS)
 libasm_a_SOURCES = asm_begin.c asm_abort.c asm_end.c asm_error.c \
                   asm_getelf.c asm_newscn.c asm_newscn_ingrp.c \
                   asm_newsubscn.c asm_newsym.c asm_newcomsym.c \
index f47feb5e657bc4638e7f049c413ff12b95e21cb4..9babfc294078e376e83bec20ce81f4485b380833 100644 (file)
@@ -44,6 +44,7 @@ endif
 include_HEADERS = dwarf.h
 pkginclude_HEADERS = libdw.h
 
+libdw_a_CFLAGS = -fpic -fvisibility=hidden $(AM_CFLAGS)
 libdw_a_SOURCES = dwarf_begin.c dwarf_begin_elf.c dwarf_end.c dwarf_getelf.c \
                  dwarf_getpubnames.c dwarf_getabbrev.c dwarf_tag.c \
                  dwarf_error.c dwarf_nextcu.c dwarf_diename.c dwarf_offdie.c \
index 3ef4dd6b8c3182b04f0faf6291db0ffe8b94c043..ba8c31119b89e80a88ef8b7f5279c1a001ffbf04 100644 (file)
@@ -41,6 +41,7 @@ endif
 
 pkginclude_HEADERS = libdwfl.h
 
+libdwfl_a_CFLAGS = -fpic -fvisibility=hidden $(AM_CFLAGS)
 libdwfl_a_SOURCES = dwfl_begin.c dwfl_end.c dwfl_error.c dwfl_version.c \
                    dwfl_module.c dwfl_report_elf.c relocate.c \
                    dwfl_module_build_id.c dwfl_module_report_build_id.c \
index 4d62fad1d156468e1e2b0106c7e6a891a8f81167..ee3505c072387250542d718cf8b96a647c1108f1 100644 (file)
@@ -56,6 +56,7 @@ gen_SOURCES = eblopenbackend.c eblclosebackend.c eblstrtab.c \
              ebl_check_special_section.c ebl_syscall_abi.c eblabicfi.c \
              eblstother.c
 
+libebl_a_CFLAGS = -fvisibility=hidden $(AM_CFLAGS)
 libebl_a_SOURCES = $(gen_SOURCES)
 
 noinst_HEADERS = libeblP.h ebl-hooks.h
index 5903ea8685c1a5388a6e82466fcb09f1edeb87b4..2c148f2d49244dc5d10b7b200df29816a71b3b90 100644 (file)
@@ -43,6 +43,7 @@ include_HEADERS = libelf.h gelf.h nlist.h
 
 pkginclude_HEADERS = elf-knowledge.h
 
+libelf_a_CFLAGS = -fpic -fvisibility=hidden $(AM_CFLAGS)
 libelf_a_SOURCES = elf_version.c elf_hash.c elf_error.c elf_fill.c \
                   elf_begin.c elf_next.c elf_rand.c elf_end.c elf_kind.c \
                   gelf_getclass.c elf_getbase.c elf_getident.c \
index 44f4a525babb223cfb1ce8829d3c9fcf82e101cf..05329527bb3151d8dbca01f6c7070deccaafe5d8 100755 (executable)
@@ -26,7 +26,7 @@ if test -f $archive; then
     echo -n "Extracting symbols... $ac_c"
 
     # The files we are looking at.
-    for f in ${abs_top_builddir}/libelf/*.o; do
+    for f in ${abs_top_builddir}/libelf/libelf_a-*.o; do
        testrun ${abs_builddir}/arextract $archive `basename $f` arextract.test || exit 1
        cmp $f arextract.test || {
            echo "Extraction of $1 failed"