Skip to contentSkip to conversation

bridge-utils: various build fixes (musl & CFLAGS)

PATCH New André Draszik 1 participant 1 message Jul 20, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bridge-utils: various build fixes (musl & CFLAGS)

bridge-utils suffers from a few problems:
- doesn't build on musl
- doesn't respect CFLAGS
- build errors are silently ignored
- doesn't support parallel make

All of these are addressed with the included patches.

---
 ...ld-error-out-correctly-if-a-submake-fails.patch | 69 ++++++++++++++++++++++
 ...idge-fix-some-build-time-warnings-fcntl.h.patch | 64 ++++++++++++++++++++
 ...idge-fix-some-build-time-warnings-errno.h.patch | 46 +++++++++++++++
 ...dd-missing-include-s-fix-build-against-mu.patch | 47 +++++++++++++++
 ...uild-don-t-ignore-CFLAGS-from-environment.patch | 53 +++++++++++++++++
 .../bridge-utils/bridge-utils_1.5.bb               | 11 +++-
 6 files changed, 287 insertions(+), 3 deletions(-)
 create mode 100644 meta-networking/recipes-support/bridge-utils/bridge-utils/0001-build-error-out-correctly-if-a-submake-fails.patch
 create mode 100644 meta-networking/recipes-support/bridge-utils/bridge-utils/0002-libbridge-fix-some-build-time-warnings-fcntl.h.patch
 create mode 100644 meta-networking/recipes-support/bridge-utils/bridge-utils/0003-bridge-fix-some-build-time-warnings-errno.h.patch
 create mode 100644 meta-networking/recipes-support/bridge-utils/bridge-utils/0004-libbridge-add-missing-include-s-fix-build-against-mu.patch
 create mode 100644 meta-networking/recipes-support/bridge-utils/bridge-utils/0005-build-don-t-ignore-CFLAGS-from-environment.patch
meta-networking/recipes-support/bridge-utils/bridge-utils/0001-build-error-out-correctly-if-a-submake-fails.patch new file +69 -0
new file mode 100644
index 0000000..c6897b4
@@ -0,0 +1,69 @@
+From 5e102b453e254d16af1f95053134f58348e0f83a Mon Sep 17 00:00:00 2001
+From: root <[email protected]>
+Date: Wed, 20 Jul 2016 23:40:30 +0100
+Subject: [PATCH 1/5] build: error out correctly if a submake fails
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Due to use of a for loop, return status from submake was always
+ignored.
+
+In the context of build-systems like OE this causes them to not
+detect any errors and continue happily, resulting in a successful,
+but incomplete, build.
+
+Fix by having a nicer Makefile.in which now has rules for the
+individual targets (directories) so that make itself can
+figure out all the dependencies and build those targets as
+needed rather than using a for loop to iterate over the
+directories in a shell and thus loosing the return status of
+the command inside the loop.
+
+This has the added advantage that parallel builds work now.
+
+Upstream-Status: Pending
+
+Signed-off-by: André Draszik <[email protected]>
+---
+ Makefile.in | 18 ++++++++++++------
+ 1 file changed, 12 insertions(+), 6 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index 6028513..dab88bb 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -13,11 +13,11 @@ distdir = $(PACKAGE)-$(VERSION)
+ 
+ SUBDIRS=libbridge brctl doc
+ 
+-all:
+-	for x in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$x ; done
++all: override ACTION=
++all: $(SUBDIRS)
+ 
+-clean:
+-	for x in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$x clean ; done
++clean: override ACTION=clean
++clean: $(SUBDIRS)
+ 
+ distclean:	clean
+ 	rm -f config.log
+@@ -30,6 +30,12 @@ maintainer-clean: distclean
+ 	rm -f libbridge/Makefile
+ 	rm -f doc/Makefile
+ 
+-install:
+-	for x in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$x install; done
++install: override ACTION=install
++install: $(SUBDIRS)
+ 
++
++brctl: libbridge
++$(SUBDIRS):
++	$(MAKE) $(MFLAGS) -C $@ $(ACTION)
++
++.PHONY: $(SUBDIRS)
+-- 
+2.8.1
+
meta-networking/recipes-support/bridge-utils/bridge-utils/0002-libbridge-fix-some-build-time-warnings-fcntl.h.patch new file +64 -0

64 lines not on this page · raw message

meta-networking/recipes-support/bridge-utils/bridge-utils/0003-bridge-fix-some-build-time-warnings-errno.h.patch new file +46 -0

46 lines not on this page · raw message

meta-networking/recipes-support/bridge-utils/bridge-utils/0004-libbridge-add-missing-include-s-fix-build-against-mu.patch new file +47 -0

47 lines not on this page · raw message

meta-networking/recipes-support/bridge-utils/bridge-utils/0005-build-don-t-ignore-CFLAGS-from-environment.patch new file +53 -0

53 lines not on this page · raw message

meta-networking/recipes-support/bridge-utils/bridge-utils_1.5.bb +8 -3
index 04f863b..6032ab0 100644
@@ -1,8 +1,13 @@
 require bridge-utils.inc
 
-SRC_URI += "file://kernel-headers.patch"
-
-PARALLEL_MAKE = ""
+SRC_URI += "\
+    file://kernel-headers.patch \
+    file://0001-build-error-out-correctly-if-a-submake-fails.patch \
+    file://0002-libbridge-fix-some-build-time-warnings-fcntl.h.patch \
+    file://0003-bridge-fix-some-build-time-warnings-errno.h.patch \
+    file://0004-libbridge-add-missing-include-s-fix-build-against-mu.patch \
+    file://0005-build-don-t-ignore-CFLAGS-from-environment.patch \
+"
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=f9d20a453221a1b7e32ae84694da2c37"
 
Signature · 1 line
2.8.1