[llvm-commits] [PATCH] Remove obsolete autoconf stuff, and upgrade autoconf, cuts down configure size to 361K (from 1.1M!)

Török Edwin edwintorok at gmail.com
Mon Sep 7 12:59:19 PDT 2009


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.

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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Update-configure.ac-to-work-with-autoconf-2.64.patch
Type: text/x-diff
Size: 8556 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20090907/28b6fcf3/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Update-install-sh-and-mkinstalldirs.patch
Type: text/x-diff
Size: 21038 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20090907/28b6fcf3/attachment-0001.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Remove-obsolete-m4-macros-and-unused-programs.-Also-.patch.gz
Type: application/x-gzip
Size: 115054 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20090907/28b6fcf3/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-Regenerate-configure-and-config.h.in.patch.gz
Type: application/x-gzip
Size: 200136 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20090907/28b6fcf3/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: full.patch.gz
Type: application/x-gzip
Size: 270217 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20090907/28b6fcf3/attachment-0002.bin>


More information about the llvm-commits mailing list