[oe-commits] [meta-openembedded] branch master-next updated: dfu-util-native: Dont build static binary

git at git.openembedded.org git at git.openembedded.org
Wed Sep 18 19:22:27 UTC 2019


This is an automated email from the git hooks/post-receive script.

khem pushed a commit to branch master-next
in repository meta-openembedded.

The following commit(s) were added to refs/heads/master-next by this push:
     new e135f74  dfu-util-native: Dont build static binary
e135f74 is described below

commit e135f74f61fa30d88c01e9db239d90a165ae72d2
Author: Khem Raj <raj.khem at gmail.com>
AuthorDate: Wed Sep 18 11:40:22 2019 -0700

    dfu-util-native: Dont build static binary
    
    This did serve a purpose in past, this however is adding additional
    requirement on build host to require static libc.a. in general it will
    be good for user to select static linking explicitly, since it does have
    distribution obligations once static linking is in place.
    
    Add packageconfig to enable static builds and keep it off by default
    
    Signed-off-by: Khem Raj <raj.khem at gmail.com>
    Cc: Martin JaMa Jansa <Martin.Jansa at gmail.com>
---
 .../dfu-util/dfu-util-native_0.9.bb                |  7 ++-
 ...1-Revert-Makefile.am-Drop-static-dfu-util.patch | 68 ----------------------
 2 files changed, 5 insertions(+), 70 deletions(-)

diff --git a/meta-oe/recipes-support/dfu-util/dfu-util-native_0.9.bb b/meta-oe/recipes-support/dfu-util/dfu-util-native_0.9.bb
index aeca23b..76faefe 100644
--- a/meta-oe/recipes-support/dfu-util/dfu-util-native_0.9.bb
+++ b/meta-oe/recipes-support/dfu-util/dfu-util-native_0.9.bb
@@ -4,12 +4,15 @@ inherit native deploy
 
 DEPENDS = "libusb1-native"
 
-SRC_URI += "file://0001-Revert-Makefile.am-Drop-static-dfu-util.patch"
+PACKAGECONFIG ??= ""
+
+PACKAGECONFIG[static] = "CFLAGS='${CFLAGS} -pthread -static',,"
 
 do_deploy[sstate-outputdirs] = "${DEPLOY_DIR_TOOLS}"
 do_deploy() {
-    install -m 0755 src/dfu-util_static ${DEPLOYDIR}/dfu-util-${PV}
+    install -m 0755 src/dfu-util ${DEPLOYDIR}/dfu-util-${PV}
     rm -f ${DEPLOYDIR}/dfu-util
     ln -sf ./dfu-util-${PV} ${DEPLOYDIR}/dfu-util
 }
+
 addtask deploy before do_package after do_install
diff --git a/meta-oe/recipes-support/dfu-util/dfu-util/0001-Revert-Makefile.am-Drop-static-dfu-util.patch b/meta-oe/recipes-support/dfu-util/dfu-util/0001-Revert-Makefile.am-Drop-static-dfu-util.patch
deleted file mode 100644
index 1c6ad08..0000000
--- a/meta-oe/recipes-support/dfu-util/dfu-util/0001-Revert-Makefile.am-Drop-static-dfu-util.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From c2aab3b9ae1febcb6b4c6561a59df1930a57b394 Mon Sep 17 00:00:00 2001
-From: Martin JaMa Jansa <Martin.Jansa at gmail.com>
-Date: Thu, 11 Aug 2011 11:19:52 +0200
-Subject: [PATCH] Revert "Makefile.am: Drop static dfu-util"
-
-This reverts commit fe0426ddc04f503d148c5e5f931f16b8f674f071.
-
-Signed-off-by: Martin JaMa Jansa <Martin.Jansa at gmail.com>
----
- configure.ac    |  2 +-
- src/Makefile.am | 22 +++++++++++++++++++++-
- 2 files changed, 22 insertions(+), 2 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index f5a43b8..6a3757e 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -21,7 +21,7 @@ AS_IF([test x$native_libusb = xno], [
-         AC_MSG_ERROR([*** Required libusb-1.0 >= 1.0.0 not installed ***]))
- ])
- 
--LIBS="$LIBS $USB_LIBS"
-+LIBS="$LIBS $USB_LIBS -lpthread"
- CFLAGS="$CFLAGS $USB_CFLAGS"
- 
- # Checks for header files.
-diff --git a/src/Makefile.am b/src/Makefile.am
-index 70179c4..e8736ee 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -1,6 +1,6 @@
- AM_CFLAGS = -Wall -Wextra
- 
--bin_PROGRAMS = dfu-util dfu-suffix dfu-prefix
-+bin_PROGRAMS = dfu-util dfu-util_static dfu-suffix dfu-prefix
- dfu_util_SOURCES = main.c \
- 		portable.h \
- 		dfu_load.c \
-@@ -19,6 +19,26 @@ dfu_util_SOURCES = main.c \
- 		quirks.c \
- 		quirks.h
- 
-+dfu_util_static_SOURCES = main.c \
-+		portable.h \
-+		dfu_load.c \
-+		dfu_load.h \
-+		dfu_util.c \
-+		dfu_util.h \
-+		dfuse.c \
-+		dfuse.h \
-+		dfuse_mem.c \
-+		dfuse_mem.h \
-+		dfu.c \
-+		dfu.h \
-+		usb_dfu.h \
-+		dfu_file.c \
-+		dfu_file.h \
-+		quirks.c \
-+		quirks.h
-+
-+dfu_util_static_LDFLAGS = -static
-+
- dfu_suffix_SOURCES = suffix.c \
- 		dfu_file.h \
- 		dfu_file.c
--- 
-2.7.2
-

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list