backward compatibility problem with grub

D. Hugh Redelmeier hugh at mimosa.com
Fri Apr 29 06:23:11 UTC 2005


| From: Jeff Spaleta <jspaleta at gmail.com>

| This is quite easy to resolve.. edit the grub.spec file to remove
| -Wno-pointer-sign

I would have thought that the whole point of the autoconf horror show
is to avoid wiring this stuff in.

| and it will rebuild on fc3 using the compiler tools in fc3.  Right now
| when compiling for gcc4 this warning needs to be supressed to get grub
| to build. Since gcc4 is now the default compiler in rawhide, the
| rawhide grub has that option turned on.  I don't think its
| unreasonable to have to edit a spec file on occasion to get something
| to recompile, especially when we are talking about jumping a compiler
| toolchain version.

I admit that I am naive about this.  The technical solution used might
be expeditious.  But from a distance, something looks wrong.

I don't know autoconf (I have avoided it), but the first chunk of its
documentation (in info format -- a bad sign) says:

   Autoconf is a tool for producing shell scripts that automatically
   configure software source code packages to adapt to many kinds of
   UNIX-like systems.  The configuration scripts produced by Autoconf
   are independent of Autoconf when they are run, so their users do
   not need to have Autoconf.

The .spec file used autoconf.  Surely adapting between GCC versions
should be well within the scope of autoconf.

So: hardwiring CFLAGS into a spec file seems suspect.  That is
precisely what the grub spec does.  CFLAGS specific to GCC4.  It makes
the .spec file brittle.  Portability is a good thing.

Also: usually compiler warnings should be addressed by changing the
code that provokes the warning.  Not having a gcc4 at hand, I haven't
looked at the particular code in grub that causes the warning(s) that
are being suppressed, so I don't know whether the warning is bogus or
warranted.

BTW: why does x86_64 require -static and other architectures do not?
A comment explaining this would be welcome in the .spec file.




More information about the fedora-test-list mailing list