summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBlackEagle2017-12-13 17:10:32 +0100
committerBlackEagle2017-12-13 17:10:32 +0100
commit9336b7b529b154e3dd2f21bb3e5648bacf368a67 (patch)
tree20ae19d07253747bf181816080bf1367e8555027
parenta947be868f6bd3773244fed2f6453949ef5c56d2 (diff)
downloadaur-9336b7b529b154e3dd2f21bb3e5648bacf368a67.tar.gz
move patches to source dir, don't rely on some upstream
Signed-off-by: BlackEagle <ike.devolder@gmail.com>
-rw-r--r--PKGBUILD4
-rw-r--r--chromium-FORTIFY_SOURCE-r2.patch30
-rw-r--r--chromium-gn-bootstrap-r17.patch68
3 files changed, 100 insertions, 2 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 2549690b612..44be1d2289b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -16,8 +16,8 @@ options=('!strip')
source=(
"https://commondatastorage.googleapis.com/chromium-browser-official/chromium-$pkgver.tar.xz"
'chromium-last-commit-position-r1.patch'
- 'https://raw.githubusercontent.com/gentoo/gentoo/master/www-client/chromium/files/chromium-FORTIFY_SOURCE-r2.patch'
- 'https://raw.githubusercontent.com/gentoo/gentoo/master/www-client/chromium/files/chromium-gn-bootstrap-r17.patch'
+ 'chromium-FORTIFY_SOURCE-r2.patch'
+ 'chromium-gn-bootstrap-r17.patch'
'chromium-gcc5-r2.patch'
)
sha512sums=('2f8c7e9a17f25670bd3ceb557149185329d372873b75584f57486f26326d8c0fb7849807b46ace0be563a4aebf4a2be4ceeae4fe30cf5da7dcb1068ab1b7ebd1'
diff --git a/chromium-FORTIFY_SOURCE-r2.patch b/chromium-FORTIFY_SOURCE-r2.patch
new file mode 100644
index 00000000000..8ebf42a46a8
--- /dev/null
+++ b/chromium-FORTIFY_SOURCE-r2.patch
@@ -0,0 +1,30 @@
+Drop _FORTIFY_SOURCE=2 from defines
+
+Gentoo toolchains enable this by default. Removing this prevents spammy
+warnings about the macro being redefined.
+
+--- a/build/config/compiler/BUILD.gn
++++ b/build/config/compiler/BUILD.gn
+@@ -1213,22 +1213,6 @@
+ "__STDC_FORMAT_MACROS",
+ ]
+
+- if (!is_debug && !using_sanitizer &&
+- (!is_linux || !is_clang || is_official_build) &&
+- current_cpu != "s390x" && current_cpu != "s390" &&
+- current_cpu != "ppc64" && current_cpu != "ppc64" &&
+- current_cpu != "mips" && current_cpu != "mips64") {
+- # _FORTIFY_SOURCE isn't really supported by Clang now, see
+- # http://llvm.org/bugs/show_bug.cgi?id=16821.
+- # It seems to work fine with Ubuntu 12 headers though, so use it in
+- # official builds.
+- #
+- # Non-chromium code is not guaranteed to compile cleanly with
+- # _FORTIFY_SOURCE. Also, fortified build may fail when optimizations are
+- # disabled, so only do that for Release build.
+- defines += [ "_FORTIFY_SOURCE=2" ]
+- }
+-
+ if (is_mac || is_ios) {
+ cflags_objc = [ "-Wobjc-missing-property-synthesis" ]
+ cflags_objcc = [ "-Wobjc-missing-property-synthesis" ]
diff --git a/chromium-gn-bootstrap-r17.patch b/chromium-gn-bootstrap-r17.patch
new file mode 100644
index 00000000000..6cfd08d58c2
--- /dev/null
+++ b/chromium-gn-bootstrap-r17.patch
@@ -0,0 +1,68 @@
+--- a/tools/gn/bootstrap/bootstrap.py
++++ b/tools/gn/bootstrap/bootstrap.py
+@@ -179,6 +179,7 @@ def build_gn_with_ninja_manually(tempdir, options):
+
+ write_buildflag_header_manually(root_gen_dir, 'base/debug/debugging_flags.h',
+ {
++ 'ENABLE_LOCATION_SOURCE': 'false',
+ 'ENABLE_PROFILING': 'false',
+ 'CAN_UNWIND_WITH_FRAME_POINTERS': 'false'
+ })
+@@ -204,7 +205,7 @@ def build_gn_with_ninja_manually(tempdir, options):
+
+ write_gn_ninja(os.path.join(tempdir, 'build.ninja'),
+ root_gen_dir, options)
+- cmd = ['ninja', '-C', tempdir]
++ cmd = ['ninja', '-C', tempdir, '-w', 'dupbuild=err']
+ if options.verbose:
+ cmd.append('-v')
+
+@@ -458,6 +459,7 @@ def write_gn_ninja(path, root_gen_dir, options):
+ 'base/metrics/bucket_ranges.cc',
+ 'base/metrics/field_trial.cc',
+ 'base/metrics/field_trial_param_associator.cc',
++ 'base/metrics/field_trial_params.cc',
+ 'base/metrics/histogram.cc',
+ 'base/metrics/histogram_base.cc',
+ 'base/metrics/histogram_functions.cc',
+@@ -507,6 +509,7 @@ def write_gn_ninja(path, root_gen_dir, options):
+ 'base/task_scheduler/scheduler_lock_impl.cc',
+ 'base/task_scheduler/scheduler_single_thread_task_runner_manager.cc',
+ 'base/task_scheduler/scheduler_worker.cc',
++ 'base/task_scheduler/scheduler_worker_pool.cc',
+ 'base/task_scheduler/scheduler_worker_pool_impl.cc',
+ 'base/task_scheduler/scheduler_worker_pool_params.cc',
+ 'base/task_scheduler/scheduler_worker_stack.cc',
+@@ -523,6 +526,7 @@ def write_gn_ninja(path, root_gen_dir, options):
+ 'base/third_party/icu/icu_utf.cc',
+ 'base/third_party/nspr/prtime.cc',
+ 'base/threading/post_task_and_reply_impl.cc',
++ 'base/threading/scoped_blocking_call.cc',
+ 'base/threading/sequence_local_storage_map.cc',
+ 'base/threading/sequenced_task_runner_handle.cc',
+ 'base/threading/sequenced_worker_pool.cc',
+@@ -579,7 +583,6 @@ def write_gn_ninja(path, root_gen_dir, options):
+ 'base/unguessable_token.cc',
+ 'base/value_iterators.cc',
+ 'base/values.cc',
+- 'base/value_iterators.cc',
+ 'base/vlog.cc',
+ ])
+
+@@ -652,7 +655,6 @@ def write_gn_ninja(path, root_gen_dir, options):
+ static_libraries['base']['sources'].extend([
+ 'base/memory/shared_memory_handle_posix.cc',
+ 'base/memory/shared_memory_posix.cc',
+- 'base/memory/shared_memory_tracker.cc',
+ 'base/nix/xdg_util.cc',
+ 'base/process/internal_linux.cc',
+ 'base/process/memory_linux.cc',
+@@ -827,7 +829,7 @@ def build_gn_with_gn(temp_gn, build_dir, options):
+ cmd = [temp_gn, 'gen', build_dir, '--args=%s' % gn_gen_args]
+ check_call(cmd)
+
+- cmd = ['ninja', '-C', build_dir]
++ cmd = ['ninja', '-C', build_dir, '-w', 'dupbuild=err']
+ if options.verbose:
+ cmd.append('-v')
+ cmd.append('gn')