summaryrefslogtreecommitdiff
path: root/sysutils/xentools415/patches/patch-.._seabios-rel-1.14.0_src_string.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysutils/xentools415/patches/patch-.._seabios-rel-1.14.0_src_string.c')
-rw-r--r--sysutils/xentools415/patches/patch-.._seabios-rel-1.14.0_src_string.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/sysutils/xentools415/patches/patch-.._seabios-rel-1.14.0_src_string.c b/sysutils/xentools415/patches/patch-.._seabios-rel-1.14.0_src_string.c
new file mode 100644
index 00000000000..fc5697bde69
--- /dev/null
+++ b/sysutils/xentools415/patches/patch-.._seabios-rel-1.14.0_src_string.c
@@ -0,0 +1,18 @@
+$NetBSD: patch-.._seabios-rel-1.14.0_src_string.c,v 1.1 2021/04/18 12:31:26 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.14.0/src/string.c.orig 2021-04-17 22:32:25.409876075 +0200
++++ ../seabios-rel-1.14.0/src/string.c 2021-04-17 22:32:39.873615679 +0200
+@@ -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