From: "Sergei Trofimovich" <slyfox@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-vpn/strongswan/, net-vpn/strongswan/files/
Date: Wed, 26 Feb 2020 08:51:40 +0000 (UTC) [thread overview]
Message-ID: <1582707091.0ee270245a780c0bbf41e7d59d26fe7ae7fcc116.slyfox@gentoo> (raw)
commit: 0ee270245a780c0bbf41e7d59d26fe7ae7fcc116
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 26 08:47:33 2020 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Wed Feb 26 08:51:31 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0ee27024
net-vpn/strongswan: tweak for gcc-10, bug #706408
Closes: https://bugs.gentoo.org/706408
Package-Manager: Portage-2.3.89, Repoman-2.3.20
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
.../strongswan/files/strongswan-5.8.2-gcc-10.patch | 45 ++++++++++++++++++++++
net-vpn/strongswan/strongswan-5.8.2.ebuild | 4 +-
2 files changed, 48 insertions(+), 1 deletion(-)
diff --git a/net-vpn/strongswan/files/strongswan-5.8.2-gcc-10.patch b/net-vpn/strongswan/files/strongswan-5.8.2-gcc-10.patch
new file mode 100644
index 00000000000..a7be11729c7
--- /dev/null
+++ b/net-vpn/strongswan/files/strongswan-5.8.2-gcc-10.patch
@@ -0,0 +1,45 @@
+https://bugs.gentoo.org/706408
+https://github.com/strongswan/strongswan/pull/163
+
+From a1f73a67aed56628c4655caa1ae50a6a2e4ec639 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Sun, 26 Jan 2020 11:03:27 +0000
+Subject: [PATCH] swanctl: fix build failure against gcc-10
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+On gcc-10 (and gcc-9 -fno-common) build fails as:
+
+```
+libtool: link: gcc ... -o .libs/swanctl ...
+ld: commands/load_authorities.o:strongswan/src/swanctl/./swanctl.h:33:
+ multiple definition of `swanctl_dir'; commands/load_all.o:strongswan/src/swanctl/./swanctl.h:33: first defined here
+```
+
+gcc-10 will change the default from -fcommon to fno-common:
+https://gcc.gnu.org/PR85678.
+
+The error also happens if CFLAGS=-fno-common passed explicitly.
+
+Reported-by: Toralf Förster
+Bug: https://bugs.gentoo.org/706408
+Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+---
+ src/swanctl/swanctl.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/src/swanctl/swanctl.h
++++ b/src/swanctl/swanctl.h
+@@ -30,7 +30,7 @@
+ /**
+ * Base directory for credentials and config
+ */
+-char *swanctl_dir;
++extern char *swanctl_dir;
+
+ /**
+ * Configuration file for connections, etc.
+--
+2.25.0
+
diff --git a/net-vpn/strongswan/strongswan-5.8.2.ebuild b/net-vpn/strongswan/strongswan-5.8.2.ebuild
index 2ab3a0ed5d3..bfcd20769ca 100644
--- a/net-vpn/strongswan/strongswan-5.8.2.ebuild
+++ b/net-vpn/strongswan/strongswan-5.8.2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
@@ -45,6 +45,8 @@ RDEPEND="${COMMON_DEPEND}
!net-vpn/libreswan
selinux? ( sec-policy/selinux-ipsec )"
+PATCHES=("${FILESDIR}"/${P}-gcc-10.patch)
+
UGID="ipsec"
pkg_setup() {
next reply other threads:[~2020-02-26 8:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-26 8:51 Sergei Trofimovich [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-08-31 21:25 [gentoo-commits] repo/gentoo:master commit in: net-vpn/strongswan/, net-vpn/strongswan/files/ Thomas Deutschmann
2022-05-19 2:20 Sam James
2023-01-06 17:45 John Helmert III
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=1582707091.0ee270245a780c0bbf41e7d59d26fe7ae7fcc116.slyfox@gentoo \
--to=slyfox@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