From eb8dc40360f0cfef56fb6947cc817a547d6d9bc6 Mon Sep 17 00:00:00 2001 From: Dave Cobbley Date: Tue, 14 Aug 2018 10:05:37 -0700 Subject: [Subtree] Removing import-layers directory As part of the move to subtrees, need to bring all the import layers content to the top level. Change-Id: I4a163d10898cbc6e11c27f776f60e1a470049d8f Signed-off-by: Dave Cobbley Signed-off-by: Brad Bishop --- .../gnu-efi/gnu-efi/gcc46-compatibility.patch | 35 +++++++++++ .../gnu-efi/lib-Makefile-fix-parallel-issue.patch | 38 ++++++++++++ .../gnu-efi/gnu-efi/parallel-make-archives.patch | 54 ++++++++++++++++ poky/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.6.bb | 71 ++++++++++++++++++++++ 4 files changed, 198 insertions(+) create mode 100644 poky/meta/recipes-bsp/gnu-efi/gnu-efi/gcc46-compatibility.patch create mode 100644 poky/meta/recipes-bsp/gnu-efi/gnu-efi/lib-Makefile-fix-parallel-issue.patch create mode 100644 poky/meta/recipes-bsp/gnu-efi/gnu-efi/parallel-make-archives.patch create mode 100644 poky/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.6.bb (limited to 'poky/meta/recipes-bsp/gnu-efi') diff --git a/poky/meta/recipes-bsp/gnu-efi/gnu-efi/gcc46-compatibility.patch b/poky/meta/recipes-bsp/gnu-efi/gnu-efi/gcc46-compatibility.patch new file mode 100644 index 000000000..69efd34e2 --- /dev/null +++ b/poky/meta/recipes-bsp/gnu-efi/gnu-efi/gcc46-compatibility.patch @@ -0,0 +1,35 @@ +From 8d16ae374c5d4d9fac45c002605a66cfb8c08be5 Mon Sep 17 00:00:00 2001 +From: Steve Langasek +Date: Wed, 9 Sep 2015 08:26:06 +0000 +Subject: [PATCH 3/3] gnu-efi, syslinux: Support gcc < 4.7 + +don't break with old compilers and -DGNU_EFI_USE_MS_ABI +It's entirely legitimate to request GNU_EFI_USE_MS_ABI even if the current +compiler doesn't support it, and gnu-efi should transparently fall back to +using legacy techniques to set the calling convention. We don't get type +checking, but at least it will still compile. + +Author: Steve Langasek +Upstream-Status: Pending +[Rebased for 3.0.6] +Signed-off-by: California Sullivan +--- + inc/x86_64/efibind.h | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/inc/x86_64/efibind.h b/inc/x86_64/efibind.h +index 4309f9f..02c0af1 100644 +--- a/inc/x86_64/efibind.h ++++ b/inc/x86_64/efibind.h +@@ -25,8 +25,6 @@ Revision History + #if defined(GNU_EFI_USE_MS_ABI) + #if (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)))||(defined(__clang__) && (__clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 2))) + #define HAVE_USE_MS_ABI 1 +- #else +- #error Compiler is too old for GNU_EFI_USE_MS_ABI + #endif + #endif + +-- +2.9.4 + diff --git a/poky/meta/recipes-bsp/gnu-efi/gnu-efi/lib-Makefile-fix-parallel-issue.patch b/poky/meta/recipes-bsp/gnu-efi/gnu-efi/lib-Makefile-fix-parallel-issue.patch new file mode 100644 index 000000000..1b2ae1ef0 --- /dev/null +++ b/poky/meta/recipes-bsp/gnu-efi/gnu-efi/lib-Makefile-fix-parallel-issue.patch @@ -0,0 +1,38 @@ +From 0daa354a16aa3cade56ed423d0f8a04cf1c22f9d Mon Sep 17 00:00:00 2001 +From: Robert Yang +Date: Thu, 23 Apr 2015 01:49:31 -0700 +Subject: [PATCH] lib/Makefile: fix parallel issue + +Fixed: +Assembler messages: +Fatal error: can't create runtime/rtlock.o: No such file or directory +Assembler messages: +Fatal error: can't create runtime/rtdata.o: No such file or directory +Assembler messages: +Fatal error: can't create runtime/vm.o: No such file or directory +Assembler messages: +Fatal error: can't create runtime/efirtlib.o: No such file or directory + +Upstream-Status: Pending + +Signed-off-by: Robert Yang +--- + lib/Makefile | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/lib/Makefile b/lib/Makefile +index dc4b94a..f64d1ed 100644 +--- a/lib/Makefile ++++ b/lib/Makefile +@@ -73,6 +73,8 @@ all: libsubdirs libefi.a + libsubdirs: + for sdir in $(SUBDIRS); do mkdir -p $$sdir; done + ++$(OBJS): libsubdirs ++ + libefi.a: $(OBJS) + $(AR) rv $@ $(OBJS) + +-- +1.7.9.5 + diff --git a/poky/meta/recipes-bsp/gnu-efi/gnu-efi/parallel-make-archives.patch b/poky/meta/recipes-bsp/gnu-efi/gnu-efi/parallel-make-archives.patch new file mode 100644 index 000000000..0110260bd --- /dev/null +++ b/poky/meta/recipes-bsp/gnu-efi/gnu-efi/parallel-make-archives.patch @@ -0,0 +1,54 @@ +From 16865de66db33ca70872199e70d93efccecc8575 Mon Sep 17 00:00:00 2001 +From: Saul Wold +Date: Sun, 9 Mar 2014 15:22:15 +0200 +Subject: [PATCH 1/3] Fix parallel make failure for archives + +Upstream-Status: Pending + +The lib and gnuefi makefiles were using the lib.a() form which compiles +and ar's as a pair instead of compiling all and then ar'ing which can +parallelize better. This was resulting in build failures on larger values +of -j. + +See http://www.chemie.fu-berlin.de/chemnet/use/info/make/make_toc.html#TOC105 +for details. + +Signed-off-by: Saul Wold +Signed-off-by: Darren Hart +[Rebased for 3.0.6] +Signed-off-by: California Sullivan +--- + gnuefi/Makefile | 3 ++- + lib/Makefile | 2 +- + 2 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/gnuefi/Makefile b/gnuefi/Makefile +index 2a61699..148106e 100644 +--- a/gnuefi/Makefile ++++ b/gnuefi/Makefile +@@ -54,7 +54,8 @@ TARGETS = crt0-efi-$(ARCH).o libgnuefi.a + + all: $(TARGETS) + +-libgnuefi.a: $(patsubst %,libgnuefi.a(%),$(OBJS)) ++libgnuefi.a: $(OBJS) ++ $(AR) rv $@ $(OBJS) + + clean: + rm -f $(TARGETS) *~ *.o $(OBJS) +diff --git a/lib/Makefile b/lib/Makefile +index b8d1ce7..6ef8107 100644 +--- a/lib/Makefile ++++ b/lib/Makefile +@@ -75,7 +75,7 @@ libsubdirs: + for sdir in $(SUBDIRS); do mkdir -p $$sdir; done + + libefi.a: $(OBJS) +- $(AR) rv -U $@ $^ ++ $(AR) rv $@ $(OBJS) + + clean: + rm -f libefi.a *~ $(OBJS) */*.o +-- +2.9.4 + diff --git a/poky/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.6.bb b/poky/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.6.bb new file mode 100644 index 000000000..2a6071748 --- /dev/null +++ b/poky/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.6.bb @@ -0,0 +1,71 @@ +SUMMARY = "Libraries for producing EFI binaries" +HOMEPAGE = "http://sourceforge.net/projects/gnu-efi/" +SECTION = "devel" +LICENSE = "GPLv2+ | BSD-2-Clause" +LIC_FILES_CHKSUM = "file://gnuefi/crt0-efi-arm.S;beginline=4;endline=16;md5=e582764a4776e60c95bf9ab617343d36 \ + file://gnuefi/crt0-efi-aarch64.S;beginline=4;endline=16;md5=e582764a4776e60c95bf9ab617343d36 \ + file://inc/efishellintf.h;beginline=13;endline=20;md5=202766b79d708eff3cc70fce15fb80c7 \ + file://inc/efishellparm.h;beginline=4;endline=11;md5=468b1231b05bbc84bae3a0d5774e3bb5 \ + file://lib/arm/math.c;beginline=2;endline=15;md5=8ed772501da77b2b3345aa6df8744c9e \ + file://lib/arm/initplat.c;beginline=2;endline=15;md5=8ed772501da77b2b3345aa6df8744c9e \ + file://lib/aarch64/math.c;beginline=2;endline=15;md5=8ed772501da77b2b3345aa6df8744c9e \ + file://lib/aarch64/initplat.c;beginline=2;endline=15;md5=8ed772501da77b2b3345aa6df8744c9e \ + " + +SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.bz2 \ + file://parallel-make-archives.patch \ + file://lib-Makefile-fix-parallel-issue.patch \ + file://gcc46-compatibility.patch \ + " + +SRC_URI[md5sum] = "46f633758a8a37db9fd6909fe270c26b" +SRC_URI[sha256sum] = "21515902d80fbea23328a61d70d3d51a47204abd1507ebfa27550a7b9bf22c91" + +COMPATIBLE_HOST = "(x86_64.*|i.86.*|aarch64.*|arm.*)-linux" +COMPATIBLE_HOST_armv4 = 'null' + +do_configure_linux-gnux32_prepend() { + cp ${STAGING_INCDIR}/gnu/stubs-x32.h ${STAGING_INCDIR}/gnu/stubs-64.h + cp ${STAGING_INCDIR}/bits/long-double-32.h ${STAGING_INCDIR}/bits/long-double-64.h +} + +def gnu_efi_arch(d): + import re + tarch = d.getVar("TARGET_ARCH") + if re.match("i[3456789]86", tarch): + return "ia32" + return tarch + +EXTRA_OEMAKE = "'ARCH=${@gnu_efi_arch(d)}' 'CC=${CC}' 'AS=${AS}' 'LD=${LD}' 'AR=${AR}' \ + 'RANLIB=${RANLIB}' 'OBJCOPY=${OBJCOPY}' 'PREFIX=${prefix}' 'LIBDIR=${libdir}' \ + " + +# gnu-efi's Makefile treats prefix as toolchain prefix, so don't +# export it. +prefix[unexport] = "1" + +do_install() { + oe_runmake install INSTALLROOT="${D}" +} + +FILES_${PN} += "${libdir}/*.lds" + +# 64-bit binaries are expected for EFI when targeting X32 +INSANE_SKIP_${PN}-dev_append_linux-gnux32 = " arch" +INSANE_SKIP_${PN}-dev_append_linux-muslx32 = " arch" + +BBCLASSEXTEND = "native" + +# It doesn't support sse, its make.defaults sets: +# CFLAGS += -mno-mmx -mno-sse +# So also remove -mfpmath=sse from TUNE_CCARGS +TUNE_CCARGS_remove = "-mfpmath=sse" + +python () { + ccargs = d.getVar('TUNE_CCARGS').split() + if '-mx32' in ccargs: + # use x86_64 EFI ABI + ccargs.remove('-mx32') + ccargs.append('-m64') + d.setVar('TUNE_CCARGS', ' '.join(ccargs)) +} -- cgit v1.2.3