This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH re-RFA]: libstdc++-v3 cross-compile configury problem
- From: cgd at broadcom dot com
- To: gcc-patches at gcc dot gnu dot org
- Date: 11 Mar 2002 17:07:02 -0800
- Subject: [PATCH re-RFA]: libstdc++-v3 cross-compile configury problem
Summarized from:
http://gcc.gnu.org/ml/gcc-patches/2002-03/msg00165.html
build on the trunk, host=sparc-solaris, target=mips64-elf (SHELL &
CONFIG_SHELL set to /bin/ksh).
Configuring libstdc++-v3, the shell would croak w/
/users/cgd/proj/gcc-testing/combined/libstdc++-v3/configure: test: argument expected
A little bit of tracing (mmm, 'set -x' 8-) told me that it was going
wrong at:
if test $enable_symvers = yes ; then
if test $with_gnu_ld = yes &&
test $glibcpp_gnu_ld_version -ge $glibcpp_min_gnu_ld_version &&
test $glibcpp_shared_libgcc = yes ;
(from GLIBCPP_ENABLE_SYMVERS) because glibcpp_gnu_ld_version was
unset, and so test was being invoked as:
test -ge 21200
This occurred because GLIBCPP_CHECK_LINKER_FEATURES wasn't invoked.
It seems that in some circumstances, e.g. this one, it's not supposed
to be.
patch below. tested (on trunk) by successfully cross-compiling said
tool set, but AFAIK is also needed on 3.1 branch. (the autoconf code
is the same.)
If approved, if approver could apply, regen the files, and check in,
i'd appreciate it.
(I couldn't find version of autoconf/aclocal that would regen the
changed files w/ the expected minimal diffs, and I spent a while
looking. If you've got a pointer to such tools, that'd be nice, too.
8-)
thanks,
chris
==========================================================================
2002-03-11 Chris Demetriou <cgd@broadcom.com>
* acinclude.m4 (GLIBCPP_ENABLE_SYMVERS): Enhance check for
whether GLIBCPP_CHECK_LINKER_FEATURES has been used.
* aclocal.m4: Regenerate.
* configure: Regenerate.
Index: acinclude.m4
===================================================================
RCS file: /cvsroot/gcc/gcc/libstdc++-v3/acinclude.m4,v
retrieving revision 1.194
diff -u -p -r1.194 acinclude.m4
--- acinclude.m4 22 Feb 2002 23:45:23 -0000 1.194
+++ acinclude.m4 4 Mar 2002 20:27:22 -0000
@@ -2062,7 +2062,9 @@ enable_symvers=GLIBCPP_ENABLE_SYMVERS_DE
# If we never went through the GLIBCPP_CHECK_LINKER_FEATURES macro, then we
# don't know enough about $LD to do tricks...
-if test $enable_shared = no || test x$LD = x ; then
+if test $enable_shared = no || test x$LD = x ||
+ test x$glibcpp_gnu_ld_version = x ;
+then
enable_symvers=no
fi