Front page | perl.perl5.porters |
Postings from April 2007
Re: g++ on FreeBSD
Thread Previous
|
Thread Next
From:
Andy Dougherty
Date:
April 10, 2007 10:49
Subject:
Re: g++ on FreeBSD
Message ID:
Pine.LNX.4.62.0704101331280.12752@fractal.phys.lafayette.edu
On Tue, 10 Apr 2007, Nicholas Clark wrote:
> On Wed, Mar 28, 2007 at 12:23:41PM -0400, Andy Dougherty wrote:
>
> > Poking about in the hints files a bit, I think the following might help.
> > We should probably eventually incorporate this more carefully in
> > Configure's usenm.U unit, but not today.
> >
> > diff -u perl-current/hints/freebsd.sh perl-andy/hints/freebsd.sh
> > --- perl-current/hints/freebsd.sh 2007-03-08 06:22:17.000000000 -0500
> > +++ perl-andy/hints/freebsd.sh 2007-03-28 11:42:31.000000000 -0400
> > @@ -138,11 +138,22 @@
> > *)
> > ccflags="${ccflags} -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H"
> > if /usr/bin/file -L /usr/lib/libc.so | /usr/bin/grep -vq "not stripped" ; then
> > - usenm=false
> > + # Respect a command-line override
> > + test -z "$usenm" && usenm=false
> > fi
> > ;;
> > esac
> >
> > +
> > +# If we are using g++ we must use nm and force ourselves to use
> > +# the /usr/lib/libc.a because the symbol scanning tricks of
> > +# Configure will crash and burn horribly.
> > +case "$cc" in
> > +*g++*) usenm=true
> > + libc='/usr/lib/libc.a'
> > + ;;
> > +esac
> > +
> > cat <<'EOM' >&4
> >
> > Some users have reported that Configure halts when testing for
>
> Sadly it has almost no effect:
>
> One can't use nm to extra symbols on FreeBSD.
We at least ought to be able to try. We just need to convince the hints
file to let us. I don't like hints files that prevent me from trying
things. (I hadn't realized you were trying to build with -Dusethreads, so
I hadn't patched that branch.)
Anyway, see where this gets you:
--- perl-current/hints/freebsd.sh Tue Apr 10 09:29:32 2007
+++ perl-andy/hints/freebsd.sh Tue Apr 10 09:28:22 2007
@@ -271,7 +271,9 @@
# Configure will probably pick the wrong libc to use for nm scan.
# The safest quick-fix is just to not use nm at all...
- usenm=false
+ # However, if we are using g++, we don't have any choice.
+ # Respect a command-line override or a previous setting.
+ test -z "$usenm" && usenm=false
case "$osvers" in
2.2.8*)
>
> Was there a flag to get Configure to not delete all its try.c files?
No, afraid not. However, here's what it essentially tries to do:
void *(*(p()))() { extern void *atof(); return &atof; }
int main() { if(p()) return(0); else return(1); }
g++ doesn't like that :-(.
--
Andy Dougherty doughera@lafayette.edu
Thread Previous
|
Thread Next