Bug 975731 - Move some CXXFLAGS variables in xpcom/reflect/xptcall/src/md/unix/Makefile.in to moz.build; r=mshal
authorEhsan Akhgari <ehsan@mozilla.com>
Wed, 26 Feb 2014 21:37:19 -0500
changeset 170888 f8054c8163298a17c57b3407dd1a0928f707c623
parent 170887 75e7fb569d74a41e863d6e1c69b2199aa79dbcf5
child 170889 0c188671f47556085d2f91f59871331934dbe848
push id5335
push usercbook@mozilla.com
push dateThu, 27 Feb 2014 14:43:43 +0000
treeherderfx-team@fb009d10f3e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmshal
bugs975731
milestone30.0a1
Bug 975731 - Move some CXXFLAGS variables in xpcom/reflect/xptcall/src/md/unix/Makefile.in to moz.build; r=mshal
xpcom/reflect/xptcall/src/md/unix/Makefile.in
xpcom/reflect/xptcall/src/md/unix/moz.build
--- a/xpcom/reflect/xptcall/src/md/unix/Makefile.in
+++ b/xpcom/reflect/xptcall/src/md/unix/Makefile.in
@@ -1,26 +1,14 @@
 #
 # 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/.
 
 ######################################################################
-# ARM
-######################################################################
-#
-# Linux/ARM
-#
-ifeq ($(OS_ARCH),Linux)
-ifneq (,$(filter arm% sa110,$(OS_TEST)))
-CXXFLAGS += -O2
-endif
-endif
-
-######################################################################
 # HPPA
 ######################################################################
 #
 # HP-UX/PA32
 #
 # for gas and gcc, check comment in xptcinvoke_asm_pa32.s
 ifeq ($(OS_ARCH),HP-UX)
 ifneq ($(CC),gcc)
@@ -73,30 +61,16 @@ endif
 ifeq ($(OS_ARCH),SunOS)
 ifneq (86,$(findstring 86,$(OS_TEST)))
 ifdef HAVE_64BIT_OS
 ASFLAGS		+= -xarch=v9
 endif
 endif
 endif
 
-######################################################################
-# S/390
-######################################################################
-#
-# Linux for S/390
-#
-ifeq ($(OS_ARCH)$(OS_TEST),Linuxs390)
-CXXFLAGS	+= -fno-strict-aliasing -fno-inline -fomit-frame-pointer -mbackchain
-endif
-
-ifeq ($(OS_ARCH)$(OS_TEST),Linuxs390x)
-CXXFLAGS	+= -fno-strict-aliasing -fno-inline -fomit-frame-pointer -mbackchain
-endif
-
 include $(topsrcdir)/config/rules.mk
 
 ifeq ($(OS_ARCH),Linux)
 ifneq (,$(findstring mips, $(OS_TEST)))
 xptcstubs_asm_mips.o: $(DIST)/include/xptcstubsdef.inc
 endif
 endif
 
--- a/xpcom/reflect/xptcall/src/md/unix/moz.build
+++ b/xpcom/reflect/xptcall/src/md/unix/moz.build
@@ -94,16 +94,17 @@ if CONFIG['OS_TEST'] == 'alpha':
         ]
 
 if CONFIG['CPU_ARCH'] == 'arm' or CONFIG['OS_TEST'] == 'sa110':
     if CONFIG['OS_ARCH'] == 'Linux':
         SOURCES += [
             'xptcinvoke_arm.cpp',
             'xptcstubs_arm.cpp'
         ]
+        CXXFLAGS += ['-O2']
     elif CONFIG['OS_ARCH'] == 'NetBSD':
         SOURCES += [
             'xptcinvoke_arm_netbsd.cpp',
             'xptcstubs_arm_netbsd.cpp',
         ]
 
 if CONFIG['CPU_ARCH'] == 'arm' and CONFIG['OS_ARCH'] == 'OpenBSD':
     SOURCES += [
@@ -303,21 +304,33 @@ if CONFIG['OS_ARCH'] == 'SunOS' and CONF
             ]
 
 if CONFIG['OS_ARCH'] == 'Linux':
     if CONFIG['OS_TEST'] == 's390':
         SOURCES += [
             'xptcinvoke_linux_s390.cpp',
             'xptcstubs_linux_s390.cpp',
         ]
+        CXXFLAGS += [
+            '-fno-strict-aliasing',
+            '-fno-inline',
+            '-fomit-frame-pointer',
+            '-mbackchain',
+        ]
     elif CONFIG['OS_TEST'] == 's390x':
         SOURCES += [
             'xptcinvoke_linux_s390x.cpp',
             'xptcstubs_linux_s390x.cpp',
         ]
+        CXXFLAGS += [
+            '-fno-strict-aliasing',
+            '-fno-inline',
+            '-fomit-frame-pointer',
+            '-mbackchain',
+        ]
 
 FINAL_LIBRARY = 'xpcom_core'
 
 LOCAL_INCLUDES += [
     '../..',
     '../../../../xptinfo/src',
 ]