Skip to content

Instantly share code, notes, and snippets.

@fuhry
Created August 7, 2021 02:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fuhry/00d655987bda3a7c3b2c55864c912379 to your computer and use it in GitHub Desktop.
Save fuhry/00d655987bda3a7c3b2c55864c912379 to your computer and use it in GitHub Desktop.
AUR envoyproxy v1.19.0 patch
From cfc4f92968e789b2c7edf51c2e43cceb8f63b331 Mon Sep 17 00:00:00 2001
From: Dan Fuhry <dan@fuhry.com>
Date: Fri, 6 Aug 2021 22:10:24 -0400
Subject: [PATCH] upgrade to v1.19.0, fix all build issues
---
PKGBUILD | 25 ++++++++++++++++++++-----
fix_wee8_build.patch | 13 +++++++++++++
2 files changed, 33 insertions(+), 5 deletions(-)
create mode 100644 fix_wee8_build.patch
diff --git a/PKGBUILD b/PKGBUILD
index b5e21aa..78cb854 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,8 +2,8 @@
# Contributor: kXuan <kxuanobj@gmail.com>
pkgname=envoyproxy
-pkgver=1.18.3
-pkgrel=2
+pkgver=1.19.0
+pkgrel=1
pkgdesc="A high performance, open source, general RPC framework that puts mobile and HTTP/2 first."
arch=('i686' 'x86_64')
url='https://envoyproxy.io'
@@ -23,14 +23,17 @@ makedepends=(
source=(
"https://github.com/$pkgname/envoy/archive/v$pkgver.tar.gz"
use_bazelisk.patch
+ fix_wee8_build.patch
)
-sha512sums=('1d24ddd3ead66a5eff890771e43514b200f9a40a159bbdb02262488d65bb31b08a4fccfb0c20a5d8078ef4797b9a04176f5b3d4cdd437a252ece6a7aee579eb2'
- '248d0903c0aaa680065cdb308068e7f999f2ba7e2ffbc3b743715d2db968858f41cf104c59e1e98d6cda74baea54755e7c9edc29711c3b1daa87d63107ee4017')
+sha512sums=('8a4dd06ce2cf3adc0f81800ff5a228b276686b70bbc41634d12602f22903aa5fd42f6443e1b0b8c9f12304ba7dcf45eea5452bbe8942daf33ba192ac59194327'
+ '248d0903c0aaa680065cdb308068e7f999f2ba7e2ffbc3b743715d2db968858f41cf104c59e1e98d6cda74baea54755e7c9edc29711c3b1daa87d63107ee4017'
+ 'e16e4949c7b66797f85d4e9547f4e47be689c2e3eb320514ba83a2c54f22f860bfc5a729b3be56b89c31336f0e414880d373b5f4d1f8b859710f80da650e9c31')
prepare() {
cd "envoy-$pkgver"
patch -Np1 -i ../use_bazelisk.patch
+ patch -Np1 -i ../fix_wee8_build.patch
export GOPATH="$srcdir"/go
@@ -46,7 +49,19 @@ prepare() {
build() {
cd "envoy-$pkgver"
- $BAZELISK build --workspace_status_command bazel/get_workspace_status --config=clang --verbose_failures -c opt //source/exe:envoy-static
+ $BAZELISK build \
+ --workspace_status_command bazel/get_workspace_status \
+ --config=clang --verbose_failures -c opt \
+ --features=-default_compile_flags \
+ --copt=-g \
+ --copt=-fstack-protector \
+ --copt=-fcolor-diagnostics \
+ --copt=-D_FORTIFY_SOURCE=1 \
+ --copt=-O2 \
+ --copt=-DNDEBUG \
+ --copt=-ffunction-sections \
+ --copt=-fdata-sections \
+ //source/exe:envoy-static
}
package() {
diff --git a/fix_wee8_build.patch b/fix_wee8_build.patch
new file mode 100644
index 0000000..a06888a
--- /dev/null
+++ b/fix_wee8_build.patch
@@ -0,0 +1,13 @@
+diff --git a/bazel/external/wee8.genrule_cmd b/bazel/external/wee8.genrule_cmd
+index 7b175a1f2..e335ee589 100644
+--- a/bazel/external/wee8.genrule_cmd
++++ b/bazel/external/wee8.genrule_cmd
+@@ -39,7 +39,7 @@ fi
+
+ if $${CXX} --version 2>&1 | grep -q clang ; then
+ export IS_CLANG=true
+- export CXXFLAGS="$${CXXFLAGS} -Wno-implicit-int-float-conversion -Wno-builtin-assume-aligned-alignment -Wno-final-dtor-non-final-class -Wno-invalid-constexpr"
++ export CXXFLAGS="$${CXXFLAGS} -Wno-implicit-int-float-conversion -Wno-builtin-assume-aligned-alignment -Wno-final-dtor-non-final-class -Wno-invalid-constexpr -Wno-invalid-offsetof"
+ else
+ export IS_CLANG=false
+ fi
--
2.32.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment