public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Yixun Lan" <dlan@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/zerotier/files/, net-misc/zerotier/
Date: Mon, 13 Nov 2023 12:12:20 +0000 (UTC)	[thread overview]
Message-ID: <1699877198.d71a4483a05c58244ca99b561853436ce510c1fa.dlan@gentoo> (raw)

commit:     d71a4483a05c58244ca99b561853436ce510c1fa
Author:     Alfred Wingate <parona <AT> protonmail <DOT> com>
AuthorDate: Thu Nov  2 03:57:07 2023 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Mon Nov 13 12:06:38 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d71a4483

net-misc/zerotier: fix build on llvm toolchain

Closes: https://github.com/gentoo/gentoo/pull/33640
Signed-off-by: Alfred Wingate <parona <AT> protonmail.com>
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 .../files/zerotier-1.12.2-noexecstack.patch        | 24 ++++++++++++++++++++++
 net-misc/zerotier/zerotier-1.12.2.ebuild           |  7 ++-----
 2 files changed, 26 insertions(+), 5 deletions(-)

diff --git a/net-misc/zerotier/files/zerotier-1.12.2-noexecstack.patch b/net-misc/zerotier/files/zerotier-1.12.2-noexecstack.patch
new file mode 100644
index 000000000000..2888577d13ba
--- /dev/null
+++ b/net-misc/zerotier/files/zerotier-1.12.2-noexecstack.patch
@@ -0,0 +1,24 @@
+https://github.com/zerotier/ZeroTierOne/pull/2161
+
+From e171384c19bb0c0dfe0368e4f249dd6a30d33748 Mon Sep 17 00:00:00 2001
+From: Alfred Wingate <parona@protonmail.com>
+Date: Sun, 29 Oct 2023 13:48:07 +0200
+Subject: [PATCH] Append noexecstack to linker flags instead of assembler flags
+
+* Better compatibility with LLVM toolchain where clang -c doesn't
+  support the flag, but the linker does. LLD already defaults to
+  noexecstack, but adding it in the linker phase will avoid errors about
+  unsupported options.
+
+Signed-off-by: Alfred Wingate <parona@protonmail.com>
+--- a/make-linux.mk
++++ b/make-linux.mk
+@@ -358,7 +358,7 @@ override CFLAGS+=-fPIC -fPIE
+ override CXXFLAGS+=-fPIC -fPIE
+ 
+ # Non-executable stack
+-override ASFLAGS+=--noexecstack
++override LDFLAGS+=-Wl,-z,noexecstack
+ 
+ .PHONY: all
+ all:	one

diff --git a/net-misc/zerotier/zerotier-1.12.2.ebuild b/net-misc/zerotier/zerotier-1.12.2.ebuild
index fb7ba2cbffc8..d380ca84b14c 100644
--- a/net-misc/zerotier/zerotier-1.12.2.ebuild
+++ b/net-misc/zerotier/zerotier-1.12.2.ebuild
@@ -191,7 +191,7 @@ declare -A GIT_CRATES=(
 	[jwt]='https://github.com/glimberg/rust-jwt;61a9291fdeec747c6edf14f4fa0caf235136c168;rust-jwt-%commit%'
 )
 
-inherit cargo flag-o-matic systemd toolchain-funcs
+inherit cargo systemd toolchain-funcs
 
 DESCRIPTION="A software-based managed Ethernet switch for planet Earth"
 HOMEPAGE="https://www.zerotier.com/"
@@ -225,6 +225,7 @@ BDEPEND="
 PATCHES=(
 	"${FILESDIR}"/${PN}-1.10.1-respect-ldflags.patch
 	"${FILESDIR}"/${PN}-1.10.1-add-armv7a-support.patch
+	"${FILESDIR}"/${PN}-1.12.2-noexecstack.patch
 )
 
 DOCS=( README.md AUTHORS.md )
@@ -248,10 +249,6 @@ src_prepare() {
 src_configure() {
 	tc-export CXX CC
 
-	# Several assembler files without GNU-stack markings
-	# https://github.com/zerotier/ZeroTierOne/issues/1179
-	append-ldflags -Wl,-z,noexecstack
-
 	use cpu_flags_arm_neon || export ZT_DISABLE_NEON=1
 
 	use sso && cargo_src_configure


             reply	other threads:[~2023-11-13 12:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-13 12:12 Yixun Lan [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-08-22 11:55 [gentoo-commits] repo/gentoo:master commit in: net-misc/zerotier/files/, net-misc/zerotier/ Yixun Lan
2024-05-22  3:06 Yixun Lan
2023-10-05 20:20 Sam James
2021-03-16 19:57 Sam James
2017-07-06 22:08 Patrice Clement

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1699877198.d71a4483a05c58244ca99b561853436ce510c1fa.dlan@gentoo \
    --to=dlan@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox