1 |
commit: 43df9ddd80a48d268c08af8b8484eb7681e8eeda |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Feb 25 21:27:54 2016 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Feb 25 22:13:28 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=43df9ddd |
7 |
|
8 |
media-sound/snd: Update patch for -ldl underlinking |
9 |
|
10 |
Gentoo-Bug: 510434, 540594 |
11 |
|
12 |
Package-Manager: portage-2.2.27 |
13 |
|
14 |
media-sound/snd/files/snd-12.6-as-needed.patch | 52 +++++++++++++++++++++++--- |
15 |
1 file changed, 46 insertions(+), 6 deletions(-) |
16 |
|
17 |
diff --git a/media-sound/snd/files/snd-12.6-as-needed.patch b/media-sound/snd/files/snd-12.6-as-needed.patch |
18 |
index d2f0bcb..af20208 100644 |
19 |
--- a/media-sound/snd/files/snd-12.6-as-needed.patch |
20 |
+++ b/media-sound/snd/files/snd-12.6-as-needed.patch |
21 |
@@ -1,6 +1,27 @@ |
22 |
---- snd-12.6/configure.ac.orig |
23 |
-+++ snd-12.6/configure.ac |
24 |
-@@ -1468,7 +1468,7 @@ |
25 |
+Fix underlinking due to missing -ldl linking: |
26 |
+* snd-xen.o:snd-xen.c:function g_dlinit_w: error: undefined reference to 'dlsym' |
27 |
+* snd-xen.o:snd-xen.c:function g_dlinit_w: error: undefined reference to 'dlerror' |
28 |
+https://bugs.gentoo.org/show_bug.cgi?id=540594 |
29 |
+ |
30 |
+Fix --as-needed issues due to linking flags in LDFLAGS |
31 |
+ |
32 |
+--- snd-12.8/configure.ac |
33 |
++++ snd-12.8/configure.ac |
34 |
+@@ -172,6 +172,13 @@ |
35 |
+ #-------------------------------------------------------------------------------- |
36 |
+ |
37 |
+ LIBS="" |
38 |
++AC_SEARCH_LIBS([dlopen], [dl dld], [], [ |
39 |
++ AC_MSG_ERROR([unable to find the dlopen() function]) |
40 |
++]) |
41 |
++LIBDL_LIBS="$LIBS" |
42 |
++AC_SUBST([LIBDL_LIBS]) |
43 |
++ |
44 |
++LIBS="" |
45 |
+ AC_CHECK_LIB(m,main) |
46 |
+ AC_CHECK_LIB(c,main) |
47 |
+ # AC_CHECK_LIB(dl,main) |
48 |
+@@ -1469,7 +1476,7 @@ |
49 |
LDSO_FLAGS="-shared" |
50 |
LIBS="$LIBS -lm" |
51 |
if test "$ac_cv_header_dlfcn_h" = yes ; then |
52 |
@@ -9,16 +30,16 @@ |
53 |
fi |
54 |
if test "$GCC" = yes ; then |
55 |
SO_FLAGS="-fPIC $SO_FLAGS" |
56 |
-@@ -1979,7 +1979,7 @@ |
57 |
+@@ -1980,7 +1987,7 @@ |
58 |
if test "$ac_snd_have_extension_language" = yes ; then |
59 |
if test "$ac_snd_have_gui" = yes ; then |
60 |
if test "$ac_cv_header_pthread_h" = yes ; then |
61 |
- LDFLAGS="$LDFLAGS -lpthread" |
62 |
-+ LIBS="$LIBS -lpthread" |
63 |
++ LIBS="$LIBS -pthread" |
64 |
fi |
65 |
fi |
66 |
fi |
67 |
-@@ -1987,14 +1987,14 @@ |
68 |
+@@ -1988,14 +1995,14 @@ |
69 |
if test "$ac_snd_have_extension_language" = no ; then |
70 |
if test "$ac_snd_have_gui" = no ; then |
71 |
if test "$ac_cv_header_dlfcn_h" = yes ; then |
72 |
@@ -35,3 +56,22 @@ |
73 |
fi |
74 |
|
75 |
|
76 |
+--- snd-12.8/makefile.in |
77 |
++++ snd-12.8/makefile.in |
78 |
+@@ -20,6 +20,7 @@ |
79 |
+ LDFLAGS = @LDFLAGS@ |
80 |
+ |
81 |
+ LIBS = @LIBS@ |
82 |
++LIBDL_LIBS = @LIBDL_LIBS@ |
83 |
+ XEN_LIBS = @XEN_LIBS@ |
84 |
+ GTK_LIBS = @GTK_LIBS@ |
85 |
+ GTK_LD_LIBS = @GTK_LD_LIBS@ |
86 |
+@@ -96,7 +97,7 @@ |
87 |
+ main_target: @MAKE_TARGET@ |
88 |
+ |
89 |
+ snd: $(SNDLIB_HEADERS) $(SND_HEADERS) $(GX_HEADERS) $(S7_HEADERS) $(S7_O_FILES) $(SNDLIB_FILES) $(O_FILES) $(GX_FILES) $(GL_FILES) |
90 |
+- $(CC) $(LDFLAGS) $(CFLAGS) $(S7_O_FILES) $(SNDLIB_FILES) $(O_FILES) $(GX_FILES) $(GL_FILES) -o snd $(SNDLIB_LIB) $(XEN_LIBS) $(GTK_LIBS) $(GL_LIBS) $(MOTIF_LIBS) $(JACK_LIBS) $(AUDIO_LIB) $(FFTW_LIBS) $(GSL_LIBS) $(FAM_LIB) $(GMP_LIBS) $(LIBS) |
91 |
++ $(CC) $(LDFLAGS) $(CFLAGS) $(S7_O_FILES) $(SNDLIB_FILES) $(O_FILES) $(GX_FILES) $(GL_FILES) -o snd $(SNDLIB_LIB) $(XEN_LIBS) $(GTK_LIBS) $(GL_LIBS) $(MOTIF_LIBS) $(JACK_LIBS) $(AUDIO_LIB) $(FFTW_LIBS) $(GSL_LIBS) $(FAM_LIB) $(GMP_LIBS) $(LIBDL_LIBS) $(LIBS) |
92 |
+ |
93 |
+ xm: xen.h mus-config.h $(S7_HEADERS) |
94 |
+ $(CC) -c xm.c -DUSE_SND=0 $(DEFS) $(SO_FLAGS) $(GTK_CFLAGS) $(CAIRO_CFLAGS) $(CFLAGS) $(XEN_CFLAGS) $(MOTIF_FLAGS) $(GSL_FLAGS) $(JACK_FLAGS) $(GL_FLAGS) |