Don't build abi_check for crosses
Daniel Jacobowitz
drow@mvista.com
Thu Sep 11 08:54:00 GMT 2003
On Wed, Sep 10, 2003 at 04:50:46AM -0500, Benjamin Kosnik wrote:
>
> >This is necessary because automake can't build abi_check for the host.
> >Right now it's listed as a target program, and will be linked to the newly
> >built libstdc++; if $build != $host or --with-cross-host, we won't be able
> >to run it even if we were able to build it. Ben, CC'd you because you
> >removed the comment saying to build it native only; was there a reason?
>
> FYI for the testsuite and testsuite directory at build time, CXX is g++,
> not gcc. See scripts/testsuite_hooks.in. Thus, this should link, even
> for crosses and other twisted permutations, and if it doesn't you will
> be in for a world of pain at the next state of your build when you try
> to test and or invoke g++. There are (were?) known problems and issues
> with linking on mipsel in particular, echristo knows the deal, it's
> something with weak linking. However....
>
> Right now, considering the limitations of the ABI checking, I think the
> 'check-abi' rule only makes sense for native targets. Thus, I think your
> patch is ok, and trust that you will resolve the rest of the mipsel
> issues with linking separately.
Thanks; for posterity, here's the patch against HEAD. Checked in.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
2003-09-10 Daniel Jacobowitz <drow@mvista.com>
Andreas Jaeger <aj@suse.de>
PR libstdc++/12189
* acinclude.m4 (GLIBCXX_CONFIGURE_TESTSUITE): Don't build
abi_check if cross compiling.
* aclocal.m4: Regenerated.
* configure: Regenerated.
Index: acinclude.m4
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/acinclude.m4,v
retrieving revision 1.269
diff -u -p -r1.269 acinclude.m4
--- acinclude.m4 2 Sep 2003 18:46:46 -0000 1.269
+++ acinclude.m4 11 Sep 2003 03:10:20 -0000
@@ -585,23 +585,26 @@ AC_DEFUN(GLIBCXX_CONFIGURE_TESTSUITE, [
# Look for setenv, so that extended locale tests can be performed.
GLIBCXX_CHECK_STDLIB_DECL_AND_LINKAGE_3(setenv)
+
+ if test $enable_symvers = no; then
+ enable_abi_check=no
+ else
+ case "$host" in
+ *-*-cygwin*)
+ enable_abi_check=no ;;
+ *)
+ enable_abi_check=yes ;;
+ esac
+ fi
+ else
+ # Only build this as native, since automake does not understand
+ # CXX_FOR_BUILD.
+ enable_abi_check=no
fi
# Export file names for ABI checking.
baseline_dir="$glibcxx_srcdir/config/abi/${abi_baseline_pair}\$(MULTISUBDIR)"
AC_SUBST(baseline_dir)
-
- # Determine if checking the ABI is desirable.
- if test $enable_symvers = no || test $is_hosted = no; then
- enable_abi_check=no
- else
- case "$host" in
- *-*-cygwin*)
- enable_abi_check=no ;;
- *)
- enable_abi_check=yes ;;
- esac
- fi
GLIBCXX_CONDITIONAL(GLIBCXX_TEST_WCHAR_T, test $enable_wchar_t = yes)
GLIBCXX_CONDITIONAL(GLIBCXX_TEST_ABI, test $enable_abi_check = yes)
More information about the Libstdc++
mailing list