Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Nov 2010 13:07:40 GMT
From:      svn-freebsd-gecko@chruetertee.ch
To:        freebsd-gecko@freebsd.org
Subject:   [SVN-Commit] r431 - in branches/experimental/www/firefox-devel: . files
Message-ID:  <201011071307.oA7D7ej5005915@trillian.chruetertee.ch>

next in thread | raw e-mail | index | archive | help
Author: beat
Date: Sun Nov  7 13:07:39 2010
New Revision: 431

Log:
- Use optimized asm in libvpx on i386/amd64 [1]
- Don't link against librt for clock_gettime(3) [2]

PR:		ports/152001 [1], ports/152002 [2]
Submitted by:	Anonymous <swell.k AT gmail.com> [1,2]

Added:
   branches/experimental/www/firefox-devel/files/patch-media-libvpx-vpx_config.c
   branches/experimental/www/firefox-devel/files/patch-media-libvpx-vpx_config.h
Modified:
   branches/experimental/www/firefox-devel/Makefile
   branches/experimental/www/firefox-devel/files/patch-configure.in

Modified: branches/experimental/www/firefox-devel/Makefile
==============================================================================
--- branches/experimental/www/firefox-devel/Makefile	Tue Nov  2 21:13:01 2010	(r430)
+++ branches/experimental/www/firefox-devel/Makefile	Sun Nov  7 13:07:39 2010	(r431)
@@ -87,6 +87,10 @@
 ALL_TARGET=	profiledbuild
 .endif
 
+.if ${ARCH} == amd64 || ${ARCH} == i386
+BUILD_DEPENDS+=	yasm:${PORTSDIR}/devel/yasm
+.endif
+
 pre-extract:
 .if defined(WITH_PGO)
 	@${ECHO} "*****************************************************************"

Modified: branches/experimental/www/firefox-devel/files/patch-configure.in
==============================================================================
--- branches/experimental/www/firefox-devel/files/patch-configure.in	Tue Nov  2 21:13:01 2010	(r430)
+++ branches/experimental/www/firefox-devel/files/patch-configure.in	Sun Nov  7 13:07:39 2010	(r431)
@@ -9,3 +9,44 @@
      CPU_ARCH="$OS_TEST"
      ;;
  
+@@ -3767,19 +3767,21 @@ AC_CHECK_FUNCS(flockfile getpagesize)
+ AC_CHECK_FUNCS(localtime_r strtok_r)
+ 
+ dnl check for clock_gettime(), the CLOCK_MONOTONIC clock, and -lrt
+-_SAVE_LDFLAGS=$LDFLAGS
+-LDFLAGS="$LDFLAGS -lrt"
+-AC_CACHE_CHECK(for clock_gettime(CLOCK_MONOTONIC) and -lrt,
++_SAVE_LIBS=$LIBS
++AC_SEARCH_LIBS(clock_gettime, rt)
++AC_CACHE_CHECK(for clock_gettime(CLOCK_MONOTONIC),
+                ac_cv_have_clock_monotonic,
+                [AC_TRY_LINK([#include <time.h>],
+                             [ struct timespec ts;
+                               clock_gettime(CLOCK_MONOTONIC, &ts); ],
+                             ac_cv_have_clock_monotonic=yes,
+                             ac_cv_have_clock_monotonic=no)])
+-LDFLAGS=$_SAVE_LDFLAGS
++LIBS=$_SAVE_LIBS
+ if test "$ac_cv_have_clock_monotonic" = "yes"; then
+     HAVE_CLOCK_MONOTONIC=1
+-    REALTIME_LIBS=-lrt
++    if test "$ac_cv_search_clock_gettime" != "none required"; then
++        REALTIME_LIBS=$ac_cv_search_clock_gettime
++    fi
+     AC_DEFINE(HAVE_CLOCK_MONOTONIC)
+     AC_SUBST(HAVE_CLOCK_MONOTONIC)
+     AC_SUBST(REALTIME_LIBS)
+@@ -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
+       ;;

Added: branches/experimental/www/firefox-devel/files/patch-media-libvpx-vpx_config.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/experimental/www/firefox-devel/files/patch-media-libvpx-vpx_config.c	Sun Nov  7 13:07:39 2010	(r431)
@@ -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"
+ 

Added: branches/experimental/www/firefox-devel/files/patch-media-libvpx-vpx_config.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/experimental/www/firefox-devel/files/patch-media-libvpx-vpx_config.h	Sun Nov  7 13:07:39 2010	(r431)
@@ -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"
+ 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201011071307.oA7D7ej5005915>