summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-17 13:33:40 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-18 07:39:32 +0000
commitc00186377d74b62a2387ef1399e1f1b89725c5b9 (patch)
treeaab6b191cf038942c40887d2cfb04b5ca1608b17 /meta/recipes-graphics
parenta46dc87c92b4cf3f56c17b6f1d6e53ed0583bc09 (diff)
downloadpoky-c00186377d74b62a2387ef1399e1f1b89725c5b9.tar.gz
libsdl2: Fix build with static libraries disabled
libsdl2 was using foo.o in Makefile dependencies but if libtool is being used then those are the statically linked intermediate files. When static libraries are globally disabled they won't be generated by libtool so the build fails. Instead, use the libtool intermediate wrapper .lo files so the build succeeds. (From OE-Core rev: 3f935a6e9155e81165e26e94fd6c8504b272441e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics')
-rw-r--r--meta/recipes-graphics/libsdl2/libsdl2/linkage.patch46
-rw-r--r--meta/recipes-graphics/libsdl2/libsdl2_2.0.3.bb3
2 files changed, 48 insertions, 1 deletions
diff --git a/meta/recipes-graphics/libsdl2/libsdl2/linkage.patch b/meta/recipes-graphics/libsdl2/libsdl2/linkage.patch
new file mode 100644
index 0000000000..08315e7fc8
--- /dev/null
+++ b/meta/recipes-graphics/libsdl2/libsdl2/linkage.patch
@@ -0,0 +1,46 @@
1When building use the libtool intermediate .lo files instead of explicitly using
2the .o files. Under libtool foo.lo is the libtool intermediate wrapper, foo.o is
3a static build, and .libs/foo.o is a shared build.
4
5If static libraries have been disabled globally then libtool won't generate them
6and explicit references to foo.o won't be satisfied.
7
8Upstream-Status: Pending
9RP
102016/1/16
11
12
13Index: SDL2-2.0.3/configure.in
14===================================================================
15--- SDL2-2.0.3.orig/configure.in
16+++ SDL2-2.0.3/configure.in
17@@ -3136,23 +3136,23 @@ done
18
19 VERSION_OBJECTS=`echo $VERSION_SOURCES`
20 VERSION_DEPENDS=`echo $VERSION_SOURCES`
21-VERSION_OBJECTS=`echo "$VERSION_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.rc,$(objects)/\1.o,g'`
22+VERSION_OBJECTS=`echo "$VERSION_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.rc,$(objects)/\1.lo,g'`
23 VERSION_DEPENDS=`echo "$VERSION_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.rc,\\\\
24-\\$(objects)/\\2.o: \\1/\\2.rc\\\\
25+\\$(objects)/\\2.lo: \\1/\\2.rc\\\\
26 \\$(WINDRES) \\$< \\$@,g"`
27
28 SDLMAIN_OBJECTS=`echo $SDLMAIN_SOURCES`
29 SDLMAIN_DEPENDS=`echo $SDLMAIN_SOURCES`
30-SDLMAIN_OBJECTS=`echo "$SDLMAIN_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.o,g'`
31+SDLMAIN_OBJECTS=`echo "$SDLMAIN_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.lo,g'`
32 SDLMAIN_DEPENDS=`echo "$SDLMAIN_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.c,\\\\
33-\\$(objects)/\\2.o: \\1/\\2.c\\\\
34+\\$(objects)/\\2.lo: \\1/\\2.c\\\\
35 \\$(LIBTOOL) --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"`
36
37 SDLTEST_OBJECTS=`echo $SDLTEST_SOURCES`
38 SDLTEST_DEPENDS=`echo $SDLTEST_SOURCES`
39-SDLTEST_OBJECTS=`echo "$SDLTEST_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.o,g'`
40+SDLTEST_OBJECTS=`echo "$SDLTEST_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.lo,g'`
41 SDLTEST_DEPENDS=`echo "$SDLTEST_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.c,\\\\
42-\\$(objects)/\\2.o: \\1/\\2.c\\\\
43+\\$(objects)/\\2.lo: \\1/\\2.c\\\\
44 \\$(LIBTOOL) --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"`
45
46 # Set runtime shared library paths as needed
diff --git a/meta/recipes-graphics/libsdl2/libsdl2_2.0.3.bb b/meta/recipes-graphics/libsdl2/libsdl2_2.0.3.bb
index 61d9c1e68d..0dc1a85f91 100644
--- a/meta/recipes-graphics/libsdl2/libsdl2_2.0.3.bb
+++ b/meta/recipes-graphics/libsdl2/libsdl2_2.0.3.bb
@@ -14,7 +14,8 @@ PROVIDES = "virtual/libsdl2"
14 14
15DEPENDS_class-nativesdk = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/nativesdk-libx11 nativesdk-libxrandr nativesdk-libxrender nativesdk-libxext', '', d)}" 15DEPENDS_class-nativesdk = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/nativesdk-libx11 nativesdk-libxrandr nativesdk-libxrender nativesdk-libxext', '', d)}"
16 16
17SRC_URI = "http://www.libsdl.org/release/SDL2-${PV}.tar.gz" 17SRC_URI = "http://www.libsdl.org/release/SDL2-${PV}.tar.gz \
18 file://linkage.patch"
18 19
19S = "${WORKDIR}/SDL2-${PV}" 20S = "${WORKDIR}/SDL2-${PV}"
20 21