libvips: fix compile error for sparc64
authorWaldemar Brodkorb <wbx@openadk.org>
Mon, 23 Nov 2015 21:42:22 +0000 (22:42 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thu, 24 Dec 2015 12:22:21 +0000 (13:22 +0100)
Fixes following build error:
http://autobuild.buildroot.net/results/1515f070c0fd410c681fc8306700244c34eb1635/

[Thomas:
 - simplify logic.
 - add reference to submitted gcc bug.]

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/libvips/libvips.mk

index d6dddc8bc3388c216b502d37cd9afe01eb4aaa97..5f80b2d64ccdcb0777f7b55279188046ba5cff83 100644 (file)
@@ -12,6 +12,16 @@ LIBVIPS_LICENSE = LGPLv2.1+
 LIBVIPS_LICENSE_FILES = COPYING
 # We're patching gtk-doc.make, so need to autoreconf
 LIBVIPS_AUTORECONF = YES
+
+# Sparc64 compile fails, for all optimization levels except -O0. To
+# fix the problem, use -O0 with no optimization instead. Bug reported
+# upstream at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69038.
+ifeq ($(BR2_sparc64),y)
+LIBVIPS_CXXFLAGS += -O0
+endif
+
+LIBVIPS_CONF_ENV += CXXFLAGS="$(TARGET_CXXFLAGS) $(LIBVIPS_CXXFLAGS)"
+
 LIBVIPS_CONF_OPTS = \
        --disable-introspection \
        --without-dmalloc \