blob: c7dd2111bd1724d2b2ea1352ffb9e057a80c3e51 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
other: 0.104
permissions: 0.095
files: 0.095
semantic: 0.087
device: 0.085
PID: 0.079
graphic: 0.069
vnc: 0.060
debug: 0.058
network: 0.057
socket: 0.057
performance: 0.051
boot: 0.051
KVM: 0.050
debug: 0.375
files: 0.190
other: 0.084
semantic: 0.057
PID: 0.055
device: 0.052
boot: 0.028
network: 0.027
performance: 0.026
vnc: 0.025
graphic: 0.024
socket: 0.022
permissions: 0.018
KVM: 0.016
should use sdl-config for static build not pkg-config
In the configure script when a user wants to compile a static QEMU and enable SDL support (i.e. ./configure --static --enable-sdl):
pkg-config does not have an option "--static-libs". For correct results (to find the static archive libSDL.a) you need to use sdl-config --static-libs.
This is how I get it to work for me anyway:
diff --git a/configure b/configure
index 2d62d12..3de4c9b 100755
--- a/configure
+++ b/configure
@@ -1548,7 +1548,7 @@ int main( void ) { return SDL_Init (SDL_INIT_VIDEO); }
EOF
sdl_cflags=`$sdlconfig --cflags 2> /dev/null`
if test "$static" = "yes" ; then
- sdl_libs=`$sdlconfig --static-libs 2>/dev/null`
+ sdl_libs=`${SDL_CONFIG-${cross_prefix}sdl-config} --static-libs`
else
sdl_libs=`$sdlconfig --libs 2> /dev/null`
fi
Sorry, I stripped out the "2>/dev/null" when I was debugging and forgot to add it back in:
diff --git a/configure b/configure
index 2d62d12..3de4c9b 100755
--- a/configure
+++ b/configure
@@ -1548,7 +1548,7 @@ int main( void ) { return SDL_Init (SDL_INIT_VIDEO); }
EOF
sdl_cflags=`$sdlconfig --cflags 2> /dev/null`
if test "$static" = "yes" ; then
- sdl_libs=`$sdlconfig --static-libs 2>/dev/null`
+ sdl_libs=`${SDL_CONFIG-${cross_prefix}sdl-config} --static-libs 2>/dev/null`
else
sdl_libs=`$sdlconfig --libs 2> /dev/null`
fi
pkg-config supports --static, and QEMU uses it.
Please try whether
pkg-config --libs --static sdl
gives the correct flags with your distribution. If not, that distribution is buggy.
you are correct, can we switch the parameter from "--static-libs" to "--libs --static" ?
diff --git a/configure b/configure
index 2d62d12..b0cedd2 100755
--- a/configure
+++ b/configure
@@ -1548,7 +1548,7 @@ int main( void ) { return SDL_Init (SDL_INIT_VIDEO); }
EOF
sdl_cflags=`$sdlconfig --cflags 2> /dev/null`
if test "$static" = "yes" ; then
- sdl_libs=`$sdlconfig --static-libs 2>/dev/null`
+ sdl_libs=`$sdlconfig --libs --static 2>/dev/null`
else
sdl_libs=`$sdlconfig --libs 2> /dev/null`
fi
Finally fixed here:
http://git.qemu.org/?p=qemu.git;a=commitdiff;h=5f37e6d4a7b22ccf1bb8fa4
|