Subject: Re: Problems with CFLAGS inheritance
To: None <port-pc532@NetBSD.ORG>
From: Julian H Stacey <Julian.H.Stacey@regent.e-technik.tu-muenchen.de>
List: port-pc532
Date: 10/21/1994 01:41:34
> > Some Detail follows:
> > ----------
> >
> > I get loads of things such as:
> > ===> atrun
> > cc -o atrun atrun.o
> > ld: No reference to __DYNAMIC
> >
> > If I remove the # in src/lib/csu/ns32k/Makefile (leo@marco.de suggestion):
> > < CFLAGS+= -DLIBC_SCCS # -DDYNAMIC
> > > CFLAGS+= -DLIBC_SCCS -DDYNAMIC
> > & make clean all install,
>
> Correct fix. I think we should make this -DDYNAMIC default. It won't hurt even
> if you are running a static system (and it saves me alot of pain when
> I forget to change this when I get a fresh tree...).
Well it doesnt stop anything working, but those ld.so: warnings bug me.
> > cd /usr/src/usr.bin/apropos ; make clean all install
> > apropos apropos
> > ld.so: ld.so: warning: non pure code in /usr/lib/libc.so.12.0 at 2243b ()
> > apropos (1) - locate commands by keyword lookup
>
> Well. You have a correctly working dynamic program using shared libs.
> Congratulations.
Umm, Thanks, I think, I have to admit it came as a suprise to me !
perhaps I'd reconfig'd before flying to England last week, then suprised
myself when I returned to Munich & rebuilt, my memory is not the best ;-)
> The non pure code warning comes from a small problem in
> usr/src/lib/libc/arch/ns32k/gen/ldexp.S. There is an absolute address
> reference in this file (@hugeval or something like this). Once you change
> this to pc-relative, the warnings will go away. I have sent a fix for this
> to Phil and I think I mailed the patch some weeks ago to the list.
>
> Matthias
I found your patch:
To: port-pc532@sun-lamp.cs.berkeley.edu (532bsd Mailing List)
Message-Id: <m0qgENy-0000JRC@ra.marco.de>
Date: Thu, 1 Sep 1994 18:49:09 +0200
*** ldexp.S.orig Wed May 4 12:16:48 1994
--- ldexp.S Tue Aug 30 23:13:09 1994
***************
*** 70,76 ****
exit []
ret 0
ldexp_overflow:
! movl @huge,f0 /* if overflow return HUGE */
movdl 0d0e0,f2
cmpl f2,8(fp) /* check original sign */
bgt ldexp_positive
--- 70,76 ----
exit []
ret 0
ldexp_overflow:
! movl huge(pc),f0 /* if overflow return HUGE */
movdl 0d0e0,f2
cmpl f2,8(fp) /* check original sign */
bgt ldexp_positive
didnt seem to make any difference though, still got
ld.so: ld.so: warning: non pure code in /usr/lib/libc.so.12.0 at 2243b ()
but I'm tired, I think I may have not relinked the commands that were warning.
Right now I' recompilng the system static to get some sanity back
(too many things broken, such as `more' (not sh. lib fault tho')),
then I'll move forward again, & retry for a shared libs selectively,
& retry your patch.
Chris, Re your
> did you consider looking around, and seeing what prorgams that need to
> be static do?
Yes & No ! I did look, but fealt I was missing something generic, as
- Phil has always maintained: do the whole system static
- the main NetBSD i386 has been (I believe) default shared lib
for a long time now,
so i figured there must be some global static on/off switch
(which I've still not found)
> i'd suggest, for example, that you look in /usr/src/bin/Makefile.inc
Thanks for the suggestion, that's the route I took, I added a
LDSTATIC= -static
to src/*/Makefile.inc
Julian Stacey <stacey@freefall.cdrom.com>