diff options
| author | Alexander Kanavin <alex.kanavin@gmail.com> | 2023-07-27 16:36:14 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-07-30 09:16:52 +0100 |
| commit | 7943dbae850301433bc81a0080b4f25d4d3102d6 (patch) | |
| tree | 7d3f15dd9324bf2d0f585ae56dbb7ae226b5f919 /meta/recipes-bsp/gnu-efi/gnu-efi_3.0.17.bb | |
| parent | fc8241a60635a86dc977abd917ecb7860f443354 (diff) | |
| download | poky-7943dbae850301433bc81a0080b4f25d4d3102d6.tar.gz | |
gnu-efi: upgrade 3.0.15 -> 3.0.17
Unset LDFLAGS as the standard ones do not work when linking EFI binaries
(the new version of gnu-efi adds various apps).
(From OE-Core rev: b4b94acef1e2c5e5f1185ae165969c8a66038b17)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-bsp/gnu-efi/gnu-efi_3.0.17.bb')
| -rw-r--r-- | meta/recipes-bsp/gnu-efi/gnu-efi_3.0.17.bb | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.17.bb b/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.17.bb new file mode 100644 index 0000000000..547c469d19 --- /dev/null +++ b/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.17.bb | |||
| @@ -0,0 +1,73 @@ | |||
| 1 | SUMMARY = "Libraries for producing EFI binaries" | ||
| 2 | HOMEPAGE = "http://sourceforge.net/projects/gnu-efi/" | ||
| 3 | DESCRIPTION = "GNU-EFI aims to Develop EFI applications for ARM-64, ARM-32, x86_64, IA-64 (IPF), IA-32 (x86), and MIPS platforms using the GNU toolchain and the EFI development environment." | ||
| 4 | SECTION = "devel" | ||
| 5 | LICENSE = "GPL-2.0-or-later | BSD-2-Clause" | ||
| 6 | LIC_FILES_CHKSUM = "file://gnuefi/crt0-efi-arm.S;beginline=4;endline=16;md5=e582764a4776e60c95bf9ab617343d36 \ | ||
| 7 | file://gnuefi/crt0-efi-aarch64.S;beginline=4;endline=16;md5=e582764a4776e60c95bf9ab617343d36 \ | ||
| 8 | file://inc/efishellintf.h;beginline=13;endline=20;md5=202766b79d708eff3cc70fce15fb80c7 \ | ||
| 9 | file://lib/arm/math.c;beginline=2;endline=15;md5=8ed772501da77b2b3345aa6df8744c9e \ | ||
| 10 | file://lib/arm/initplat.c;beginline=2;endline=15;md5=8ed772501da77b2b3345aa6df8744c9e \ | ||
| 11 | file://lib/aarch64/math.c;beginline=2;endline=15;md5=8ed772501da77b2b3345aa6df8744c9e \ | ||
| 12 | file://lib/aarch64/initplat.c;beginline=2;endline=15;md5=8ed772501da77b2b3345aa6df8744c9e \ | ||
| 13 | " | ||
| 14 | |||
| 15 | SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/files/${BP}.tar.bz2 \ | ||
| 16 | file://parallel-make-archives.patch \ | ||
| 17 | file://gnu-efi-3.0.9-fix-clang-build.patch \ | ||
| 18 | " | ||
| 19 | |||
| 20 | SRC_URI[sha256sum] = "7807e903349343a7a142ebb934703a2872235e89688cf586c032b0a1087bcaf4" | ||
| 21 | |||
| 22 | COMPATIBLE_HOST = "(x86_64.*|i.86.*|aarch64.*|arm.*|riscv64.*)-linux" | ||
| 23 | COMPATIBLE_HOST:armv4 = 'null' | ||
| 24 | |||
| 25 | do_configure:linux-gnux32:prepend() { | ||
| 26 | cp ${STAGING_INCDIR}/gnu/stubs-x32.h ${STAGING_INCDIR}/gnu/stubs-64.h | ||
| 27 | cp ${STAGING_INCDIR}/bits/long-double-32.h ${STAGING_INCDIR}/bits/long-double-64.h | ||
| 28 | } | ||
| 29 | |||
| 30 | def gnu_efi_arch(d): | ||
| 31 | import re | ||
| 32 | tarch = d.getVar("TARGET_ARCH") | ||
| 33 | if re.match("i[3456789]86", tarch): | ||
| 34 | return "ia32" | ||
| 35 | return tarch | ||
| 36 | |||
| 37 | do_compile:prepend() { | ||
| 38 | unset LDFLAGS | ||
| 39 | } | ||
| 40 | |||
| 41 | EXTRA_OEMAKE = "'ARCH=${@gnu_efi_arch(d)}' 'CC=${CC}' 'AS=${AS}' 'LD=${LD}' 'AR=${AR}' \ | ||
| 42 | 'RANLIB=${RANLIB}' 'OBJCOPY=${OBJCOPY}' 'PREFIX=${prefix}' 'LIBDIR=${libdir}' \ | ||
| 43 | " | ||
| 44 | |||
| 45 | # gnu-efi's Makefile treats prefix as toolchain prefix, so don't | ||
| 46 | # export it. | ||
| 47 | prefix[unexport] = "1" | ||
| 48 | |||
| 49 | do_install() { | ||
| 50 | oe_runmake install INSTALLROOT="${D}" | ||
| 51 | } | ||
| 52 | |||
| 53 | FILES:${PN} += "${libdir}/*.lds ${libdir}/gnuefi/apps" | ||
| 54 | |||
| 55 | # 64-bit binaries are expected for EFI when targeting X32 | ||
| 56 | INSANE_SKIP:${PN}-dev:append:linux-gnux32 = " arch" | ||
| 57 | INSANE_SKIP:${PN}-dev:append:linux-muslx32 = " arch" | ||
| 58 | |||
| 59 | BBCLASSEXTEND = "native" | ||
| 60 | |||
| 61 | # It doesn't support sse, its make.defaults sets: | ||
| 62 | # CFLAGS += -mno-mmx -mno-sse | ||
| 63 | # So also remove -mfpmath=sse from TUNE_CCARGS | ||
| 64 | TUNE_CCARGS:remove = "-mfpmath=sse" | ||
| 65 | |||
| 66 | python () { | ||
| 67 | ccargs = d.getVar('TUNE_CCARGS').split() | ||
| 68 | if '-mx32' in ccargs: | ||
| 69 | # use x86_64 EFI ABI | ||
| 70 | ccargs.remove('-mx32') | ||
| 71 | ccargs.append('-m64') | ||
| 72 | d.setVar('TUNE_CCARGS', ' '.join(ccargs)) | ||
| 73 | } | ||
