summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/dfu-util
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2019-09-18 11:40:22 -0700
committerKhem Raj <raj.khem@gmail.com>2019-09-18 12:22:07 -0700
commite135f74f61fa30d88c01e9db239d90a165ae72d2 (patch)
tree47618888d7e5b6bf550f240aa6597022f41d1356 /meta-oe/recipes-support/dfu-util
parentad9c47718bb55a7c85507eed1c5f1c72ce886434 (diff)
downloadmeta-openembedded-e135f74f61fa30d88c01e9db239d90a165ae72d2.tar.gz
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@gmail.com> Cc: Martin JaMa Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support/dfu-util')
-rw-r--r--meta-oe/recipes-support/dfu-util/dfu-util-native_0.9.bb7
-rw-r--r--meta-oe/recipes-support/dfu-util/dfu-util/0001-Revert-Makefile.am-Drop-static-dfu-util.patch68
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 aeca23bf2..76faefefb 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
4 4
5DEPENDS = "libusb1-native" 5DEPENDS = "libusb1-native"
6 6
7SRC_URI += "file://0001-Revert-Makefile.am-Drop-static-dfu-util.patch" 7PACKAGECONFIG ??= ""
8
9PACKAGECONFIG[static] = "CFLAGS='${CFLAGS} -pthread -static',,"
8 10
9do_deploy[sstate-outputdirs] = "${DEPLOY_DIR_TOOLS}" 11do_deploy[sstate-outputdirs] = "${DEPLOY_DIR_TOOLS}"
10do_deploy() { 12do_deploy() {
11 install -m 0755 src/dfu-util_static ${DEPLOYDIR}/dfu-util-${PV} 13 install -m 0755 src/dfu-util ${DEPLOYDIR}/dfu-util-${PV}
12 rm -f ${DEPLOYDIR}/dfu-util 14 rm -f ${DEPLOYDIR}/dfu-util
13 ln -sf ./dfu-util-${PV} ${DEPLOYDIR}/dfu-util 15 ln -sf ./dfu-util-${PV} ${DEPLOYDIR}/dfu-util
14} 16}
17
15addtask deploy before do_package after do_install 18addtask 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 1c6ad0807..000000000
--- a/meta-oe/recipes-support/dfu-util/dfu-util/0001-Revert-Makefile.am-Drop-static-dfu-util.patch
+++ /dev/null
@@ -1,68 +0,0 @@
1From c2aab3b9ae1febcb6b4c6561a59df1930a57b394 Mon Sep 17 00:00:00 2001
2From: Martin JaMa Jansa <Martin.Jansa@gmail.com>
3Date: Thu, 11 Aug 2011 11:19:52 +0200
4Subject: [PATCH] Revert "Makefile.am: Drop static dfu-util"
5
6This reverts commit fe0426ddc04f503d148c5e5f931f16b8f674f071.
7
8Signed-off-by: Martin JaMa Jansa <Martin.Jansa@gmail.com>
9---
10 configure.ac | 2 +-
11 src/Makefile.am | 22 +++++++++++++++++++++-
12 2 files changed, 22 insertions(+), 2 deletions(-)
13
14diff --git a/configure.ac b/configure.ac
15index f5a43b8..6a3757e 100644
16--- a/configure.ac
17+++ b/configure.ac
18@@ -21,7 +21,7 @@ AS_IF([test x$native_libusb = xno], [
19 AC_MSG_ERROR([*** Required libusb-1.0 >= 1.0.0 not installed ***]))
20 ])
21
22-LIBS="$LIBS $USB_LIBS"
23+LIBS="$LIBS $USB_LIBS -lpthread"
24 CFLAGS="$CFLAGS $USB_CFLAGS"
25
26 # Checks for header files.
27diff --git a/src/Makefile.am b/src/Makefile.am
28index 70179c4..e8736ee 100644
29--- a/src/Makefile.am
30+++ b/src/Makefile.am
31@@ -1,6 +1,6 @@
32 AM_CFLAGS = -Wall -Wextra
33
34-bin_PROGRAMS = dfu-util dfu-suffix dfu-prefix
35+bin_PROGRAMS = dfu-util dfu-util_static dfu-suffix dfu-prefix
36 dfu_util_SOURCES = main.c \
37 portable.h \
38 dfu_load.c \
39@@ -19,6 +19,26 @@ dfu_util_SOURCES = main.c \
40 quirks.c \
41 quirks.h
42
43+dfu_util_static_SOURCES = main.c \
44+ portable.h \
45+ dfu_load.c \
46+ dfu_load.h \
47+ dfu_util.c \
48+ dfu_util.h \
49+ dfuse.c \
50+ dfuse.h \
51+ dfuse_mem.c \
52+ dfuse_mem.h \
53+ dfu.c \
54+ dfu.h \
55+ usb_dfu.h \
56+ dfu_file.c \
57+ dfu_file.h \
58+ quirks.c \
59+ quirks.h
60+
61+dfu_util_static_LDFLAGS = -static
62+
63 dfu_suffix_SOURCES = suffix.c \
64 dfu_file.h \
65 dfu_file.c
66--
672.7.2
68