Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 1 | SUMMARY = "Newlib is a C library intended for use on embedded systems" |
| 2 | HOMEPAGE = "https://sourceware.org/newlib/" |
| 3 | DESCRIPTION = "C library intended for use on embedded systems. It is a conglomeration of several library parts, all under free software licenses that make them easily usable on embedded products." |
| 4 | SECTION = "libs" |
| 5 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 6 | LICENSE = "GPL-2.0-only & LGPL-3.0-only & GPL-3.0-only & LGPL-2.0-only & BSD-2-Clause & BSD-3-Clause & TCL" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 7 | LIC_FILES_CHKSUM = " \ |
| 8 | file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ |
| 9 | file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \ |
| 10 | file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \ |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 11 | file://COPYING.LIBGLOSS;md5=c0469b6ebb847a75781066be515f032d \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 12 | file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \ |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 13 | file://COPYING.NEWLIB;md5=8bb75595dbcc7d45e5c0d116d7bdf6ce \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 14 | file://newlib/libc/posix/COPYRIGHT;md5=103468ff1982be840fdf4ee9f8b51bbf \ |
| 15 | file://newlib/libc/sys/linux/linuxthreads/LICENSE;md5=73640207fbc79b198c7ffd4ad4d97aa0 \ |
| 16 | " |
| 17 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 18 | # Newlib maintainers sometimes publish the source |
| 19 | # from a specific snapshot, after an upgrade we can |
| 20 | # delete the following line and keep the empty default |
| 21 | NEWLIB_SNAPSHOT = ".20211231" |
| 22 | NEWLIB_SNAPSHOT ?= "" |
| 23 | SRC_URI = "https://sourceware.org/pub/newlib/newlib-${PV}${NEWLIB_SNAPSHOT}.tar.gz" |
| 24 | SRC_URI[sha256sum] = "c3a0e8b63bc3bef1aeee4ca3906b53b3b86c8d139867607369cb2915ffc54435" |
| 25 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 26 | |
| 27 | INHIBIT_DEFAULT_DEPS = "1" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 28 | DEPENDS = "virtual/${TARGET_PREFIX}gcc" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 29 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 30 | S = "${WORKDIR}/newlib-${PV}${NEWLIB_SNAPSHOT}" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 31 | B = "${WORKDIR}/build" |
| 32 | |
| 33 | ## disable stdlib |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 34 | TARGET_CC_ARCH:append = " -nostdlib" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 35 | |
| 36 | EXTRA_OECONF = " \ |
| 37 | --build=${BUILD_SYS} \ |
| 38 | --target=${TARGET_SYS} \ |
| 39 | --host=${HOST_SYS} \ |
| 40 | --prefix=${prefix} \ |
| 41 | --exec-prefix=${exec_prefix} \ |
| 42 | --bindir=${bindir} \ |
| 43 | --libdir=${libdir} \ |
| 44 | --includedir=${includedir} \ |
| 45 | --enable-languages=c \ |
| 46 | --with-newlib \ |
| 47 | --with-gnu-as \ |
| 48 | --with-gnu-ld \ |
| 49 | --disable-multilib \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 50 | --disable-newlib-supplied-syscalls \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 51 | " |
| 52 | |
| 53 | do_configure[cleandirs] = "${B}" |
| 54 | |
| 55 | do_install() { |
| 56 | oe_runmake install DESTDIR='${D}' |
| 57 | } |
| 58 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 59 | COMPATIBLE_HOST:libc-musl:class-target = "null" |
| 60 | COMPATIBLE_HOST:libc-glibc:class-target = "null" |