Subject: Re: Problems with CFLAGS inheritance
To: None <port-pc532@NetBSD.ORG>
From: Julian H Stacey <>
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 ( suggestion):
> > 	< 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 warnings bug me.

> > cd /usr/src/usr.bin/apropos ; make clean all install
> > apropos apropos
> > warning: non pure code in /usr/lib/ 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: (532bsd Mailing List)
Message-Id: <>
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
!       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
!       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 warning: non pure code in /usr/lib/ 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/
Thanks for the suggestion, that's the route I took, I added a
	LDSTATIC=       -static
to src/*/

Julian Stacey <>