* [Buildroot] [PATCH-for-master] boot/syslinux: fix build with EFI support
@ 2019-02-26 11:13 Carlos Santos
2019-02-26 12:09 ` Peter Korsgaard
0 siblings, 1 reply; 3+ messages in thread
From: Carlos Santos @ 2019-02-26 11:13 UTC (permalink / raw)
To: buildroot
Commit 1a437fd22f bumped gnu-efi to version 3.0.9. This breaks the build
of syslinux with EFI support due to multiple definitions of 'memset' and
'memcpy'. Backport a patch already applied upstream to fix the problem.
Signed-off-by: Carlos Santos <casantos@datacom.com.br>
---
...0013-Fix-build-with-gnu-efi-version-3.0.9.patch | 45 ++++++++++++++++++++++
1 file changed, 45 insertions(+)
create mode 100644 boot/syslinux/0013-Fix-build-with-gnu-efi-version-3.0.9.patch
diff --git a/boot/syslinux/0013-Fix-build-with-gnu-efi-version-3.0.9.patch b/boot/syslinux/0013-Fix-build-with-gnu-efi-version-3.0.9.patch
new file mode 100644
index 0000000000..17a6d37cef
--- /dev/null
+++ b/boot/syslinux/0013-Fix-build-with-gnu-efi-version-3.0.9.patch
@@ -0,0 +1,45 @@
+From 44a1b42e561b9a257209300e2860b901b100cc17 Mon Sep 17 00:00:00 2001
+From: Carlos Santos <casantos@datacom.com.br>
+Date: Tue, 26 Feb 2019 08:07:22 -0300
+Subject: [PATCH] Fix build with gnu-efi version 3.0.9
+
+Adapt a patch already applied upstream to prevent multiple definitions
+of 'memset' and 'memcpy'.
+
+Signed-off-by: Carlos Santos <casantos@datacom.com.br>
+(adapted from commit 363d61c4f112b972649b19d67e96b9321f738f00)
+---
+ mk/lib.mk | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/mk/lib.mk b/mk/lib.mk
+index ceb95bd0..c9b6eaf3 100644
+--- a/mk/lib.mk
++++ b/mk/lib.mk
+@@ -186,9 +186,9 @@ MINLIBOBJS = \
+ # $(LIBVESA_OBJS)
+
+ CORELIBOBJS = \
+- memcpy.o memset.o memcmp.o printf.o strncmp.o vfprintf.o \
++ memcmp.o printf.o strncmp.o vfprintf.o \
+ strlen.o vsnprintf.o snprintf.o stpcpy.o strcmp.o strdup.o \
+- strcpy.o strncpy.o setjmp.o fopen.o fread.o fread2.o puts.o \
++ strcpy.o strncpy.o fopen.o fread.o fread2.o puts.o \
+ strtoul.o strntoumax.o strcasecmp.o \
+ sprintf.o strlcat.o strchr.o strlcpy.o strncasecmp.o ctypes.o \
+ fputs.o fwrite2.o fwrite.o fgetc.o fclose.o lmalloc.o \
+@@ -203,6 +203,11 @@ CORELIBOBJS = \
+ $(LIBENTRY_OBJS) \
+ $(LIBMODULE_OBJS)
+
++ifndef EFI_BUILD
++# For EFI, these are part of gnu-efi
++CORELIBOBJS += setjmp.o memcpy.o memset.o
++endif
++
+ LDFLAGS = -m elf_$(ARCH) --hash-style=gnu -T $(com32)/lib/$(ARCH)/elf.ld
+
+ .SUFFIXES: .c .o .a .so .lo .i .S .s .ls .ss .lss
+--
+2.14.5
+
--
2.14.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH-for-master] boot/syslinux: fix build with EFI support
2019-02-26 11:13 [Buildroot] [PATCH-for-master] boot/syslinux: fix build with EFI support Carlos Santos
@ 2019-02-26 12:09 ` Peter Korsgaard
2019-02-26 17:04 ` Thomas Petazzoni
0 siblings, 1 reply; 3+ messages in thread
From: Peter Korsgaard @ 2019-02-26 12:09 UTC (permalink / raw)
To: buildroot
>>>>> "Carlos" == Carlos Santos <casantos@datacom.com.br> writes:
> Commit 1a437fd22f bumped gnu-efi to version 3.0.9. This breaks the build
> of syslinux with EFI support due to multiple definitions of 'memset' and
> 'memcpy'. Backport a patch already applied upstream to fix the problem.
> Signed-off-by: Carlos Santos <casantos@datacom.com.br>
Committed, thanks.
I guess we don't have any tests or autobuilder runs for this, we
probably should add one.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH-for-master] boot/syslinux: fix build with EFI support
2019-02-26 12:09 ` Peter Korsgaard
@ 2019-02-26 17:04 ` Thomas Petazzoni
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2019-02-26 17:04 UTC (permalink / raw)
To: buildroot
On Tue, 26 Feb 2019 13:09:00 +0100
Peter Korsgaard <peter@korsgaard.com> wrote:
> I guess we don't have any tests or autobuilder runs for this, we
> probably should add one.
Oh, yes, more runtime tests (even if they are just build testing) for
bootloader/firmware stuff would be *very* useful.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-02-26 17:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-26 11:13 [Buildroot] [PATCH-for-master] boot/syslinux: fix build with EFI support Carlos Santos
2019-02-26 12:09 ` Peter Korsgaard
2019-02-26 17:04 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox