diff options
author | Khem Raj <raj.khem@gmail.com> | 2019-09-18 11:40:22 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2019-09-18 12:22:07 -0700 |
commit | e135f74f61fa30d88c01e9db239d90a165ae72d2 (patch) | |
tree | 47618888d7e5b6bf550f240aa6597022f41d1356 /meta-oe/recipes-support/dfu-util | |
parent | ad9c47718bb55a7c85507eed1c5f1c72ce886434 (diff) | |
download | meta-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.bb | 7 | ||||
-rw-r--r-- | meta-oe/recipes-support/dfu-util/dfu-util/0001-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 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 | ||
5 | DEPENDS = "libusb1-native" | 5 | DEPENDS = "libusb1-native" |
6 | 6 | ||
7 | SRC_URI += "file://0001-Revert-Makefile.am-Drop-static-dfu-util.patch" | 7 | PACKAGECONFIG ??= "" |
8 | |||
9 | PACKAGECONFIG[static] = "CFLAGS='${CFLAGS} -pthread -static',," | ||
8 | 10 | ||
9 | do_deploy[sstate-outputdirs] = "${DEPLOY_DIR_TOOLS}" | 11 | do_deploy[sstate-outputdirs] = "${DEPLOY_DIR_TOOLS}" |
10 | do_deploy() { | 12 | do_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 | |||
15 | addtask deploy before do_package after do_install | 18 | 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 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 @@ | |||
1 | From c2aab3b9ae1febcb6b4c6561a59df1930a57b394 Mon Sep 17 00:00:00 2001 | ||
2 | From: Martin JaMa Jansa <Martin.Jansa@gmail.com> | ||
3 | Date: Thu, 11 Aug 2011 11:19:52 +0200 | ||
4 | Subject: [PATCH] Revert "Makefile.am: Drop static dfu-util" | ||
5 | |||
6 | This reverts commit fe0426ddc04f503d148c5e5f931f16b8f674f071. | ||
7 | |||
8 | Signed-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 | |||
14 | diff --git a/configure.ac b/configure.ac | ||
15 | index 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. | ||
27 | diff --git a/src/Makefile.am b/src/Makefile.am | ||
28 | index 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 | -- | ||
67 | 2.7.2 | ||
68 | |||