libvips: fix compile error for sparc64
PATCH 1/1 libvips: fix compile error for sparc64
Fixes following build error:
http://autobuild.buildroot.net/results/1515f070c0fd410c681fc8306700244c34eb1635/
--- package/libvips/libvips.mk | 11 +++++++++++ 1 file changed, 11 insertions(+)
package/libvips/libvips.mk +11 -0
@@ -12,6 +12,17 @@ LIBVIPS_LICENSE = LGPLv2.1+ LIBVIPS_LICENSE_FILES = COPYING # We're patching gtk-doc.make, so need to autoreconf LIBVIPS_AUTORECONF = YES + +# Sparc64 compile fails, this seems to be caused by the -Os option we pass +# by default. To fix the problem, use -O2 with normal optimization instead. +ifeq ($(BR2_sparc64),y) +LIBVIPS_CXXFLAGS := $(filter-out -Os,$(TARGET_CXXFLAGS)) +LIBVIPS_CXXFLAGS += -O2 +else +LIBVIPS_CXXFLAGS := $(TARGET_CFLAGS) +endif +LIBVIPS_CONF_ENV += CXXFLAGS="$(LIBVIPS_CFLAGS)" + LIBVIPS_CONF_OPTS = \ --disable-introspection \ --without-dmalloc \
Signature · 1 line
1.7.10.4
PATCH 1/1 libvips: fix compile error for sparc64
Waldemar,
package/libvips/libvips.mk LIBVIPS_LICENSE = LGPLv2.1+ · line 17
Quoted 2 lines · Waldemar Brodkorb
package/libvips/libvips.mk +2
-0+# Sparc64 compile fails, this seems to be caused by the -Os option we pass +# by default. To fix the problem, use -O2 with normal optimization instead.
This looks like a compiler bug. Could you check if you can reproduce it with gcc 5.2, and if you can, submit a bug report to the gcc project ?
package/libvips/libvips.mk LIBVIPS_LICENSE = LGPLv2.1+ · line 19
Quoted 2 lines
package/libvips/libvips.mk +2
-0+ifeq ($(BR2_sparc64),y) +LIBVIPS_CXXFLAGS := $(filter-out -Os,$(TARGET_CXXFLAGS))
Should be = and not :=
package/libvips/libvips.mk LIBVIPS_LICENSE = LGPLv2.1+ · line 22
Quoted 3 lines
package/libvips/libvips.mk +3
-0+LIBVIPS_CXXFLAGS += -O2 +else +LIBVIPS_CXXFLAGS := $(TARGET_CFLAGS)
You should use TARGET_CXXFLAGS here.
package/libvips/libvips.mk LIBVIPS_LICENSE = LGPLv2.1+ · line 24
Quoted 2 lines
package/libvips/libvips.mk +2
-0+endif +LIBVIPS_CONF_ENV += CXXFLAGS="$(LIBVIPS_CFLAGS)"
Did you test this? The LIBVIPS_CFLAGS variable is not defined anywhere, you're defining LIBVIPS_CXXFLAGS.
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com