[llvm-commits] [PATCH] Remove obsolete autoconf stuff, and upgrade autoconf, cuts down configure size to 361K (from 1.1M!)
Shantonu Sen
ssen at apple.com
Mon Sep 7 20:42:07 PDT 2009
On Sep 7, 2009, at 12:59 PM, Török Edwin wrote:
> On 2009-09-07 21:46, Shantonu Sen wrote:
>> This patch looks scary to me. Do we really want to invest in moving
>> to
>> a new autoconf/libtool/automake version that I'm told has known
>> incompatibilities (which means it's unlikely to be used by anyone
>> else)?
>
> I can't regenerate llvm's configure with autoconf 2.61 or autoconf
> 2.64
> which are the only ones available on Debian.
> The regeneration succeeds, but there is a syntax error in configure
> when
> run (a libtool macro is not expanded).
> I'd like to support both autoconf 2.60 and 2.64.
It's trivial to use whatever version of auto* AutoRegen.sh requires:
[ssen at virgon]$ eval `grep ^want_ AutoRegen.sh | grep -v _clean | tr -d
'\'`
[ssen at virgon]$ ( mkdir -p src; cd src; for p in autoconf-$
{want_autoconf_version} automake-${want_aclocal_version} libtool-$
{want_libtool_version}; do curl -O ftp://ftp.gnu.org/pub/gnu/`echo $p
| awk -F- '{print $1}'`/$p.tar.gz; tar zxf $p.tar.gz; cd $p; ./
configure --prefix=$PWD/../../dst && make && make install; cd ..;
done; cd ..; echo "Now add $PWD/dst/bin to the front of your PATH" )
...
Now add /Volumes/HD/ltmp/ssen/llvm/autoconf/dst/bin to the front of
your PATH
[ssen at virgon]$ export PATH=/Volumes/HD/ltmp/ssen/llvm/autoconf/dst/bin:
$PATH
[ssen at virgon]$ ./AutoRegen.sh
...
Every Linux distribution, Mac OS X install, FreeBSD, etc., has a
different combination of auto*/libtool versions. LLVM has standardized
on some versions of those tools, and developers should match.
I don't think AutoRegen.sh should support ranges of tools, because it
makes incremental changes to ./configure meaningless because every
line will change. If it's autoconf-2.64, I think that should be what
AutoRegen.sh requires, even if configure.ac accepts a lower version
for local quick-fix development.
I'm confused about libtool requirements. When I try reconfiguring with
AutoRegen.sh, the resulting ./configure script has:
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
../configure: line 5741: LT_PATH_NM: command not found
checking for GNU make... make
checking whether ln -s works... yes
So is libtool required? If it is, please restore it's requirements to
AutoRegen.sh, even if ltmain.sh is not used at build time.
> Thanks for the review, comments below and new patch attached.
>
>>
>> Some specific issues:
>> 1)
>>> dnl Indicate that we require autoconf 2.59 or later. Ths is needed
>>> because we
>>> dnl use some autoconf macros only available in 2.59.
>>> -AC_PREREQ(2.59)
>>> +AC_PREREQ(2.64)
>>
>> Please update the comments
>
> Sorry that should be AC_PREREQ(2.60), it should still work with
> autoconf
> 2.60.
> I changed AutoRegen.sh to accept both. If you have autoconf 2.60 can
> you
> try whether ./AutoRegen.sh works for you with my patch applied?
>
>>
>> 2)
>>> -want_libtool_version='1\.5\.22'
>>
>> What version of libtool is being used? I can't figure it out. Where
>> is
>> it documented?
>
> In the newly attached I kept libtool at what LLVM currently has, only
> one macro is used from it though, see below: AC_PROG_NM.
> As such I don't think libtool needs to be upgraded.
>
>>
>> 3)
>>> 3. Copy <SRC>/ltdl.m4 to llvm/autoconf/m4
>>> + 3. Copy <SRC>/ltsugar.m4 to llvm/autoconf/m4
>>> 4. Copy <PFX>/share/aclocal/libtool.m4 to llvm/autoconf/m4/
>>> libtool.m4
>>
>> You didn't update any of the step numbering, leading to many
>> duplicate
>> numbered steps and gaps of steps.
>
> Dropped this section from README now, libtool doesn't need to be
> updated
> since we don't use libtool per se.
>
>>
>> 4) I thought the policy was not to upgrade config.guess? Even if not,
>> you've lost several local LLVM changes:
>>> *:Darwin:*:*)
>>> UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
>>> case $UNAME_PROCESSOR in
>>> - *86) UNAME_PROCESSOR=i686 ;;
>>> unknown) UNAME_PROCESSOR=powerpc ;;
>>> esac
>>
>> I don't know what else was overwritten, but it can't be good.
>
> Didn't know it had LLVM local changes, I'll remove the config.*
> updates
> from my patch, and keep them as is.
>
>>
>> 6) These changes use libtool internal macros, like
>> "_LT_PROG_ECHO_BACKSLASH". These are not stable, and should not be
>> used by configure scripts.
>>
>> I think this requirements more refinement.
>
> Yeah that is hackish, I've done it like that to cut down configure
> size.
> However libtool is currently only used to detect the extension of
> shared
> libraries, and for AC_PROG_NM.
> Detecting the shared lib extension with libtool needs LT_INIT that
> adds
> another 300K bloat to configure, instead my latest patch determines
> the shared lib extension with a much simpler m4 macro I copied from
> LLVM's libtool.m4.
>
> I think the libtool.m4 in LLVM allows that, it only has this
> copyright:
>
> ## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
> ## Free Software Foundation, Inc.
> ## Originally by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
> ##
> ## This file is free software; the Free Software Foundation gives
> ## unlimited permission to copy and/or distribute it, with or without
> ## modifications, as long as this notice is preserved.
>
> full.patch.gz:
> autoconf/depcomp | 522
> autoconf/ltmain.sh | 6863 -------
> autoconf/m4/bison.m4 | 15
> autoconf/m4/cxx_bidi_iterator.m4 | 22
> autoconf/m4/cxx_fwd_iterator.m4 | 22
> autoconf/m4/cxx_namespaces.m4 | 19
> autoconf/m4/cxx_std_iterator.m4 | 26
> autoconf/m4/flex.m4 | 17
> autoconf/m4/ltdl.m4 | 418
> autoconf/missing | 353
> b/autoconf/AutoRegen.sh | 10
> b/autoconf/README.TXT | 35
> b/autoconf/configure.ac | 40
> b/autoconf/install-sh | 530
> b/autoconf/m4/path_tclsh.m4 | 4
> b/autoconf/m4/shrext.m4 | 38
> b/autoconf/mkinstalldirs | 40
> b/configure |32893
> ++++----------------------------------
> b/include/llvm/Config/config.h.in | 168
> 19 files changed, 4522 insertions(+), 37513 deletions(-)
>
>
> Best regards,
> --Edwin
> <0001-Update-configure.ac-to-work-with-autoconf-2.64.patch><0003-
> Update-install-sh-and-mkinstalldirs.patch><0002-Remove-obsolete-m4-
> macros-and-unused-programs.-Also-.patch.gz><0004-Regenerate-
> configure-and-config.h.in.patch.gz><full.patch.gz>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20090907/b771ffbf/attachment.html>
More information about the llvm-commits
mailing list