This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Libtool update (checking in)


I'm checking in an update of libtool scripts, that, among other minor
things, fixes a subtle problem caused by a bug in Solaris' /bin/sh.
Basically, libtool used to set a variable cached in config.cache to a
string containing `}'.  This `}' character got Solaris' /bin/sh
confused when the affected variable was already set.  The symptom of
the problem is that lt_cv_file_magic_cmd in config.cache grows each
time some configure script is run.  The bug in Solaris' /bin/sh can be
exercised by running:

% /bin/sh
$ unset foo
$ foo=${foo='}'}
$ echo $foo
}
$ foo=${foo='}'   # no error; this hints to what the bug is
$ echo $foo
}
$ foo=${foo='}'}
$ echo $foo
}}
 ^ ugh!

It seems that `}' is considered to match `${', even though it is
enclosed in single quotes.  The problem doesn't happen using double
quotes.  The code that saves the cache in autoconf may have to be
adjusted to cope with this bug.  Meanwhile, I've replaced `${foo}'
with `$foo' in libtool.m4, so as to work around the bug.

If you have an ugly definition of lt_cv_file_magic_cmd in
config.cache, you may want to remove it and run configure again.

Thanks to David Taylor <taylor@cygnus.com> for reporting the problem!

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]