This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Don't build abi_check for crosses


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....

Maybe that's true for for a native build.  It's not true for a
host-x-host build, though.  Here's the quote from my build scripts:

# See the comment in libstdc++-v3/src/Makefile.am.  GCC can compile
# C++ files, and this prevents libtool trying to link libstdc++ with
# -lstdc++.  Only a problem in host-x-host builds.
# Note that we must explicitly add -shared-libgcc or libstdc++ won't
# be linked to libgcc_s.so.
export CXX_FOR_TARGET="$CC -shared-libgcc"
export CXX="$CC -shared-libgcc"


The problem is, setting CXX and CXX_FOR_TARGET in the environment
overrides the way the toplevel passes them to libstdc++. 
testsuite_flags.in recovers a real CXX:
      CXX=`echo "$CXX_build" | sed 's,gcc/xgcc ,gcc/g++ ,'`
but that's hardly right if CXX was specified in the environment.

I just picked mipsel-linux at random, by the way.  I get linking errors
for any target.

> 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.

Mark, this is a regression from 3.3 to 3.3.1.  OK for the branch also?

> 
> best,
> -benjamin
> 
> >2003-09-08  Daniel Jacobowitz  <drow@mvista.com>
> >	    Andreas Jaeger <aj@suse.de>
> >
> >	PR libstdc++/12189
> >	* acinclude.m4 (GLIBCPP_CONFIGURE_TESTSUITE): Don't build
> >	abi_check if cross compiling.
> >	* aclocal.m4: Regenerated.
> >	* configure: Regenerated.
> 

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


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