summaryrefslogtreecommitdiffstats
path: root/recipes-core
diff options
context:
space:
mode:
authorNathan Rossi <nathan@nathanrossi.com>2017-05-30 21:01:38 +1000
committerNathan Rossi <nathan@nathanrossi.com>2017-06-03 16:55:31 +1000
commitd391df08fd5bda57454a7f88d2ba2a78bd22a81e (patch)
tree844b472e37de108867ae16fdb09a0fc0c1f226a9 /recipes-core
parentb3a1bb6145ee2291b6f5b35154e032fabad77fb0 (diff)
downloadmeta-xilinx-d391df08fd5bda57454a7f88d2ba2a78bd22a81e.tar.gz
newlib_2.5.0: Add recipe for the newlib libc
Add a recipe for newlib version 2.5.0 which provides a libc for embedded targets. Specifically this is required for building programs using the Xilinx standalone drivers/applications. Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Tested-by: Alistair Francis <alistair.francis@xilinx.com> Tested-by: Koteswararao Nayudu <kotin@xilinx.com>
Diffstat (limited to 'recipes-core')
-rw-r--r--recipes-core/newlib/newlib.inc59
-rw-r--r--recipes-core/newlib/newlib_2.5.0.bb11
2 files changed, 70 insertions, 0 deletions
diff --git a/recipes-core/newlib/newlib.inc b/recipes-core/newlib/newlib.inc
new file mode 100644
index 00000000..2fb2301d
--- /dev/null
+++ b/recipes-core/newlib/newlib.inc
@@ -0,0 +1,59 @@
1SUMMARY = "Newlib is a C library intended for use on embedded systems"
2HOMEPAGE = "https://sourceware.org/newlib/"
3DESCRIPTION = "It is a conglomeration of several library parts, all under free software licenses that make them easily usable on embedded products."
4SECTION = "libs"
5
6LICENSE = "GPLv2 & LGPLv3 & GPLv3 & LGPLv2"
7LIC_FILES_CHKSUM = " \
8 file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
9 file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \
10 file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \
11 file://COPYING.LIBGLOSS;md5=73f5c98779aea7dba4a6c94a74ab0ae2 \
12 file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
13 file://COPYING.NEWLIB;md5=bfdd6396bf3b02bd23ffbb9f7ddfbec6 \
14 file://newlib/libc/posix/COPYRIGHT;md5=103468ff1982be840fdf4ee9f8b51bbf \
15 file://newlib/libc/sys/linux/linuxthreads/LICENSE;md5=73640207fbc79b198c7ffd4ad4d97aa0 \
16 "
17
18SRC_URI = "ftp://sourceware.org/pub/newlib/newlib-${PV}.tar.gz"
19SRC_URI[md5sum] = "767dc60aaf814d091997d91d588968b2"
20SRC_URI[sha256sum] = "5b76a9b97c9464209772ed25ce55181a7bb144a66e5669aaec945aa64da3189b"
21
22INHIBIT_DEFAULT_DEPS = "1"
23DEPENDS = "virtual/${TARGET_PREFIX}gcc"
24
25S = "${WORKDIR}/newlib-${PV}"
26B = "${WORKDIR}/build"
27
28# disable use of a link hash style
29TARGET_LINK_HASH_STYLE_microblaze = ""
30
31# disable stdlib
32TARGET_CC_ARCH_append = " -nostdlib"
33
34CONFIGUREOPTS = " \
35 --build=${BUILD_SYS} \
36 --host=${HOST_SYS} \
37 --target=${TARGET_SYS} \
38 --prefix=${prefix} \
39 --exec-prefix=${exec_prefix} \
40 --bindir=${bindir} \
41 --libdir=${libdir} \
42 --includedir=${includedir} \
43 --enable-languages=c \
44 --with-newlib \
45 --with-gnu-as \
46 --with-gnu-ld \
47 --disable-multilib \
48 "
49
50do_configure[cleandirs] = "${B}"
51
52do_install() {
53 oe_runmake install DESTDIR='${D}'
54
55 # output of headers/libs in 'tooldir' subdirectories, move it up to the prefix dir.
56 mv ${D}${prefix}/${TARGET_SYS}/* ${D}${prefix}/
57 rmdir ${D}${prefix}/${TARGET_SYS}
58}
59
diff --git a/recipes-core/newlib/newlib_2.5.0.bb b/recipes-core/newlib/newlib_2.5.0.bb
new file mode 100644
index 00000000..dc30c6b2
--- /dev/null
+++ b/recipes-core/newlib/newlib_2.5.0.bb
@@ -0,0 +1,11 @@
1
2require newlib.inc
3
4do_configure_prepend_microblaze() {
5 # hack for microblaze, which needs xilinx.ld to literally do any linking (its hard coded in its LINK_SPEC)
6 export CC="${CC} -L${S}/libgloss/microblaze"
7}
8
9do_configure() {
10 ${S}/configure ${CONFIGUREOPTS}
11}