From 5da2a1efae05a012daf72e61f6f131d104ce52c2 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 10 Mar 2015 20:29:26 +0100 Subject: [PATCH] aarch64 fixes --- firefox-aarch64.patch | 42 +++++++++++++++++++++++++++++++++++++++++ firefox.spec | 8 ++++---- mozilla-build-arm.patch | 42 ----------------------------------------- 3 files changed, 46 insertions(+), 46 deletions(-) create mode 100644 firefox-aarch64.patch diff --git a/firefox-aarch64.patch b/firefox-aarch64.patch new file mode 100644 index 0000000..2585f98 --- /dev/null +++ b/firefox-aarch64.patch @@ -0,0 +1,42 @@ +diff -up firefox-36.0.1/mozilla-release/gfx/skia/generate_mozbuild.py.aarch64 firefox-36.0.1/mozilla-release/gfx/skia/generate_mozbuild.py +--- firefox-36.0.1/mozilla-release/gfx/skia/generate_mozbuild.py.aarch64 2015-03-10 16:51:22.000000000 +0100 ++++ firefox-36.0.1/mozilla-release/gfx/skia/generate_mozbuild.py 2015-03-10 20:23:07.561891942 +0100 +@@ -27,7 +27,7 @@ footer = """ + # can we find a better way of dealing with asm sources? + + # left out of UNIFIED_SOURCES for now; that's not C++ anyway, nothing else to unify it with +-if not CONFIG['INTEL_ARCHITECTURE'] and CONFIG['CPU_ARCH'] == 'arm' and CONFIG['GNU_CC']: ++if not CONFIG['INTEL_ARCHITECTURE'] and (CONFIG['CPU_ARCH'] == 'arm' or CONFIG['CPU_ARCH'] == 'aarch64') and CONFIG['GNU_CC']: + SOURCES += [ + 'trunk/src/opts/memset.arm.S', + ] +@@ -123,7 +123,7 @@ if CONFIG['INTEL_ARCHITECTURE'] and CONF + SOURCES['trunk/src/opts/SkMorphology_opts_SSE2.cpp'].flags += CONFIG['SSE2_FLAGS'] + SOURCES['trunk/src/opts/SkUtils_opts_SSE2.cpp'].flags += CONFIG['SSE2_FLAGS'] + SOURCES['trunk/src/opts/SkXfermode_opts_SSE2.cpp'].flags += CONFIG['SSE2_FLAGS'] +-elif CONFIG['CPU_ARCH'] == 'arm' and CONFIG['GNU_CC'] and CONFIG['BUILD_ARM_NEON']: ++elif (CONFIG['CPU_ARCH'] == 'arm' or CONFIG['CPU_ARCH'] == 'aarch64') and CONFIG['GNU_CC'] and CONFIG['BUILD_ARM_NEON']: + DEFINES['__ARM_HAVE_OPTIONAL_NEON_SUPPORT'] = 1 + DEFINES['USE_ANDROID_NDK_CPU_FEATURES'] = 0 + elif CONFIG['CLANG_CL']: +@@ -440,7 +440,7 @@ def write_mozbuild(includes, sources): + f.write("if CONFIG['INTEL_ARCHITECTURE']:\n") + write_sources(f, sources['intel'], 4) + +- f.write("elif CONFIG['CPU_ARCH'] == 'arm' and CONFIG['GNU_CC']:\n") ++ f.write("elif (CONFIG['CPU_ARCH'] == 'arm' or CONFIG['CPU_ARCH'] == 'aarch64') and CONFIG['GNU_CC']:\n") + write_sources(f, sources['arm'], 4) + + f.write(" if CONFIG['BUILD_ARM_NEON']:\n") +diff -up firefox-36.0.1/mozilla-release/gfx/ycbcr/moz.build.aarch64 firefox-36.0.1/mozilla-release/gfx/ycbcr/moz.build +--- firefox-36.0.1/mozilla-release/gfx/ycbcr/moz.build.aarch64 2015-03-05 11:28:10.000000000 +0100 ++++ firefox-36.0.1/mozilla-release/gfx/ycbcr/moz.build 2015-03-10 16:54:47.009663193 +0100 +@@ -61,7 +61,7 @@ else: + 'yuv_row_other.cpp', + ] + +-if CONFIG['CPU_ARCH'] == 'arm' and CONFIG['HAVE_ARM_NEON']: ++if (CONFIG['CPU_ARCH'] == 'arm' or CONFIG['CPU_ARCH'] == 'aarch64') and CONFIG['HAVE_ARM_NEON']: + SOURCES += [ + 'yuv_row_arm.s', + ] diff --git a/firefox.spec b/firefox.spec index 4d2729a..628bdb2 100644 --- a/firefox.spec +++ b/firefox.spec @@ -127,6 +127,7 @@ Source24: mozilla-api-key Patch0: firefox-install-dir.patch Patch1: firefox-build.patch Patch3: mozilla-build-arm.patch +Patch4: firefox-aarch64.patch # https://bugzilla.redhat.com/show_bug.cgi?id=814879#c3 Patch18: xulrunner-24.0-jemalloc-ppc.patch # workaround linking issue on s390 (JSContext::updateMallocCounter(size_t) not found) @@ -280,10 +281,6 @@ cd %{tarballdir} %patch0 -p1 %patch1 -p2 -b .build -%ifarch %{arm} -%patch3 -p2 -b .arm -%endif - %patch18 -p2 -b .jemalloc-ppc %patch19 -p2 -b .s390-inlines %patch20 -p1 -b .prbool @@ -291,6 +288,9 @@ cd %{tarballdir} %patch22 -p2 -b .1108834 %patch23 -p1 -b .1005535 +%patch3 -p2 -b .arm +%patch4 -p2 -b .aarch64 + # For branding specific patches. # Fedora patches diff --git a/mozilla-build-arm.patch b/mozilla-build-arm.patch index 9dd243a..86e6f2e 100644 --- a/mozilla-build-arm.patch +++ b/mozilla-build-arm.patch @@ -1,45 +1,3 @@ -diff -up firefox-29.0/mozilla-release/gfx/ycbcr/moz.build.arm firefox-29.0/mozilla-release/gfx/ycbcr/moz.build ---- firefox-29.0/mozilla-release/gfx/ycbcr/moz.build.arm 2014-04-22 07:27:47.000000000 +0200 -+++ firefox-29.0/mozilla-release/gfx/ycbcr/moz.build 2014-04-22 16:40:34.862849368 +0200 -@@ -61,7 +61,7 @@ else: - 'yuv_row_other.cpp', - ] - --if CONFIG['CPU_ARCH'] == 'arm' and CONFIG['HAVE_ARM_NEON']: -+if CONFIG['HAVE_ARM_NEON']: - SOURCES += [ - 'yuv_row_arm.s', - ] -diff -up firefox-36.0.1/mozilla-release/gfx/skia/generate_mozbuild.py.arm firefox-36.0.1/mozilla-release/gfx/skia/generate_mozbuild.py ---- firefox-36.0.1/mozilla-release/gfx/skia/generate_mozbuild.py.arm 2015-03-09 10:02:17.000000000 +0100 -+++ firefox-36.0.1/mozilla-release/gfx/skia/generate_mozbuild.py 2015-03-10 09:16:18.532740641 +0100 -@@ -27,7 +27,7 @@ footer = """ - # can we find a better way of dealing with asm sources? - - # left out of UNIFIED_SOURCES for now; that's not C++ anyway, nothing else to unify it with --if not CONFIG['INTEL_ARCHITECTURE'] and CONFIG['CPU_ARCH'] == 'arm' and CONFIG['GNU_CC']: -+if not CONFIG['INTEL_ARCHITECTURE'] and CONFIG['GNU_CC']: - SOURCES += [ - 'trunk/src/opts/memset.arm.S', - ] -@@ -123,7 +123,7 @@ if CONFIG['INTEL_ARCHITECTURE'] and CONF - SOURCES['trunk/src/opts/SkMorphology_opts_SSE2.cpp'].flags += CONFIG['SSE2_FLAGS'] - SOURCES['trunk/src/opts/SkUtils_opts_SSE2.cpp'].flags += CONFIG['SSE2_FLAGS'] - SOURCES['trunk/src/opts/SkXfermode_opts_SSE2.cpp'].flags += CONFIG['SSE2_FLAGS'] --elif CONFIG['CPU_ARCH'] == 'arm' and CONFIG['GNU_CC'] and CONFIG['BUILD_ARM_NEON']: -+elif CONFIG['GNU_CC'] and CONFIG['BUILD_ARM_NEON']: - DEFINES['__ARM_HAVE_OPTIONAL_NEON_SUPPORT'] = 1 - DEFINES['USE_ANDROID_NDK_CPU_FEATURES'] = 0 - elif CONFIG['CLANG_CL']: -@@ -440,7 +440,7 @@ def write_mozbuild(includes, sources): - f.write("if CONFIG['INTEL_ARCHITECTURE']:\n") - write_sources(f, sources['intel'], 4) - -- f.write("elif CONFIG['CPU_ARCH'] == 'arm' and CONFIG['GNU_CC']:\n") -+ f.write("elif CONFIG['GNU_CC']:\n") - write_sources(f, sources['arm'], 4) - - f.write(" if CONFIG['BUILD_ARM_NEON']:\n") diff -up firefox-36.0.1/mozilla-release/media/webrtc/trunk/webrtc/build/common.gypi.arm firefox-36.0.1/mozilla-release/media/webrtc/trunk/webrtc/build/common.gypi --- firefox-36.0.1/mozilla-release/media/webrtc/trunk/webrtc/build/common.gypi.arm 2015-03-05 11:28:19.000000000 +0100 +++ firefox-36.0.1/mozilla-release/media/webrtc/trunk/webrtc/build/common.gypi 2015-03-09 10:02:17.875243261 +0100