diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-11-12 09:31:41 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-11-12 09:31:41 +0000 |
commit | 983485e93d76602266889d23c963609073b75e51 (patch) | |
tree | 19081a3616b34ff1d8bc5521d767740501b31153 /media-libs/sdl-sound/files/sdl-sound-1.0.3_p20220525-underlinking.patch | |
parent | 3a9a4f8b478ff62e3c752e20305edb2c7d91959f (diff) |
gentoo auto-resync : 12:11:2022 - 09:31:40
Diffstat (limited to 'media-libs/sdl-sound/files/sdl-sound-1.0.3_p20220525-underlinking.patch')
-rw-r--r-- | media-libs/sdl-sound/files/sdl-sound-1.0.3_p20220525-underlinking.patch | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/media-libs/sdl-sound/files/sdl-sound-1.0.3_p20220525-underlinking.patch b/media-libs/sdl-sound/files/sdl-sound-1.0.3_p20220525-underlinking.patch new file mode 100644 index 000000000000..cbf96a66320e --- /dev/null +++ b/media-libs/sdl-sound/files/sdl-sound-1.0.3_p20220525-underlinking.patch @@ -0,0 +1,45 @@ +https://github.com/icculus/SDL_sound/pull/80 + +From 83f33e04125517197520e26452d06b81c2d7b429 Mon Sep 17 00:00:00 2001 +From: Sam James <sam@gentoo.org> +Date: Sat, 12 Nov 2022 02:49:21 +0000 +Subject: [PATCH] Fix underlinking with lld (missing -lm) + +We need to explicitly search for and link with -lm if needed by +libc for math libraries like `log` and `sin`: +``` +ld.lld: error: undefined reference due to --no-allow-shlib-undefined: sin +>>> referenced by ../.libs/libSDL_sound.so + +ld.lld: error: undefined reference due to --no-allow-shlib-undefined: log +>>> referenced by ../.libs/libSDL_sound.so +``` + +It turns out Gentoo has actually had a patch for this since 2012 (mea +culpa!) but it never made its way upstream. + +We're already using libtool, so just use the macro it provides for +this purpose. + +Signed-off-by: Sam James <sam@gentoo.org> +--- a/Makefile.am ++++ b/Makefile.am +@@ -12,7 +12,7 @@ endif + SDLSOUND_HDRS = SDL_sound.h + SDLSOUND_SRCS = SDL_sound.c SDL_sound_internal.h alt_audio_convert.c alt_audio_convert.h audio_convert.c + SDLSOUND_LDFLAGS = -no-undefined -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) +-SDLSOUND_LIBADD = decoders/libdecoders.la $(TIMIDITY_LIB) ++SDLSOUND_LIBADD = decoders/libdecoders.la $(TIMIDITY_LIB) $(LIBM) + + if USE_SDL2 + lib_LTLIBRARIES = libSDL2_sound.la +--- a/configure.ac ++++ b/configure.ac +@@ -54,6 +54,7 @@ AC_PROG_CC + AC_PROG_INSTALL + AC_PROG_LN_S + LT_INIT([win32-dll]) ++LT_LIB_M + PKG_PROG_PKG_CONFIG + + |