lsof: stop overriding CFLAGS in build
authorAndy Gibbs <andyg1001@hotmail.co.uk>
Wed, 3 Nov 2010 14:09:24 +0000 (15:09 +0100)
committerPeter Korsgaard <jacmet@sunsite.dk>
Thu, 4 Nov 2010 16:15:18 +0000 (17:15 +0100)
Closes #2767

lsof compile breaks if CFLAGS overridden in 'make' command line
which is the case since buildroot-2010.08.

lsof has a partial fix for this already in the form of the
'LSOF_CFLAGS_OVERRIDE=1' configure option; however this only
fixes the problem in the generation of the Makefile for liblsof.

This patch does two things: it extends the 'LSOF_CFLAGS_OVERRIDE=1'
configure option to also cover the main Makefile; it also patches
lsof.mk to make use of the LSOF_CFLAGS_OVERRIDE option.

Signed-off-by: Andy Gibbs <andyg1001@hotmail.co.uk>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
CHANGES
package/lsof/lsof-override-cflags.patch [new file with mode: 0644]
package/lsof/lsof.mk

diff --git a/CHANGES b/CHANGES
index e436f8748b087c3472a69efe7ec9dfb17b57ad63..6ca25bda9ab4220663db87d63bf1cd507bd50b4f 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -70,6 +70,7 @@
        #2563: [PATCH] cairo: Expose the configure option to disable some...
        #2581: libmms: Update to 0.6, and patch to work on architectures...
        #2707: Can't compile linux kernel using buildroot + crosstool-ng
+       #2767: Build for lsof broken in buildroot-2010.08
 
 2010.08: Released August 31th, 2010:
 
diff --git a/package/lsof/lsof-override-cflags.patch b/package/lsof/lsof-override-cflags.patch
new file mode 100644 (file)
index 0000000..fcb9292
--- /dev/null
@@ -0,0 +1,13 @@
+--- lsof_4.81/lsof_4.81_src/Configure  2008-10-21 18:21:45.000000000 +0200
++++ lsof_4.81/lsof_4.81_src/Configure  2010-11-03 14:00:00.000000000 +0100
+@@ -5206,6 +5206,10 @@
+   cp $LSOF_MKFC ${LSOF_LIB}/$LSOF_LIBMKF
+ fi    # }
+ cat ./dialects/$LSOF_DIALECT_DIR/$LSOF_REST >> $LSOF_MKFC
++if test "X$LSOF_CFLAGS_OVERRIDE" != "X"       # {
++then
++  sed -i -e 's/^CFLAGS=/override CFLAGS=/' $LSOF_MKFC
++fi    # }
+ if test "X$LSOF_LIB_NO" = "X" # {
+ then
index 8deff15f1fbb279f7e86a968fc2fb436e5ea5ece..837a88c2e4e1ac7694f9447c4ccba3b6c47db2ac 100644 (file)
@@ -34,7 +34,7 @@ $(LSOF_DIR)/.unpacked: $(DL_DIR)/$(LSOF_SOURCE)
        touch $(LSOF_DIR)/.unpacked
 
 $(LSOF_DIR)/.configured: $(LSOF_DIR)/.unpacked
-       (cd $(LSOF_DIR)/lsof_$(LSOF_VERSION)_src; echo n | $(TARGET_CONFIGURE_OPTS) DEBUG="$(TARGET_CFLAGS) $(BR2_LSOF_CFLAGS)" LSOF_INCLUDE="$(LSOF_INCLUDE)" ./Configure linux)
+       (cd $(LSOF_DIR)/lsof_$(LSOF_VERSION)_src; echo n | $(TARGET_CONFIGURE_OPTS) DEBUG="$(TARGET_CFLAGS) $(BR2_LSOF_CFLAGS)" LSOF_INCLUDE="$(LSOF_INCLUDE)" LSOF_CFLAGS_OVERRIDE=1 ./Configure linux)
        touch $(LSOF_DIR)/.configured
 
 $(LSOF_DIR)/lsof_$(LSOF_VERSION)_src/$(LSOF_BINARY): $(LSOF_DIR)/.configured