Front page | perl.perl5.porters |
Postings from March 2007
Re: g++ on FreeBSD
Thread Previous
|
Thread Next
From:
Andy Dougherty
Date:
March 28, 2007 09:25
Subject:
Re: g++ on FreeBSD
Message ID:
Pine.LNX.4.62.0703281223360.11756@fractal.phys.lafayette.edu
On Tue, 27 Mar 2007, Andrew Dougherty wrote:
> On Tue, 27 Mar 2007, Nicholas Clark wrote:
>
> > But if I use g++ as my C compiler:
> >
> > d_dlerror='undef'
> > d_strerrm='((e)<0||(e)>=sys_nerr?"unknown":sys_errlist[e])'
> > d_strerror='undef'
> > d_strerror_r='undef'
> > d_syserrlst='define'
> > i_neterrno='undef'
> > strerror_r_proto='0'
> >
> > mmm. Houston, we have a problem.
>
> Ok. This is what I was expecting, though I don't understand it. I wonder
> why we're not seeing strerror() with g++? More broadly, are there lots of
> other differences between the gcc and g++ config.sh files? (Especially
> the d_* defines.)
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
--
Andy Dougherty doughera@lafayette.edu
Thread Previous
|
Thread Next