diff options
author | Alejandro Hernandez Samaniego <alejandro@enedino.org> | 2023-01-27 12:43:30 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-01-29 19:24:22 +0000 |
commit | f3ad36d15ccb88f89cb0621593b69b63b47a5358 (patch) | |
tree | 641493cf0c95a790b9bc06f95794bbb94b118ff4 /meta | |
parent | fa4cd1a7a20615c228a5556e135ddf791d28b8a0 (diff) | |
download | poky-f3ad36d15ccb88f89cb0621593b69b63b47a5358.tar.gz |
newlib: Upgrade 4.2.0 -> 4.3.0
- Rebased fix-rs6000-crt0.patch
- Patch fix_makefile_include_arm_h.patch is no longer required, the newlib
header dependency has been fixed upstream at 26f9cfd7
- LICENSE checksum change due to:
- Adding SPDX identifier
- Deleted Phoenix Systems from License and updated each licenses
numbers accordingly.
- Add a dummy limits.h header, to make the improved preprocessor
checks happy during configure.
- Add a patch for libgloss to maintain current behavior of TCLIBC=newlib
by making libgloss DEPEND on newlib and use its installed headers.
- Switch to git fetcher to simplify fetching the sources and avoid future
issues due to the way newlib release snapshots were being published.
(From OE-Core rev: 1c9cbb27dfe37ca4574c4285fb03ce394dee5ed1)
Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandro@enedino.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/conf/distro/include/maintainers.inc | 4 | ||||
-rw-r--r-- | meta/recipes-core/newlib/libgloss/fix-rs6000-crt0.patch | 24 | ||||
-rw-r--r-- | meta/recipes-core/newlib/libgloss/libgloss-build-without-nostdinc.patch | 30 | ||||
-rw-r--r-- | meta/recipes-core/newlib/libgloss_4.3.0.bb (renamed from meta/recipes-core/newlib/libgloss_4.2.0.bb) | 5 | ||||
-rw-r--r-- | meta/recipes-core/newlib/newlib.inc | 23 | ||||
-rw-r--r-- | meta/recipes-core/newlib/newlib_git.bb (renamed from meta/recipes-core/newlib/newlib_4.2.0.bb) | 0 |
6 files changed, 63 insertions, 23 deletions
diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc index 23c2e02d0d..ec7ea90d16 100644 --- a/meta/conf/distro/include/maintainers.inc +++ b/meta/conf/distro/include/maintainers.inc | |||
@@ -339,7 +339,7 @@ RECIPE_MAINTAINER:pn-libgcc-initial = "Khem Raj <raj.khem@gmail.com>" | |||
339 | RECIPE_MAINTAINER:pn-libgcrypt = "Hongxu Jia <hongxu.jia@windriver.com>" | 339 | RECIPE_MAINTAINER:pn-libgcrypt = "Hongxu Jia <hongxu.jia@windriver.com>" |
340 | RECIPE_MAINTAINER:pn-libgfortran = "Khem Raj <raj.khem@gmail.com>" | 340 | RECIPE_MAINTAINER:pn-libgfortran = "Khem Raj <raj.khem@gmail.com>" |
341 | RECIPE_MAINTAINER:pn-libgit2 = "Unassigned <unassigned@yoctoproject.org>" | 341 | RECIPE_MAINTAINER:pn-libgit2 = "Unassigned <unassigned@yoctoproject.org>" |
342 | RECIPE_MAINTAINER:pn-libgloss = "Alejandro Hernandez <aehs29@gmail.com>" | 342 | RECIPE_MAINTAINER:pn-libgloss = "Alejandro Hernandez <alejandro@enedino.org>" |
343 | RECIPE_MAINTAINER:pn-libglu = "Ross Burton <ross.burton@arm.com>" | 343 | RECIPE_MAINTAINER:pn-libglu = "Ross Burton <ross.burton@arm.com>" |
344 | RECIPE_MAINTAINER:pn-libgpg-error = "Hongxu Jia <hongxu.jia@windriver.com>" | 344 | RECIPE_MAINTAINER:pn-libgpg-error = "Hongxu Jia <hongxu.jia@windriver.com>" |
345 | RECIPE_MAINTAINER:pn-libgudev = "Ross Burton <ross.burton@arm.com>" | 345 | RECIPE_MAINTAINER:pn-libgudev = "Ross Burton <ross.burton@arm.com>" |
@@ -535,7 +535,7 @@ RECIPE_MAINTAINER:pn-nativesdk-libtool = "Richard Purdie <richard.purdie@linuxfo | |||
535 | RECIPE_MAINTAINER:pn-nativesdk-packagegroup-sdk-host = "Ross Burton <ross.burton@arm.com>" | 535 | RECIPE_MAINTAINER:pn-nativesdk-packagegroup-sdk-host = "Ross Burton <ross.burton@arm.com>" |
536 | RECIPE_MAINTAINER:pn-nativesdk-qemu-helper = "Richard Purdie <richard.purdie@linuxfoundation.org>" | 536 | RECIPE_MAINTAINER:pn-nativesdk-qemu-helper = "Richard Purdie <richard.purdie@linuxfoundation.org>" |
537 | RECIPE_MAINTAINER:pn-nativesdk-sdk-provides-dummy = "Richard Purdie <richard.purdie@linuxfoundation.org>" | 537 | RECIPE_MAINTAINER:pn-nativesdk-sdk-provides-dummy = "Richard Purdie <richard.purdie@linuxfoundation.org>" |
538 | RECIPE_MAINTAINER:pn-newlib = "Alejandro Hernandez <aehs29@gmail.com>" | 538 | RECIPE_MAINTAINER:pn-newlib = "Alejandro Hernandez <alejandro@enedino.org>" |
539 | RECIPE_MAINTAINER:pn-ncurses = "Hongxu Jia <hongxu.jia@windriver.com>" | 539 | RECIPE_MAINTAINER:pn-ncurses = "Hongxu Jia <hongxu.jia@windriver.com>" |
540 | RECIPE_MAINTAINER:pn-neard = "Anuj Mittal <anuj.mittal@intel.com>" | 540 | RECIPE_MAINTAINER:pn-neard = "Anuj Mittal <anuj.mittal@intel.com>" |
541 | RECIPE_MAINTAINER:pn-net-tools = "Unassigned <unassigned@yoctoproject.org>" | 541 | RECIPE_MAINTAINER:pn-net-tools = "Unassigned <unassigned@yoctoproject.org>" |
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/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.2.0.bb b/meta/recipes-core/newlib/libgloss_4.3.0.bb index 8c8ee91395..7e34e33c7a 100644 --- a/meta/recipes-core/newlib/libgloss_4.2.0.bb +++ b/meta/recipes-core/newlib/libgloss_4.3.0.bb | |||
@@ -4,8 +4,9 @@ DEPENDS += "newlib" | |||
4 | 4 | ||
5 | FILESEXTRAPATHS:prepend := "${THISDIR}/libgloss:" | 5 | FILESEXTRAPATHS:prepend := "${THISDIR}/libgloss:" |
6 | 6 | ||
7 | SRC_URI:append = " file://libgloss-build-without-nostdinc.patch" | ||
7 | SRC_URI:append:powerpc = " file://fix-rs6000-crt0.patch" | 8 | SRC_URI:append:powerpc = " file://fix-rs6000-crt0.patch" |
8 | SRC_URI:append:arm = " file://fix_makefile_include_arm_h.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} |
@@ -28,6 +29,8 @@ do_install:append() { | |||
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 27b52a43af..5351a9f991 100644 --- a/meta/recipes-core/newlib/newlib.inc +++ b/meta/recipes-core/newlib/newlib.inc | |||
@@ -10,24 +10,19 @@ LIC_FILES_CHKSUM = " \ | |||
10 | file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \ | 10 | file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \ |
11 | file://COPYING.LIBGLOSS;md5=c0469b6ebb847a75781066be515f032d \ | 11 | file://COPYING.LIBGLOSS;md5=c0469b6ebb847a75781066be515f032d \ |
12 | file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \ | 12 | file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \ |
13 | file://COPYING.NEWLIB;md5=8bb75595dbcc7d45e5c0d116d7bdf6ce \ | 13 | file://COPYING.NEWLIB;md5=5a9d477b5f4eab20dccf655a77107a6e \ |
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 | # Newlib maintainers sometimes publish the source | 17 | BASEVER = "4.3.0" |
19 | # from a specific snapshot, after an upgrade we can | 18 | PV = "${BASEVER}+git${SRCPV}" |
20 | # delete the following line and keep the empty default | 19 | SRC_URI = "git://sourceware.org/git/newlib-cygwin.git;protocol=https;branch=main" |
21 | NEWLIB_SNAPSHOT = ".20211231" | 20 | SRCREV="9e09d6ed83cce4777a5950412647ccc603040409" |
22 | NEWLIB_SNAPSHOT ?= "" | ||
23 | SRC_URI = "https://sourceware.org/pub/newlib/newlib-${PV}${NEWLIB_SNAPSHOT}.tar.gz" | ||
24 | SRC_URI[sha256sum] = "c3a0e8b63bc3bef1aeee4ca3906b53b3b86c8d139867607369cb2915ffc54435" | ||
25 | |||
26 | 21 | ||
27 | INHIBIT_DEFAULT_DEPS = "1" | 22 | INHIBIT_DEFAULT_DEPS = "1" |
28 | DEPENDS = "virtual/${TARGET_PREFIX}gcc" | 23 | DEPENDS = "virtual/${TARGET_PREFIX}gcc" |
29 | 24 | ||
30 | S = "${WORKDIR}/newlib-${PV}${NEWLIB_SNAPSHOT}" | 25 | S = "${WORKDIR}/git" |
31 | B = "${WORKDIR}/build" | 26 | B = "${WORKDIR}/build" |
32 | 27 | ||
33 | ## disable stdlib | 28 | ## disable stdlib |
@@ -52,6 +47,12 @@ EXTRA_OECONF = " \ | |||
52 | 47 | ||
53 | do_configure[cleandirs] = "${B}" | 48 | do_configure[cleandirs] = "${B}" |
54 | 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 | |||
55 | do_install() { | 56 | do_install() { |
56 | oe_runmake install DESTDIR='${D}' | 57 | oe_runmake install DESTDIR='${D}' |
57 | } | 58 | } |
diff --git a/meta/recipes-core/newlib/newlib_4.2.0.bb b/meta/recipes-core/newlib/newlib_git.bb index fb922d65d1..fb922d65d1 100644 --- a/meta/recipes-core/newlib/newlib_4.2.0.bb +++ b/meta/recipes-core/newlib/newlib_git.bb | |||