summaryrefslogtreecommitdiffstats
path: root/package/libkcapi/0004-internal.h-make-inline-functions-static.patch
diff options
context:
space:
mode:
authorMarcin Nowakowski <marcin.nowakowski@imgtec.com>2017-09-22 08:20:20 +0200
committerArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>2017-09-26 22:38:18 +0200
commitcd707a9112e38b4ce98326b96c0ed12054ca1cca (patch)
tree437220f3afd9ac19ab9fb440716f455a3563cc25 /package/libkcapi/0004-internal.h-make-inline-functions-static.patch
parent3f61400d2fc37ab54d266bde48c3b69261827f5d (diff)
downloadbuildroot-cd707a9112e38b4ce98326b96c0ed12054ca1cca.tar.gz
buildroot-cd707a9112e38b4ce98326b96c0ed12054ca1cca.zip
libkcapi: bump version to 0.14.0
Switch from github hash to an official release. Several upstream patches are required to build the code correctly on all platforms supported by buildroot. The test application now uses fork(). Signed-off-by: Marcin Nowakowski <marcin.nowakowski@imgtec.com> [Arnout: Squash the two patches, MMU dependency was introduced with the version bump. Wrap assignments in libkcapi.mk differently.] Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Diffstat (limited to 'package/libkcapi/0004-internal.h-make-inline-functions-static.patch')
-rw-r--r--package/libkcapi/0004-internal.h-make-inline-functions-static.patch103
1 files changed, 103 insertions, 0 deletions
diff --git a/package/libkcapi/0004-internal.h-make-inline-functions-static.patch b/package/libkcapi/0004-internal.h-make-inline-functions-static.patch
new file mode 100644
index 0000000000..a050173964
--- /dev/null
+++ b/package/libkcapi/0004-internal.h-make-inline-functions-static.patch
@@ -0,0 +1,103 @@
+From 2b9e01ee31c1b7596b19f0c89954e93e217b0479 Mon Sep 17 00:00:00 2001
+From: Marcin Nowakowski <marcin.nowakowski@imgtec.com>
+Date: Thu, 21 Sep 2017 10:16:33 +0200
+Subject: [PATCH] internal.h: make inline functions static
+
+With some GCC configurations/build options it is possible for gcc to
+ignore the inline hint. As the methods are not declared static, gcc
+expects a definition to be provided elsewhere, which is not the case
+here resulting in the following linker error:
+
+libtool: link: /home/marcin/br-test-pkg/br-arm-cortex-a9-glibc/host/bin/arm-linux-gcc
+-fstack-protector-strong -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
+-D_FILE_OFFSET_BITS=64 -Os -Wl,-z -Wl,relro -Wl,-z -Wl,now -o bin/kcapi
+test/bin_kcapi-kcapi-main.o ./.libs/libkcapi.so -Wl,-rpath
+-Wl,/home/marcin/br-test-pkg/br-arm-cortex-a9-glibc/build/libkcapi-0.14.0/.libs
+./.libs/libkcapi.so: undefined reference to `_kcapi_common_vmsplice_iov'
+./.libs/libkcapi.so: undefined reference to `_kcapi_common_read_data'
+./.libs/libkcapi.so: undefined reference to `_kcapi_aio_read_iov'
+./.libs/libkcapi.so: undefined reference to `_kcapi_common_recv_data'
+./.libs/libkcapi.so: undefined reference to `_kcapi_common_send_data'
+./.libs/libkcapi.so: undefined reference to `_kcapi_common_vmsplice_chunk'
+./.libs/libkcapi.so: undefined reference to `_kcapi_common_send_meta'
+collect2: error: ld returned 1 exit status
+
+$ arm-linux-gcc --version
+arm-linux-gcc.br_real (Buildroot 2017.08-git-01078-g95b1dae) 7.1.0
+
+Signed-off-by: Marcin Nowakowski <marcin.nowakowski@imgtec.com>
+Signed-off-by: Stephan Mueller <smueller@chronox.de>
+
+[Upstream commit: https://github.com/smuellerDD/libkcapi/commit/2b9e01ee31c1b7596b19f0c89954e93e217b0479]
+Signed-off-by: Marcin Nowakowski <marcin.nowakowski@imgtec.com>
+---
+ lib/internal.h | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/lib/internal.h b/lib/internal.h
+index 0d98f24..addf450 100644
+--- a/lib/internal.h
++++ b/lib/internal.h
+@@ -233,7 +233,7 @@ void kcapi_dolog(int severity, const char *fmt, ...);
+ int32_t _kcapi_common_send_meta_fd(struct kcapi_handle *handle, int *fdptr,
+ struct iovec *iov, uint32_t iovlen,
+ uint32_t enc, uint32_t flags);
+-inline int32_t _kcapi_common_send_meta(struct kcapi_handle *handle,
++static inline int32_t _kcapi_common_send_meta(struct kcapi_handle *handle,
+ struct iovec *iov, uint32_t iovlen,
+ uint32_t enc, uint32_t flags)
+ {
+@@ -244,7 +244,7 @@ inline int32_t _kcapi_common_send_meta(struct kcapi_handle *handle,
+ int32_t _kcapi_common_vmsplice_iov_fd(struct kcapi_handle *handle, int *fdptr,
+ struct iovec *iov, unsigned long iovlen,
+ uint32_t flags);
+-inline int32_t _kcapi_common_vmsplice_iov(struct kcapi_handle *handle,
++static inline int32_t _kcapi_common_vmsplice_iov(struct kcapi_handle *handle,
+ struct iovec *iov, unsigned long iovlen,
+ uint32_t flags)
+ {
+@@ -255,7 +255,7 @@ inline int32_t _kcapi_common_vmsplice_iov(struct kcapi_handle *handle,
+ int32_t _kcapi_common_send_data_fd(struct kcapi_handle *handle, int *fdprt,
+ struct iovec *iov, uint32_t iovlen,
+ uint32_t flags);
+-inline int32_t _kcapi_common_send_data(struct kcapi_handle *handle,
++static inline int32_t _kcapi_common_send_data(struct kcapi_handle *handle,
+ struct iovec *iov, uint32_t iovlen,
+ uint32_t flags)
+ {
+@@ -265,7 +265,7 @@ inline int32_t _kcapi_common_send_data(struct kcapi_handle *handle,
+
+ int32_t _kcapi_common_recv_data_fd(struct kcapi_handle *handle, int *fdptr,
+ struct iovec *iov, uint32_t iovlen);
+-inline int32_t _kcapi_common_recv_data(struct kcapi_handle *handle,
++static inline int32_t _kcapi_common_recv_data(struct kcapi_handle *handle,
+ struct iovec *iov, uint32_t iovlen)
+ {
+ return _kcapi_common_recv_data_fd(handle, &handle->opfd, iov, iovlen);
+@@ -273,7 +273,7 @@ inline int32_t _kcapi_common_recv_data(struct kcapi_handle *handle,
+
+ int32_t _kcapi_common_read_data_fd(struct kcapi_handle *handle, int *fdptr,
+ uint8_t *out, uint32_t outlen);
+-inline int32_t _kcapi_common_read_data(struct kcapi_handle *handle,
++static inline int32_t _kcapi_common_read_data(struct kcapi_handle *handle,
+ uint8_t *out, uint32_t outlen)
+ {
+ return _kcapi_common_read_data_fd(handle, &handle->opfd, out, outlen);
+@@ -285,7 +285,7 @@ int _kcapi_common_close(struct kcapi_handle *handle, int fdptr);
+ int32_t _kcapi_common_vmsplice_chunk_fd(struct kcapi_handle *handle, int *fdptr,
+ const uint8_t *in, uint32_t inlen,
+ uint32_t flags);
+-inline int32_t _kcapi_common_vmsplice_chunk(struct kcapi_handle *handle,
++static inline int32_t _kcapi_common_vmsplice_chunk(struct kcapi_handle *handle,
+ const uint8_t *in, uint32_t inlen,
+ uint32_t flags)
+ {
+@@ -315,7 +315,7 @@ int _kcapi_aio_send_iov(struct kcapi_handle *handle, struct iovec *iov,
+
+ int32_t _kcapi_aio_read_iov_fd(struct kcapi_handle *handle, int *fdptr,
+ struct iovec *iov, uint32_t iovlen);
+-inline int32_t _kcapi_aio_read_iov(struct kcapi_handle *handle,
++static inline int32_t _kcapi_aio_read_iov(struct kcapi_handle *handle,
+ struct iovec *iov, uint32_t iovlen)
+ {
+ return _kcapi_aio_read_iov_fd(handle, &handle->opfd, iov, iovlen);
OpenPOWER on IntegriCloud