rpms/elfutils/devel elfutils-portability.patch, NONE, 1.1 elfutils.spec, 1.15, 1.16 elfutils-0.101-bswap.patch, 1.1, NONE elfutils-0.101-portability.patch, 1.1, NONE

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Wed Mar 23 17:39:32 UTC 2005


Update of /cvs/dist/rpms/elfutils/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv25309

Modified Files:
	elfutils.spec 
Added Files:
	elfutils-portability.patch 
Removed Files:
	elfutils-0.101-bswap.patch elfutils-0.101-portability.patch 
Log Message:
0.103-2


elfutils-portability.patch:
 configure.ac       |    9 +++++++++
 lib/ChangeLog      |    5 +++++
 lib/Makefile.am    |    3 ++-
 libasm/Makefile.am |    3 ++-
 libdw/Makefile.am  |    3 ++-
 libebl/Makefile.am |    3 ++-
 libelf/Makefile.am |    3 ++-
 src/Makefile.am    |    5 +++--
 src/strip.c        |   26 ++++++++++++++++++++++++--
 9 files changed, 51 insertions(+), 9 deletions(-)

--- NEW FILE elfutils-portability.patch ---
2005-02-07  Roland McGrath  <roland at frob.com>

	* configure.ac (WEXTRA): Check for -Wextra and set this substitution.

2003-08-12  Roland McGrath  <roland at redhat.com>

	* 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  <roland at redhat.com>
+
+	* Makefile.am (WEXTRA): New variable, substituted by configure.
+	(AM_CFLAGS): Use it in place of -Wextra.
+
 2005-02-15  Ulrich Drepper  <drepper at redhat.com>
 
 	* 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);


Index: elfutils.spec
===================================================================
RCS file: /cvs/dist/rpms/elfutils/devel/elfutils.spec,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- elfutils.spec	16 Feb 2005 13:47:13 -0000	1.15
+++ elfutils.spec	23 Mar 2005 17:39:30 -0000	1.16
@@ -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 @@
 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: bison >= 1.875
 BuildRequires: flex >= 2.5.4a
 BuildRequires: bzip2
+# Need <byteswap.h> that gives unsigned bswap_16 etc.
+BuildRequires: glibc-headers >= 2.3.4-11
 
 %define _gnu %{nil}
 %define _program_prefix eu-
@@ -87,8 +88,7 @@
 
 %prep
 %setup -q
-%patch1 -p0
-%patch2 -p1
+%patch1 -p1
 
 %build
 mkdir build-%{_target_platform}
@@ -121,11 +121,8 @@
 { 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 @@
 %{_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 @@
 %{_libdir}/libelf.so
 
 %changelog
+* Wed Mar 23 2005 Jakub Jelinek <jakub at redhat.com> 0.103-2
+- update to 0.103
+
 * Wed Feb 16 2005 Jakub Jelinek <jakub at redhat.com> 0.101-2
 - update to 0.101.
 - use %%configure macro to get CFLAGS etc. right


--- elfutils-0.101-bswap.patch DELETED ---


--- elfutils-0.101-portability.patch DELETED ---




More information about the fedora-cvs-commits mailing list