summaryrefslogtreecommitdiff
path: root/multimedia/ffmpeg010
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2013-06-30 12:16:18 +0000
committerwiz <wiz@pkgsrc.org>2013-06-30 12:16:18 +0000
commitdcd9a93c640da32a85b1152790218807a394edd9 (patch)
treefb03abc34949c28a64438d5f5180dc3574238e41 /multimedia/ffmpeg010
parent23d446eff257c060aeb1c30d7fc42eb61f13c2fc (diff)
downloadpkgsrc-dcd9a93c640da32a85b1152790218807a394edd9.tar.gz
Apply a version of the asm fixes for gcc from ffmpeg/Makefile here as well.
Noted by John D. Baker in PR 47132.
Diffstat (limited to 'multimedia/ffmpeg010')
-rw-r--r--multimedia/ffmpeg010/Makefile17
1 files changed, 15 insertions, 2 deletions
diff --git a/multimedia/ffmpeg010/Makefile b/multimedia/ffmpeg010/Makefile
index d4f4e9ebba5..e2d91838f7a 100644
--- a/multimedia/ffmpeg010/Makefile
+++ b/multimedia/ffmpeg010/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.11 2013/04/14 00:59:50 cheusov Exp $
+# $NetBSD: Makefile,v 1.12 2013/06/30 12:16:18 wiz Exp $
PKGNAME= ffmpeg010-20130410.${DISTVERSION}
PKGREVISION= 1
@@ -25,8 +25,21 @@ CONF_FILES+= ${PREFIX}/share/examples/ffmpeg010/ffserver.conf \
.include "../../mk/bsd.prefs.mk"
-.if ${OPSYS} == "Darwin"
+.include "../../mk/compiler.mk"
+
+# disable asm on i386 for non-gcc and gcc < 4.2
+# no alignment options needed for gcc >= 4.6 on i386
+
+.if ${MACHINE_ARCH} == "i386"
+.if !empty(MACHINE_PLATFORM:MDarwin-*-i386)
CONFIGURE_ARGS+= --disable-asm
+.elif !empty(CC_VERSION:Mgcc-4.[2345]*)
+CFLAGS+=-mstackrealign -mpreferred-stack-boundary=4
+.elif !empty(CC_VERSION:Mgcc-[123]*) \
+ || !empty(CC_VERSION:Mgcc-4.[01]*) \
+ || empty(CC_VERSION:Mgcc*)
+CONFIGURE_ARGS+= --disable-asm
+.endif
.endif
# "error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'"