diff options
Diffstat (limited to 'meta/recipes-core/newlib')
-rw-r--r-- | meta/recipes-core/newlib/libgloss/fix-rs6000-crt0.patch | 24 | ||||
-rw-r--r-- | meta/recipes-core/newlib/libgloss/fix_makefile_include_arm_h.patch | 30 | ||||
-rw-r--r-- | meta/recipes-core/newlib/libgloss/libgloss-build-without-nostdinc.patch | 30 | ||||
-rw-r--r-- | meta/recipes-core/newlib/libgloss_git.bb (renamed from meta/recipes-core/newlib/libgloss_4.1.0.bb) | 17 | ||||
-rw-r--r-- | meta/recipes-core/newlib/newlib.inc | 27 | ||||
-rw-r--r-- | meta/recipes-core/newlib/newlib_git.bb (renamed from meta/recipes-core/newlib/newlib_4.1.0.bb) | 4 |
6 files changed, 74 insertions, 58 deletions
diff --git a/meta/recipes-core/newlib/libgloss/fix-rs6000-crt0.patch b/meta/recipes-core/newlib/libgloss/fix-rs6000-crt0.patch index c220fb8437..8c29fea8cf 100644 --- a/meta/recipes-core/newlib/libgloss/fix-rs6000-crt0.patch +++ b/meta/recipes-core/newlib/libgloss/fix-rs6000-crt0.patch | |||
@@ -5,35 +5,41 @@ 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 | 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. | 6 | and leave it to the user to select which object files to use. |
7 | 7 | ||
8 | Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com> | ||
9 | 8 | ||
10 | Index: newlib-3.0.0/libgloss/rs6000/Makefile.in | 9 | 01/2023: Rebased for libgloss 4.3.0 |
10 | |||
11 | Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandro@enedino.org> | ||
12 | |||
13 | |||
14 | Index: git/libgloss/rs6000/Makefile.in | ||
11 | =================================================================== | 15 | =================================================================== |
12 | --- newlib-3.0.0.orig/libgloss/rs6000/Makefile.in | 16 | --- git.orig/libgloss/rs6000/Makefile.in |
13 | +++ newlib-3.0.0/libgloss/rs6000/Makefile.in | 17 | +++ git/libgloss/rs6000/Makefile.in |
14 | @@ -358,7 +358,7 @@ install-sim: | 18 | @@ -362,7 +362,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 | 19 | ||
17 | install-mvme: | 20 | install-mvme: |
21 | ${mkinstalldirs} ${DESTDIR}${tooldir}/lib${MULTISUBDIR} | ||
18 | - set -e; for x in ${MVME_CRT0} ${MVME_BSP} ${MVME_SCRIPTS}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done | 22 | - 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 | 23 | + set -e; for x in ${MVME_CRT0} ${MVME_BSP} ${MVME_SCRIPTS}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/mvme-$$x; done |
20 | 24 | ||
21 | install-solaris: | 25 | install-solaris: |
22 | set -e; for x in ${SOLARIS_CRT0} ${SOLARIS_BSP} ${SOLARIS_SCRIPTS}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done | 26 | ${mkinstalldirs} ${DESTDIR}${tooldir}/lib${MULTISUBDIR} |
23 | @@ -367,15 +367,15 @@ install-linux: | 27 | @@ -374,17 +374,17 @@ 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 | 28 | ||
26 | install-yellowknife: | 29 | install-yellowknife: |
30 | ${mkinstalldirs} ${DESTDIR}${tooldir}/lib${MULTISUBDIR} | ||
27 | - set -e; for x in ${YELLOWKNIFE_CRT0} ${YELLOWKNIFE_BSP}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done | 31 | - 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 | 32 | + 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 | 33 | set -e; for x in ${YELLOWKNIFE_SCRIPTS}; do ${INSTALL_DATA} $(srcdir)/$$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done |
30 | 34 | ||
31 | install-ads: | 35 | install-ads: |
36 | ${mkinstalldirs} ${DESTDIR}${tooldir}/lib${MULTISUBDIR} | ||
32 | - set -e; for x in ${ADS_CRT0} ${ADS_BSP}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done | 37 | - 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 | 38 | + 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 | 39 | set -e; for x in ${ADS_SCRIPTS}; do ${INSTALL_DATA} $(srcdir)/$$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done |
35 | 40 | ||
36 | install-mbx: | 41 | install-mbx: |
42 | ${mkinstalldirs} ${DESTDIR}${tooldir}/lib${MULTISUBDIR} | ||
37 | - set -e; for x in ${MBX_CRT0} ${MBX_BSP}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done | 43 | - 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 | 44 | + 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 | 45 | set -e; for x in ${MBX_SCRIPTS} ${MBX_SPECS}; do ${INSTALL_DATA} $(srcdir)/$$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done |
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 deleted file mode 100644 index 7645be7314..0000000000 --- a/meta/recipes-core/newlib/libgloss/fix_makefile_include_arm_h.patch +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
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} | ||
diff --git a/meta/recipes-core/newlib/libgloss/libgloss-build-without-nostdinc.patch b/meta/recipes-core/newlib/libgloss/libgloss-build-without-nostdinc.patch new file mode 100644 index 0000000000..2b66155eea --- /dev/null +++ b/meta/recipes-core/newlib/libgloss/libgloss-build-without-nostdinc.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | Upstream-Status: Inappropriate [OE-Specific] | ||
2 | |||
3 | Since commit e0c0ad82 libgloss started passing the -nostdinc to CC. | ||
4 | |||
5 | They dont want to build against C library headers that are already in | ||
6 | the system to avoid pollution, however, we purposely build libgloss | ||
7 | against the newly built newlib C library, thats why we keep newlib | ||
8 | and libgloss in separate recipes and create a dependency between them. | ||
9 | |||
10 | This causes an issue where bitbake stops finding newlib headers while | ||
11 | libgloss is being built. | ||
12 | |||
13 | Do not pass -nostdinc to CC to maintain current behavior of | ||
14 | TCLIBC=newlib | ||
15 | |||
16 | |||
17 | Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandro@enedino.org> | ||
18 | Index: newlib-3.0.0/libgloss/configure | ||
19 | =================================================================== | ||
20 | --- newlib-3.0.0.orig/libgloss/configure | ||
21 | +++ newlib-3.0.0/libgloss/configure | ||
22 | @@ -5106,7 +5106,7 @@ fi | ||
23 | fi | ||
24 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_compiler_isystem" >&5 | ||
25 | $as_echo "$libc_cv_compiler_isystem" >&6; } | ||
26 | -CC="$CC -nostdinc $libc_cv_compiler_isystem" | ||
27 | +CC="$CC $libc_cv_compiler_isystem" | ||
28 | |||
29 | host_makefile_frag_path=$host_makefile_frag | ||
30 | |||
diff --git a/meta/recipes-core/newlib/libgloss_4.1.0.bb b/meta/recipes-core/newlib/libgloss_git.bb index c9ed30d988..7e34e33c7a 100644 --- a/meta/recipes-core/newlib/libgloss_4.1.0.bb +++ b/meta/recipes-core/newlib/libgloss_git.bb | |||
@@ -2,21 +2,22 @@ require newlib.inc | |||
2 | 2 | ||
3 | DEPENDS += "newlib" | 3 | DEPENDS += "newlib" |
4 | 4 | ||
5 | FILESEXTRAPATHS_prepend := "${THISDIR}/libgloss:" | 5 | FILESEXTRAPATHS:prepend := "${THISDIR}/libgloss:" |
6 | 6 | ||
7 | SRC_URI_append_powerpc = " file://fix-rs6000-crt0.patch" | 7 | SRC_URI:append = " file://libgloss-build-without-nostdinc.patch" |
8 | SRC_URI_append_arm = " file://fix_makefile_include_arm_h.patch" | 8 | SRC_URI:append:powerpc = " file://fix-rs6000-crt0.patch" |
9 | SRC_URI:append:powerpc = " file://fix-rs6000-cflags.patch" | ||
9 | 10 | ||
10 | do_configure() { | 11 | do_configure() { |
11 | ${S}/libgloss/configure ${EXTRA_OECONF} | 12 | ${S}/libgloss/configure ${EXTRA_OECONF} |
12 | } | 13 | } |
13 | 14 | ||
14 | do_install_prepend() { | 15 | do_install:prepend() { |
15 | # install doesn't create this itself, avoid install error | 16 | # install doesn't create this itself, avoid install error |
16 | install -d ${D}${prefix}/${TARGET_SYS}/lib | 17 | install -d ${D}${prefix}/${TARGET_SYS}/lib |
17 | } | 18 | } |
18 | 19 | ||
19 | do_install_append() { | 20 | do_install:append() { |
20 | # Move libs to default directories so they can be picked up later | 21 | # Move libs to default directories so they can be picked up later |
21 | install -d ${D}${libdir} | 22 | install -d ${D}${libdir} |
22 | mv -v ${D}${prefix}/${TARGET_SYS}/lib/* ${D}${libdir} | 23 | mv -v ${D}${prefix}/${TARGET_SYS}/lib/* ${D}${libdir} |
@@ -26,8 +27,10 @@ do_install_append() { | |||
26 | } | 27 | } |
27 | 28 | ||
28 | # Split packages correctly | 29 | # Split packages correctly |
29 | FILES_${PN} += "${libdir}/*.ld ${libdir}/*.specs" | 30 | FILES:${PN} += "${libdir}/*.ld ${libdir}/*.specs" |
30 | FILES_${PN}-dev += "${libdir}/cpu-init/*" | 31 | FILES:${PN}-dev += "${libdir}/cpu-init/*" |
32 | # RiscV installation moved the syscall header to this location | ||
33 | FILES:${PN}-dev += "${prefix}/${TARGET_SYS}/include/machine/*.h" | ||
31 | 34 | ||
32 | INHIBIT_PACKAGE_STRIP = "1" | 35 | INHIBIT_PACKAGE_STRIP = "1" |
33 | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" | 36 | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" |
diff --git a/meta/recipes-core/newlib/newlib.inc b/meta/recipes-core/newlib/newlib.inc index 0aba21fae7..6113f5e831 100644 --- a/meta/recipes-core/newlib/newlib.inc +++ b/meta/recipes-core/newlib/newlib.inc | |||
@@ -3,29 +3,30 @@ 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." | 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" | 4 | SECTION = "libs" |
5 | 5 | ||
6 | LICENSE = "GPLv2 & LGPLv3 & GPLv3 & LGPLv2 & BSD-2-Clause & tcl" | 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 & Apache-2.0-with-LLVM-exception" |
7 | LIC_FILES_CHKSUM = " \ | 7 | LIC_FILES_CHKSUM = " \ |
8 | file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ | 8 | file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ |
9 | file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \ | 9 | file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \ |
10 | file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \ | 10 | file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \ |
11 | file://COPYING.LIBGLOSS;md5=7b7615de0ecda0ff8d705966ac3b8950 \ | 11 | file://COPYING.LIBGLOSS;md5=c0469b6ebb847a75781066be515f032d \ |
12 | file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \ | 12 | file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \ |
13 | file://COPYING.NEWLIB;md5=b8dda70da54e0efb49b1074f349d7749 \ | 13 | file://COPYING.NEWLIB;md5=4f1a15846ffee91e352418563e1bce27 \ |
14 | file://newlib/libc/posix/COPYRIGHT;md5=103468ff1982be840fdf4ee9f8b51bbf \ | 14 | file://newlib/libc/posix/COPYRIGHT;md5=103468ff1982be840fdf4ee9f8b51bbf \ |
15 | file://newlib/libc/sys/linux/linuxthreads/LICENSE;md5=73640207fbc79b198c7ffd4ad4d97aa0 \ | ||
16 | " | 15 | " |
17 | 16 | ||
18 | SRC_URI = "https://sourceware.org/pub/newlib/newlib-${PV}.tar.gz" | 17 | BASEVER = "4.4.0" |
19 | SRC_URI[sha256sum] = "f296e372f51324224d387cc116dc37a6bd397198756746f93a2b02e9a5d40154" | 18 | PV = "${BASEVER}+git" |
19 | SRC_URI = "git://sourceware.org/git/newlib-cygwin.git;protocol=https;branch=main" | ||
20 | SRCREV="ad11e2587f83d61357a32c61c36d72ea4f39315e" | ||
20 | 21 | ||
21 | INHIBIT_DEFAULT_DEPS = "1" | 22 | INHIBIT_DEFAULT_DEPS = "1" |
22 | DEPENDS = "virtual/${TARGET_PREFIX}gcc" | 23 | DEPENDS = "virtual/${TARGET_PREFIX}gcc" |
23 | 24 | ||
24 | S = "${WORKDIR}/newlib-${PV}" | 25 | S = "${WORKDIR}/git" |
25 | B = "${WORKDIR}/build" | 26 | B = "${WORKDIR}/build" |
26 | 27 | ||
27 | ## disable stdlib | 28 | ## disable stdlib |
28 | TARGET_CC_ARCH_append = " -nostdlib" | 29 | TARGET_CC_ARCH:append = " -nostdlib" |
29 | 30 | ||
30 | EXTRA_OECONF = " \ | 31 | EXTRA_OECONF = " \ |
31 | --build=${BUILD_SYS} \ | 32 | --build=${BUILD_SYS} \ |
@@ -46,9 +47,15 @@ EXTRA_OECONF = " \ | |||
46 | 47 | ||
47 | do_configure[cleandirs] = "${B}" | 48 | do_configure[cleandirs] = "${B}" |
48 | 49 | ||
50 | # We need a dummy limits.h to pass preprocessor checks | ||
51 | do_configure:append(){ | ||
52 | install -d ${STAGING_INCDIR} | ||
53 | touch ${STAGING_INCDIR}/limits.h | ||
54 | } | ||
55 | |||
49 | do_install() { | 56 | do_install() { |
50 | oe_runmake install DESTDIR='${D}' | 57 | oe_runmake install DESTDIR='${D}' |
51 | } | 58 | } |
52 | 59 | ||
53 | COMPATIBLE_HOST_libc-musl_class-target = "null" | 60 | COMPATIBLE_HOST:libc-musl:class-target = "null" |
54 | COMPATIBLE_HOST_libc-glibc_class-target = "null" | 61 | COMPATIBLE_HOST:libc-glibc:class-target = "null" |
diff --git a/meta/recipes-core/newlib/newlib_4.1.0.bb b/meta/recipes-core/newlib/newlib_git.bb index 7ab5b2b94e..fb922d65d1 100644 --- a/meta/recipes-core/newlib/newlib_4.1.0.bb +++ b/meta/recipes-core/newlib/newlib_git.bb | |||
@@ -7,7 +7,7 @@ do_configure() { | |||
7 | ${S}/configure ${EXTRA_OECONF} | 7 | ${S}/configure ${EXTRA_OECONF} |
8 | } | 8 | } |
9 | 9 | ||
10 | do_install_append() { | 10 | do_install:append() { |
11 | # Move include files and libs to default directories so they can be picked up later | 11 | # Move include files and libs to default directories so they can be picked up later |
12 | mv -v ${D}${prefix}/${TARGET_SYS}/lib ${D}${libdir} | 12 | mv -v ${D}${prefix}/${TARGET_SYS}/lib ${D}${libdir} |
13 | mv -v ${D}${prefix}/${TARGET_SYS}/include ${D}${includedir} | 13 | mv -v ${D}${prefix}/${TARGET_SYS}/include ${D}${includedir} |
@@ -17,4 +17,4 @@ do_install_append() { | |||
17 | } | 17 | } |
18 | 18 | ||
19 | # No rpm package is actually created but -dev depends on it, avoid dnf error | 19 | # No rpm package is actually created but -dev depends on it, avoid dnf error |
20 | RDEPENDS_${PN}-dev_libc-newlib = "" | 20 | DEV_PKG_DEPENDENCY:libc-newlib = "" |