]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
Implement --enable-gconv option for configure.
authorUlrich Drepper <drepper@redhat.com>
Sun, 28 Aug 2005 16:18:57 +0000 (16:18 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sun, 28 Aug 2005 16:18:57 +0000 (16:18 +0000)
16 files changed:
ChangeLog
NEWS
configure.ac
libasm/ChangeLog
libasm/Makefile.am
libdw/ChangeLog
libdw/Makefile.am
libebl/ChangeLog
libebl/Makefile.am
libelf/ChangeLog
libelf/Makefile.am
src/ChangeLog
src/Makefile.am
src/strings.c
tests/ChangeLog
tests/Makefile.am

index 9a7850aa2fbe4a56e53702403f6804c286449c38..b390eedacfb308ae1617e79fb634253cd32490e7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2005-08-28  Ulrich Drepper  <drepper@redhat.com>
+
+       * configure.ac: Add --enable-gcov option.
+
 2005-08-06  Ulrich Drepper  <drepper@redhat.com>
 
        * configure.ac: Add --enable-gprof option.
diff --git a/NEWS b/NEWS
index 77dc2a679d7785226f74e4c165c6a935ae921a45..7d5d4afc88b588c0cca810b8e316106c642b6420 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,8 @@ libelf: speed-ups of non-mmap reading.
 
 strings: New program.
 
+Implement --enable-gcov option for configure.
+
 Version 0.114:
 
 libelf: new function elf_getaroff
index cdade456b7b36259359bf21277aa16c455ed32d3..f721310db2c8a47d6e710cf6a72929d9ae5ac13d 100644 (file)
@@ -138,8 +138,19 @@ if test "$use_gprof" = yes; then
   LDFLAGS="$LDFLAGS -pg"
 fi
 AM_CONDITIONAL(GPROF, test "$use_gprof" = yes)
+
+# Enable gcov suport.
+AC_ARG_ENABLE([gcov],
+AC_HELP_STRING([--enable-gcov],
+[build binaries with gcov support]), [use_gcov=yes], [use_gcov=no])
+if test "$use_gcov" = yes; then
+  CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
+  LDFLAGS="$LDFLAGS -fprofile-arcs"
+fi
+AM_CONDITIONAL(GPROF, test "$use_gprof" = yes)
+
 AM_CONDITIONAL(BUILD_STATIC, [dnl
-test "$use_mudflap" = yes -o "$use_gprof" = yes])
+test "$use_mudflap" = yes -o "$use_gprof" = yes -o "$use_gcov" = yes])
 
 LIBEBL_SUBDIR="$PACKAGE"
 AC_ARG_ENABLE([libebl-subdir],
index 6adeef1e0aabc7e7375613ed3704edb11b724f11..c9a26b9ac1a7be54bf435f4cab9d1934abb9c186 100644 (file)
@@ -1,3 +1,7 @@
+2005-08-28  Ulrich Drepper  <drepper@redhat.com>
+
+       * Makefile.am: Use $(LINK) not $(CC) when creating DSO.
+
 2005-08-02  Ulrich Drepper  <drepper@redhat.com>
 
        * Makefile.am (AM_CFLAGS): Add -std=gnu99.
index 7802a5c041533d1fec33eeded21071bb358bfbf4..172143c31fc71f62928937b0d72a37f4df241d10 100644 (file)
@@ -51,10 +51,10 @@ am_libasm_pic_a_OBJECTS = $(libasm_a_SOURCES:.c=.os)
 
 libasm_so_SOURCES =
 libasm.so: libasm_pic.a libasm.map
-       $(CC) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \
-             -Wl,--version-script,$(srcdir)/libasm.map,--no-undefined \
-             -Wl,--soname,$@.$(VERSION) \
-             ../libebl/libebl.a ../libelf/libelf.so
+       $(LINK) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \
+               -Wl,--version-script,$(srcdir)/libasm.map,--no-undefined \
+               -Wl,--soname,$@.$(VERSION) \
+               ../libebl/libebl.a ../libelf/libelf.so
        if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi
        ln -fs $@ $@.$(VERSION)
 
@@ -83,4 +83,4 @@ endif
 noinst_HEADERS = libasmP.h symbolhash.h
 EXTRA_DIST = libasm.map
 
-CLEANFILES = $(am_libasm_pic_a_OBJECTS)
+CLEANFILES = $(am_libasm_pic_a_OBJECTS) *.gcno *.gcda
index 3b84ab9e6150d4bcb25bd1d11eb3ad0b7fc8be59..14a0ce6b33eec1f7d82f8bcfe686b20e27b16b90 100644 (file)
@@ -1,3 +1,7 @@
+2005-08-28  Ulrich Drepper  <drepper@redhat.com>
+
+       * Makefile.am: Use $(LINK) not $(CC) when creating DSO.
+
 2005-08-23  Roland McGrath  <roland@redhat.com>
 
        * dwarf_attr_integrate.c (dwarf_attr_integrate): Treat
index ad6b28a16e5c8a5816dbedfe7a4d1b1b239195ea..1f659702e1c9b834ecc8ca86097366ba5fd2b519 100644 (file)
@@ -76,10 +76,10 @@ libdw_so_SOURCES =
 libdw.so: $(srcdir)/libdw.map libdw_pic.a \
          ../libdwfl/libdwfl_pic.a ../libebl/libebl.a \
          ../libelf/libelf.so
-       $(CC) -shared -o $@ -Wl,--soname,$@.$(VERSION),-z,defs \
-             -Wl,--version-script,$<,--no-undefined \
-             -Wl,--whole-archive $(filter-out $<,$^) -Wl,--no-whole-archive \
-             -ldl
+       $(LINK) -shared -o $@ -Wl,--soname,$@.$(VERSION),-z,defs \
+               -Wl,--version-script,$<,--no-undefined \
+               -Wl,--whole-archive $(filter-out $<,$^) -Wl,--no-whole-archive\
+               -ldl
        if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi
        ln -fs $@ $@.$(VERSION)
 
@@ -110,4 +110,4 @@ noinst_HEADERS = libdwP.h memory-access.h dwarf_abbrev_hash.h
 
 EXTRA_DIST = libdw.map
 
-CLEANFILES = $(am_libdw_pic_a_OBJECTS)
+CLEANFILES = $(am_libdw_pic_a_OBJECTS) *.gcno *.gcda
index cb0d00954e2d012a3fd51de6c79af08d5909277f..d5248293b7fcd7cf59380fc4cc138628709172a6 100644 (file)
@@ -1,3 +1,7 @@
+2005-08-28  Ulrich Drepper  <drepper@redhat.com>
+
+       * Makefile.am: Use $(LINK) not $(CC) when creating DSOs.
+
 2005-08-13  Roland McGrath  <roland@redhat.com>
 
        * ia64_symbol.c (ia64_machine_flag_check): New function.
index ead129bd7a82c575d8d716818ac85968203b927f..93271e5285c48fdeddd7f2567aec61fd0b52e117 100644 (file)
@@ -69,9 +69,9 @@ textrel_check = if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi
 
 libebl_i386_so_SOURCES =
 libebl_i386.so: libebl_i386_pic.a libebl_i386.map
-       $(CC) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \
-             -Wl,--version-script,$(srcdir)/libebl_i386.map \
-             -Wl,-z,defs $(libelf) $(libmudflap)
+       $(LINK) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \
+               -Wl,--version-script,$(srcdir)/libebl_i386.map \
+               -Wl,-z,defs $(libelf) $(libmudflap)
        $(textrel_check)
 
 
@@ -81,9 +81,9 @@ am_libebl_sh_pic_a_OBJECTS = $(sh_SRCS:.c=.os)
 
 libebl_sh_so_SOURCES =
 libebl_sh.so: libebl_sh_pic.a libebl_sh.map
-       $(CC) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \
-             -Wl,--version-script,$(srcdir)/libebl_sh.map \
-             -Wl,-z,defs $(libmudflap)
+       $(LINK) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \
+               -Wl,--version-script,$(srcdir)/libebl_sh.map \
+               -Wl,-z,defs $(libmudflap)
        $(textrel_check)
 
 
@@ -93,9 +93,9 @@ am_libebl_x86_64_pic_a_OBJECTS = $(x86_64_SRCS:.c=.os)
 
 libebl_x86_64_so_SOURCES =
 libebl_x86_64.so: libebl_x86_64_pic.a libebl_x86_64.map
-       $(CC) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \
-             -Wl,--version-script,$(srcdir)/libebl_x86_64.map \
-             -Wl,-z,defs $(libelf) $(libmudflap)
+       $(LINK) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \
+               -Wl,--version-script,$(srcdir)/libebl_x86_64.map \
+               -Wl,-z,defs $(libelf) $(libmudflap)
        $(textrel_check)
 
 
@@ -105,9 +105,9 @@ am_libebl_ia64_pic_a_OBJECTS = $(ia64_SRCS:.c=.os)
 
 libebl_ia64_so_SOURCES =
 libebl_ia64.so: libebl_ia64_pic.a libebl_ia64.map
-       $(CC) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \
-             -Wl,--version-script,$(srcdir)/libebl_ia64.map \
-             -Wl,-z,defs $(libmudflap)
+       $(LINK) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \
+               -Wl,--version-script,$(srcdir)/libebl_ia64.map \
+               -Wl,-z,defs $(libmudflap)
        $(textrel_check)
 
 
@@ -117,9 +117,9 @@ am_libebl_alpha_pic_a_OBJECTS = $(alpha_SRCS:.c=.os)
 
 libebl_alpha_so_SOURCES =
 libebl_alpha.so: libebl_alpha_pic.a libebl_alpha.map
-       $(CC) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \
-             -Wl,--version-script,$(srcdir)/libebl_alpha.map \
-             -Wl,-z,defs $(libmudflap)
+       $(LINK) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \
+               -Wl,--version-script,$(srcdir)/libebl_alpha.map \
+               -Wl,-z,defs $(libmudflap)
        $(textrel_check)
 
 
@@ -129,9 +129,9 @@ am_libebl_arm_pic_a_OBJECTS = $(arm_SRCS:.c=.os)
 
 libebl_arm_so_SOURCES =
 libebl_arm.so: libebl_arm_pic.a libebl_arm.map
-       $(CC) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \
-             -Wl,--version-script,$(srcdir)/libebl_arm.map \
-             -Wl,-z,defs $(libmudflap)
+       $(LINK) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \
+               -Wl,--version-script,$(srcdir)/libebl_arm.map \
+               -Wl,-z,defs $(libmudflap)
        $(textrel_check)
 
 
@@ -141,9 +141,9 @@ am_libebl_sparc_pic_a_OBJECTS = $(sparc_SRCS:.c=.os)
 
 libebl_sparc_so_SOURCES =
 libebl_sparc.so: libebl_sparc_pic.a libebl_sparc.map
-       $(CC) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \
-             -Wl,--version-script,$(srcdir)/libebl_sparc.map \
-             -Wl,-z,defs $(libmudflap)
+       $(LINK) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \
+               -Wl,--version-script,$(srcdir)/libebl_sparc.map \
+               -Wl,-z,defs $(libmudflap)
        $(textrel_check)
 
 
@@ -153,9 +153,9 @@ am_libebl_ppc_pic_a_OBJECTS = $(ppc_SRCS:.c=.os)
 
 libebl_ppc_so_SOURCES =
 libebl_ppc.so: libebl_ppc_pic.a libebl_ppc.map
-       $(CC) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \
-             -Wl,--version-script,$(srcdir)/libebl_ppc.map \
-             -Wl,-z,defs $(libelf) $(libmudflap)
+       $(LINK) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \
+               -Wl,--version-script,$(srcdir)/libebl_ppc.map \
+               -Wl,-z,defs $(libelf) $(libmudflap)
        $(textrel_check)
 
 
@@ -165,9 +165,9 @@ am_libebl_ppc64_pic_a_OBJECTS = $(ppc64_SRCS:.c=.os)
 
 libebl_ppc64_so_SOURCES =
 libebl_ppc64.so: libebl_ppc64_pic.a libebl_ppc64.map
-       $(CC) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \
-             -Wl,--version-script,$(srcdir)/libebl_ppc64.map \
-             -Wl,-z,defs $(libelf) $(libmudflap)
+       $(LINK) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \
+               -Wl,--version-script,$(srcdir)/libebl_ppc64.map \
+               -Wl,-z,defs $(libelf) $(libmudflap)
        $(textrel_check)
 
 
@@ -199,5 +199,5 @@ noinst_HEADERS = libeblP.h $(noinst_LIBRARIES:%_pic.a=%.h)
 EXTRA_DIST = $(noinst_LIBRARIES:%_pic.a=%.map) \
             $(foreach m,$(modules),$($(m)_SRCS))
 
-CLEANFILES = $(am_libebl_pic_a_OBJECTS) \
+CLEANFILES = $(am_libebl_pic_a_OBJECTS) *.gcno *.gcda \
             $(foreach m,$(modules),$(am_libebl_$(m)_pic_a_OBJECTS))
index 6c8b5b1eb9cfc0ee9745bb3493d4fd95dc59c8bf..17b7136e7b69b6a4d2f394365fa919a33b004a68 100644 (file)
@@ -1,3 +1,7 @@
+2005-08-28  Ulrich Drepper  <drepper@redhat.com>
+
+       * Makefile.am: Use $(LINK) not $(CC) when creating DSO.
+
 2005-08-27  Ulrich Drepper  <drepper@redhat.com>
 
        * elf_begin.c (file_read_elf): Avoid reading ELF header from file
index 28d0d6ed15ff864dcc32e1bb030ce05d9d3416fb..17851fc5a99e0556be107626bec79ed9821ff05f 100644 (file)
@@ -92,9 +92,9 @@ am_libelf_pic_a_OBJECTS = $(libelf_a_SOURCES:.c=.os)
 
 libelf_so_SOURCES =
 libelf.so: libelf_pic.a libelf.map
-       $(CC) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \
-             -Wl,--version-script,$(srcdir)/libelf.map,--no-undefined \
-             -Wl,--soname,$@.$(VERSION),-z,-defs
+       $(LINK) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \
+               -Wl,--version-script,$(srcdir)/libelf.map,--no-undefined \
+               -Wl,--soname,$@.$(VERSION),-z,-defs
        if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi
        ln -fs $@ $@.$(VERSION)
 
@@ -122,4 +122,4 @@ noinst_HEADERS = elf.h abstract.h common.h exttypes.h gelf_xlate.h libelfP.h \
                 version_xlate.h dl-hash.h
 EXTRA_DIST = libelf.map
 
-CLEANFILES = $(am_libelf_pic_a_OBJECTS)
+CLEANFILES = $(am_libelf_pic_a_OBJECTS) *.gcno *.gcda
index d092882561f291d3fb1546c058117d80630f0003..9494dd007714f3fcfee4632971a2fa601d42779e 100644 (file)
@@ -1,5 +1,11 @@
 2005-08-28  Ulrich Drepper  <drepper@redhat.com>
 
+       * Makefile.an [BUILD_STATIC] (libdw): Add -ldl.
+       (CLEANFILES): Add *.gcno *.gcda *.gconv.
+
+       * strings.c (process_chunk): Reorder expressions in conditional
+       (process_chunk_mb): Likewise.
+
        * strings.c: New file.
        * Makefile.am (bin_PROGRAMS): Add strings.
        (strings_no_Wstring): Define.
index ef944776018a32897097dfbdc098e7993f96609b..1a4894974d14087cbb1f93a1d364f478749359c6 100644 (file)
@@ -67,7 +67,7 @@ libmudflap = -lmudflap
 endif
 
 if BUILD_STATIC
-libdw = ../libdw/libdw.a $(libelf) $(libebl)
+libdw = ../libdw/libdw.a $(libelf) $(libebl) -ldl
 libelf = ../libelf/libelf.a
 else
 libdw = ../libdw/libdw.so
@@ -148,4 +148,4 @@ installcheck-binPROGRAMS: $(bin_PROGRAMS)
          done; \
        done; rm -f c$${pid}_.???; exit $$bad
 
-CLEANFILES = none_ld.os $(ld_modules:.c=.os)
+CLEANFILES = none_ld.os $(ld_modules:.c=.os) *.gcno *.gcda *.gconv
index fa7efa4ac0930d66ff33e51d937d5754e8532b7e..1898ac74e764ef3eaf4ebedee50a4ad3a4ba9fad 100644 (file)
@@ -334,7 +334,7 @@ process_chunk_mb (const char *fname, const unsigned char *buf, off64_t to,
            ch = buf[3] << 24 | buf[2] << 16 | buf[1] << 8 | buf[0];
        }
 
-      if (ch <= 255 && (ch == '\t' || isprint (ch)))
+      if (ch <= 255 && (isprint (ch) || ch == '\t'))
        {
          ++buf;
          ++curlen;
@@ -399,8 +399,7 @@ process_chunk (const char *fname, const unsigned char *buf, off64_t to,
   const unsigned char *start = buf;
   while (len > 0)
     {
-      if ((*buf == '\t' || isprint (*buf))
-              && (! char_7bit || *buf <= 127))
+      if ((isprint (*buf) || *buf == '\t') && (! char_7bit || *buf <= 127))
        {
          ++buf;
          ++curlen;
index 514f4a4851d13a429c28ccd1acab54508621a9aa..81f8d1d6a68f1105ea1eb005d7a19cdd93c61182 100644 (file)
@@ -1,3 +1,8 @@
+2005-08-28  Ulrich Drepper  <drepper@redhat.com>
+
+       * Makefile.an [BUILD_STATIC] (libdw): Add -ldl.
+       (CLEANFILES): Add *.gcno *.gcda *.gconv.
+
 2005-08-28  Ulrich Drepper  <drepper@redhat.com>
 
        * run-strings-test.sh: New file.
index 78cf502b58aca02264ad5002b88a9829aac7c16e..1fb0c1c997cbe7348f15c425c5712865ce7fa6be 100644 (file)
@@ -78,7 +78,7 @@ libmudflap = -lmudflap
 endif
 
 if BUILD_STATIC
-libdw = ../libdw/libdw.a $(libelf) $(libebl)
+libdw = ../libdw/libdw.a $(libelf) $(libebl) -ldl
 libelf = ../libelf/libelf.a
 libasm = ../libasm/libasm.a
 else
@@ -126,4 +126,4 @@ asm_tst8_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
 asm_tst9_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
 dwflmodtest_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) -ldl
 
-CLEANFILES = xxx
+CLEANFILES = xxx *.gcno *.gcda *gconv