mirror of
https://github.com/MiyooCFW/buildroot.git
synced 2025-09-27 22:24:19 +03:00
Merge from bittboy/buildroot@26c91a9
This commit is contained in:
@@ -1,64 +0,0 @@
|
||||
From abf3a1b9c9cdacb574c2b9cdbf3f2a5e18c39ab9 Mon Sep 17 00:00:00 2001
|
||||
From: Rodrigo Rebello <rprebello@gmail.com>
|
||||
Date: Mon, 29 Feb 2016 22:53:49 -0300
|
||||
Subject: [PATCH 1/1] Add 'Libs.private' field to pkg-config file
|
||||
|
||||
In order to support static linking, SDL_mixer.pc should include a
|
||||
'Libs.private' field listing all the libraries that SDL_mixer requires.
|
||||
|
||||
This patch adds such a field and also modifies configure.in so that
|
||||
EXTRA_LDFLAGS (which is now also used as the value of 'Libs.private')
|
||||
no longer includes SDL_LIBS. This is done so as to prevent libraries
|
||||
required by SDL from being listed twice when 'pkg-config --libs --static
|
||||
SDL_mixer' is run (they're already shown because of the 'Requires: sdl'
|
||||
line in SDL_mixer.pc). Makefile.in is also adjusted accordingly.
|
||||
|
||||
Upstream status: submitted
|
||||
https://bugzilla.libsdl.org/show_bug.cgi?id=3278
|
||||
|
||||
Signed-off-by: Rodrigo Rebello <rprebello@gmail.com>
|
||||
---
|
||||
Makefile.in | 2 +-
|
||||
SDL_mixer.pc.in | 1 +
|
||||
configure.in | 1 -
|
||||
3 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index 3d10565..ce4efd4 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -63,7 +63,7 @@ $(objects):
|
||||
.PHONY: all install install-hdrs install-lib install-bin uninstall uninstall-hdrs uninstall-lib uninstall-bin clean distclean dist
|
||||
|
||||
$(objects)/$(TARGET): $(OBJECTS) $(VERSION_OBJECTS)
|
||||
- $(LIBTOOL) --mode=link $(CC) -o $@ $(OBJECTS) $(VERSION_OBJECTS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS)
|
||||
+ $(LIBTOOL) --mode=link $(CC) -o $@ $(OBJECTS) $(VERSION_OBJECTS) $(LDFLAGS) $(SDL_LIBS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS)
|
||||
|
||||
$(objects)/playwave$(EXE): $(objects)/playwave.lo $(objects)/$(TARGET)
|
||||
$(LIBTOOL) --mode=link $(CC) -o $@ $(objects)/playwave.lo $(SDL_CFLAGS) $(SDL_LIBS) $(objects)/$(TARGET)
|
||||
diff --git a/SDL_mixer.pc.in b/SDL_mixer.pc.in
|
||||
index 1c4965d..d793521 100644
|
||||
--- a/SDL_mixer.pc.in
|
||||
+++ b/SDL_mixer.pc.in
|
||||
@@ -8,5 +8,6 @@ Description: mixer library for Simple DirectMedia Layer
|
||||
Version: @VERSION@
|
||||
Requires: sdl >= @SDL_VERSION@
|
||||
Libs: -L${libdir} -lSDL_mixer
|
||||
+Libs.private: @EXTRA_LDFLAGS@
|
||||
Cflags: -I${includedir}/SDL
|
||||
|
||||
diff --git a/configure.in b/configure.in
|
||||
index 2272b29..442eca6 100644
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -202,7 +202,6 @@ AM_PATH_SDL($SDL_VERSION,
|
||||
AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
|
||||
)
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS $SDL_CFLAGS"
|
||||
-EXTRA_LDFLAGS="$EXTRA_LDFLAGS $SDL_LIBS"
|
||||
|
||||
dnl Check for math library
|
||||
AC_CHECK_LIB(m, pow, [LIBM="-lm"])
|
||||
--
|
||||
2.1.4
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
Pass LDFLAGS while creating binaries.
|
||||
|
||||
Fixes following linking error with uClibc-ng:
|
||||
br/output/host/usr/lib/gcc/powerpc-buildroot-linux-uclibc/5.4.0/libgcc.a(unwind-dw2-fde-dip.o): In function `_Unwind_Find_FDE':
|
||||
br/output/build/host-gcc-final-5.4.0/build/powerpc-buildroot-linux-uclibc/libgcc/../../../libgcc/unwind-dw2-fde-dip.c:465: undefined reference to `dl_iterate_phdr'
|
||||
collect2: error: ld returned 1 exit status
|
||||
|
||||
Since uClibc-ng 1.0.18 a circular dependency between libc and libgcc
|
||||
exist, when static linking is used. It can be resolved by the compiler
|
||||
when -static is correctly passed in the linking step.
|
||||
|
||||
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
|
||||
|
||||
Revised patch so it would also work with SDL_mixer 1.2.13
|
||||
|
||||
diff -Nur SDL_mixer-1.2.13.orig/Makefile.in SDL_mixer-1.2.13/Makefile.in
|
||||
--- SDL_mixer-1.2.13.orig/Makefile.in 2012-01-15 23:01:04.000000000 +0100
|
||||
+++ SDL_mixer-1.2.13/Makefile.in 2016-12-07 08:29:22.479786596 +0100
|
||||
@@ -63,13 +63,13 @@
|
||||
.PHONY: all install install-hdrs install-lib install-bin uninstall uninstall-hdrs uninstall-lib uninstall-bin clean distclean dist
|
||||
|
||||
$(objects)/$(TARGET): $(OBJECTS) $(VERSION_OBJECTS)
|
||||
- $(LIBTOOL) --mode=link $(CC) -o $@ $(OBJECTS) $(VERSION_OBJECTS) $(LDFLAGS) $(SDL_LIBS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS)
|
||||
+ $(LIBTOOL) --mode=link $(CC) -o $@ $(OBJECTS) $(VERSION_OBJECTS) $(LDFLAGS) $(SDL_LIBS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS)
|
||||
|
||||
$(objects)/playwave$(EXE): $(objects)/playwave.lo $(objects)/$(TARGET)
|
||||
- $(LIBTOOL) --mode=link $(CC) -o $@ $(objects)/playwave.lo $(SDL_CFLAGS) $(SDL_LIBS) $(LDFLAGS) $(objects)/$(TARGET)
|
||||
+ $(LIBTOOL) --mode=link $(CC) -o $@ $(objects)/playwave.lo $(SDL_CFLAGS) $(SDL_LIBS) $(LDFLAGS) $(LDFLAGS) $(objects)/$(TARGET)
|
||||
|
||||
$(objects)/playmus$(EXE): $(objects)/playmus.lo $(objects)/$(TARGET)
|
||||
- $(LIBTOOL) --mode=link $(CC) -o $@ $(objects)/playmus.lo $(SDL_CFLAGS) $(SDL_LIBS) $(LDFLAGS) $(objects)/$(TARGET)
|
||||
+ $(LIBTOOL) --mode=link $(CC) -o $@ $(objects)/playmus.lo $(SDL_CFLAGS) $(SDL_LIBS) $(LDFLAGS) $(LDFLAGS) $(objects)/$(TARGET)
|
||||
|
||||
install: all install-hdrs install-lib #install-bin
|
||||
install-hdrs:
|
||||
@@ -1,12 +0,0 @@
|
||||
diff -ru SDL_mixer-1.2.13.org/configure.in SDL_mixer-1.2.13/configure.in
|
||||
--- SDL_mixer-1.2.13.org/configure.in 2012-01-15 23:01:05.000000000 +0100
|
||||
+++ SDL_mixer-1.2.13/configure.in 2014-07-03 05:25:44.761854572 +0200
|
||||
@@ -301,7 +301,7 @@
|
||||
have_libmikmod=yes
|
||||
AC_MSG_CHECKING([for libmikmod - version >= $libmikmod_ver])
|
||||
AC_TRY_RUN([
|
||||
-#include "mikmod.h"
|
||||
+#include "libmodplug/mikmod.h"
|
||||
#include "stdio.h"
|
||||
|
||||
int main(int argc, char **argv)
|
||||
@@ -1,15 +1,25 @@
|
||||
--- a/configure.in
|
||||
+++ a/configure.in
|
||||
@@ -449,7 +449,7 @@
|
||||
--- a/configure.ac
|
||||
+++ a/configure.ac
|
||||
--- <unnamed>
|
||||
+++ <unnamed>
|
||||
@@ -448,15 +448,21 @@
|
||||
echo "-- dynamic libvorbisidec -> $ogg_lib"
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS -DOGG_DYNAMIC=\\\"$ogg_lib\\\""
|
||||
else
|
||||
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lvorbisidec -lvorbis"
|
||||
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lvorbisidec "
|
||||
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lvorbisidec"
|
||||
fi
|
||||
else
|
||||
AC_MSG_WARN([*** Unable to find Ogg Vorbis Tremor library (http://www.xiph.org/)])
|
||||
@@ -457,7 +457,7 @@
|
||||
- AC_MSG_WARN([*** Unable to find Ogg Vorbis Tremor library (http://www.xiph.org/)])
|
||||
- AC_MSG_WARN([Ogg Vorbis support disabled])
|
||||
+ SOURCES="$SOURCES $srcdir/*_ogg.c"
|
||||
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -DOGG_MUSIC -DOGG_USE_TREMOR"
|
||||
+ if test x$enable_music_ogg_shared = xyes && test x$ogg_lib != x; then
|
||||
+ echo "-- dynamic libvorbisidec -> $ogg_lib"
|
||||
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -DOGG_DYNAMIC=\\\"$ogg_lib\\\""
|
||||
+ else
|
||||
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lvorbisidec"
|
||||
+ fi
|
||||
fi
|
||||
else
|
||||
AC_CHECK_HEADER([vorbis/vorbisfile.h], [have_ogg_hdr=yes])
|
||||
@@ -18,41 +28,50 @@
|
||||
if test x$have_ogg_hdr = xyes -a x$have_ogg_lib = xyes; then
|
||||
case "$host" in
|
||||
*-*-darwin*)
|
||||
@@ -479,7 +479,7 @@
|
||||
@@ -478,11 +484,17 @@
|
||||
echo "-- dynamic libvorbisfile -> $ogg_lib"
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS -DOGG_DYNAMIC=\\\"$ogg_lib\\\""
|
||||
else
|
||||
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lvorbisfile -lvorbis -logg -lm"
|
||||
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lvorbisfile -logg -lm"
|
||||
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lvorbisfile -logg -lm"
|
||||
fi
|
||||
else
|
||||
AC_MSG_WARN([*** Unable to find Ogg Vorbis library (http://www.xiph.org/)])
|
||||
- AC_MSG_WARN([*** Unable to find Ogg Vorbis library (http://www.xiph.org/)])
|
||||
- AC_MSG_WARN([Ogg Vorbis support disabled])
|
||||
+ SOURCES="$SOURCES $srcdir/*_ogg.c"
|
||||
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -DOGG_MUSIC"
|
||||
+ if test x$enable_music_ogg_shared = xyes && test x$ogg_lib != x; then
|
||||
+ echo "-- dynamic libvorbisfile -> $ogg_lib"
|
||||
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -DOGG_DYNAMIC=\\\"$ogg_lib\\\""
|
||||
+ else
|
||||
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lvorbisfile -logg -lm"
|
||||
+ fi
|
||||
fi
|
||||
fi
|
||||
LIBS="$LIBS_SAVED"
|
||||
--- a/configure
|
||||
+++ a/configure
|
||||
@@ -13936,7 +13936,7 @@
|
||||
+++ b/configure
|
||||
@@ -12216,13 +12216,17 @@
|
||||
echo "-- dynamic libvorbisidec -> $ogg_lib"
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS -DOGG_DYNAMIC=\\\"$ogg_lib\\\""
|
||||
else
|
||||
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lvorbisidec -lvorbis"
|
||||
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lvorbisidec "
|
||||
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lvorbisidec"
|
||||
fi
|
||||
else
|
||||
{ $as_echo "$as_me:$LINENO: WARNING: *** Unable to find Ogg Vorbis Tremor library (http://www.xiph.org/)" >&5
|
||||
@@ -14083,7 +14083,7 @@
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
-LIBS="-lvorbisfile -lvorbis -logg -lm $LIBS"
|
||||
+LIBS="-lvorbisfile -logg -lm $LIBS"
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
@@ -14167,7 +14167,7 @@
|
||||
echo "-- dynamic libvorbisfile -> $ogg_lib"
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS -DOGG_DYNAMIC=\\\"$ogg_lib\\\""
|
||||
else
|
||||
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lvorbisfile -lvorbis -logg -lm"
|
||||
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lvorbisfile -logg -lm"
|
||||
fi
|
||||
else
|
||||
{ $as_echo "$as_me:$LINENO: WARNING: *** Unable to find Ogg Vorbis library (http://www.xiph.org/)" >&5
|
||||
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Unable to find Ogg Vorbis Tremor library (http://www.xiph.org/)" >&5
|
||||
-$as_echo "$as_me: WARNING: *** Unable to find Ogg Vorbis Tremor library (http://www.xiph.org/)" >&2;}
|
||||
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ogg Vorbis support disabled" >&5
|
||||
-$as_echo "$as_me: WARNING: Ogg Vorbis support disabled" >&2;}
|
||||
+ SOURCES="$SOURCES $srcdir/*_ogg.c"
|
||||
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -DOGG_MUSIC -DOGG_USE_TREMOR"
|
||||
+ if test x$enable_music_ogg_shared = xyes && test x$ogg_lib != x; then
|
||||
+ echo "-- dynamic libvorbisidec -> $ogg_lib"
|
||||
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -DOGG_DYNAMIC=\\\"$ogg_lib\\\""
|
||||
+ else
|
||||
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lvorbisidec"
|
||||
+ fi
|
||||
fi
|
||||
else
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "vorbis/vorbisfile.h" "ac_cv_header_vorbis_vorbisfile_h" "$ac_includes_default"
|
||||
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -13701,7 +13701,7 @@
|
||||
if test "${enable_music_ogg_tremor+set}" = set; then
|
||||
enableval=$enable_music_ogg_tremor;
|
||||
else
|
||||
- enable_music_ogg_tremor=no
|
||||
+ enableval=$enable_music_ogg_tremor;
|
||||
fi
|
||||
|
||||
# Check whether --enable-music-ogg-shared was given.
|
||||
@@ -13939,10 +13939,14 @@
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lvorbisidec -lvorbis"
|
||||
fi
|
||||
else
|
||||
- { $as_echo "$as_me:$LINENO: WARNING: *** Unable to find Ogg Vorbis Tremor library (http://www.xiph.org/)" >&5
|
||||
-$as_echo "$as_me: WARNING: *** Unable to find Ogg Vorbis Tremor library (http://www.xiph.org/)" >&2;}
|
||||
- { $as_echo "$as_me:$LINENO: WARNING: Ogg Vorbis support disabled" >&5
|
||||
-$as_echo "$as_me: WARNING: Ogg Vorbis support disabled" >&2;}
|
||||
+ SOURCES="$SOURCES $srcdir/*_ogg.c"
|
||||
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -DOGG_MUSIC -DOGG_USE_TREMOR"
|
||||
+ if test x$enable_music_ogg_shared = xyes && test x$ogg_lib != x; then
|
||||
+ echo "-- dynamic libvorbisidec -> $ogg_lib"
|
||||
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -DOGG_DYNAMIC=\\\"$ogg_lib\\\""
|
||||
+ else
|
||||
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lvorbisidec"
|
||||
+ fi
|
||||
fi
|
||||
else
|
||||
if test "${ac_cv_header_vorbis_vorbisfile_h+set}" = set; then
|
||||
@@ -1,19 +0,0 @@
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -452,8 +452,14 @@
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lvorbisidec -lvorbis"
|
||||
fi
|
||||
else
|
||||
- AC_MSG_WARN([*** Unable to find Ogg Vorbis Tremor library (http://www.xiph.org/)])
|
||||
- AC_MSG_WARN([Ogg Vorbis support disabled])
|
||||
+ SOURCES="$SOURCES $srcdir/*_ogg.c"
|
||||
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -DOGG_MUSIC -DOGG_USE_TREMOR"
|
||||
+ if test x$enable_music_ogg_shared = xyes && test x$ogg_lib != x; then
|
||||
+ echo "-- dynamic libvorbisidec -> $ogg_lib"
|
||||
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -DOGG_DYNAMIC=\\\"$ogg_lib\\\""
|
||||
+ else
|
||||
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lvorbisidec"
|
||||
+ fi
|
||||
fi
|
||||
else
|
||||
AC_CHECK_HEADER([vorbis/vorbisfile.h], [have_ogg_hdr=yes])
|
||||
Reference in New Issue
Block a user