mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-27 07:34:20 +00:00
Bug 979685 - Rewrite the qcms Makefile.in in moz.build; r=mshal
This commit is contained in:
parent
cc460fe766
commit
87efce53b9
@ -1,54 +0,0 @@
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
ifeq (86,$(findstring 86,$(OS_TEST)))
|
||||
CSRCS += transform-sse2.c
|
||||
ifdef _MSC_VER
|
||||
ifneq ($(OS_ARCH)_$(OS_TEST),WINNT_x86_64)
|
||||
CSRCS += transform-sse1.c
|
||||
endif
|
||||
else
|
||||
CSRCS += transform-sse1.c
|
||||
ifdef GNU_CC
|
||||
SSE1_FLAGS=-msse
|
||||
SSE2_FLAGS=-msse2
|
||||
else
|
||||
ifeq ($(SOLARIS_SUNPRO_CC),1)
|
||||
ifneq (64,$(findstring 64,$(OS_TEST)))
|
||||
SSE1_FLAGS=-xarch=sse
|
||||
SSE2_FLAGS=-xarch=sse2
|
||||
else
|
||||
# Sun Studio doesn't work correctly for x86 intristics
|
||||
# with -m64 and without optimization.
|
||||
SSE1_FLAGS= -xO4
|
||||
SSE2_FLAGS= -xO4
|
||||
endif
|
||||
else
|
||||
SSE1_FLAGS=
|
||||
SSE2_FLAGS=
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
else
|
||||
ifeq (ppc,$(findstring ppc,$(CPU_ARCH)))
|
||||
ifdef GNU_CC
|
||||
CSRCS += transform-altivec.c
|
||||
ALTIVEC_FLAGS=-maltivec
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
# Disable spammy "missing initializer" GCC warning
|
||||
ifdef GNU_CC
|
||||
CFLAGS += -Wno-missing-field-initializers
|
||||
endif # GNU_CC
|
||||
|
||||
# special rules for transform-sse*.c to get the right cflags. (taken from pixman/src/Makefile.in)
|
||||
transform-sse1.$(OBJ_SUFFIX): COMPILE_CFLAGS += $(SSE1_FLAGS)
|
||||
|
||||
transform-sse2.$(OBJ_SUFFIX): COMPILE_CFLAGS += $(SSE2_FLAGS)
|
||||
|
||||
transform-altivec.$(OBJ_SUFFIX): COMPILE_CFLAGS += $(ALTIVEC_FLAGS)
|
@ -20,3 +20,48 @@ SOURCES += [
|
||||
MSVC_ENABLE_PGO = True
|
||||
|
||||
FINAL_LIBRARY = 'gkmedias'
|
||||
|
||||
if CONFIG['GNU_CC']:
|
||||
CFLAGS += ['-Wno-missing-field-initializers']
|
||||
|
||||
use_sse1 = False
|
||||
use_sse2 = False
|
||||
use_altivec = False
|
||||
if '86' in CONFIG['OS_TEST']:
|
||||
use_sse2 = True
|
||||
if CONFIG['_MSC_VER']:
|
||||
if CONFIG['OS_ARCH'] != 'WINNT' or CONFIG['OS_TEST'] != 'x86_64':
|
||||
use_sse1 = True
|
||||
else:
|
||||
use_sse1 = True
|
||||
elif 'ppc' in CONFIG['CPU_ARCH']:
|
||||
if CONFIG['GNU_CC']:
|
||||
use_altivec = True
|
||||
|
||||
if use_sse1:
|
||||
SOURCES += ['transform-sse1.c']
|
||||
if CONFIG['GNU_CC']:
|
||||
SOURCES['transform-sse1.c'].flags += ['-msse']
|
||||
elif CONFIG['SOLARIS_SUNPRO_CC']:
|
||||
if '64' in CONFIG['OS_TEST']:
|
||||
# Sun Studio doesn't work correctly for x86 intristics
|
||||
# with -m64 and without optimization.
|
||||
SOURCES['transform-sse1.c'].flags += ['-xO4']
|
||||
else:
|
||||
SOURCES['transform-sse1.c'].flags += ['-xarch=sse']
|
||||
|
||||
if use_sse2:
|
||||
SOURCES += ['transform-sse2.c']
|
||||
if CONFIG['GNU_CC']:
|
||||
SOURCES['transform-sse2.c'].flags += ['-msse2']
|
||||
elif CONFIG['SOLARIS_SUNPRO_CC']:
|
||||
if '64' in CONFIG['OS_TEST']:
|
||||
# Sun Studio doesn't work correctly for x86 intristics
|
||||
# with -m64 and without optimization.
|
||||
SOURCES['transform-sse2.c'].flags += ['-xO4']
|
||||
else:
|
||||
SOURCES['transform-sse2.c'].flags += ['-xarch=sse2']
|
||||
|
||||
if use_altivec:
|
||||
SOURCES += ['transform-altivec.c']
|
||||
SOURCES['transform-altivec.c'].flags += ['-maltivec']
|
||||
|
Loading…
x
Reference in New Issue
Block a user