openexr: fix gcc6 build

This commit is contained in:
Juergen Buchmueller 2016-10-12 08:35:47 +02:00
parent 21523ceec4
commit 8d0e5615ef

View file

@ -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