[patch] build shared libraries

Allan Clark allanc at chickenandporn.com
Tue Sep 6 12:48:48 UTC 2005


Bernhard Fischer wrote:

>On Tue, Sep 06, 2005 at 06:49:37PM +0800, Allan Clark wrote:
>
>  
>
>>>>If you and he could coordinate on this, that would be seriously cool. :)
>>>>  
>>>>
>>>>        
>>>>
>>>I can have a look at it. Allan, if you like, please send me that patch
>>>so we can work on that together.
>>>
>>>      
>>>
>>I made a START to a patch, I wanted some feedback (works/fails, 
>>good/bad) but I didn't see any yet from Rob.
>>    
>>
>
>thanks.
>Why do both of you feel the need for a helper standalone.c?
>  
>
I don't; I did this for simplicity, and assumed that it could be done 
better later if someone wanted.  I just worked towards a makefile.

>I'd simply say something to the effect of (untested):
>APPLET=$(shell echo $(@F) | sed -e "s \.[^\.]*$  ")
>$(CC) $(CFLAGS) -DAPPLET="\"$(APPLET)\"" -Dbb_applet_name="\"$(APPLET)\"" \
>-o $(APPLET) -Wl,-e,$(APPLET)_main $($(APPLET)-obj) $($(APPLET)-libs))
>
>i.e. let's define bb_applet_name and $(APPLET)_full_usage and just set
>the entry point to $(applet)_main instead of the default.
>
>Would that be acceptable for everyone?
>
>PS:
>We need a clean list of $(BB_CONFIG_$(APPLET))-obj = whereever/whatever.o
>and a list of objects -- be they system-libs, e.g. -lm -- or internal --
>libbb -- or multi-obj applets. Without it, i don't think we can cleanly
>support the standalone idea. ymmv.
>  
>
It sould be simple to convert a list of files to a makefile using some 
kind of awk, piping that to "make -f -", but it would save little over 
using a makefile that called out specific targets.

Because it uses implicit targets, it should be possible to use explicit 
rules to define the behavior for each misbehaving binary.

>>This only gets one section building, some builds fail, but it's a start 
>>to show the possible framework to doing this.  I can possibly repeat for 
>>shared libs if necessary... if someone can either give me permission to 
>>apply buildroot patch#391, or apply it for me (it should be my patch for 
>>buildroot for Qt/E)...
>>    
>>





More information about the busybox mailing list