From 8d0e5615ef401037cb5bd0ebab3ab38f594b69ab Mon Sep 17 00:00:00 2001 From: Juergen Buchmueller Date: Wed, 12 Oct 2016 08:35:47 +0200 Subject: [PATCH] openexr: fix gcc6 build --- srcpkgs/openexr/template | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/srcpkgs/openexr/template b/srcpkgs/openexr/template index 5bdf1785a0..8f14211fbc 100644 --- a/srcpkgs/openexr/template +++ b/srcpkgs/openexr/template @@ -14,6 +14,16 @@ checksum="36a012f6c43213f840ce29a8b182700f6cf6b214bea0d5735594136b44914231" LDFLAGS="-lrt" +_gccver="$(gcc --version | awk '/^gcc \(GCC\)/ { print $3 }')" +if [ "${_gccver%%.*}" -gt 5 ]; then + case "$XBPS_TARGET_MACHINE" in + *-musl) # gcc6 fails with internal error + CFLAGS="-Os" + CXXFLAGS="-Os" + ;; + esac +fi + post_configure() { if [ "$CROSS_BUILD" ]; then # Don't try to rebuild these header files when cross compiling