add -fPIC option for shared libbusybox.so

Peter S. Mazinger ps.m at gmx.net
Tue May 2 10:16:55 UTC 2006


On Tue, 2 May 2006, Yasushi SHOJI wrote:

> At Tue, 2 May 2006 10:40:21 +0200 (CEST),
> Peter S. Mazinger wrote:
> > 
> > On Tue, 2 May 2006, Yasushi SHOJI wrote:
> > 
> > > --- busybox.orig/Rules.mak	2006-05-02 13:25:36.000000000 +0900
> > > +++ busybox/Rules.mak	2006-05-02 13:25:43.000000000 +0900
> > > @@ -233,6 +233,9 @@ LIB_CFLAGS+=$(CFLAGS_SHARED)
> > >  ifeq ($(strip $(CONFIG_BUILD_LIBBUSYBOX)),y)
> > >      CFLAGS_PIC:= $(call check_gcc,-fPIC,)
> > >      LIB_CFLAGS+=$(CFLAGS_PIC)
> > > +    ifeq ($(strip $(TARGET_ARCH)),x86_64)
> > > +        CHECKED_CFLAGS+=$(CFLAGS_PIC)
> > > +    endif
> > >  endif
> > 
> > this is rather a general issue, I have checked on x86 (bb-1.1.2, changed 
> > the CONFIG_DISABLE_SHARED, curious name for what it should do) and iirc 
> > it was also reported for arm on uClibc ml maybe a week ago.
> > CFLAGS_PIC should be used for all objects going into any shared lib (so 
> > at least libbb/*), but it is used only at link time (where it is 
> > superfluos)
> 
> if so, we can just ommit ifeq/endif and add CFLAGS_PIC to
> CHECKED_CFLAGS.

I would leave the issue to Bernhard, he knows what he wants there to 
have (and in busybox 1.1.2 you can't come to enable this option at all)
for the earlier version(s) simply don't enable building libbusybox.so

Peter
> 
> the problem is that I don't know what was going on when this happend.
> svn annotate command show me that the revision 14531 changed the
> portion of the code:
> 
>  14531      aldot ifeq ($(strip $(CONFIG_BUILD_LIBBUSYBOX)),y)
>  14531      aldot     CFLAGS_PIC:= $(call check_gcc,-fPIC,)
>  14531      aldot     LIB_CFLAGS+=$(CFLAGS_PIC)
>  14531      aldot endif
> 
> but r14531 is:
> 
>     r14531 | aldot | 2006-03-14 04:04:00 +0900 (Tue, 14 Mar 2006) | 2 lines
> 
>     - revert back to r14406
> 
> I've also checked the out put from svn log between 13793 (right before
> r14406 for Rules.mak) and 14531 doesn't give me much info. r13638
> might be it but i'm not sure.
> --
>      yashi
> 
> 
> 

-- 
Peter S. Mazinger <ps dot m at gmx dot net>           ID: 0xA5F059F2
Key fingerprint = 92A4 31E1 56BC 3D5A 2D08  BB6E C389 975E A5F0 59F2




More information about the busybox mailing list