From a769ac68d62e438af13adc400f271c81376c42c4 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 23 Mar 2005 17:43:53 +0000 Subject: [PATCH] 0.103-2 --- .cvsignore | 2 +- elfutils-portability.patch | 198 +++++++++++++++++++++++++++++++++++++ elfutils.spec | 21 ++-- sources | 2 +- 4 files changed, 211 insertions(+), 12 deletions(-) create mode 100644 elfutils-portability.patch diff --git a/.cvsignore b/.cvsignore index ed26ea8..ace8540 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -elfutils-0.101.tar.gz +elfutils-0.103.tar.gz diff --git a/elfutils-portability.patch b/elfutils-portability.patch new file mode 100644 index 0000000..fc6a841 --- /dev/null +++ b/elfutils-portability.patch @@ -0,0 +1,198 @@ +2005-02-07 Roland McGrath + + * configure.ac (WEXTRA): Check for -Wextra and set this substitution. + +2003-08-12 Roland McGrath + + * configure.ac: Check for struct stat st_?tim members. + * src/strip.c (process_file): Use st_?time if st_?tim are not there. + + * configure.ac: Check for futimes function. + * src/strip.c (handle_elf) [! HAVE_FUTIMES]: Use utimes instead. + (handle_ar) [! HAVE_FUTIMES]: Likewise. + +--- elfutils/configure.ac ++++ elfutils/configure.ac +@@ -66,6 +66,15 @@ CFLAGS="$old_CFLAGS"]) + AS_IF([test "x$ac_cv_c99" != xyes], + AC_MSG_ERROR([gcc with C99 support required])) + ++AC_CACHE_CHECK([for -Wextra option to $CC], ac_cv_cc_wextra, [dnl ++old_CFLAGS="$CFLAGS" ++CFLAGS="$CFLAGS -Wextra" ++AC_COMPILE_IFELSE([void foo (void) { }], ++ ac_cv_cc_wextra, ac_cv_cc_wextra=no) ++CFLAGS="$old_CFLAGS"]) ++AC_SUBST(WEXTRA) ++AS_IF([test "x$ac_cv_cc_wextra" = yes], [WEXTRA=-Wextra]) ++ + LOCALEDIR=$datadir + AC_SUBST(LOCALEDIR) + AC_DEFINE_UNQUOTED(LOCALEDIR, "$LOCALEDIR") +--- elfutils/lib/ChangeLog ++++ elfutils/lib/ChangeLog +@@ -1,3 +1,8 @@ ++2005-02-07 Roland McGrath ++ ++ * Makefile.am (WEXTRA): New variable, substituted by configure. ++ (AM_CFLAGS): Use it in place of -Wextra. ++ + 2005-02-15 Ulrich Drepper + + * dynamicsizehash.c (lookup): Mark val parameter as possibly unused. +--- elfutils/lib/Makefile.am ++++ elfutils/lib/Makefile.am +@@ -17,12 +17,13 @@ + ## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + ## + DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H ++WEXTRA = @WEXTRA@ + if MUDFLAP + AM_CFLAGS = -fmudflap + else + AM_CFLAGS = + endif +-AM_CFLAGS += -fpic -Wall -Wshadow -Werror -Wunused -Wextra $($(*F)_CFLAGS) ++AM_CFLAGS += -fpic -Wall -Wshadow -Werror -Wunused $(WEXTRA) $($(*F)_CFLAGS) + INCLUDES = -I$(srcdir)/../libelf -I.. + + noinst_LIBRARIES = libeu.a +--- elfutils/libasm/Makefile.am ++++ elfutils/libasm/Makefile.am +@@ -14,12 +14,13 @@ + ## 3001 King Ranch Road, Ukiah, CA 95482. + ## + DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H ++WEXTRA = @WEXTRA@ + if MUDFLAP + AM_CFLAGS = -fmudflap + else + AM_CFLAGS = + endif +-AM_CFLAGS += -Wall -Wshadow -Werror -Wunused -Wextra -Wformat=2 ++AM_CFLAGS += -Wall -Wshadow -Werror -Wunused $(WEXTRA) -Wformat=2 + INCLUDES = -I. -I$(srcdir) -I.. -I$(top_srcdir)/libelf -I$(top_srcdir)/libebl \ + -I$(top_srcdir)/lib + GCC_INCLUDE = -I$(shell $(CC) -print-file-name=include) +--- elfutils/libdw/Makefile.am ++++ elfutils/libdw/Makefile.am +@@ -14,12 +14,13 @@ + ## 3001 King Ranch Road, Ukiah, CA 95482. + ## + DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H ++WEXTRA = @WEXTRA@ + if MUDFLAP + AM_CFLAGS = -fmudflap + else + AM_CFLAGS = + endif +-AM_CFLAGS += -Wall -Werror -Wshadow -Wunused -Wformat=2 -Wextra -std=gnu99 ++AM_CFLAGS += -Wall -Werror -Wshadow -Wunused -Wformat=2 $(WEXTRA) -std=gnu99 + INCLUDES = -I. -I$(srcdir) -I$(srcdir)/../libelf -I.. -I$(srcdir)/../lib + VERSION = 1 + +--- elfutils/libebl/Makefile.am ++++ elfutils/libebl/Makefile.am +@@ -14,12 +14,13 @@ + ## 3001 King Ranch Road, Ukiah, CA 95482. + ## + DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -DOBJDIR=\"$(shell pwd)\" ++WEXTRA = @WEXTRA@ + if MUDFLAP + AM_CFLAGS = -fmudflap + else + AM_CFLAGS = + endif +-AM_CFLAGS += -fpic -Wall -Wshadow -Werror -Wunused -Wextra -Wformat=2 \ ++AM_CFLAGS += -fpic -Wall -Wshadow -Werror -Wunused $(WEXTRA) -Wformat=2 \ + -std=gnu99 + + INCLUDES = -I$(srcdir) -I$(top_srcdir)/libelf -I$(top_srcdir)/lib -I.. +--- elfutils/libelf/Makefile.am ++++ elfutils/libelf/Makefile.am +@@ -17,12 +17,13 @@ + ## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + ## + DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H ++WEXTRA = @WEXTRA@ + if MUDFLAP + AM_CFLAGS = -fpic -fmudflap + else + AM_CFLAGS = + endif +-AM_CFLAGS += -Wall -Wshadow -Werror -Wunused -Wextra -Wformat=2 -std=gnu99 \ ++AM_CFLAGS += -Wall -Wshadow -Werror -Wunused $(WEXTRA) -Wformat=2 -std=gnu99 \ + $($(*F)_CFLAGS) + INCLUDES = -I$(srcdir) -I$(top_srcdir)/lib -I.. + GCC_INCLUDE = -I$(shell $(CC) -print-file-name=include) +--- elfutils/src/Makefile.am ++++ elfutils/src/Makefile.am +@@ -15,14 +15,15 @@ + ## + DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H $(YYDEBUG) \ + -DSRCDIR=\"$(shell cd $(srcdir);pwd)\" -DOBJDIR=\"$(shell pwd)\" ++WEXTRA = @WEXTRA@ + if MUDFLAP +-AM_CFLAGS = -Wall -Wshadow -Wunused -Wextra -std=gnu99 -fmudflap \ ++AM_CFLAGS = -Wall -Wshadow -Wunused $(WEXTRA) -std=gnu99 -fmudflap \ + $(native_ld_cflags) $(if $($(*F)_no_Wunused),,-Wunused) \ + $(if $($(*F)_no_Wformat),,-Wformat=2) + else + AM_CFLAGS = -Wall -Wshadow -std=gnu99 $(native_ld_cflags) \ + $(if $($(*F)_no_Werror),,-Werror) \ +- $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \ ++ $(if $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) \ + $(if $($(*F)_no_Wformat),,-Wformat=2) + endif + if MUDFLAP +--- elfutils/src/strip.c ++++ elfutils/src/strip.c +@@ -245,8 +245,18 @@ process_file (const char *fname) + + /* If we have to preserve the timestamp, we need it in the + format utimes() understands. */ ++#ifdef HAVE_STRUCT_STAT_ST_ATIM + TIMESPEC_TO_TIMEVAL (&tv[0], &pre_st.st_atim); ++#else ++ tv[0].tv_sec = pre_st.st_atime; ++ tv[0].tv_usec = 0; ++#endif ++#ifdef HAVE_STRUCT_STAT_ST_MTIM + TIMESPEC_TO_TIMEVAL (&tv[1], &pre_st.st_mtim); ++#else ++ tv[1].tv_sec = pre_st.st_atime; ++ tv[1].tv_usec = 0; ++#endif + } + + /* Open the file. */ +@@ -1677,7 +1687,13 @@ handle_elf (int fd, Elf *elf, const char + /* If requested, preserve the timestamp. */ + if (tvp != NULL) + { +- if (futimes (fd, tvp) != 0) ++ if ( ++#ifdef HAVE_FUTIMES ++ futimes (fd, tvp) != 0 ++#else ++ utimes (output_fname, tvp) != 0 ++#endif ++ ) + { + error (0, errno, gettext ("\ + cannot set access and modification date of \"%s\""), +@@ -1734,7 +1750,13 @@ handle_ar (int fd, Elf *elf, const char + + if (tvp != NULL) + { +- if (unlikely (futimes (fd, tvp) != 0)) ++ if (unlikely ( ++#ifdef HAVE_FUTIMES ++ futimes (fd, tvp) ++#else ++ utimes (fname, tvp) ++#endif ++ != 0)) + { + error (0, errno, gettext ("\ + cannot set access and modification date of \"%s\""), fname); diff --git a/elfutils.spec b/elfutils.spec index 4c296ac..b7c493d 100644 --- a/elfutils.spec +++ b/elfutils.spec @@ -1,7 +1,7 @@ %define gpl 0 Summary: A collection of utilities and DSOs to handle compiled objects. Name: elfutils -Version: 0.101 +Version: 0.103 Release: 2 %if %{gpl} License: GPL @@ -11,8 +11,7 @@ License: OSL Group: Development/Tools #URL: file://home/devel/drepper/ Source: elfutils-%{version}.tar.gz -Patch1: elfutils-%{version}-bswap.patch -Patch2: elfutils-%{version}-portability.patch +Patch1: elfutils-portability.patch Obsoletes: libelf libelf-devel Requires: elfutils-libelf = %{version}-%{release} %if %{gpl} @@ -26,6 +25,8 @@ BuildRequires: gcc >= 3.2 BuildRequires: bison >= 1.875 BuildRequires: flex >= 2.5.4a BuildRequires: bzip2 +# Need that gives unsigned bswap_16 etc. +BuildRequires: glibc-headers >= 2.3.4-11 %define _gnu %{nil} %define _program_prefix eu- @@ -87,8 +88,7 @@ different sections of an ELF file. %prep %setup -q -%patch1 -p0 -%patch2 -p1 +%patch1 -p1 %build mkdir build-%{_target_platform} @@ -121,11 +121,8 @@ cd .. { cd ${RPM_BUILD_ROOT} rm -f .%{_bindir}/eu-ld rm -f .%{_includedir}/elfutils/libasm.h - rm -f .%{_includedir}/elfutils/libdw.h rm -f .%{_libdir}/libasm-%{version}.so rm -f .%{_libdir}/libasm.a - rm -f .%{_libdir}/libdw.so - rm -f .%{_libdir}/libdw.a } %endif @@ -172,11 +169,12 @@ rm -rf ${RPM_BUILD_ROOT} %{_includedir}/elfutils/elf-knowledge.h %if !%{gpl} %{_includedir}/elfutils/libebl.h +%{_includedir}/elfutils/libdw.h #%{_libdir}/libasm.a %{_libdir}/libebl.a -#%{_libdir}/libdw.a +%{_libdir}/libdw.a #%{_libdir}/libasm.so -#%{_libdir}/libdw.so +%{_libdir}/libdw.so %endif %files libelf @@ -193,6 +191,9 @@ rm -rf ${RPM_BUILD_ROOT} %{_libdir}/libelf.so %changelog +* Wed Mar 23 2005 Jakub Jelinek 0.103-2 +- update to 0.103 + * Wed Feb 16 2005 Jakub Jelinek 0.101-2 - update to 0.101. - use %%configure macro to get CFLAGS etc. right diff --git a/sources b/sources index 4142319..891461e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -36e8e5532b8ba5004abd32c46256e876 elfutils-0.101.tar.gz +2ffd19ed993c277d54da955ae3e9a09a elfutils-0.103.tar.gz