From 1b79c470542025d36275ec451732adbb9f5ba430 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Fri, 5 Jan 2024 23:09:45 +0100 Subject: [PATCH] update to 0.20200521git [release 0.20200521git-1mamba;Thu May 21 2020] --- gn-0.20200521git-gcc-support.patch | 18 ++++++++++++++++++ gn.spec | 21 ++++++++++++++++++--- 2 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 gn-0.20200521git-gcc-support.patch diff --git a/gn-0.20200521git-gcc-support.patch b/gn-0.20200521git-gcc-support.patch new file mode 100644 index 0000000..124d2d9 --- /dev/null +++ b/gn-0.20200521git-gcc-support.patch @@ -0,0 +1,18 @@ +diff --git a/build/gen.py b/build/gen.py +index d2305c8f..811c2e95 100755 +--- a/build/gen.py ++++ b/build/gen.py +@@ -324,8 +324,11 @@ def WriteGNNinja(path, platform, host, options): + ldflags.append('-Wl,--icf=all') + + if options.use_lto: +- cflags.extend(['-flto', '-fwhole-program-vtables']) +- ldflags.extend(['-flto', '-fwhole-program-vtables']) ++ cflags.append('-flto') ++ ldflags.append('-flto') ++ if "clang" in cxx: ++ cflags.append('-fwhole-program-vtables') ++ ldflags.append('-fwhole-program-vtables') + + cflags.extend([ + '-D_FILE_OFFSET_BITS=64', diff --git a/gn.spec b/gn.spec index a18f78f..3ec7ee2 100644 --- a/gn.spec +++ b/gn.spec @@ -1,5 +1,5 @@ Name: gn -Version: 0.20190301git +Version: 0.20200521git Release: 1mamba Summary: A meta-build system that generates build files for Ninja Group: Development/Tools @@ -9,6 +9,7 @@ Packager: Silvan Calarco URL: https://gn.googlesource.com/gn/+/master/README.md ## GITSOURCE https://gn.googlesource.com/gn.git master Source: https://gn.googlesource.com/gn.git/master/gn-%{version}.tar.bz2 +Patch0: gn-0.20200521git-gcc-support.patch License: BSD ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel @@ -23,20 +24,31 @@ GN is a meta-build system that generates build files for Ninja. %prep %setup -q +%patch0 -p1 -cat > tools/gn/last_commit_position.h << _EOF +cat > src/last_commit_position.h << _EOF // Generated by build/gen.py. #ifndef OUT_LAST_COMMIT_POSITION_H_ #define OUT_LAST_COMMIT_POSITION_H_ #define LAST_COMMIT_POSITION "0 (0)" +#define LAST_COMMIT_POSITION_NUM 0 #endif // OUT_LAST_COMMIT_POSITION_H_ _EOF %build -python build/gen.py --no-last-commit-position +CC=cc CXX=c++ AR=ar \ +CFLAGS="%{optflags} -pthread" \ +CXXFLAGS="%{optflags} -pthread" \ +LDFLAGS="%{optflags} -pthread" \ +python3 build/gen.py \ + --no-last-commit-position \ + --no-strip + +# --use-lto + ninja -C out %check @@ -55,5 +67,8 @@ install -D -m0755 out/gn %{buildroot}%{_bindir}/gn %doc AUTHORS LICENSE %changelog +* Thu May 21 2020 Silvan Calarco 0.20200521git-1mamba +- update to 0.20200521git + * Fri Mar 01 2019 Silvan Calarco 0.20190301git-1mamba - package created using the webbuild interface