summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Perez de Castro2018-07-21 22:28:50 +0200
committerAdrian Perez de Castro2018-07-21 22:29:09 +0200
commitddf23c05c59f1b63636755fd15df57196ce58a16 (patch)
tree34679de0aca6d81f78a392c6d012825f28e48e29
parent3cf7d71fc6a683c75fadf0933dc660f66bd9b4b1 (diff)
downloadaur-ddf23c05c59f1b63636755fd15df57196ce58a16.tar.gz
Avoid download of Debian sysroot, build with GCC
-rw-r--r--.SRCINFO7
-rw-r--r--PKGBUILD17
-rw-r--r--gcc-support.patch33
3 files changed, 48 insertions, 9 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f0b584cfd3b..cf95632d05f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,19 +1,20 @@
pkgbase = gn-git
pkgdesc = Meta-build system which generates Ninja build files
- pkgver = r1438.8ce4e49a
- pkgrel = 2
+ pkgver = r1446.5d9a4e9a
+ pkgrel = 1
url = https://gn.googlesource.com/gn
arch = x86_64
arch = i686
license = BSD
makedepends = python2
makedepends = ninja
- makedepends = clang
depends = gcc-libs
provides = gn
conflicts = gn-bin
source = gn::git+https://gn.googlesource.com/gn
+ source = gcc-support.patch
sha512sums = SKIP
+ sha512sums = 14f5a6236c09d1e11f6ce8984cbe1e635dc582a38ba801b719404bdaaf0b9f708262fdf13b5d6496e8af7fd50d411ab90747af1d816fa78a6a8b808ae88cb4f8
pkgname = gn-git
diff --git a/PKGBUILD b/PKGBUILD
index 4a26caf4dcc..af4bb1dfd90 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,26 +3,31 @@
#
pkgname=gn-git
pkgdesc='Meta-build system which generates Ninja build files'
-pkgver=r1438.8ce4e49a
-pkgrel=2
+pkgver=r1446.5d9a4e9a
+pkgrel=1
license=('BSD')
arch=('x86_64' 'i686')
conflicts=('gn-bin')
provides=('gn')
depends=('gcc-libs')
-makedepends=('python2' 'ninja' 'clang')
+makedepends=('python2' 'ninja')
url='https://gn.googlesource.com/gn'
-source=("gn::git+${url}")
-sha512sums=(SKIP)
+source=("gn::git+${url}" gcc-support.patch)
+sha512sums=('SKIP'
+ '14f5a6236c09d1e11f6ce8984cbe1e635dc582a38ba801b719404bdaaf0b9f708262fdf13b5d6496e8af7fd50d411ab90747af1d816fa78a6a8b808ae88cb4f8')
pkgver () {
export GIT_DIR="${startdir}/gn"
printf "r%s.%s" "$(git --bare rev-list --count HEAD)" "$(git --bare rev-parse --short HEAD)"
}
+prepare () {
+ patch -p1 < gcc-support.patch
+}
+
build () {
cd gn
- python2 build/gen.py
+ CC=cc CXX=c++ AR=ar python2 build/gen.py --no-sysroot --use-lto
ninja -C out
}
diff --git a/gcc-support.patch b/gcc-support.patch
new file mode 100644
index 00000000000..e2119234a16
--- /dev/null
+++ b/gcc-support.patch
@@ -0,0 +1,33 @@
+--- src/gn/build/gen.py.orig 2018-07-21 16:28:08.909054488 +0200
++++ src/gn/build/gen.py 2018-07-21 19:15:30.284412730 +0200
+@@ -293,11 +297,11 @@
+ # probably resolve this and (re-)add a way to build against libc++.
+ cflags.append('--sysroot=' + linux_sysroot)
+ ldflags.append('--sysroot=' + linux_sysroot)
+- cflags.append('-stdlib=libstdc++')
+- ldflags.extend(['-static-libstdc++',
+- '-stdlib=libstdc++',
+- '-Wl,--as-needed',
+- ])
++ if "clang" in cc:
++ cflags.append('-stdlib=libstdc++')
++ ldflags.extend(['-static-libstdc++',
++ '-stdlib=libstdc++'])
++ ldflags.append('-Wl,--as-needed')
+ libs.extend([
+ '-lgcc_s',
+ '-lpthread',
+@@ -308,8 +312,11 @@
+ ldflags.append(min_mac_version_flag)
+
+ 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 cc:
++ cflags.append('-fwhole-program-vtables')
++ ldflags.append('-fwhole-program-vtables')
+
+ elif is_win:
+ if not options.debug: