Intel fixes (#608)

* ycbcr: intel assembly fixes for old gcc-as in Tiger

minor changes in assembly that are friendly to the
older gcc-as in Tiger

* libvpx/moz.build: only use force_cpusubtype_all on PPC

this flag is not accepted by the intel assembler

* libvpx: compiler/assembler fixes for intel

use clang-3.4 as the primary compiler
use yasm for the assembly

* nss: use clang-3.4 as compiler on Intel

nss contains assembly that the old gas assembler can't manage
using clang-3.4 is the easiest fix for this, as it is
already needed elsewhere for libvpx

* Intel mozconfig: update

we need to force the old gas assembler to be used
for the majority of the build as the newer clang
one will fail

* client.mk: use original which

MacPorts has a newer version of the which command
that is supposed to be more like current 'which' versions,
but there is an error in it at present and the construct
used in TFF doesn't work correctly.

Until this is fixed, use the original /usr/bin/which (and that
one can in fact be used forever, of course).
This commit is contained in:
Ken 2020-06-11 15:31:09 -07:00 committed by GitHub
parent 8304421b75
commit 3f33f8a6e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 37 additions and 10 deletions

View File

@ -57,7 +57,7 @@ endif
# try to find autoconf 2.13 - discard errors from 'which'
# MacOS X 10.4 sends "no autoconf*" errors to stdout, discard those via grep
AUTOCONF ?= $(shell which autoconf-2.13 autoconf2.13 autoconf213 2>/dev/null | grep -v '^no autoconf' | head -1)
AUTOCONF ?= $(shell /usr/bin/which autoconf-2.13 autoconf2.13 autoconf213 2>/dev/null | grep -v '^no autoconf' | head -1)
# See if the autoconf package was installed through fink
ifeq (,$(strip $(AUTOCONF)))

View File

@ -10,6 +10,17 @@ CXX_WRAPPER =
default::
ifeq (86,$(findstring 86,$(OS_TEST)))
# TenFourFox Intel fix
# TO DO - pass the compiler in as an environment variable
CC=clang-mp-3.4
CC += -arch i386
CC += -O3
CCC=clang++-mp-3.4
CCC += -arch i386
CCC += -O3
endif
include $(topsrcdir)/config/makefiles/functions.mk
NSS_LIBS = \

View File

@ -272,8 +272,7 @@ void FastConvertYUVToRGB32Row_SSE(const uint8* y_buf,
int width);
asm(
".text\n"
".global FastConvertYUVToRGB32Row_SSE\n"
".type FastConvertYUVToRGB32Row_SSE, @function\n"
".globl FastConvertYUVToRGB32Row_SSE\n"
"FastConvertYUVToRGB32Row_SSE:\n"
"pusha\n"
"mov 0x24(%esp),%edx\n"
@ -350,8 +349,7 @@ void ScaleYUVToRGB32Row_SSE(const uint8* y_buf,
int source_dx);
asm(
".text\n"
".global ScaleYUVToRGB32Row_SSE\n"
".type ScaleYUVToRGB32Row_SSE, @function\n"
".globl ScaleYUVToRGB32Row_SSE\n"
"ScaleYUVToRGB32Row_SSE:\n"
"pusha\n"
"mov 0x24(%esp),%edx\n"
@ -444,8 +442,7 @@ void LinearScaleYUVToRGB32Row_SSE(const uint8* y_buf,
int source_dx);
asm(
".text\n"
".global LinearScaleYUVToRGB32Row_SSE\n"
".type LinearScaleYUVToRGB32Row_SSE, @function\n"
".globl LinearScaleYUVToRGB32Row_SSE\n"
"LinearScaleYUVToRGB32Row_SSE:\n"
"pusha\n"
"mov 0x24(%esp),%edx\n"

View File

@ -1,6 +1,12 @@
. $topsrcdir/browser/config/mozconfig
export CC="/opt/local/bin/gcc-mp-4.8 -flax-vector-conversions -O3 -m32 -march=pentium-m -read_only_relocs suppress -mdynamic-no-pic"
export CXX="/opt/local/bin/g++-mp-4.8 -flax-vector-conversions -fpermissive -O3 -m32 -march=pentium-m -read_only_relocs suppress -mdynamic-no-pic"
# we need to use -Wa,-Q to force the behaviour of the traditional assembler on MacPorts
# as that is the only one that can accept all the output from gcc-4.8 without errors
# recent changes in MacPorts will force clang as assembler if certain clangs are found otherwise
export CC="/opt/local/bin/gcc-mp-4.8 -Wa,-Q -flax-vector-conversions -O3 -m32 -march=pentium-m -read_only_relocs suppress"
export CXX="/opt/local/bin/g++-mp-4.8 -Wa,-Q -flax-vector-conversions -fpermissive -O3 -m32 -march=pentium-m -read_only_relocs suppress"
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-ff-dbg
mk_add_options MOZ_MAKE_FLAGS="-s -j2"
mk_add_options AUTOCONF=autoconf213

View File

@ -9,6 +9,15 @@ VPX_AS=gcc
VPX_ASM_SUFFIX=s
endif
ifdef VPX_X86_ASM
# TO DO - pass these in as an environment variable
CC=clang-mp-3.4
CC += -arch i386
CC += -O3
VPX_AS=yasm
VPX_ASM_SUFFIX=asm
endif
# Set up the libvpx assembler config.
AS=$(VPX_AS)

View File

@ -102,6 +102,7 @@ if CONFIG['CLANG_CL'] or not CONFIG['_MSC_VER']:
if CONFIG['GNU_CC']:
CFLAGS += ['-Wno-sign-compare']
ASFLAGS += CONFIG['VPX_ASFLAGS']
ASFLAGS += [
'-I.',
@ -109,7 +110,10 @@ ASFLAGS += [
'-I%s/media/libvpx/vpx_ports/' % TOPSRCDIR,
]
# moved from Makefile.in for TenFourFox
ASFLAGS += ['-force_cpusubtype_ALL']
# this only works on gcc-as (ie PPC)
if not '86' in CONFIG['OS_TEST']:
ASFLAGS += ['-force_cpusubtype_ALL']
if CONFIG['OS_TARGET'] == 'Android':
# For LIBVPX_RAND