From 25a26ddfb656016191231dc342fa8faf0a494584 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Mon, 27 Sep 2021 16:01:14 -0400 Subject: [PATCH] Correctly stop overriding optimization flags --- gn-0153d369-no-O3.patch | 14 ++++++++++++++ gn.spec | 5 ++--- 2 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 gn-0153d369-no-O3.patch diff --git a/gn-0153d369-no-O3.patch b/gn-0153d369-no-O3.patch new file mode 100644 index 0000000..13a4820 --- /dev/null +++ b/gn-0153d369-no-O3.patch @@ -0,0 +1,14 @@ +diff -Naur gn-0153d369bbccc908f4da4993b1ba82728055926a-original/build/gen.py gn-0153d369bbccc908f4da4993b1ba82728055926a/build/gen.py +--- gn-0153d369bbccc908f4da4993b1ba82728055926a-original/build/gen.py 2021-09-27 14:58:14.000000000 -0400 ++++ gn-0153d369bbccc908f4da4993b1ba82728055926a/build/gen.py 2021-09-27 15:59:42.330405195 -0400 +@@ -344,10 +344,8 @@ + cflags.extend(['-O0', '-g']) + else: + cflags.append('-DNDEBUG') +- cflags.append('-O3') + if options.no_strip: + cflags.append('-g') +- ldflags.append('-O3') + # Use -fdata-sections and -ffunction-sections to place each function + # or data item into its own section so --gc-sections can eliminate any + # unused functions and data items. diff --git a/gn.spec b/gn.spec index 453c869..453d6c2 100644 --- a/gn.spec +++ b/gn.spec @@ -53,6 +53,8 @@ Source2: update-version # ce30313f5e4af121140c037bf026453355534f24/f/ # chromium-84.0.4147.105-gn-gcc-cleanup.patch Patch0: %{name}-39a87c0b-gcc-cleanup.patch +# Stop overriding optimization flags +Patch1: %{name}-0153d369-no-O3.patch BuildRequires: python3 BuildRequires: python3-devel @@ -100,9 +102,6 @@ cp -vp misc/vim/README.md README-vim.md # Fix shebangs in examples and such. %py3_shebang_fix . -# Stop overriding optimization flags -sed -r -i '/.append(.-O3.)/d' build/gen.py - %build AR='gcc-ar'; export AR