summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2005-08-07 04:41:39 +0000
committerUlrich Drepper <drepper@redhat.com>2005-08-07 04:41:39 +0000
commit47be795df365174601a08535bf61d22301697ef8 (patch)
tree016407cd67ef07066784632ffa1a04f059dce6a7
parentca2db8a3ae7bbcbaa8aa314d06608683e694d2df (diff)
downloadelfutils-47be795df365174601a08535bf61d22301697ef8.tar.gz
Implement --enable-gprof option in configure script.
-rw-r--r--ChangeLog4
-rw-r--r--configure.ac14
-rw-r--r--lib/ChangeLog4
-rw-r--r--lib/Makefile.am2
-rw-r--r--libelf/ChangeLog4
-rw-r--r--libelf/Makefile.am5
-rw-r--r--src/ChangeLog5
-rw-r--r--src/Makefile.am21
-rw-r--r--tests/ChangeLog5
-rw-r--r--tests/Makefile.am8
10 files changed, 58 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index 3192cee8..9a7850aa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2005-08-06 Ulrich Drepper <drepper@redhat.com>
+
+ * configure.ac: Add --enable-gprof option.
+
2005-07-27 Roland McGrath <roland@redhat.com>
* Makefile.am (all_SUBDIRS): Put libdwfl before libdw.
diff --git a/configure.ac b/configure.ac
index 578ec655..960463c4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -16,7 +16,7 @@ dnl You should have received a copy of the GNU General Public License
dnl along with this program; if not, write to the Free Software Foundation,
dnl Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
dnl
-AC_INIT([Red Hat elfutils],[0.112],[http://bugzilla.redhat.com/bugzilla/],
+AC_INIT([Red Hat elfutils],[0.113],[http://bugzilla.redhat.com/bugzilla/],
[elfutils])
AC_CONFIG_AUX_DIR([config])
@@ -129,6 +129,18 @@ if test "$use_mudflap" = fail; then
fi
AM_CONDITIONAL(MUDFLAP, test "$use_mudflap" = yes)
+# Enable gprof suport.
+AC_ARG_ENABLE([gprof],
+AC_HELP_STRING([--enable-gprof],
+[build binaries with gprof support]), [use_gprof=yes], [use_gprof=no])
+if test "$use_gprof" = yes; then
+ CFLAGS="$CFLAGS -pg"
+ LDFLAGS="$LDFLAGS -pg"
+fi
+AM_CONDITIONAL(GPROF, test "$use_gprof" = yes)
+AM_CONDITIONAL(BUILD_STATIC, [dnl
+test "$use_mudflap" = yes -o "$use_gprof" = yes])
+
LIBEBL_SUBDIR="$PACKAGE"
AC_ARG_ENABLE([libebl-subdir],
AS_HELP_STRING([--enable-libebl-subdir=DIR],
diff --git a/lib/ChangeLog b/lib/ChangeLog
index 9ddc2163..5b79d096 100644
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -1,3 +1,7 @@
+2005-08-06 Ulrich Drepper <drepper@redhat.com>
+
+ * Makefile.am (xmalloc_CFLAGS): Define only if !GPROF.
+
2005-05-03 Roland McGrath <roland@redhat.com>
* crc32_file.c: New file.
diff --git a/lib/Makefile.am b/lib/Makefile.am
index facb5634..b34d5440 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -32,4 +32,6 @@ libeu_a_SOURCES = xstrdup.c xstrndup.c xmalloc.c next_prime.c \
noinst_HEADERS = fixedsizehash.h system.h dynamicsizehash.h list.h
EXTRA_DIST = dynamicsizehash.c
+if !GPROF
xmalloc_CFLAGS = -ffunction-sections
+endif
diff --git a/libelf/ChangeLog b/libelf/ChangeLog
index 5d22c326..4a8bc879 100644
--- a/libelf/ChangeLog
+++ b/libelf/ChangeLog
@@ -1,3 +1,7 @@
+2005-08-06 Ulrich Drepper <drepper@redhat.com>
+
+ * Makefile.am (AM_CFLAGS): Add -fpic when BUILD_STATIC.
+
2005-08-03 Ulrich Drepper <drepper@redhat.com>
* libelf.map: Move elf32_offscn, elf64_offscn, and gelf_offscn in
diff --git a/libelf/Makefile.am b/libelf/Makefile.am
index d9caac65..3853608b 100644
--- a/libelf/Makefile.am
+++ b/libelf/Makefile.am
@@ -17,10 +17,13 @@
##
DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H
if MUDFLAP
-AM_CFLAGS = -fpic -fmudflap
+AM_CFLAGS = -fmudflap
else
AM_CFLAGS =
endif
+if BUILD_STATIC
+AM_CFLAGS += -fpic
+endif
AM_CFLAGS += -Wall -Wshadow -Werror -Wunused -Wextra -Wformat=2 -std=gnu99 \
$($(*F)_CFLAGS)
INCLUDES = -I$(srcdir) -I$(top_srcdir)/lib -I..
diff --git a/src/ChangeLog b/src/ChangeLog
index 6533861b..cf315fff 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2005-08-06 Ulrich Drepper <drepper@redhat.com>
+
+ * Makefile.am (AM_CFLAGS): Avoid duplication.
+ Link with statis libs if BUILD_STATIC.
+
2005-08-05 Ulrich Drepper <drepper@redhat.com>
* elflint.c: Many, many more tests. Mostly related to symbol
diff --git a/src/Makefile.am b/src/Makefile.am
index 5229dce3..73c82dc6 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -15,18 +15,15 @@
DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H $(YYDEBUG) \
-DSRCDIR=\"$(shell cd $(srcdir);pwd)\" -DOBJDIR=\"$(shell pwd)\"
if MUDFLAP
-AM_CFLAGS = -Wall -Wshadow -Wunused -Wextra -std=gnu99 -fmudflap \
- $(native_ld_cflags) $(if $($(*F)_no_Wunused),,-Wunused) \
- $(if $($(*F)_no_Wformat),,-Wformat=2)
+AM_CFLAGS = -fmudflap
else
-AM_CFLAGS = -Wall -Wshadow -std=gnu99 $(native_ld_cflags) \
- $(if $($(*F)_no_Werror),,-Werror) \
- $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
- $(if $($(*F)_no_Wformat),,-Wformat=2)
-endif
-if MUDFLAP
-libmudflap = -lmudflap
+AM_CFLAGS =
endif
+AM_CFLAGS += -Wall -Wshadow -std=gnu99 $(native_ld_cflags) \
+ $(if $($(*F)_no_Werror),,-Werror) \
+ $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
+ $(if $($(*F)_no_Wformat),,-Wformat=2)
+
INCLUDES = -I$(srcdir) -I$(srcdir)/../libelf -I$(srcdir)/../libebl -I$(srcdir)/../lib -I$(srcdir)/../libdw -I..
YACC = @YACC@ -d
@@ -64,6 +61,10 @@ EXTRA_DIST = elf32-i386.script libld_elf_i386.map $(ld_modules)
ld_modules = i386_ld.c
if MUDFLAP
+libmudflap = -lmudflap
+endif
+
+if BUILD_STATIC
libdw = ../libdw/libdw.a
libelf = ../libelf/libelf.a
else
diff --git a/tests/ChangeLog b/tests/ChangeLog
index d5926489..25474b06 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,8 @@
+2005-08-06 Ulrich Drepper <drepper@redhat.com>
+
+ * Makefile.am: Link with statis libs if BUILD_STATIC.
+ (dwflmodtest_LDADD): Also link with -ldl.
+
2005-08-02 Ulrich Drepper <drepper@redhat.com>
* Makefile.am: Add -ldl to asm_tst[1-9]_LDASS.
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 07b87e0e..c0c23c09 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -64,10 +64,14 @@ EXTRA_DIST = run-arextract.sh run-arsymtest.sh \
testfile18.bz2
if MUDFLAP
+static_build=yes
+libmudflap = -lmudflap
+endif
+
+if BUILD_STATIC
libdw = ../libdw/libdw.a
libelf = ../libelf/libelf.a
libasm = ../libasm/libasm.a
-libmudflap = -lmudflap
else
libdw = ../libdw/libdw.so
libelf = ../libelf/libelf.so
@@ -110,6 +114,6 @@ asm_tst6_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
asm_tst7_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
asm_tst8_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
asm_tst9_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl
-dwflmodtest_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap)
+dwflmodtest_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) -ldl
CLEANFILES = xxx