diff options
Diffstat (limited to 'meta/recipes-bsp/gnu-efi/gnu-efi_3.0.18.bb')
-rw-r--r-- | meta/recipes-bsp/gnu-efi/gnu-efi_3.0.18.bb | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.18.bb b/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.18.bb new file mode 100644 index 0000000000..a56a85bdef --- /dev/null +++ b/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.18.bb | |||
@@ -0,0 +1,72 @@ | |||
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://0001-Fix-parallel-make-failure-for-archives.patch \ | ||
17 | file://0002-Do-not-treat-warnings-as-errors.patch \ | ||
18 | " | ||
19 | SRC_URI[sha256sum] = "7f212c96ee66547eeefb531267b641e5473d7d8529f0bd8ccdefd33cf7413f5c" | ||
20 | |||
21 | COMPATIBLE_HOST = "(x86_64.*|i.86.*|aarch64.*|arm.*|riscv64.*)-linux" | ||
22 | COMPATIBLE_HOST:armv4 = 'null' | ||
23 | |||
24 | do_configure:linux-gnux32:prepend() { | ||
25 | cp ${STAGING_INCDIR}/gnu/stubs-x32.h ${STAGING_INCDIR}/gnu/stubs-64.h | ||
26 | cp ${STAGING_INCDIR}/bits/long-double-32.h ${STAGING_INCDIR}/bits/long-double-64.h | ||
27 | } | ||
28 | |||
29 | def gnu_efi_arch(d): | ||
30 | import re | ||
31 | tarch = d.getVar("TARGET_ARCH") | ||
32 | if re.match("i[3456789]86", tarch): | ||
33 | return "ia32" | ||
34 | return tarch | ||
35 | |||
36 | do_compile:prepend() { | ||
37 | unset LDFLAGS | ||
38 | } | ||
39 | |||
40 | EXTRA_OEMAKE = "'ARCH=${@gnu_efi_arch(d)}' 'CC=${CC}' 'AS=${AS}' 'LD=${LD}' 'AR=${AR}' \ | ||
41 | 'RANLIB=${RANLIB}' 'OBJCOPY=${OBJCOPY}' 'PREFIX=${prefix}' 'LIBDIR=${libdir}' \ | ||
42 | " | ||
43 | |||
44 | # gnu-efi's Makefile treats prefix as toolchain prefix, so don't | ||
45 | # export it. | ||
46 | prefix[unexport] = "1" | ||
47 | |||
48 | do_install() { | ||
49 | oe_runmake install INSTALLROOT="${D}" | ||
50 | } | ||
51 | |||
52 | FILES:${PN} += "${libdir}/*.lds ${libdir}/gnuefi/apps" | ||
53 | |||
54 | # 64-bit binaries are expected for EFI when targeting X32 | ||
55 | INSANE_SKIP:${PN}-dev:append:linux-gnux32 = " arch" | ||
56 | INSANE_SKIP:${PN}-dev:append:linux-muslx32 = " arch" | ||
57 | |||
58 | BBCLASSEXTEND = "native" | ||
59 | |||
60 | # It doesn't support sse, its make.defaults sets: | ||
61 | # CFLAGS += -mno-mmx -mno-sse | ||
62 | # So also remove -mfpmath=sse from TUNE_CCARGS | ||
63 | TUNE_CCARGS:remove = "-mfpmath=sse" | ||
64 | |||
65 | python () { | ||
66 | ccargs = d.getVar('TUNE_CCARGS').split() | ||
67 | if '-mx32' in ccargs: | ||
68 | # use x86_64 EFI ABI | ||
69 | ccargs.remove('-mx32') | ||
70 | ccargs.append('-m64') | ||
71 | d.setVar('TUNE_CCARGS', ' '.join(ccargs)) | ||
72 | } | ||