Commit 946f8155 authored by Sean McGovern's avatar Sean McGovern Committed by Fiona Glaser

Fix build on SPARC Solaris 10

parent 13d9e702
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
#if ARCH_ARM #if ARCH_ARM
# include "arm/pixel.h" # include "arm/pixel.h"
#endif #endif
#if ARCH_UltraSparc #if ARCH_UltraSPARC
# include "sparc/pixel.h" # include "sparc/pixel.h"
#endif #endif
...@@ -443,7 +443,7 @@ SAD_X( 4x8 ) ...@@ -443,7 +443,7 @@ SAD_X( 4x8 )
SAD_X( 4x4 ) SAD_X( 4x4 )
#if !HIGH_BIT_DEPTH #if !HIGH_BIT_DEPTH
#if ARCH_UltraSparc #if ARCH_UltraSPARC
SAD_X( 16x16_vis ) SAD_X( 16x16_vis )
SAD_X( 16x8_vis ) SAD_X( 16x8_vis )
SAD_X( 8x16_vis ) SAD_X( 8x16_vis )
...@@ -1063,7 +1063,7 @@ void x264_pixel_init( int cpu, x264_pixel_function_t *pixf ) ...@@ -1063,7 +1063,7 @@ void x264_pixel_init( int cpu, x264_pixel_function_t *pixf )
} }
#endif #endif
#if !HIGH_BIT_DEPTH #if !HIGH_BIT_DEPTH
#if ARCH_UltraSparc #if ARCH_UltraSPARC
INIT4( sad, _vis ); INIT4( sad, _vis );
INIT4( sad_x3, _vis ); INIT4( sad_x3, _vis );
INIT4( sad_x4, _vis ); INIT4( sad_x4, _vis );
......
...@@ -392,15 +392,20 @@ case $host_cpu in ...@@ -392,15 +392,20 @@ case $host_cpu in
fi fi
;; ;;
sparc) sparc)
if [ $asm = auto ] && test "$(uname -m)" = "sun4u"; then ARCH="SPARC"
ARCH="UltraSparc" case $(uname -m) in
CFLAGS="$CFLAGS -mcpu=ultrasparc" sun4u|sun4v)
LDFLAGS="$LDFLAGS -mcpu=ultrasparc" if [ $asm = auto ]; then
AS="${AS-${cross_prefix}as}" ARCH="UltraSPARC"
ASFLAGS="$ASFLAGS -xarch=v8plusa" if ! echo $CFLAGS | grep -Eq '\-mcpu' ; then
else CFLAGS="$CFLAGS -mcpu=ultrasparc"
ARCH="Sparc" LDFLAGS="$LDFLAGS -mcpu=ultrasparc"
fi fi
AS="${AS-${cross_prefix}as}"
ASFLAGS="$ASFLAGS -xarch=v8plusa"
fi
;;
esac
;; ;;
mips|mipsel|mips64|mips64el) mips|mipsel|mips64|mips64el)
ARCH="MIPS" ARCH="MIPS"
...@@ -497,11 +502,11 @@ fi ...@@ -497,11 +502,11 @@ fi
define ARCH_$ARCH define ARCH_$ARCH
define SYS_$SYS 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" $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 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" die "endian test failed"
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment