diff options
author | Tom Doehring <toolmmy@googlemail.com> | 2015-09-27 15:34:14 +0200 |
---|---|---|
committer | Andrei Gherzan <andrei@gherzan.ro> | 2015-10-02 23:26:14 +0200 |
commit | 4dfa633d2387cf6e88d05635d817289d33c1d905 (patch) | |
tree | afe145823c362e9c3674a7e896b04aea337f1b44 | |
parent | c6f7ec52cfe47e3f13646a76ee5c7d7f24581ef3 (diff) | |
download | meta-raspberrypi-4dfa633d2387cf6e88d05635d817289d33c1d905.tar.gz |
userland: Fix multiple inline issues while building with gcc 5.x
Building userland source with gcc 5.x causes multiple issues such as:
vcos_thread.h:186:15: warning: inline function 'vcos_thread_get_affinity' declared but never defined
| VCOS_UNSIGNED vcos_thread_get_affinity(VCOS_THREAD_T *thread);
The following patches fixes these issues and allows building userland on the current
poky master branch.
Signed-off-by: Tom Doehring <toolmmy@googlemail.com>
5 files changed, 70 insertions, 39 deletions
diff --git a/recipes-graphics/userland/userland/0001-Use-newer-POSIX-macro.patch b/recipes-graphics/userland/userland/0001-Use-newer-POSIX-macro.patch deleted file mode 100644 index 2a092c2..0000000 --- a/recipes-graphics/userland/userland/0001-Use-newer-POSIX-macro.patch +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | From 12f7718bb0e08e2c06825c7ab7541b3c5bfe74c1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sun, 9 Aug 2015 08:55:05 -0700 | ||
4 | Subject: [PATCH] Use newer POSIX macro | ||
5 | |||
6 | Define _POSIX_C_SOURCE such that it demands correct | ||
7 | posix interfaces, netdb.h declares interfaces such as | ||
8 | getaddrinfo if __USE_POSIX, i.e. POSIX.1:1990 or later. | ||
9 | However, these interfaces were new in the 2001 edition of POSIX | ||
10 | therefore ask for Extension from POSIX.1:2001 since we use addrinfo | ||
11 | structure here. | ||
12 | |||
13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
14 | --- | ||
15 | Upstream-Status: Submitted | ||
16 | |||
17 | containers/CMakeLists.txt | 2 +- | ||
18 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
19 | |||
20 | diff --git a/containers/CMakeLists.txt b/containers/CMakeLists.txt | ||
21 | index a29a885..5570038 100644 | ||
22 | --- a/containers/CMakeLists.txt | ||
23 | +++ b/containers/CMakeLists.txt | ||
24 | @@ -13,7 +13,7 @@ add_definitions(-DDL_PATH_PREFIX="${VMCS_PLUGIN_DIR}/") | ||
25 | |||
26 | SET( GCC_COMPILER_FLAGS -Wall -g -O2 -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wcast-qual -Wwrite-strings -Wundef ) | ||
27 | SET( GCC_COMPILER_FLAGS ${GCC_COMPILER_FLAGS} -Wextra )#-Wno-missing-field-initializers ) | ||
28 | -SET( GCC_COMPILER_FLAGS ${GCC_COMPILER_FLAGS} -std=c99 -D_POSIX_C_SOURCE=199309L ) | ||
29 | +SET( GCC_COMPILER_FLAGS ${GCC_COMPILER_FLAGS} -std=c99 -D_POSIX_C_SOURCE=200112L ) | ||
30 | SET( GCC_COMPILER_FLAGS ${GCC_COMPILER_FLAGS} -Wno-missing-field-initializers ) | ||
31 | SET( GCC_COMPILER_FLAGS ${GCC_COMPILER_FLAGS} -Wno-unused-value ) | ||
32 | |||
33 | -- | ||
34 | 2.1.4 | ||
35 | |||
diff --git a/recipes-graphics/userland/userland/0001-fix-gcc-5.x-inlines.patch b/recipes-graphics/userland/userland/0001-fix-gcc-5.x-inlines.patch new file mode 100644 index 0000000..57f3518 --- /dev/null +++ b/recipes-graphics/userland/userland/0001-fix-gcc-5.x-inlines.patch | |||
@@ -0,0 +1,26 @@ | |||
1 | --- userland-fb11b39d97371c076eef7c85bbcab5733883a41e.orig/interface/vcos/vcos_types.h | ||
2 | +++ userland-fb11b39d97371c076eef7c85bbcab5733883a41e/interface/vcos/vcos_types.h | ||
3 | @@ -121,10 +121,10 @@ | ||
4 | #if defined(NDEBUG) | ||
5 | |||
6 | #ifdef __GNUC__ | ||
7 | -# define VCOS_INLINE_DECL extern __inline__ | ||
8 | +# define VCOS_INLINE_DECL extern | ||
9 | # define VCOS_INLINE_IMPL static __inline__ | ||
10 | #else | ||
11 | -# define VCOS_INLINE_DECL static _VCOS_INLINE /* declare a func */ | ||
12 | +# define VCOS_INLINE_DECL extern | ||
13 | # define VCOS_INLINE_IMPL static _VCOS_INLINE /* implement a func inline */ | ||
14 | #endif | ||
15 | |||
16 | --- userland-fb11b39d97371c076eef7c85bbcab5733883a41e.orig/interface/vcos/pthreads/vcos_platform_types.h | ||
17 | +++ userland-fb11b39d97371c076eef7c85bbcab5733883a41e/interface/vcos/pthreads/vcos_platform_types.h | ||
18 | @@ -61,7 +61,7 @@ | ||
19 | #define VCOS_ASSERT_MSG(...) ((VCOS_ASSERT_LOGGING && !VCOS_ASSERT_LOGGING_DISABLE) ? vcos_pthreads_logging_assert(__FILE__, __func__, __LINE__, __VA_ARGS__) : (void)0) | ||
20 | |||
21 | #define VCOS_INLINE_BODIES | ||
22 | -#define VCOS_INLINE_DECL extern __inline__ | ||
23 | +#define VCOS_INLINE_DECL extern | ||
24 | #define VCOS_INLINE_IMPL static __inline__ | ||
25 | |||
26 | #ifdef __cplusplus | ||
diff --git a/recipes-graphics/userland/userland/0002-fix-musl-build.patch b/recipes-graphics/userland/userland/0002-fix-musl-build.patch new file mode 100644 index 0000000..2fb11e7 --- /dev/null +++ b/recipes-graphics/userland/userland/0002-fix-musl-build.patch | |||
@@ -0,0 +1,22 @@ | |||
1 | --- userland-d4aa617de3b196399bb8e2ce32e181768cb52179.orig/host_applications/linux/apps/raspicam/RaspiVidYUV.c | ||
2 | +++ userland-d4aa617de3b196399bb8e2ce32e181768cb52179/host_applications/linux/apps/raspicam/RaspiVidYUV.c | ||
3 | @@ -106,8 +106,6 @@ | ||
4 | /// Run/record forever | ||
5 | #define WAIT_METHOD_FOREVER 4 | ||
6 | |||
7 | -extern FILE *stderr, *stdout; | ||
8 | - | ||
9 | int mmal_status_to_int(MMAL_STATUS_T status); | ||
10 | static void signal_handler(int signal_number); | ||
11 | |||
12 | --- userland-d4aa617de3b196399bb8e2ce32e181768cb52179.orig/host_applications/linux/libs/debug_sym/debug_sym.c | ||
13 | +++ userland-d4aa617de3b196399bb8e2ce32e181768cb52179/host_applications/linux/libs/debug_sym/debug_sym.c | ||
14 | @@ -67,6 +67,8 @@ | ||
15 | # else | ||
16 | # define PAGE_SIZE 4096 | ||
17 | # endif | ||
18 | +#endif | ||
19 | +#ifndef PAGE_MASK | ||
20 | #define PAGE_MASK (~(PAGE_SIZE - 1)) | ||
21 | #endif | ||
22 | |||
diff --git a/recipes-graphics/userland/userland/0003-fix-alloc-size-uninitialized.patch b/recipes-graphics/userland/userland/0003-fix-alloc-size-uninitialized.patch new file mode 100644 index 0000000..7dd6436 --- /dev/null +++ b/recipes-graphics/userland/userland/0003-fix-alloc-size-uninitialized.patch | |||
@@ -0,0 +1,13 @@ | |||
1 | diff --git a/host_applications/linux/apps/smem/smem.c b/host_applications/linux/apps/smem/smem.c | ||
2 | index f780b79..618580e 100644 | ||
3 | --- a/host_applications/linux/apps/smem/smem.c | ||
4 | +++ b/host_applications/linux/apps/smem/smem.c | ||
5 | @@ -192,7 +192,7 @@ int main( int argc, char **argv ) | ||
6 | int opt; | ||
7 | int opt_alloc = 0; | ||
8 | int opt_status = 0; | ||
9 | - uint32_t alloc_size; | ||
10 | + uint32_t alloc_size = 0; | ||
11 | int opt_pid = -1; | ||
12 | VCSM_STATUS_T status_mode = VCSM_STATUS_NONE; | ||
13 | |||
diff --git a/recipes-graphics/userland/userland_git.bb b/recipes-graphics/userland/userland_git.bb index 2b3286a..e431077 100644 --- a/recipes-graphics/userland/userland_git.bb +++ b/recipes-graphics/userland/userland_git.bb | |||
@@ -9,15 +9,20 @@ PR = "r5" | |||
9 | 9 | ||
10 | PROVIDES = "virtual/libgles2 \ | 10 | PROVIDES = "virtual/libgles2 \ |
11 | virtual/egl" | 11 | virtual/egl" |
12 | |||
12 | COMPATIBLE_MACHINE = "raspberrypi" | 13 | COMPATIBLE_MACHINE = "raspberrypi" |
13 | 14 | ||
14 | SRCBRANCH = "master" | 15 | SRCBRANCH = "master" |
15 | SRCFORK = "raspberrypi" | 16 | SRCFORK = "raspberrypi" |
16 | SRCREV = "c2f27fb8e581f8e5af83bf28422553ade8f7a7c8" | 17 | SRCREV = "cc92dfd6c4e8e2d90c3903dccfe77f7274b8d1b7" |
18 | |||
19 | SRC_URI = "\ | ||
20 | git://github.com/${SRCFORK}/userland.git;protocol=git;branch=${SRCBRANCH} \ | ||
21 | file://0001-fix-gcc-5.x-inlines.patch \ | ||
22 | file://0002-fix-musl-build.patch \ | ||
23 | file://0003-fix-alloc-size-uninitialized.patch \ | ||
24 | " | ||
17 | 25 | ||
18 | SRC_URI = "git://github.com/${SRCFORK}/userland.git;protocol=git;branch=${SRCBRANCH} \ | ||
19 | file://0001-Use-newer-POSIX-macro.patch \ | ||
20 | " | ||
21 | S = "${WORKDIR}/git" | 26 | S = "${WORKDIR}/git" |
22 | 27 | ||
23 | inherit cmake | 28 | inherit cmake |