[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Outdated GNU config (config.{sub,guess}) and autotools-dev



Hello developpers,

I have lacked time to read debian-devel in the last few weeks, so sorry if I missed some points.

I think Debian packages does not need config.guess and config.subi to build.
Just configure packages in debian/rules with

./configure --host=$DEB_HOST_GNU_TYPE

and you skip the use of config.guess.

This is a clean definitive solution, without kludge, and this follows policy
12.1. And more important, it protext ourself against sub-architecture
optimisation (we don't want i386 package build on pentium machine to use pentium specific instruction).
(for example I dont like gdb to say
This GDB was configured as "i686-pc-linux-gnu".
because really it should be configured for  "i386-pc-linux-gnu"
(which is equivalent of course, but only by chance)).

For config.sub, it is a bit more subtle, because we cannot avoid configure
to call it easily.
So just modify config.sub in the diff as follows

# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.

# Check  for Debian architecture
if [ "x$DEB_HOST_GNU_TYPE" = "x$1" ] then
  echo "$DEB_HOST_GNU_CPU-unknown-$DEB_HOST_GNU_SYSTEM-gnu"
  exit 0
fi

# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
# If it is invalid, we print an error message on stderr and exit with code 1.
# Otherwise, we print the canonical config type on stdout and succeed.

This way, when config.sub is updated, the patch will apply cleanly.

Well there are cleaner ways to do this, but there are left to the interested
readers.

The point is that this is a clean one-time fix, and there is no point to
constantly update files that are not useful. Of course, if we want packages to
build outside debian, we need them to  be up to date, but then it is the responsibility of the upstream author, and we still have to remember him to do it,
if he forget, but it is less an issue.

Anyway, just my two cents¹.

Bill <ballombe@debian.org>
(Please CC)

¹Someone can explain me what it mean really ??



Reply to: