aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAriadne Conill <ariadne@dereferenced.org>2020-08-24 04:28:59 -0600
committerAriadne Conill <ariadne@dereferenced.org>2020-08-24 04:28:59 -0600
commit0c4a13be77e819e726dd05c0f35612bac6c0caa1 (patch)
treeccbb1ade2d0c9294017cb09ca53662a26da04cda
parentea6102a8f51b1676a0685082602176364784d2f4 (diff)
downloadaports-0c4a13be77e819e726dd05c0f35612bac6c0caa1.tar.gz
aports-0c4a13be77e819e726dd05c0f35612bac6c0caa1.tar.bz2
aports-0c4a13be77e819e726dd05c0f35612bac6c0caa1.tar.xz
main/openrc: fix gcc 10 compile
-rw-r--r--main/openrc/0012-gcc-10.patch48
-rw-r--r--main/openrc/APKBUILD2
2 files changed, 50 insertions, 0 deletions
diff --git a/main/openrc/0012-gcc-10.patch b/main/openrc/0012-gcc-10.patch
new file mode 100644
index 0000000000..ce2fd102d2
--- /dev/null
+++ b/main/openrc/0012-gcc-10.patch
@@ -0,0 +1,48 @@
+https://bugs.gentoo.org/705868
+
+From 375ef42393f3dc6edbaa2cb70c79b2366072db38 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Sun, 19 Jan 2020 15:24:20 +0000
+Subject: [PATCH] src/rc/rc-logger.h: fix build failure against gcc-10
+
+On gcc-10 (and gcc-9 -fno-common) build fails as:
+
+```
+cc -L../librc -L../libeinfo -O2 -g -std=c99 -Wall -Wextra -Wimplicit -Wshadow \
+ -Wformat=2 -Wmissing-prototypes -Wmissing-declarations -Wmissing-noreturn \
+ -Wmissing-format-attribute -Wnested-externs -Winline -Wwrite-strings \
+ -Wcast-align -Wcast-qual -Wpointer-arith -Wdeclaration-after-statement \
+ -Wsequence-point -Werror=implicit-function-declaration \
+ -Wl,-rpath=/lib -o openrc rc.o rc-logger.o rc-misc.o rc-plugin.o _usage.o -lutil -lrc -leinfo -Wl,-Bdynamic -ldl
+ld: rc-logger.o:/home/slyfox/dev/git/openrc/src/rc/rc-logger.h:16:
+ multiple definition of `rc_logger_pid'; rc.o:openrc/src/rc/rc-logger.h:16: first defined here
+ld: rc-logger.o:/home/slyfox/dev/git/openrc/src/rc/rc-logger.h:17:
+ multiple definition of `rc_logger_tty'; rc.o:openrc/src/rc/rc-logger.h:17: 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.
+
+This fixes #348.
+---
+ src/rc/rc-logger.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/src/rc/rc-logger.h
++++ b/src/rc/rc-logger.h
+@@ -13,8 +13,8 @@
+ #ifndef RC_LOGGER_H
+ #define RC_LOGGER_H
+
+-pid_t rc_logger_pid;
+-int rc_logger_tty;
++extern pid_t rc_logger_pid;
++extern int rc_logger_tty;
+ extern bool rc_in_logger;
+
+ void rc_logger_open(const char *runlevel);
+--
+2.25.2
+
diff --git a/main/openrc/APKBUILD b/main/openrc/APKBUILD
index 66f5974dd2..69a435e0e1 100644
--- a/main/openrc/APKBUILD
+++ b/main/openrc/APKBUILD
@@ -25,6 +25,7 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/OpenRC/openrc/archive/$pkgve
0009-Support-early-loading-of-keymap-if-kdb-is-installed.patch
0010-rc-mount-make-timeout-invocation-compatible-with-bus.patch
0011-vrf.patch
+ 0012-gcc-10.patch
openrc.logrotate
hostname.initd
@@ -126,6 +127,7 @@ d2b8700f56b05579926352855de8fcee5cf78f0c13200643a5195f8c60e2b5082d476b42cc77b132
667085d89e194f7e2255d5c098c3d8de272f54cb925710cb98d5e7a6b58982d0acfe15f97b574cfc646b139cd7aa5b527ba700ef9b8048a6d6d9dee8cc74913c 0009-Support-early-loading-of-keymap-if-kdb-is-installed.patch
ff9bf2f6e4f55633a9641385398f70a2e591e2b3b56b1903f168a97b07bd56dc5a65d151deeab94229452b2e892b597c16dc3d57d5d47ec35a48cf5343190c36 0010-rc-mount-make-timeout-invocation-compatible-with-bus.patch
34c5b1157d9f1e26f9c9121b649f7a31c32f3bdd62a17f451d3391f276ec8ca82623c1b917506867647523d18a1ee665a17d261ac12ff1732ab5c19cfaf91aac 0011-vrf.patch
+24c665098475c8a1dca75677b48864dc554930f8039900785d8f73c4ebab857255607297fdcbce6249f18f2b97bd7804a35a782721d4658a1c7a7b7b985418ff 0012-gcc-10.patch
12bb6354e808fbf47bbab963de55ee7901738b4a912659982c57ef2777fff9a670e867fcb8ec316a76b151032c92dc89a950d7d1d835ef53f753a8f3b41d2cec openrc.logrotate
493f27d588e64bb2bb542b32493ed05873f4724e8ad1751002982d7b4e07963cfb72f93603b2d678f305177cf9556d408a87b793744c6b7cd46cf9be4b744c02 hostname.initd
c06eac7264f6cc6888563feeae5ca745aae538323077903de1b19102e4f16baa34c18b8c27af5dd5423e7670834e2261e9aa55f2b1ec8d8fdc2be105fe894d55 hwdrivers.initd