diff options
author | Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com> | 2018-03-26 17:20:25 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-06-15 17:56:24 +0100 |
commit | ae5e33ddc48802af6288deacfee59bf5bf4b5223 (patch) | |
tree | 1c001161ac140e49c91a1d28d4e8618651ae9e44 /meta/recipes-core/newlib/libgloss | |
parent | b6dbfabbadc3f980e8176f30f8cdf5cdb0775e3c (diff) | |
download | poky-ae5e33ddc48802af6288deacfee59bf5bf4b5223.tar.gz |
newlib: Adds newlib and libgloss recipes
Newlib is a C library that is intended to be used on embedded systems.
It is a conglomeration of several library parts, all under free software
licenses that make them easily usable on embedded products.
Newlib provides a C library alternative that can run on baremetal, mainly
for resource constrained devices.
Libgloss is the BSP part of the C library, which can be easily modified
to port for new hardware platforms.
(From OE-Core rev: fe490ff829440b94124317759d856e2e2daf5047)
Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/newlib/libgloss')
-rw-r--r-- | meta/recipes-core/newlib/libgloss/fix-rs6000-crt0.patch | 41 | ||||
-rw-r--r-- | meta/recipes-core/newlib/libgloss/fix_makefile_include_arm_h.patch | 30 |
2 files changed, 71 insertions, 0 deletions
diff --git a/meta/recipes-core/newlib/libgloss/fix-rs6000-crt0.patch b/meta/recipes-core/newlib/libgloss/fix-rs6000-crt0.patch new file mode 100644 index 0000000000..c220fb8437 --- /dev/null +++ b/meta/recipes-core/newlib/libgloss/fix-rs6000-crt0.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | Upstream-Status: Inappropriate [OE-Specific] | ||
2 | |||
3 | Make install tries to perform install for all variants, but some of them use the same | ||
4 | name for crt0 in specific, so performing all of them results in an error during | ||
5 | do_install, we simply modify the name of the objects so the installation can proceed | ||
6 | and leave it to the user to select which object files to use. | ||
7 | |||
8 | Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com> | ||
9 | |||
10 | Index: newlib-3.0.0/libgloss/rs6000/Makefile.in | ||
11 | =================================================================== | ||
12 | --- newlib-3.0.0.orig/libgloss/rs6000/Makefile.in | ||
13 | +++ newlib-3.0.0/libgloss/rs6000/Makefile.in | ||
14 | @@ -358,7 +358,7 @@ install-sim: | ||
15 | set -e; for x in ${SIM_CRT0} ${SIM_BSP} ${SIM_SCRIPTS}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done | ||
16 | |||
17 | install-mvme: | ||
18 | - set -e; for x in ${MVME_CRT0} ${MVME_BSP} ${MVME_SCRIPTS}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done | ||
19 | + set -e; for x in ${MVME_CRT0} ${MVME_BSP} ${MVME_SCRIPTS}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/mvme-$$x; done | ||
20 | |||
21 | install-solaris: | ||
22 | set -e; for x in ${SOLARIS_CRT0} ${SOLARIS_BSP} ${SOLARIS_SCRIPTS}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done | ||
23 | @@ -367,15 +367,15 @@ install-linux: | ||
24 | set -e; for x in ${LINUX_CRT0} ${LINUX_BSP} ${LINUX_SCRIPTS}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done | ||
25 | |||
26 | install-yellowknife: | ||
27 | - set -e; for x in ${YELLOWKNIFE_CRT0} ${YELLOWKNIFE_BSP}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done | ||
28 | + set -e; for x in ${YELLOWKNIFE_CRT0} ${YELLOWKNIFE_BSP}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/yellowknife-$$x; done | ||
29 | set -e; for x in ${YELLOWKNIFE_SCRIPTS}; do ${INSTALL_DATA} $(srcdir)/$$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done | ||
30 | |||
31 | install-ads: | ||
32 | - set -e; for x in ${ADS_CRT0} ${ADS_BSP}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done | ||
33 | + set -e; for x in ${ADS_CRT0} ${ADS_BSP}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/ads-$$x; done | ||
34 | set -e; for x in ${ADS_SCRIPTS}; do ${INSTALL_DATA} $(srcdir)/$$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done | ||
35 | |||
36 | install-mbx: | ||
37 | - set -e; for x in ${MBX_CRT0} ${MBX_BSP}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done | ||
38 | + set -e; for x in ${MBX_CRT0} ${MBX_BSP}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/mbx-$$x; done | ||
39 | set -e; for x in ${MBX_SCRIPTS} ${MBX_SPECS}; do ${INSTALL_DATA} $(srcdir)/$$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done | ||
40 | |||
41 | install-xil: | ||
diff --git a/meta/recipes-core/newlib/libgloss/fix_makefile_include_arm_h.patch b/meta/recipes-core/newlib/libgloss/fix_makefile_include_arm_h.patch new file mode 100644 index 0000000000..7645be7314 --- /dev/null +++ b/meta/recipes-core/newlib/libgloss/fix_makefile_include_arm_h.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | Upstream-Status: Inappropriate [OE-Specific] | ||
2 | |||
3 | When trying to build libgloss for an arm target, the build system | ||
4 | complains about missing some include files: | ||
5 | |||
6 | | fatal error: acle-compiat.h: No such file or directory | ||
7 | | #include "acle-compat.h" | ||
8 | | ^~~~~~~~~~~~~~~ | ||
9 | | compilation terminated. | ||
10 | |||
11 | These include files come from the newlib source, but since we | ||
12 | are building libgloss separately from newlib, libgloss is unaware | ||
13 | of where they are, this patch fixes the INCLUDES so the build system | ||
14 | can find such files. | ||
15 | |||
16 | Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com> | ||
17 | |||
18 | Index: newlib-3.0.0/libgloss/config/default.mh | ||
19 | =================================================================== | ||
20 | --- newlib-3.0.0.orig/libgloss/config/default.mh | ||
21 | +++ newlib-3.0.0/libgloss/config/default.mh | ||
22 | @@ -1,7 +1,7 @@ | ||
23 | NEWLIB_CFLAGS = `if [ -d ${objroot}/newlib ]; then echo -I${objroot}/newlib/targ-include -I${srcroot}/newlib/libc/include; fi` | ||
24 | NEWLIB_LDFLAGS = `if [ -d ${objroot}/newlib ]; then echo -B${objroot}/newlib/ -L${objroot}/newlib/; fi` | ||
25 | |||
26 | -INCLUDES = -I. -I$(srcdir)/.. | ||
27 | +INCLUDES = -I. -I$(srcdir)/.. -I$(srcdir)/../newlib/libc/machine/arm | ||
28 | # Note that when building the library, ${MULTILIB} is not the way multilib | ||
29 | # options are passed; they're passed in $(CFLAGS). | ||
30 | CFLAGS_FOR_TARGET = -O2 -g ${MULTILIB} ${INCLUDES} ${NEWLIB_CFLAGS} | ||