Update find_patches to python3
The `find_patches.py` utility was python2. Update it to python3.
In addition:
- Re-run it to get the latest version of `README.patches`
- Update the copyright headers to the new style
Bug: chromium:1409095
Change-Id: I4181e6abd9242cf9da86b1da3f3920bcee4ad819
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index 13fd383..b6abea3 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -1,4 +1,4 @@
-# Copyright 2018 The Chromium Authors. All rights reserved.
+# Copyright 2018 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Presubmit script for nasm repository."""
diff --git a/README.patches b/README.patches
index 3b3fad3..9e5c86e 100644
--- a/README.patches
+++ b/README.patches
@@ -86,25 +86,40 @@
include/ilog2.h
------------------------------------------------------------------
-commit 2326c263ecb55e2fb0747def58855198bdd0fbc4
-Author: H. Peter Anvin (Intel) <hpa@zytor.com>
-Date: Mon Jul 6 21:46:43 2020 -0700
+commit 3dc3d47978ef567966cb21a7b6d617fb688e6029
+Author: Byoungchan Lee <daniel.l@hpcnt.com>
+Date: Tue Jul 27 05:09:09 2021 +0900
- BR 3392692: outcoff: allow user to reduce the default alignment
+ Emit the LC_BUILD_VERSION load command when creating a mach object.
- NASM would incorrectly only allow for the alignment to be increased,
- even when overridden by the user. Allow the user to specify any
- alignment value and have it override the partition type default.
+ LC_BUILD_VERSION contains the min OS version on which this binary
+ was built to run for its platform in mach object. It is required for
+ targets like iOS Catalyst.
- The user can increade their own alignment value specification later,
- of course, and the sectalign directive will present a floor for either
- kind of specification.
+ Also, emit the __LLVM segment, __asm section to tell the Apple
+ toolchain that this object is from assembler and has no bitcode.
+ This trick is used in Kotlin/Native, Rust, Flutter, Golang and yasm.
- Reported-by: Dale Curtis <dalecurtis@chromium.org>
- Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
+ Bug: 1145197, webrtc:11516
+ Change-Id: I6859cc171f80d1aa86d9d7187c2f8ceac7b8c4f3
Affects:
- doc/nasmdoc.src
- output/outcoff.c
- output/pecoff.h
+ asm/nasm.c
+ output/macho.h
+ output/outmacho.c
+
+------------------------------------------------------------------
+commit 9215e8e1d0fe474ffd3e16c1a07a0f97089e6224
+Author: Nico Weber <thakis@chromium.org>
+Date: Mon Oct 18 15:16:22 2021 -0400
+
+ nasm: Cherry-pick -Wbitwise-instead-of-logical fix
+
+ This cherry-picks https://github.com/netwide-assembler/nasm/pull/17
+
+ Bug: chromium:1255745
+ Change-Id: I230b9ab9fd0a8baa1cdc8dd6e62cdc069cb14070
+
+Affects:
+ asm/preproc.c
diff --git a/find_patches.py b/find_patches.py
index 3a9f87c..663fd6c 100755
--- a/find_patches.py
+++ b/find_patches.py
@@ -1,6 +1,6 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
-# Copyright 2018 The Chromium Authors. All rights reserved.
+# Copyright 2018 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
@@ -18,7 +18,6 @@
find_patches.py origin/merge-m68 > patches.68
"""
-from __future__ import print_function
import collections
import os
import re
@@ -43,7 +42,7 @@
Returns:
stdout as a a string.
"""
- return subprocess.Popen(command, stdout=subprocess.PIPE).communicate()[0]
+ return subprocess.Popen(command, stdout=subprocess.PIPE).communicate()[0].decode()
class PatchInfo:
@@ -246,7 +245,7 @@
file=output_file)
print("\n", file=output_file)
wd = os.getcwd()
- for sha1, date in sorted(sha1_to_date.iteritems(), key=lambda (k, v): v):
+ for sha1, date in sorted(sha1_to_date.items(), key=lambda kv: kv[1]):
print(
"------------------------------------------------------------------",
file=output_file)
diff --git a/generate_nasm_configs.py b/generate_nasm_configs.py
index 371c489..b419879 100755
--- a/generate_nasm_configs.py
+++ b/generate_nasm_configs.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
#
-# Copyright 2022 The Chromium Authors. All rights reserved.
+# Copyright 2022 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""A script to update and tweak nasm's generated configs post-autoconf."""
diff --git a/generate_nasm_sources.py b/generate_nasm_sources.py
index 356cb47..4621c7e 100755
--- a/generate_nasm_sources.py
+++ b/generate_nasm_sources.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
#
-# Copyright 2018 The Chromium Authors. All rights reserved.
+# Copyright 2018 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
diff --git a/nasm_assemble.gni b/nasm_assemble.gni
index 4c3d534..3a0e92d 100644
--- a/nasm_assemble.gni
+++ b/nasm_assemble.gni
@@ -1,4 +1,4 @@
-# Copyright 2018 The Chromium Authors. All rights reserved.
+# Copyright 2018 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
diff --git a/nasm_sources.gni b/nasm_sources.gni
index 4ca5d3b..bbfcb2a 100644
--- a/nasm_sources.gni
+++ b/nasm_sources.gni
@@ -1,4 +1,4 @@
-# Copyright (c) 2018 The Chromium Authors. All rights reserved.
+# Copyright 2018 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.