[x264-devel] commit: Fix build on SPARC Solaris 10 (Sean McGovern )
git at videolan.org
git at videolan.org
Fri Nov 26 00:57:13 CET 2010
x264 | branch: master | Sean McGovern <gseanmcg at gmail.com> | Sun Oct 10 19:34:18 2010 -0400| [ee75acd55e1a89eb9a8c2f7d14c923b57e08ceb3] | committer: Jason Garrett-Glaser
Fix build on SPARC Solaris 10
> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=ee75acd55e1a89eb9a8c2f7d14c923b57e08ceb3
---
common/pixel.c | 6 +++---
configure | 29 +++++++++++++++++------------
2 files changed, 20 insertions(+), 15 deletions(-)
diff --git a/common/pixel.c b/common/pixel.c
index 1e21550..7fa497c 100644
--- a/common/pixel.c
+++ b/common/pixel.c
@@ -36,7 +36,7 @@
#if ARCH_ARM
# include "arm/pixel.h"
#endif
-#if ARCH_UltraSparc
+#if ARCH_UltraSPARC
# include "sparc/pixel.h"
#endif
@@ -443,7 +443,7 @@ SAD_X( 4x8 )
SAD_X( 4x4 )
#if !HIGH_BIT_DEPTH
-#if ARCH_UltraSparc
+#if ARCH_UltraSPARC
SAD_X( 16x16_vis )
SAD_X( 16x8_vis )
SAD_X( 8x16_vis )
@@ -1063,7 +1063,7 @@ void x264_pixel_init( int cpu, x264_pixel_function_t *pixf )
}
#endif
#if !HIGH_BIT_DEPTH
-#if ARCH_UltraSparc
+#if ARCH_UltraSPARC
INIT4( sad, _vis );
INIT4( sad_x3, _vis );
INIT4( sad_x4, _vis );
diff --git a/configure b/configure
index 2f38154..fd62337 100755
--- a/configure
+++ b/configure
@@ -392,15 +392,20 @@ case $host_cpu in
fi
;;
sparc)
- if [ $asm = auto ] && test "$(uname -m)" = "sun4u"; then
- ARCH="UltraSparc"
- CFLAGS="$CFLAGS -mcpu=ultrasparc"
- LDFLAGS="$LDFLAGS -mcpu=ultrasparc"
- AS="${AS-${cross_prefix}as}"
- ASFLAGS="$ASFLAGS -xarch=v8plusa"
- else
- ARCH="Sparc"
- fi
+ ARCH="SPARC"
+ case $(uname -m) in
+ sun4u|sun4v)
+ if [ $asm = auto ]; then
+ ARCH="UltraSPARC"
+ if ! echo $CFLAGS | grep -Eq '\-mcpu' ; then
+ CFLAGS="$CFLAGS -mcpu=ultrasparc"
+ LDFLAGS="$LDFLAGS -mcpu=ultrasparc"
+ fi
+ AS="${AS-${cross_prefix}as}"
+ ASFLAGS="$ASFLAGS -xarch=v8plusa"
+ fi
+ ;;
+ esac
;;
mips|mipsel|mips64|mips64el)
ARCH="MIPS"
@@ -497,11 +502,11 @@ fi
define ARCH_$ARCH
define SYS_$SYS
-echo "int i = 0x42494745; double f = 0x1.0656e6469616ep+102;" > conftest.c
+echo "int i[2] = {0x42494745,0}; double f[2] = {0x1.0656e6469616ep+102,0};" > conftest.c
$CC $CFLAGS conftest.c -c -o conftest.o 2>$DEVNULL || die "endian test failed"
-if grep -q BIGE conftest.o && grep -q FPendian conftest.o ; then
+if (strings -a conftest.o | grep -q BIGE) && (strings -a conftest.o | grep -q FPendian) ; then
define WORDS_BIGENDIAN
-elif !(grep -q EGIB conftest.o && grep -q naidnePF conftest.o) ; then
+elif !(strings -a conftest.o | grep -q EGIB && strings -a conftest.o | grep -q naidnePF) ; then
die "endian test failed"
fi
More information about the x264-devel
mailing list