Gentoo Archives: gentoo-commits

From: Mike Gilbert <floppym@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/systemd/files/, sys-apps/systemd/
Date: Sun, 26 Jan 2020 17:19:06
Message-Id: 1580059138.7c0cb0a875021f18b06ab03e85e5163f773830eb.floppym@gentoo
1 commit: 7c0cb0a875021f18b06ab03e85e5163f773830eb
2 Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jan 26 17:18:58 2020 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Sun Jan 26 17:18:58 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7c0cb0a8
7
8 sys-apps/systemd: fix build with gcc 10
9
10 Package-Manager: Portage-2.3.85_p2, Repoman-2.3.20_p36
11 Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
12
13 sys-apps/systemd/files/244-efi-gcc-10.patch | 40 +++++++++++++++++++++++++++++
14 sys-apps/systemd/systemd-244.ebuild | 1 +
15 2 files changed, 41 insertions(+)
16
17 diff --git a/sys-apps/systemd/files/244-efi-gcc-10.patch b/sys-apps/systemd/files/244-efi-gcc-10.patch
18 new file mode 100644
19 index 00000000000..ce37ac300be
20 --- /dev/null
21 +++ b/sys-apps/systemd/files/244-efi-gcc-10.patch
22 @@ -0,0 +1,40 @@
23 +From 2c3ab079560664926189d5135b08eccc9797ab9e Mon Sep 17 00:00:00 2001
24 +From: Susant Sahani <ssahani@××××××.com>
25 +Date: Sat, 25 Jan 2020 11:30:08 +0100
26 +Subject: [PATCH] efi: fix build.
27 +
28 +```
29 +ninja -C build
30 +ninja: Entering directory `build'
31 +[29/101] Generating systemd_boot.so with a custom command.
32 +FAILED: src/boot/efi/systemd_boot.so
33 +/usr/bin/ld -o src/boot/efi/systemd_boot.so -T /usr/lib64/gnuefi/elf_x64_efi.lds -shared -Bsymbolic -nostdlib -znocombreloc -L /usr/lib64 /usr/lib64/gnuefi/crt0-efi-x64.o src/boot/efi/disk.c.o src/boot/efi/graphics.c.o src/boot/efi/measure.c.o src/boot/efi/pe.c.o src/boot/efi/util.c.o src/boot/efi/boot.c.o src/boot/efi/console.c.o src/boot/efi/crc32.c.o src/boot/efi/random-seed.c.o src/boot/efi/sha256.c.o src/boot/efi/shim.c.o -lefi -lgnuefi /usr/lib/gcc/x86_64-redhat-linux/10/libgcc.a
34 +/usr/bin/ld: src/boot/efi/graphics.c.o:/home/sus/tt/systemd/build/../src/boot/efi/util.h:58: multiple definition of `loader_guid'; src/boot/efi/disk.c.o:/home/sus/tt/systemd/build/../src/boot/efi/util.h:58: first defined here
35 +/usr/bin/ld: src/boot/efi/pe.c.o:/home/sus/tt/systemd/build/../src/boot/efi/util.h:58: multiple definition of `loader_guid'; src/boot/efi/disk.c.o:/home/sus/tt/systemd/build/../src/boot/efi/util.h:58: first defined here
36 +/usr/bin/ld: src/boot/efi/util.c.o:/home/sus/tt/systemd/build/../src/boot/efi/util.h:58: multiple definition of `loader_guid'; src/boot/efi/disk.c.o:/home/sus/tt/systemd/build/../src/boot/efi/util.h:58: first defined here
37 +/usr/bin/ld: src/boot/efi/boot.c.o:/home/sus/tt/systemd/build/../src/boot/efi/util.h:58: multiple definition of `loader_guid'; src/boot/efi/disk.c.o:/home/sus/tt/systemd/build/../src/boot/efi/util.h:58: first defined here
38 +/usr/bin/ld: src/boot/efi/console.c.o:/home/sus/tt/systemd/build/../src/boot/efi/util.h:58: multiple definition of `loader_guid'; src/boot/efi/disk.c.o:/home/sus/tt/systemd/build/../src/boot/efi/util.h:58: first defined here
39 +/usr/bin/ld: src/boot/efi/random-seed.c.o:/home/sus/tt/systemd/build/../src/boot/efi/util.h:58: multiple definition of `loader_guid'; src/boot/efi/disk.c.o:/home/sus/tt/systemd/build/../src/boot/efi/util.h:58: first defined here
40 +/usr/bin/ld: src/boot/efi/shim.c.o:/home/sus/tt/systemd/build/../src/boot/efi/util.h:58: multiple definition of `loader_guid'; src/boot/efi/disk.c.o:/home/sus/tt/systemd/build/../src/boot/efi/util.h:58: first defined here
41 +[31/101] Generating stub.c.o with a custom command.
42 +ninja: build stopped: subcommand failed.
43 +make: *** [Makefile:2: all] Error 1
44 +
45 +```
46 +---
47 + src/boot/efi/util.h | 2 +-
48 + 1 file changed, 1 insertion(+), 1 deletion(-)
49 +
50 +diff --git a/src/boot/efi/util.h b/src/boot/efi/util.h
51 +index 8518dfde77e..b13f22476c6 100644
52 +--- a/src/boot/efi/util.h
53 ++++ b/src/boot/efi/util.h
54 +@@ -55,7 +55,7 @@ static inline void FileHandleClosep(EFI_FILE_HANDLE *handle) {
55 + uefi_call_wrapper((*handle)->Close, 1, *handle);
56 + }
57 +
58 +-const EFI_GUID loader_guid;
59 ++extern const EFI_GUID loader_guid;
60 +
61 + #define UINTN_MAX (~(UINTN)0)
62 + #define INTN_MAX ((INTN)(UINTN_MAX>>1))
63
64 diff --git a/sys-apps/systemd/systemd-244.ebuild b/sys-apps/systemd/systemd-244.ebuild
65 index daed59e210c..948689867c8 100644
66 --- a/sys-apps/systemd/systemd-244.ebuild
67 +++ b/sys-apps/systemd/systemd-244.ebuild
68 @@ -185,6 +185,7 @@ src_prepare() {
69
70 # Add local patches here
71 PATCHES+=(
72 + "${FILESDIR}"/244-efi-gcc-10.patch
73 )
74
75 if ! use vanilla; then