commit 973556f29281d6ff85c0af36d3fb305992beb431
parent ea01eccee03b9e1b5673a5351b0927d3f743c075
Author: Ted Hess <thess@kitschensync.net>
Date: Wed, 27 Apr 2016 17:13:41 -0400
flac: Fix debug builds
Signed-off-by: Ted Hess <thess@kitschensync.net>
Diffstat:
2 files changed, 20 insertions(+), 3 deletions(-)
diff --git 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
@@ -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
+