[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: configure scripts and cross-compiling

From: Peter Kurpis
Subject: Re: configure scripts and cross-compiling
Date: Wed, 23 May 2001 15:04:30 -1000 (HST)

> On May 23, 2001, Mike Culbertson <address@hidden> wrote:
> > Could somone specify what it is generic configure script would have to
> > find in order to think that the compiler I am using (gcc 2.95-3 on
> > sun/sparc solaris 8) is a cross-compiler?
> It would try to run a `main(){ exit(0); }' program built with that
> compiler and be fail.

I got stung by this heuristic for g++ on solaris, though.  The program
failed, so configure assumed it was a cross-compiler, but the problem
turned out to be that an otherwise okay *native* executable wasn't
finding libstdc++.so (because  ld  doesn't hardwire the appopriate runtime 
search path on solaris).

BTW, the autoconf macro  AC_PROG_CXX  has this problem, so I am taking this
opportunity to CC the approprate reflector.

BTW (again), if LD_LIBRARY_PATH or LD_RUN_PATH isn't set to point to 
(which it isn't by design in my environment), I've been getting g++
to tell me where the libstdc++.so is in an environment-independent way
in configure.in by using the rather convoluted:

`$CXX --print-search-dirs | sed -n 's/^install: \(.*\)\/lib\/.*$/\1\/lib/p'`

Note in a makefile, you need to double-up on the second  $  character.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]