Red Hat Bugzilla – Bug 149020
Patch with check for -Wextra in elfutils doesn't really work
Last modified: 2007-11-30 17:11:00 EST
Description of problem:
Patch with check for -Wextra in elfutils doesn't really work:
if gcc -D_GNU_SOURCE -DHAVE_CONFIG_H -I. -I/usr/src/redhat/BUILD/elfutils-
0.101/build-i386-redhat-linux/../libcpu -I.. -I/usr/src/redhat/BUILD/elfutils-
0.101/build-i386-redhat-linux/../libcpu -Wall -Wshadow -Werror -Wextra
-Wformat=2 -Wunused -O2 -g -march=i386 -mcpu=i686 -MT i386_dis.o -MD -MP -MF
".deps/i386_dis.Tpo" -c -o i386_dis.o /usr/src/redhat/BUILD/elfutils-
then mv -f ".deps/i386_dis.Tpo" ".deps/i386_dis.Po"; else rm -f ".deps/i386
_dis.Tpo"; exit 1; fi
cc1: unrecognized option `-Wextra'
make: *** [i386_dis.o] Error 1
make: Leaving directory `/usr/src/redhat/BUILD/elfutils-0.101/build-i386-
make: *** [install-recursive] Fehler 1
Version-Release number of selected component (if applicable):
Everytime, see below.
Steps to Reproduce:
1. Use a compiler that doesn't have -Wextra (RHEL3's gcc for example)
2. Rebuild elfutils-0.101-2
3. Die with an error
Patch with check for -Wextra in elfutils doesn't really work.
Rebuilding also should work without the -Wextra parameter. The attached patch
solves the problem for me.
BTW, gcc 3.2.x also has problems with the changes in src/strip.c of the
elfutils-0.101-portability.patch - but I guess, this is irrelevant for
Created attachment 111183 [details]
This is not really a supported issue since it doesn't come up if you are using
the stock compiler. Anyway, the current rawhide elfutils srpm contains a
portability patch that does work with older compilers, you have to use rpmbuild
--with compat to build the srpm using that patch.