From 973556f29281d6ff85c0af36d3fb305992beb431 Mon Sep 17 00:00:00 2001 From: Ted Hess Date: Wed, 27 Apr 2016 17:13:41 -0400 Subject: [PATCH] flac: Fix debug builds Signed-off-by: Ted Hess --- libs/flac/Makefile | 6 +++--- libs/flac/patches/005-gcc_debug_options.patch | 17 +++++++++++++++++ 2 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 libs/flac/patches/005-gcc_debug_options.patch diff --git a/libs/flac/Makefile b/libs/flac/Makefile index 0454f98f7f..01d7d646e3 100644 --- a/libs/flac/Makefile +++ b/libs/flac/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=flac PKG_VERSION:=1.3.1 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=http://downloads.xiph.org/releases/flac/ @@ -43,8 +43,8 @@ CONFIGURE_ARGS += \ --disable-xmms-plugin \ --disable-ogg \ --disable-oggtest \ - --disable-debug \ - --enable-static \ + $(if $(CONFIG_DEBUG),--enable-debug) \ + --enable-static TARGET_CFLAGS += $(FPIC) diff --git a/libs/flac/patches/005-gcc_debug_options.patch b/libs/flac/patches/005-gcc_debug_options.patch new file mode 100644 index 0000000000..80ffff1a68 --- /dev/null +++ b/libs/flac/patches/005-gcc_debug_options.patch @@ -0,0 +1,17 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -348,11 +348,11 @@ fi + + if test "x$debug" = xtrue; then + CPPFLAGS="-DDEBUG $CPPFLAGS" +- CFLAGS=$(echo "$CFLAGS" | sed 's/-g//') +- CFLAGS="-g $CFLAGS" ++ CFLAGS=$(echo "$CFLAGS" | sed 's/-g[0-9]*//') ++ CFLAGS="-g3 $CFLAGS" + else + CPPFLAGS="-DNDEBUG $CPPFLAGS" +- CFLAGS=$(echo "$CFLAGS" | sed 's/-O2//;s/-g//') ++ CFLAGS=$(echo "$CFLAGS" | sed 's/-O2//;s/-g[0-9]*//') + CFLAGS="-O3 -funroll-loops $CFLAGS" + fi +