* On 2014-09-03 at 13:50 BST, Patrick Welche wrote:
NetBSD 5 comes with gcc 4.1.3.
libvpx needs >= gcc 4.4 to build ssse3 code
libvpx then ends up with a runtime dependency on gcc 4.4 via libgcc_s,
according to libvpx's +BUILD_INFO:
REQUIRES=/usr/pkg/gcc44/lib/libgcc_s.so.1
This means that the 1.6M libvpx (i386) binary package carries
a 150M dependency, which seems a little heavy...
Thoughts?
This is one of the reasons for the gcc47-libs package, with that and
USE_PKGSRC_GCC_RUNTIME=yes then you "only" have to depend upon the 20M
gcc47-libs package.
Something similar could be done for the older GCC packages, though it
is a reasonable amount of work and I'm not sure anyone has much
interest in doing it (we don't, as we only use 4.7+).
(Make ssse3 optional?) (Would that imply sse4_1 as well?)
For your situation I'd do some performance analysis to see whether
enabling ssse3 actually results in much improvement, and then decide
based on that whether to continue enabling it and taking the resulting
GCC hit. If it's worth it then it may be worth just using lang/gcc47
for all packages.
YMMV.
richard@omnis:~/src/pkgsrc/multimedia/libvpx$ git diff master .
diff --git a/multimedia/libvpx/Makefile b/multimedia/libvpx/Makefile
index 4c15230..2689e1e 100644
--- a/multimedia/libvpx/Makefile
+++ b/multimedia/libvpx/Makefile
@@ -9,7 +9,7 @@ EXTRACT_SUFX= .tar.bz2
MAINTAINER= ryoon%NetBSD.org@localhost
HOMEPAGE= http://code.google.com/p/webm/
-COMMENT= On2 VP8 library from Google
+COMMENT= On2 VP8/VP9 Codec library from Google
LICENSE= modified-bsd
WRKSRC= ${WRKDIR}/${PKGNAME_NOREV}
@@ -25,7 +25,7 @@ CONFIGURE_ARGS+= --enable-runtime-cpu-detect
CONFIGURE_ARGS+= --prefix=${PREFIX}
CONFIGURE_ARGS+= --disable-unit-tests
-.include "../../mk/bsd.prefs.mk"
+.include "options.mk"
.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64" || \
${MACHINE_ARCH} == "amd64"
diff --git a/multimedia/libvpx/options.mk b/multimedia/libvpx/options.mk
new file mode 100644
index 0000000..390252e
--- /dev/null
+++ b/multimedia/libvpx/options.mk
@@ -0,0 +1,17 @@
+# $NetBSD$
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.libvpx
+
+.include "../../mk/bsd.prefs.mk"
+
+.if ${MACHINE_ARCH:Mi386}
+PKG_SUPPORTED_OPTIONS+= i586-optimized
+.endif
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mi586-optimized)
+# use assembler routines optimized for, and only for!, i586
+ONLY_FOR_PLATFORM= *-*-i386
+MACHINE_GNU_ARCH= i586
+.endif