[Buildroot] [PATCH 2/2] add libfcgi to buildroot

Arnout Vandecappelle arnout at mind.be
Sat Oct 1 20:59:08 UTC 2011

[I put Rico back in CC]
On Thursday 29 September 2011 11:58:49, Thomas Petazzoni wrote:
> Le Thu, 29 Sep 2011 10:45:17 +0200,
> Rico Bachmann <bachmann at tofwerk.com> a écrit :
> > added the patches, still not working
> > could be a problem with the filepath in the patch?
> Also:
>  * Your two patches link_math_cgifcgi.patch and link_math_example.patch
>    should be just one patch.

 You typically generate the patch like this:

1. Make a copy of the unmodified source tree:
cp -a output/build/fcgi-2.4.0 output/build/fcgi-2.4.0.orig

2. Hack away in output/build/fcgi-2.4.0 until it works.

3. Create the patch relative to the build directory:
cd output/build
diff -rup fcgi-2.4.0.orig fcgi-2.4.0 > \

4. Verify that it works by doing a clean build:
make fcgi-dirclean; make fcgi

>  * This patch should have a description and a Signed-off-by line.

 Edit package/fcgi/fcgi-2.4.0-add-lm.patch to add these things.

 The description goes in the beginning of the patch, before the first 'diff', 
and explains why the patch is necessary.

 The Signed-off-by line comes at the end of this patch comment.  It shows that 
you are the author of the patch and that you agree to distribute it under GPL.  
See http://kerneltrap.org/files/Jeremy/DCO.txt

 Terminate the description with a line containing three dashes: ---

 And look at some of the existing patches for inspiration :-)

>  * Patching the Makefiles in an autotools-based package is really
>    wrong, it's the Makefile.am that should be patched. I think your
>    LDFLAGS = -lm is more a workaround than a correct fix.

 The Makefile will be overwritten next time you configure the package.  You'll 
notice that in step 4 :-).  Instead, you have to modify Makefile.am.  
Autotools uses Makefile.am to generate Makefile.in, and configure uses 
Makefile.in to generate Makefile.  However, buildroot normally doesn't run 
autotools but uses the distributed Makefile.in instead.  So, you should patch 
both Makefile.am and Makefile.in.

 6. Send your patch to the upstream project.  And be prepared to get 
completely different feedback from them than what you got here :-)

 Good luck!
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  31BB CF53 8660 6F88 345D  54CC A836 5879 20D7 CF43

More information about the buildroot mailing list