pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/xentools413 When compiling with -fwhole-progr...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/928f1f997917
branches:  trunk
changeset: 446145:928f1f997917
user:      bouyer <bouyer%pkgsrc.org@localhost>
date:      Thu Feb 04 23:51:51 2021 +0000

description:
When compiling with -fwhole-program gcc will omit functions which
are not used in the file, even if not declared static.
Add __attribute__((externally_visible)) to memcpy() to force gcc to
include it.
Fixes build on -current (gcc 9)
This is a build fix so no PKGREVISION bump

diffstat:

 sysutils/xentools413/distinfo                                         |   3 +-
 sysutils/xentools413/patches/patch-.._seabios-rel-1.12.1_src_string.c |  18 ++++++++++
 2 files changed, 20 insertions(+), 1 deletions(-)

diffs (39 lines):

diff -r b435b1e7693a -r 928f1f997917 sysutils/xentools413/distinfo
--- a/sysutils/xentools413/distinfo     Thu Feb 04 23:15:43 2021 +0000
+++ b/sysutils/xentools413/distinfo     Thu Feb 04 23:51:51 2021 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.8 2021/02/03 22:30:21 bouyer Exp $
+$NetBSD: distinfo,v 1.9 2021/02/04 23:51:51 bouyer Exp $
 
 SHA1 (xen413/ipxe-1dd56dbd11082fb622c2ed21cfaced4f47d798a6.tar.gz) = b78d21457bc07b4c4d3e770109c169ddafdacdf5
 RMD160 (xen413/ipxe-1dd56dbd11082fb622c2ed21cfaced4f47d798a6.tar.gz) = 846dbcc0f56e87fca8c87b00ca2ed031471d4246
@@ -12,6 +12,7 @@
 RMD160 (xen413/xen-4.13.2.tar.gz) = 96727c20bd84338f8c67c7c584c01ef877bbcb18
 SHA512 (xen413/xen-4.13.2.tar.gz) = cd3092281c97e9421e303aa288aac04dcccd5536ba7c0ff4d51fbf3d07b5ffacfe3456ba06f5cf63577dafbf8cf3a5d9825ceb5e9ef8ca1427900cc3e57b50a3
 Size (xen413/xen-4.13.2.tar.gz) = 39037826 bytes
+SHA1 (patch-.._seabios-rel-1.12.1_src_string.c) = 8b4091daf0b653cfd4db51d2c09b5b42a08f6311
 SHA1 (patch-Config.mk) = c41005a60de2f94a72b0206030eb021c137653d3
 SHA1 (patch-Makefile) = 6c580cbea532d08a38cf5e54228bd0210a98da21
 SHA1 (patch-XSA115-c) = 7e3216a23c522fc73f47fa6deef8918c4dce7fae
diff -r b435b1e7693a -r 928f1f997917 sysutils/xentools413/patches/patch-.._seabios-rel-1.12.1_src_string.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xentools413/patches/patch-.._seabios-rel-1.12.1_src_string.c     Thu Feb 04 23:51:51 2021 +0000
@@ -0,0 +1,18 @@
+$NetBSD: patch-.._seabios-rel-1.12.1_src_string.c,v 1.1 2021/02/04 23:51:51 bouyer Exp $
+
+when the code is compiled -fwhole-program, memcpy() will be ommitted by gcc
+because nothing in the file references it. Later the link fails with
+undefined references to memcpy().
+Force the inclusion with (externally_visible) attribute
+
+--- ../seabios-rel-1.12.1/src/string.c.orig    2021-02-04 23:06:35.686612339 +0100
++++ ../seabios-rel-1.12.1/src/string.c 2021-02-04 23:03:33.884883498 +0100
+@@ -149,7 +149,7 @@
+         memcpy(d_fl, s_fl, len);
+ }
+ 
+-void *
++__attribute__((externally_visible)) void *
+ #undef memcpy
+ memcpy(void *d1, const void *s1, size_t len)
+ #if MODESEGMENT == 0



Home | Main Index | Thread Index | Old Index