blob: 27b52a43afd626e7f01c9b195efc6bfdce0911f1 [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001SUMMARY = "Newlib is a C library intended for use on embedded systems"
2HOMEPAGE = "https://sourceware.org/newlib/"
3DESCRIPTION = "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."
4SECTION = "libs"
5
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00006LICENSE = "GPL-2.0-only & LGPL-3.0-only & GPL-3.0-only & LGPL-2.0-only & BSD-2-Clause & BSD-3-Clause & TCL"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08007LIC_FILES_CHKSUM = " \
8 file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
9 file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \
10 file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000011 file://COPYING.LIBGLOSS;md5=c0469b6ebb847a75781066be515f032d \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080012 file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000013 file://COPYING.NEWLIB;md5=8bb75595dbcc7d45e5c0d116d7bdf6ce \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080014 file://newlib/libc/posix/COPYRIGHT;md5=103468ff1982be840fdf4ee9f8b51bbf \
15 file://newlib/libc/sys/linux/linuxthreads/LICENSE;md5=73640207fbc79b198c7ffd4ad4d97aa0 \
16 "
17
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000018# 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
21NEWLIB_SNAPSHOT = ".20211231"
22NEWLIB_SNAPSHOT ?= ""
23SRC_URI = "https://sourceware.org/pub/newlib/newlib-${PV}${NEWLIB_SNAPSHOT}.tar.gz"
24SRC_URI[sha256sum] = "c3a0e8b63bc3bef1aeee4ca3906b53b3b86c8d139867607369cb2915ffc54435"
25
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080026
27INHIBIT_DEFAULT_DEPS = "1"
Brad Bishop19323692019-04-05 15:28:33 -040028DEPENDS = "virtual/${TARGET_PREFIX}gcc"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080029
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000030S = "${WORKDIR}/newlib-${PV}${NEWLIB_SNAPSHOT}"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080031B = "${WORKDIR}/build"
32
33## disable stdlib
Patrick Williams213cb262021-08-07 19:21:33 -050034TARGET_CC_ARCH:append = " -nostdlib"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080035
36EXTRA_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 Geissler82c905d2020-04-13 13:39:40 -050050 --disable-newlib-supplied-syscalls \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080051 "
52
53do_configure[cleandirs] = "${B}"
54
55do_install() {
56 oe_runmake install DESTDIR='${D}'
57}
58
Patrick Williams213cb262021-08-07 19:21:33 -050059COMPATIBLE_HOST:libc-musl:class-target = "null"
60COMPATIBLE_HOST:libc-glibc:class-target = "null"