diff --git a/libs/flac/Makefile b/libs/flac/Makefile index 0454f98f7..01d7d646e 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 000000000..80ffff1a6 --- /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 +