diff options
author | Ross Burton <ross.burton@intel.com> | 2018-06-28 18:47:45 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-06-29 11:07:45 +0100 |
commit | 1dec2101f9603d5340139f24d36c2e9f396eb311 (patch) | |
tree | a743248d38d457cc180517ab9792ae97bc01aea4 /meta/recipes-graphics/libsdl2 | |
parent | 4205e87a7717bccbe034f1334ae1b3d1130d7e57 (diff) | |
download | poky-1dec2101f9603d5340139f24d36c2e9f396eb311.tar.gz |
libsdl2: fix build race
There's an occasional build race from headers being generated in parallel with
other files which include the headers being compiled. Solve this by adding more
dependencies.
[ YOCTO #12815 ]
(From OE-Core rev: 177f4782e1ffca1eed3c9b102d910239a3dceea4)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics/libsdl2')
-rw-r--r-- | meta/recipes-graphics/libsdl2/libsdl2/more-gen-depends.patch | 47 | ||||
-rw-r--r-- | meta/recipes-graphics/libsdl2/libsdl2_2.0.8.bb | 4 |
2 files changed, 49 insertions, 2 deletions
diff --git a/meta/recipes-graphics/libsdl2/libsdl2/more-gen-depends.patch b/meta/recipes-graphics/libsdl2/libsdl2/more-gen-depends.patch new file mode 100644 index 0000000000..29076bf6cb --- /dev/null +++ b/meta/recipes-graphics/libsdl2/libsdl2/more-gen-depends.patch | |||
@@ -0,0 +1,47 @@ | |||
1 | Many source files include e.g. wayland-protocols.h which should be found in the | ||
2 | sysroot but SDL wants to build its own headers from the XML definitions. | ||
3 | |||
4 | However the rules to generate those headers are only dependencies of the | ||
5 | top-level libSDL2.la object so can be built in parallel with the rest of the | ||
6 | objects, which can lead to interesting errors if the header is parsed by the | ||
7 | compiler whilst it's being written by another process: | ||
8 | |||
9 | | gen/wayland-client-protocol.h:3: error: unterminated #ifndef | ||
10 | | #ifndef WAYLAND_CLIENT_PROTOCOL_H | ||
11 | |||
12 | Solve this by adding more dependencies so the generated files are built before | ||
13 | the primary objects. | ||
14 | |||
15 | Upstream-Status: Pending | ||
16 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
17 | |||
18 | diff --git a/configure.in b/data/poky-tmp/master/work/corei7-64-poky-linux/libsdl2/2.0.8-r0/SDL2-2.0.8/configure.in | ||
19 | index 1c7e79338..ba07a4a4e 100644 | ||
20 | --- a/configure.in | ||
21 | +++ b/data/poky-tmp/master/work/corei7-64-poky-linux/libsdl2/2.0.8-r0/SDL2-2.0.8/configure.in | ||
22 | @@ -4011,7 +4011,7 @@ DEPENDS=`echo $SOURCES | tr ' ' '\n'` | ||
23 | for EXT in asm cc m c S; do | ||
24 | OBJECTS=`echo "$OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.'$EXT',$(objects)/\1.lo,g'` | ||
25 | DEPENDS=`echo "$DEPENDS" | sed "s,^\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.$EXT\\$,\\\\ | ||
26 | -\\$(objects)/\\2.lo: \\1/\\2.$EXT\\\\ | ||
27 | +\\$(objects)/\\2.lo: \\1/\\2.$EXT \\$(GEN_OBJECTS)\\\\ | ||
28 | \\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"` | ||
29 | done | ||
30 | |||
31 | @@ -4028,14 +4028,14 @@ SDLMAIN_OBJECTS=`echo $SDLMAIN_SOURCES` | ||
32 | SDLMAIN_DEPENDS=`echo $SDLMAIN_SOURCES` | ||
33 | SDLMAIN_OBJECTS=`echo "$SDLMAIN_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.lo,g'` | ||
34 | SDLMAIN_DEPENDS=`echo "$SDLMAIN_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.c,\\\\ | ||
35 | -\\$(objects)/\\2.lo: \\1/\\2.c\\\\ | ||
36 | +\\$(objects)/\\2.lo: \\1/\\2.c \\$(GEN_OBJECTS)\\\\ | ||
37 | \\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"` | ||
38 | |||
39 | SDLTEST_OBJECTS=`echo $SDLTEST_SOURCES` | ||
40 | SDLTEST_DEPENDS=`echo $SDLTEST_SOURCES` | ||
41 | SDLTEST_OBJECTS=`echo "$SDLTEST_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.lo,g'` | ||
42 | SDLTEST_DEPENDS=`echo "$SDLTEST_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.c,\\\\ | ||
43 | -\\$(objects)/\\2.lo: \\1/\\2.c\\\\ | ||
44 | +\\$(objects)/\\2.lo: \\1/\\2.c\\\\ \\$(GEN_OBJECTS)\\\\ | ||
45 | \\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"` | ||
46 | |||
47 | # Set runtime shared library paths as needed | ||
diff --git a/meta/recipes-graphics/libsdl2/libsdl2_2.0.8.bb b/meta/recipes-graphics/libsdl2/libsdl2_2.0.8.bb index 6966dc5c34..accea38aaa 100644 --- a/meta/recipes-graphics/libsdl2/libsdl2_2.0.8.bb +++ b/meta/recipes-graphics/libsdl2/libsdl2_2.0.8.bb | |||
@@ -12,8 +12,8 @@ LIC_FILES_CHKSUM = "file://COPYING.txt;md5=02ee26814dd044bd7838ae24e05b880f" | |||
12 | 12 | ||
13 | PROVIDES = "virtual/libsdl2" | 13 | PROVIDES = "virtual/libsdl2" |
14 | 14 | ||
15 | SRC_URI = " \ | 15 | SRC_URI = "http://www.libsdl.org/release/SDL2-${PV}.tar.gz \ |
16 | http://www.libsdl.org/release/SDL2-${PV}.tar.gz \ | 16 | file://more-gen-depends.patch \ |
17 | " | 17 | " |
18 | 18 | ||
19 | S = "${WORKDIR}/SDL2-${PV}" | 19 | S = "${WORKDIR}/SDL2-${PV}" |