Date: Sun, 07 Nov 2010 05:29:15 +0300 From: Anonymous <swell.k@gmail.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/152001: [patch] www/firefox-devel: use optimized asm in libvpx on i386/amd64 Message-ID: <86iq09uaro.fsf@gmail.com> Resent-Message-ID: <201011070230.oA72U9A4021914@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 152001 >Category: ports >Synopsis: [patch] www/firefox-devel: use optimized asm in libvpx on i386/amd64 >Confidential: no >Severity: non-critical >Priority: low >Responsible: gecko >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun Nov 07 02:30:09 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Anonymous >Release: FreeBSD 9.0-CURRENT amd64 >Organization: >Environment: >Description: Build *bundled* libvpx more like multimedia/libvpx does by using x86-linux-gcc and x86_64-linux-gcc targets. Non-x86 archs continue to use generic-gnu target. >How-To-Repeat: # let's see if arch-specific asm is actually used during build $ make configue $ grep \^VPX_ $(make -V WRKSRC)/config/autoconf.mk VPX_AS = yasm VPX_ASFLAGS = -f elf64 -rnasm -pnasm -DPIC VPX_X86_ASM = 1 # build bundled libvpx manually to save time $ gmake -C$(make -V WRKSRC)/config $ gmake -C$(make -V WRKSRC)/media/libvpx [...] yasm -o idctllm_mmx.o -f elf64 -rnasm -pnasm -DPIC -I../../media/libvpx/ -I../../media/libvpx/vpx_ports/ -c ./vp8/common/x86/idctllm_mmx.asm yasm: warning: unrecognized option `-c' yasm -o iwalsh_mmx.o -f elf64 -rnasm -pnasm -DPIC -I../../media/libvpx/ -I../../media/libvpx/vpx_ports/ -c ./vp8/common/x86/iwalsh_mmx.asm yasm: warning: unrecognized option `-c' yasm -o iwalsh_sse2.o -f elf64 -rnasm -pnasm -DPIC -I../../media/libvpx/ -I../../media/libvpx/vpx_ports/ -c ./vp8/common/x86/iwalsh_sse2.asm yasm: warning: unrecognized option `-c' yasm -o loopfilter_mmx.o -f elf64 -rnasm -pnasm -DPIC -I../../media/libvpx/ -I../../media/libvpx/vpx_ports/ -c ./vp8/common/x86/loopfilter_mmx.asm yasm: warning: unrecognized option `-c' yasm -o loopfilter_sse2.o -f elf64 -rnasm -pnasm -DPIC -I../../media/libvpx/ -I../../media/libvpx/vpx_ports/ -c ./vp8/common/x86/loopfilter_sse2.asm yasm: warning: unrecognized option `-c' yasm -o postproc_mmx.o -f elf64 -rnasm -pnasm -DPIC -I../../media/libvpx/ -I../../media/libvpx/vpx_ports/ -c ./vp8/common/x86/postproc_mmx.asm yasm: warning: unrecognized option `-c' yasm -o postproc_sse2.o -f elf64 -rnasm -pnasm -DPIC -I../../media/libvpx/ -I../../media/libvpx/vpx_ports/ -c ./vp8/common/x86/postproc_sse2.asm yasm: warning: unrecognized option `-c' yasm -o recon_mmx.o -f elf64 -rnasm -pnasm -DPIC -I../../media/libvpx/ -I../../media/libvpx/vpx_ports/ -c ./vp8/common/x86/recon_mmx.asm yasm: warning: unrecognized option `-c' yasm -o recon_sse2.o -f elf64 -rnasm -pnasm -DPIC -I../../media/libvpx/ -I../../media/libvpx/vpx_ports/ -c ./vp8/common/x86/recon_sse2.asm yasm: warning: unrecognized option `-c' yasm -o subpixel_mmx.o -f elf64 -rnasm -pnasm -DPIC -I../../media/libvpx/ -I../../media/libvpx/vpx_ports/ -c ./vp8/common/x86/subpixel_mmx.asm yasm: warning: unrecognized option `-c' yasm -o subpixel_sse2.o -f elf64 -rnasm -pnasm -DPIC -I../../media/libvpx/ -I../../media/libvpx/vpx_ports/ -c ./vp8/common/x86/subpixel_sse2.asm yasm: warning: unrecognized option `-c' yasm -o dequantize_mmx.o -f elf64 -rnasm -pnasm -DPIC -I../../media/libvpx/ -I../../media/libvpx/vpx_ports/ -c ./vp8/decoder/x86/dequantize_mmx.asm yasm: warning: unrecognized option `-c' yasm -o emms.o -f elf64 -rnasm -pnasm -DPIC -I../../media/libvpx/ -I../../media/libvpx/vpx_ports/ -c ./vpx_ports/emms.asm yasm: warning: unrecognized option `-c' rm -f libvpx.a ar cr libvpx.a vpx_config_c.o systemdependent.o alloccommon.o blockd.o debugmodes.o dsystemdependent.o entropy.o entropymode.o entropymv.o extend.o filter_c.o findnearmv.o idctllm.o invtrans.o loopfilter.o loopfilter_filters.o mbpitch.o modecont.o modecontext.o postproc.o predictdc.o quant_common.o recon.o reconinter.o reconintra.o reconintra4x4.o segmentation_common.o setupintrarecon.o swapyv12buffer.o textblit.o treecoder.o dboolhuff.o decodemv.o decodframe.o demode.o dequantize.o detokenize.o onyxd_if.o threading.o vp8_dx_iface.o vpx_codec.o vpx_decoder.o vpx_decoder_compat.o vpx_encoder.o vpx_image.o vpx_mem.o gen_scalers.o vpxscale.o scalesystemdependant.o yv12config.o yv12extend.o loopfilter_x86.o vp8_asm_stubs.o x86_systemdependent.o x86_dsystemdependent.o idctllm_mmx.o iwalsh_mmx.o iwalsh_sse2.o loopfilter_mmx.o loopfilter_sse2.o postproc_mmx.o postproc_sse2.o recon_mmx.o recon_sse2.o subpixel_mmx.o subpixel_sse2.o dequantize_mmx.o emms.o ranlib libvpx.a >Fix: --- a.diff begins here --- Index: www/firefox-devel/Makefile =================================================================== --- www/firefox-devel/Makefile (revision 430) +++ www/firefox-devel/Makefile (working copy) @@ -87,6 +85,10 @@ ALL_TARGET= profiledbuild .endif +.if ${ARCH} == amd64 || ${ARCH} == i386 +BUILD_DEPENDS+= yasm:${PORTSDIR}/devel/yasm +.endif + pre-extract: .if defined(WITH_PGO) @${ECHO} "*****************************************************************" Index: www/firefox-devel/files/patch-configure.in =================================================================== --- www/firefox-devel/files/patch-configure.in (revision 430) +++ www/firefox-devel/files/patch-configure.in (working copy) @@ -9,3 +9,17 @@ CPU_ARCH="$OS_TEST" ;; +@@ -5938,11 +5938,11 @@ if test -n "$MOZ_WEBM"; then + AC_CHECK_PROGS(VPX_AS, $YASM yasm, "") + dnl We have YASM, see if we have assembly on this platform. + case "$OS_ARCH:$OS_TEST" in +- Linux:x86|Linux:i?86) ++ Linux:x86|Linux:i?86|FreeBSD:i386) + VPX_ASFLAGS="-f elf32 -rnasm -pnasm" + VPX_X86_ASM=1 + ;; +- Linux:x86_64) ++ Linux:x86_64|FreeBSD:amd64) + VPX_ASFLAGS="-f elf64 -rnasm -pnasm -DPIC" + VPX_X86_ASM=1 + ;; Index: www/firefox-devel/files/patch-media-libvpx-vpx_config.c =================================================================== --- www/firefox-devel/files/patch-media-libvpx-vpx_config.c (revision 0) +++ www/firefox-devel/files/patch-media-libvpx-vpx_config.c (revision 0) @@ -0,0 +1,16 @@ +--- media/libvpx/vpx_config_c.c~ ++++ media/libvpx/vpx_config_c.c +@@ -12,11 +12,11 @@ + /* 32 bit MacOS. */ + #include "vpx_config_x86-darwin9-gcc.c" + +-#elif defined(__linux__) && defined(__i386__) ++#elif (defined(__linux__) || defined(__FreeBSD__)) && defined(__i386__) + /* 32 bit Linux. */ + #include "vpx_config_x86-linux-gcc.c" + +-#elif defined(__linux__) && defined(__x86_64__) ++#elif (defined(__linux__) || defined(__FreeBSD__)) && defined(__x86_64__) + /* 64 bit Linux. */ + #include "vpx_config_x86_64-linux-gcc.c" + Index: www/firefox-devel/files/patch-media-libvpx-vpx_config.h =================================================================== --- www/firefox-devel/files/patch-media-libvpx-vpx_config.h (revision 0) +++ www/firefox-devel/files/patch-media-libvpx-vpx_config.h (revision 0) @@ -0,0 +1,16 @@ +--- media/libvpx/vpx_config.h~ ++++ media/libvpx/vpx_config.h +@@ -12,11 +12,11 @@ + /* 32 bit MacOS. */ + #include "vpx_config_x86-darwin9-gcc.h" + +-#elif defined(__linux__) && defined(__i386__) ++#elif (defined(__linux__) || defined(__FreeBSD__)) && defined(__i386__) + /* 32 bit Linux. */ + #include "vpx_config_x86-linux-gcc.h" + +-#elif defined(__linux__) && defined(__x86_64__) ++#elif (defined(__linux__) || defined(__FreeBSD__)) && defined(__x86_64__) + /* 64 bit Linux. */ + #include "vpx_config_x86_64-linux-gcc.h" + --- a.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86iq09uaro.fsf>