Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 1 | DESCRIPTION = "klibc is intended to be a minimalistic libc subset for \ |
| 2 | use with initramfs. It is deliberately written for small size, \ |
| 3 | minimal entaglement, and portability, not speed." |
| 4 | SECTION = "libs" |
| 5 | LICENSE = "BSD-3-Clause & GPL-2.0 & MIT & Zlib" |
| 6 | LIC_FILES_CHKSUM = "file://usr/klibc/LICENSE;md5=d75181f10e998c21eb147f6d2e43ce8b" |
| 7 | DEPENDS = "linux-libc-headers perl-native" |
| 8 | SRCREV = "4d19974d7020488f63651244e1f9f51727c3f66c" |
| 9 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame^] | 10 | SRC_URI = "git://git.kernel.org/pub/scm/libs/klibc/klibc.git \ |
| 11 | ${ARMPATCHES} \ |
| 12 | file://klibc-linux-libc-dev.patch \ |
| 13 | file://staging.patch \ |
| 14 | file://klcc-consider-sysroot.patch \ |
| 15 | file://0001-dash-Specify-format-string-in-fmtstr.patch \ |
| 16 | file://0001-Define-in_-structs-for-non-glibc-system-libs.patch \ |
| 17 | file://0001-include-linux-sysinfo.h-directly.patch \ |
| 18 | file://0001-mkfifo-Implement-mkfifo.patch \ |
| 19 | file://0001-always-use-bfd-linker.patch \ |
| 20 | " |
| 21 | |
| 22 | ARMPATCHES ?= "" |
| 23 | |
| 24 | ARMPATCHES_arm = "file://klibc-config-eabi.patch \ |
| 25 | file://armv4-fix-v4bx.patch \ |
| 26 | " |
| 27 | |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 28 | |
| 29 | S = "${WORKDIR}/git" |
| 30 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame^] | 31 | PARALLEL_MAKE = "" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 32 | EXTRA_OEMAKE = "'KLIBCARCH=${KLIBC_ARCH}' \ |
| 33 | 'CROSS_COMPILE=${TARGET_PREFIX}' \ |
| 34 | 'KLIBCKERNELSRC=${STAGING_DIR_TARGET}${exec_prefix}' \ |
| 35 | 'KLIBCLIBGCC=${STAGING_DIR_TARGET}${libdir}/${TARGET_SYS}/*/libgcc.a' \ |
| 36 | 'prefix=${exec_prefix}' \ |
| 37 | 'INSTALLROOT=${D}' \ |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 38 | 'INSTALLDIR=${libdir}/klibc' \ |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 39 | 'SHLIBDIR=${libdir}' \ |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame^] | 40 | '${KLIBCTHUMB}' \ |
| 41 | 'KLIBCOPTFLAGS=${TUNE_CCARGS}' \ |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 42 | " |
| 43 | |
| 44 | export FIX_ARMV4_EABI_BX = "${FIX_V4BX}" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame^] | 45 | KLIBCTHUMB = "${@['CONFIG_KLIBC_THUMB=n', 'CONFIG_KLIBC_THUMB=y'][(d.getVar('ARM_INSTRUCTION_SET') == 'thumb')]}" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 46 | |
| 47 | do_configure () { |
| 48 | ln -sf "${STAGING_DIR_TARGET}${exec_prefix}" linux |
| 49 | } |
| 50 | |
| 51 | INHIBIT_PACKAGE_STRIP = "1" |
| 52 | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" |
| 53 | INSANE_SKIP_${PN} = "already-stripped" |
| 54 | INSANE_SKIP_libklibc-dev = "dev-elf" |
| 55 | KLIBC_ARCH = "${TARGET_ARCH}" |
| 56 | KLIBC_ARCH_aarch64 = "arm64" |
| 57 | KLIBC_ARCH_armeb = "arm" |
| 58 | KLIBC_ARCH_mipsel = "mips" |
| 59 | KLIBC_ARCH_x86 = "i386" |
| 60 | KLIBC_ARCH_x86-64 = "x86_64" |
| 61 | KLIBC_ARCH_powerpc = "ppc" |
| 62 | KLIBC_ARCH_powerpc64 = "ppc64" |
| 63 | THIS_LIBKLIBC = "libklibc (= ${PV}-${PR})" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame^] | 64 | |
| 65 | SECURITY_CFLAGS = "-fno-PIE -no-pie" |
| 66 | SECURITY_LDFLAGS = "-no-pie" |