[packages] libmad: fix build failure on targets using -O2 optimizations (partially...
authornico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 4 Apr 2010 14:40:07 +0000 (14:40 +0000)
committernico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 4 Apr 2010 14:40:07 +0000 (14:40 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/packages@20699 3c298f89-4303-0410-b956-a3cf2f4a3e73

libs/libmad/Makefile

index 79cb315..f4169f7 100644 (file)
@@ -48,15 +48,22 @@ endef
 
 TARGET_CFLAGS += $(FPIC)
 
-define Build/Configure
-       $(call Build/Configure/Default, \
-               --enable-shared \
-               --enable-static \
-               --enable-fpm="$(FPM)" \
-               --disable-debugging \
-               --enable-speed \
-       )
-endef
+CONFIGURE_ARGS+= \
+       --enable-shared \
+       --enable-static \
+       --enable-fpm="$(FPM)" \
+       --disable-debugging \
+       --enable-speed \
+
+# XXX: configure is parsing and "optimizing" CFLAGS, adding unsupported 
+# XXX: compiler args to it (like -fforce-mem)
+# XXX: so pass an empty one to configure
+CONFIGURE_VARS+= \
+       CFLAGS="" \
+
+# XXX: and pass our own to make
+MAKE_FLAGS+= \
+       CFLAGS="$(TARGET_CFLAGS)" \
 
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include