Magellan Linux

Contents of /trunk/elfutils/patches/elfutils-0.108-portability.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 144 - (show annotations) (download)
Tue May 8 20:06:05 2007 UTC (16 years, 11 months ago) by niro
File size: 18453 byte(s)
-import

1 --- elfutils/ChangeLog
2 +++ elfutils/ChangeLog
3 @@ -1,3 +1,16 @@
4 +2005-02-07 Roland McGrath <roland@frob.com>
5 +
6 + * configure.ac (WEXTRA): Check for -Wextra and set this substitution.
7 +
8 +2003-08-12 Roland McGrath <roland@redhat.com>
9 +
10 + * configure.ac: Check for struct stat st_?tim members.
11 + * src/strip.c (process_file): Use st_?time if st_?tim are not there.
12 +
13 + * configure.ac: Check for futimes function.
14 + * src/strip.c (handle_elf) [! HAVE_FUTIMES]: Use utimes instead.
15 + (handle_ar) [! HAVE_FUTIMES]: Likewise.
16 +
17 2005-02-22 Ulrich Drepper <drepper@redhat.com>
18
19 * Makefile.am (all_SUBDIRS): Don't add doc subdir for now.
20 --- elfutils/Makefile.in
21 +++ elfutils/Makefile.in
22 @@ -127,6 +127,7 @@ SHELL = @SHELL@
23 STRIP = @STRIP@
24 USE_NLS = @USE_NLS@
25 VERSION = @VERSION@
26 +WEXTRA = @WEXTRA@
27 XGETTEXT = @XGETTEXT@
28 YACC = @YACC@
29 ac_ct_CC = @ac_ct_CC@
30 --- elfutils/config/Makefile.in
31 +++ elfutils/config/Makefile.in
32 @@ -105,6 +105,7 @@ SHELL = @SHELL@
33 STRIP = @STRIP@
34 USE_NLS = @USE_NLS@
35 VERSION = @VERSION@
36 +WEXTRA = @WEXTRA@
37 XGETTEXT = @XGETTEXT@
38 YACC = @YACC@
39 ac_ct_CC = @ac_ct_CC@
40 --- elfutils/configure
41 +++ elfutils/configure
42 @@ -277,7 +277,7 @@ PACKAGE_STRING='Red Hat elfutils 0.108'
43 PACKAGE_BUGREPORT='http://bugzilla.redhat.com/bugzilla/'
44
45 ac_unique_file="libelf/libelf.h"
46 -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE RANLIB ac_ct_RANLIB YACC LEX LEXLIB LEX_OUTPUT_ROOT LOCALEDIR DATADIRNAME NATIVE_LD_TRUE NATIVE_LD_FALSE base_cpu MUDFLAP_TRUE MUDFLAP_FALSE USE_NLS MKINSTALLDIRS MSGFMT GMSGFMT XGETTEXT MSGMERGE LIBOBJS LTLIBOBJS'
47 +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE RANLIB ac_ct_RANLIB YACC LEX LEXLIB LEX_OUTPUT_ROOT WEXTRA LOCALEDIR DATADIRNAME NATIVE_LD_TRUE NATIVE_LD_FALSE base_cpu MUDFLAP_TRUE MUDFLAP_FALSE USE_NLS MKINSTALLDIRS MSGFMT GMSGFMT XGETTEXT MSGMERGE LIBOBJS LTLIBOBJS'
48 ac_subst_files=''
49
50 # Initialize some variables set by options.
51 @@ -3373,6 +3373,58 @@ echo "$as_me: error: gcc with C99 suppor
52 fi
53
54
55 +echo "$as_me:$LINENO: checking for -Wextra option to $CC" >&5
56 +echo $ECHO_N "checking for -Wextra option to $CC... $ECHO_C" >&6
57 +if test "${ac_cv_cc_wextra+set}" = set; then
58 + echo $ECHO_N "(cached) $ECHO_C" >&6
59 +else
60 + old_CFLAGS="$CFLAGS"
61 +CFLAGS="$CFLAGS -Wextra"
62 +cat >conftest.$ac_ext <<_ACEOF
63 +void foo (void) { }
64 +_ACEOF
65 +rm -f conftest.$ac_objext
66 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
67 + (eval $ac_compile) 2>conftest.er1
68 + ac_status=$?
69 + grep -v '^ *+' conftest.er1 >conftest.err
70 + rm -f conftest.er1
71 + cat conftest.err >&5
72 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
73 + (exit $ac_status); } &&
74 + { ac_try='test -z "$ac_c_werror_flag"
75 + || test ! -s conftest.err'
76 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
77 + (eval $ac_try) 2>&5
78 + ac_status=$?
79 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
80 + (exit $ac_status); }; } &&
81 + { ac_try='test -s conftest.$ac_objext'
82 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
83 + (eval $ac_try) 2>&5
84 + ac_status=$?
85 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
86 + (exit $ac_status); }; }; then
87 + ac_cv_cc_wextra=yes
88 +else
89 + echo "$as_me: failed program was:" >&5
90 +sed 's/^/| /' conftest.$ac_ext >&5
91 +
92 +ac_cv_cc_wextra=no
93 +fi
94 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
95 +CFLAGS="$old_CFLAGS"
96 +fi
97 +echo "$as_me:$LINENO: result: $ac_cv_cc_wextra" >&5
98 +echo "${ECHO_T}$ac_cv_cc_wextra" >&6
99 +
100 +if test "x$ac_cv_cc_wextra" = yes; then
101 + WEXTRA=-Wextra
102 +else
103 + WEXTRA=-W
104 +fi
105 +
106 +
107 LOCALEDIR=$datadir
108
109 cat >>confdefs.h <<_ACEOF
110 @@ -4818,6 +4870,7 @@ s,@YACC@,$YACC,;t t
111 s,@LEX@,$LEX,;t t
112 s,@LEXLIB@,$LEXLIB,;t t
113 s,@LEX_OUTPUT_ROOT@,$LEX_OUTPUT_ROOT,;t t
114 +s,@WEXTRA@,$WEXTRA,;t t
115 s,@LOCALEDIR@,$LOCALEDIR,;t t
116 s,@DATADIRNAME@,$DATADIRNAME,;t t
117 s,@NATIVE_LD_TRUE@,$NATIVE_LD_TRUE,;t t
118 --- elfutils/configure.ac
119 +++ elfutils/configure.ac
120 @@ -64,6 +64,15 @@ CFLAGS="$old_CFLAGS"])
121 AS_IF([test "x$ac_cv_c99" != xyes],
122 AC_MSG_ERROR([gcc with C99 support required]))
123
124 +AC_CACHE_CHECK([for -Wextra option to $CC], ac_cv_cc_wextra, [dnl
125 +old_CFLAGS="$CFLAGS"
126 +CFLAGS="$CFLAGS -Wextra"
127 +AC_COMPILE_IFELSE([void foo (void) { }],
128 + ac_cv_cc_wextra=yes, ac_cv_cc_wextra=no)
129 +CFLAGS="$old_CFLAGS"])
130 +AC_SUBST(WEXTRA)
131 +AS_IF([test "x$ac_cv_cc_wextra" = yes], [WEXTRA=-Wextra], [WEXTRA=-W])
132 +
133 LOCALEDIR=$datadir
134 AC_SUBST(LOCALEDIR)
135 AC_DEFINE_UNQUOTED(LOCALEDIR, "$LOCALEDIR")
136 --- elfutils/lib/ChangeLog
137 +++ elfutils/lib/ChangeLog
138 @@ -4,6 +4,11 @@
139 * Makefile.am (libeu_a_SOURCES): Add it.
140 * system.h: Declare crc32_file.
141
142 +2005-02-07 Roland McGrath <roland@redhat.com>
143 +
144 + * Makefile.am (WEXTRA): New variable, substituted by configure.
145 + (AM_CFLAGS): Use it in place of -Wextra.
146 +
147 2005-04-30 Ulrich Drepper <drepper@redhat.com>
148
149 * Makefile.am: Use -ffunction-sections for xmalloc.c.
150 --- elfutils/lib/Makefile.am
151 +++ elfutils/lib/Makefile.am
152 @@ -16,12 +16,13 @@
153 ## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
154 ##
155 DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H
156 +WEXTRA = @WEXTRA@
157 if MUDFLAP
158 AM_CFLAGS = -fmudflap
159 else
160 AM_CFLAGS =
161 endif
162 -AM_CFLAGS += -fpic -Wall -Wshadow -Werror -Wunused -Wextra $($(*F)_CFLAGS)
163 +AM_CFLAGS += -fpic -Wall -Wshadow -Werror -Wunused $(WEXTRA) $($(*F)_CFLAGS)
164 INCLUDES = -I$(srcdir)/../libelf -I..
165
166 noinst_LIBRARIES = libeu.a
167 --- elfutils/lib/Makefile.in
168 +++ elfutils/lib/Makefile.in
169 @@ -127,6 +127,7 @@ SHELL = @SHELL@
170 STRIP = @STRIP@
171 USE_NLS = @USE_NLS@
172 VERSION = @VERSION@
173 +WEXTRA = @WEXTRA@
174 XGETTEXT = @XGETTEXT@
175 YACC = @YACC@
176 ac_ct_CC = @ac_ct_CC@
177 @@ -169,9 +170,9 @@ sharedstatedir = @sharedstatedir@
178 sysconfdir = @sysconfdir@
179 target_alias = @target_alias@
180 @MUDFLAP_FALSE@AM_CFLAGS = -fpic -Wall -Wshadow -Werror -Wunused \
181 -@MUDFLAP_FALSE@ -Wextra $($(*F)_CFLAGS)
182 +@MUDFLAP_FALSE@ $(WEXTRA) $($(*F)_CFLAGS)
183 @MUDFLAP_TRUE@AM_CFLAGS = -fmudflap -fpic -Wall -Wshadow -Werror \
184 -@MUDFLAP_TRUE@ -Wunused -Wextra $($(*F)_CFLAGS)
185 +@MUDFLAP_TRUE@ -Wunused $(WEXTRA) $($(*F)_CFLAGS)
186 INCLUDES = -I$(srcdir)/../libelf -I..
187 noinst_LIBRARIES = libeu.a
188 libeu_a_SOURCES = xstrdup.c xstrndup.c xmalloc.c next_prime.c \
189 --- elfutils/libasm/Makefile.am
190 +++ elfutils/libasm/Makefile.am
191 @@ -13,12 +13,13 @@
192 ## 3001 King Ranch Road, Ukiah, CA 95482.
193 ##
194 DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H
195 +WEXTRA = @WEXTRA@
196 if MUDFLAP
197 AM_CFLAGS = -fmudflap
198 else
199 AM_CFLAGS =
200 endif
201 -AM_CFLAGS += -Wall -Wshadow -Werror -Wunused -Wextra -Wformat=2
202 +AM_CFLAGS += -Wall -Wshadow -Werror -Wunused $(WEXTRA) -Wformat=2
203 INCLUDES = -I. -I$(srcdir) -I.. -I$(top_srcdir)/libelf -I$(top_srcdir)/libebl \
204 -I$(top_srcdir)/lib
205 GCC_INCLUDE = -I$(shell $(CC) -print-file-name=include)
206 --- elfutils/libasm/Makefile.in
207 +++ elfutils/libasm/Makefile.in
208 @@ -159,6 +159,7 @@ SHELL = @SHELL@
209 STRIP = @STRIP@
210 USE_NLS = @USE_NLS@
211 VERSION = 1
212 +WEXTRA = @WEXTRA@
213 XGETTEXT = @XGETTEXT@
214 YACC = @YACC@
215 ac_ct_CC = @ac_ct_CC@
216 @@ -200,10 +201,10 @@ sbindir = @sbindir@
217 sharedstatedir = @sharedstatedir@
218 sysconfdir = @sysconfdir@
219 target_alias = @target_alias@
220 -@MUDFLAP_FALSE@AM_CFLAGS = -Wall -Wshadow -Werror -Wunused -Wextra \
221 +@MUDFLAP_FALSE@AM_CFLAGS = -Wall -Wshadow -Werror -Wunused $(WEXTRA) \
222 @MUDFLAP_FALSE@ -Wformat=2
223 @MUDFLAP_TRUE@AM_CFLAGS = -fmudflap -Wall -Wshadow -Werror -Wunused \
224 -@MUDFLAP_TRUE@ -Wextra -Wformat=2
225 +@MUDFLAP_TRUE@ $(WEXTRA) -Wformat=2
226 INCLUDES = -I. -I$(srcdir) -I.. -I$(top_srcdir)/libelf -I$(top_srcdir)/libebl \
227 -I$(top_srcdir)/lib
228
229 --- elfutils/libcpu/ChangeLog
230 +++ elfutils/libcpu/ChangeLog
231 @@ -1,3 +1,8 @@
232 +2005-04-04 Roland McGrath <roland@redhat.com>
233 +
234 + * Makefile.am (WEXTRA): New variable, substituted by configure.
235 + (AM_CFLAGS): Use it instead of -Wextra.
236 +
237 2005-02-15 Ulrich Drepper <drepper@redhat.com>
238
239 * Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
240 --- elfutils/libcpu/Makefile.am
241 +++ elfutils/libcpu/Makefile.am
242 @@ -13,7 +13,8 @@
243 ## 3001 King Ranch Road, Ukiah, CA 95482.
244 ##
245 DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H
246 -AM_CFLAGS = -Wall -Wshadow -Werror -Wextra -Wformat=2 -Wunused
247 +WEXTRA = @WEXTRA@
248 +AM_CFLAGS = -Wall -Wshadow -Werror $(WEXTRA) -Wformat=2 -Wunused
249 INCLUDES = -I$(srcdir)
250
251 noinst_LIBRARIES = libcpu_i386.a
252 --- elfutils/libcpu/Makefile.in
253 +++ elfutils/libcpu/Makefile.in
254 @@ -122,6 +122,7 @@ SHELL = @SHELL@
255 STRIP = @STRIP@
256 USE_NLS = @USE_NLS@
257 VERSION = @VERSION@
258 +WEXTRA = @WEXTRA@
259 XGETTEXT = @XGETTEXT@
260 YACC = @YACC@
261 ac_ct_CC = @ac_ct_CC@
262 @@ -163,7 +164,7 @@ sbindir = @sbindir@
263 sharedstatedir = @sharedstatedir@
264 sysconfdir = @sysconfdir@
265 target_alias = @target_alias@
266 -AM_CFLAGS = -Wall -Wshadow -Werror -Wextra -Wformat=2 -Wunused
267 +AM_CFLAGS = -Wall -Wshadow -Werror $(WEXTRA) -Wformat=2 -Wunused
268 INCLUDES = -I$(srcdir)
269 noinst_LIBRARIES = libcpu_i386.a
270 libcpu_i386_a_SOURCES = i386_dis.c
271 --- elfutils/libdw/Makefile.am
272 +++ elfutils/libdw/Makefile.am
273 @@ -13,12 +13,13 @@
274 ## 3001 King Ranch Road, Ukiah, CA 95482.
275 ##
276 DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H
277 +WEXTRA = @WEXTRA@
278 if MUDFLAP
279 AM_CFLAGS = -fmudflap
280 else
281 AM_CFLAGS =
282 endif
283 -AM_CFLAGS += -Wall -Werror -Wshadow -Wunused -Wformat=2 -Wextra -std=gnu99
284 +AM_CFLAGS += -Wall -Werror -Wshadow -Wunused -Wformat=2 $(WEXTRA) -std=gnu99
285 INCLUDES = -I. -I$(srcdir) -I$(srcdir)/../libelf -I.. -I$(srcdir)/../lib
286 VERSION = 1
287
288 --- elfutils/libdw/Makefile.in
289 +++ elfutils/libdw/Makefile.in
290 @@ -190,6 +190,7 @@ SHELL = @SHELL@
291 STRIP = @STRIP@
292 USE_NLS = @USE_NLS@
293 VERSION = 1
294 +WEXTRA = @WEXTRA@
295 XGETTEXT = @XGETTEXT@
296 YACC = @YACC@
297 ac_ct_CC = @ac_ct_CC@
298 @@ -232,9 +233,9 @@ sharedstatedir = @sharedstatedir@
299 sysconfdir = @sysconfdir@
300 target_alias = @target_alias@
301 @MUDFLAP_FALSE@AM_CFLAGS = -Wall -Werror -Wshadow -Wunused -Wformat=2 \
302 -@MUDFLAP_FALSE@ -Wextra -std=gnu99
303 +@MUDFLAP_FALSE@ $(WEXTRA) -std=gnu99
304 @MUDFLAP_TRUE@AM_CFLAGS = -fmudflap -Wall -Werror -Wshadow -Wunused \
305 -@MUDFLAP_TRUE@ -Wformat=2 -Wextra -std=gnu99
306 +@MUDFLAP_TRUE@ -Wformat=2 $(WEXTRA) -std=gnu99
307 INCLUDES = -I. -I$(srcdir) -I$(srcdir)/../libelf -I.. -I$(srcdir)/../lib
308 lib_LIBRARIES = libdw.a
309 @MUDFLAP_FALSE@noinst_LIBRARIES = libdw_pic.a
310 --- elfutils/libebl/Makefile.am
311 +++ elfutils/libebl/Makefile.am
312 @@ -13,12 +13,13 @@
313 ## 3001 King Ranch Road, Ukiah, CA 95482.
314 ##
315 DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -DOBJDIR=\"$(shell pwd)\"
316 +WEXTRA = @WEXTRA@
317 if MUDFLAP
318 AM_CFLAGS = -fmudflap
319 else
320 AM_CFLAGS =
321 endif
322 -AM_CFLAGS += -fpic -Wall -Wshadow -Werror -Wunused -Wextra -Wformat=2 \
323 +AM_CFLAGS += -fpic -Wall -Wshadow -Werror -Wunused $(WEXTRA) -Wformat=2 \
324 -std=gnu99
325
326 INCLUDES = -I$(srcdir) -I$(top_srcdir)/libelf -I$(top_srcdir)/lib -I..
327 --- elfutils/libebl/Makefile.in
328 +++ elfutils/libebl/Makefile.in
329 @@ -236,6 +236,7 @@ SHELL = @SHELL@
330 STRIP = @STRIP@
331 USE_NLS = @USE_NLS@
332 VERSION = 1
333 +WEXTRA = @WEXTRA@
334 XGETTEXT = @XGETTEXT@
335 YACC = @YACC@
336 ac_ct_CC = @ac_ct_CC@
337 @@ -278,9 +279,9 @@ sharedstatedir = @sharedstatedir@
338 sysconfdir = @sysconfdir@
339 target_alias = @target_alias@
340 @MUDFLAP_FALSE@AM_CFLAGS = -fpic -Wall -Wshadow -Werror -Wunused \
341 -@MUDFLAP_FALSE@ -Wextra -Wformat=2 -std=gnu99
342 +@MUDFLAP_FALSE@ $(WEXTRA) -Wformat=2 -std=gnu99
343 @MUDFLAP_TRUE@AM_CFLAGS = -fmudflap -fpic -Wall -Wshadow -Werror \
344 -@MUDFLAP_TRUE@ -Wunused -Wextra -Wformat=2 -std=gnu99
345 +@MUDFLAP_TRUE@ -Wunused $(WEXTRA) -Wformat=2 -std=gnu99
346 INCLUDES = -I$(srcdir) -I$(top_srcdir)/libelf -I$(top_srcdir)/lib -I..
347 lib_LIBRARIES = libebl.a
348 modules = i386 sh mips x86_64 ia64 alpha arm sparc ppc ppc64
349 --- elfutils/libelf/Makefile.am
350 +++ elfutils/libelf/Makefile.am
351 @@ -16,12 +16,13 @@
352 ## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
353 ##
354 DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H
355 +WEXTRA = @WEXTRA@
356 if MUDFLAP
357 AM_CFLAGS = -fpic -fmudflap
358 else
359 AM_CFLAGS =
360 endif
361 -AM_CFLAGS += -Wall -Wshadow -Werror -Wunused -Wextra -Wformat=2 -std=gnu99 \
362 +AM_CFLAGS += -Wall -Wshadow -Werror -Wunused $(WEXTRA) -Wformat=2 -std=gnu99 \
363 $($(*F)_CFLAGS)
364 INCLUDES = -I$(srcdir) -I$(top_srcdir)/lib -I..
365 GCC_INCLUDE = -I$(shell $(CC) -print-file-name=include)
366 --- elfutils/libelf/Makefile.in
367 +++ elfutils/libelf/Makefile.in
368 @@ -199,6 +199,7 @@ SHELL = @SHELL@
369 STRIP = @STRIP@
370 USE_NLS = @USE_NLS@
371 VERSION = 1
372 +WEXTRA = @WEXTRA@
373 XGETTEXT = @XGETTEXT@
374 YACC = @YACC@
375 ac_ct_CC = @ac_ct_CC@
376 @@ -240,10 +241,10 @@ sbindir = @sbindir@
377 sharedstatedir = @sharedstatedir@
378 sysconfdir = @sysconfdir@
379 target_alias = @target_alias@
380 -@MUDFLAP_FALSE@AM_CFLAGS = -Wall -Wshadow -Werror -Wunused -Wextra \
381 +@MUDFLAP_FALSE@AM_CFLAGS = -Wall -Wshadow -Werror -Wunused $(WEXTRA) \
382 @MUDFLAP_FALSE@ -Wformat=2 -std=gnu99 $($(*F)_CFLAGS)
383 @MUDFLAP_TRUE@AM_CFLAGS = -fpic -fmudflap -Wall -Wshadow -Werror \
384 -@MUDFLAP_TRUE@ -Wunused -Wextra -Wformat=2 -std=gnu99 \
385 +@MUDFLAP_TRUE@ -Wunused $(WEXTRA) -Wformat=2 -std=gnu99 \
386 @MUDFLAP_TRUE@ $($(*F)_CFLAGS)
387 INCLUDES = -I$(srcdir) -I$(top_srcdir)/lib -I..
388 GCC_INCLUDE = -I$(shell $(CC) -print-file-name=include)
389 --- elfutils/m4/Makefile.in
390 +++ elfutils/m4/Makefile.in
391 @@ -103,6 +103,7 @@ SHELL = @SHELL@
392 STRIP = @STRIP@
393 USE_NLS = @USE_NLS@
394 VERSION = @VERSION@
395 +WEXTRA = @WEXTRA@
396 XGETTEXT = @XGETTEXT@
397 YACC = @YACC@
398 ac_ct_CC = @ac_ct_CC@
399 --- elfutils/src/Makefile.am
400 +++ elfutils/src/Makefile.am
401 @@ -14,14 +14,15 @@
402 ##
403 DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H $(YYDEBUG) \
404 -DSRCDIR=\"$(shell cd $(srcdir);pwd)\" -DOBJDIR=\"$(shell pwd)\"
405 +WEXTRA = @WEXTRA@
406 if MUDFLAP
407 -AM_CFLAGS = -Wall -Wshadow -Wunused -Wextra -std=gnu99 -fmudflap \
408 +AM_CFLAGS = -Wall -Wshadow -Wunused $(WEXTRA) -std=gnu99 -fmudflap \
409 $(native_ld_cflags) $(if $($(*F)_no_Wunused),,-Wunused) \
410 $(if $($(*F)_no_Wformat),,-Wformat=2)
411 else
412 AM_CFLAGS = -Wall -Wshadow -std=gnu99 $(native_ld_cflags) \
413 $(if $($(*F)_no_Werror),,-Werror) \
414 - $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
415 + $(if $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) \
416 $(if $($(*F)_no_Wformat),,-Wformat=2)
417 endif
418 if MUDFLAP
419 --- elfutils/src/Makefile.in
420 +++ elfutils/src/Makefile.in
421 @@ -194,6 +194,7 @@ SHELL = @SHELL@
422 STRIP = @STRIP@
423 USE_NLS = @USE_NLS@
424 VERSION = @VERSION@
425 +WEXTRA = @WEXTRA@
426 XGETTEXT = @XGETTEXT@
427 YACC = @YACC@ -d
428 ac_ct_CC = @ac_ct_CC@
429 @@ -237,10 +238,10 @@ sysconfdir = @sysconfdir@
430 target_alias = @target_alias@
431 @MUDFLAP_FALSE@AM_CFLAGS = -Wall -Wshadow -std=gnu99 $(native_ld_cflags) \
432 @MUDFLAP_FALSE@ $(if $($(*F)_no_Werror),,-Werror) \
433 -@MUDFLAP_FALSE@ $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
434 +@MUDFLAP_FALSE@ $(if $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) \
435 @MUDFLAP_FALSE@ $(if $($(*F)_no_Wformat),,-Wformat=2)
436
437 -@MUDFLAP_TRUE@AM_CFLAGS = -Wall -Wshadow -Wunused -Wextra -std=gnu99 -fmudflap \
438 +@MUDFLAP_TRUE@AM_CFLAGS = -Wall -Wshadow -Wunused $(WEXTRA) -std=gnu99 -fmudflap \
439 @MUDFLAP_TRUE@ $(native_ld_cflags) $(if $($(*F)_no_Wunused),,-Wunused) \
440 @MUDFLAP_TRUE@ $(if $($(*F)_no_Wformat),,-Wformat=2)
441
442 --- elfutils/src/findtextrel.c
443 +++ elfutils/src/findtextrel.c
444 @@ -476,7 +476,11 @@ ptrcompare (const void *p1, const void *
445
446
447 static void
448 -check_rel (size_t nsegments, struct segments segments[nsegments],
449 +check_rel (size_t nsegments, struct segments segments[
450 +#if __GNUC__ >= 4
451 + nsegments
452 +#endif
453 + ],
454 GElf_Addr addr, Elf *elf, Elf_Scn *symscn, Dwarf *dw,
455 const char *fname, bool more_than_one, void **knownsrcs)
456 {
457 --- elfutils/src/strip.c
458 +++ elfutils/src/strip.c
459 @@ -40,6 +40,12 @@
460 #include <libebl.h>
461 #include <system.h>
462
463 +#ifdef HAVE_FUTIMES
464 +# define FUTIMES(fd, fname, tvp) futimes (fd, tvp)
465 +#else
466 +# define FUTIMES(fd, fname, tvp) utimes (fname, tvp)
467 +#endif
468 +
469
470 /* Name and version of program. */
471 static void print_version (FILE *stream, struct argp_state *state);
472 @@ -269,8 +275,18 @@ process_file (const char *fname)
473
474 /* If we have to preserve the timestamp, we need it in the
475 format utimes() understands. */
476 +#ifdef HAVE_STRUCT_STAT_ST_ATIM
477 TIMESPEC_TO_TIMEVAL (&tv[0], &pre_st.st_atim);
478 +#else
479 + tv[0].tv_sec = pre_st.st_atime;
480 + tv[0].tv_usec = 0;
481 +#endif
482 +#ifdef HAVE_STRUCT_STAT_ST_MTIM
483 TIMESPEC_TO_TIMEVAL (&tv[1], &pre_st.st_mtim);
484 +#else
485 + tv[1].tv_sec = pre_st.st_atime;
486 + tv[1].tv_usec = 0;
487 +#endif
488 }
489
490 /* Open the file. */
491 @@ -1677,7 +1693,7 @@ handle_elf (int fd, Elf *elf, const char
492 /* If requested, preserve the timestamp. */
493 if (tvp != NULL)
494 {
495 - if (futimes (fd, tvp) != 0)
496 + if (FUTIMES (fd, output_fname, tvp) != 0)
497 {
498 error (0, errno, gettext ("\
499 cannot set access and modification date of '%s'"),
500 @@ -1734,7 +1750,7 @@ handle_ar (int fd, Elf *elf, const char
501
502 if (tvp != NULL)
503 {
504 - if (unlikely (futimes (fd, tvp) != 0))
505 + if (unlikely (FUTIMES (fd, fname, tvp) != 0))
506 {
507 error (0, errno, gettext ("\
508 cannot set access and modification date of '%s'"), fname);
509 --- elfutils/tests/Makefile.in
510 +++ elfutils/tests/Makefile.in
511 @@ -266,6 +266,7 @@ SHELL = @SHELL@
512 STRIP = @STRIP@
513 USE_NLS = @USE_NLS@
514 VERSION = @VERSION@
515 +WEXTRA = @WEXTRA@
516 XGETTEXT = @XGETTEXT@
517 YACC = @YACC@
518 ac_ct_CC = @ac_ct_CC@