since update to newlib-3.3.0 msp430-elf-gcc (tested with stable version 9.2.0-r2, but others are affected, too) cannot link executables for uC programmers any more. The following linker error occurs: /usr/libexec/gcc/msp430-elf/ld: cannot find crtn.o newlib-3.1.0 still works with msp430-elf-gcc but this version is not available any more in portage tree. There is an upstream patch that can be applied to gcc-9.2.0-r2 in order to fix this: https://sourceware.org/legacy-ml/newlib/2019/msg00343.html If this patch is included in a newer gcc version (I could not find out if this is the case) it might make sense to stabilize a newer gcc version for crossdev msp430?
(In reply to tomtom69 from comment #0) > since update to newlib-3.3.0 msp430-elf-gcc (tested with stable version > 9.2.0-r2, but others are affected, too) cannot link executables for uC > programmers any more. The following linker error occurs: > /usr/libexec/gcc/msp430-elf/ld: cannot find crtn.o > newlib-3.1.0 still works with msp430-elf-gcc but this version is not > available any more in portage tree. > There is an upstream patch that can be applied to gcc-9.2.0-r2 in order to > fix this: > https://sourceware.org/legacy-ml/newlib/2019/msg00343.html > If this patch is included in a newer gcc version (I could not find out if > this is the case) it might make sense to stabilize a newer gcc version for > crossdev msp430? Can you provide minimal example that exhibits linker failure? Does gcc-9.3.0 work?
Upstream gcc merged the change into master as: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=e8aa9f55f6486a9503d4f9e6b88b8f81d1daab15 I don't see it in gcc-9 branch yet. Let's restore older newlib for now.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c53a6004192d8b595c7a7ad0b24e23ac2b922249 commit c53a6004192d8b595c7a7ad0b24e23ac2b922249 Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2020-04-16 07:42:33 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2020-04-16 07:43:00 +0000 sys-libs/newlib: add early error for msp430 Reported-by: tomtom69 Bug: https://bugs.gentoo.org/717610 Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> sys-libs/newlib/newlib-3.3.0.ebuild | 7 +++++++ 1 file changed, 7 insertions(+) https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=053e0364d33f0432ec0b168afa2067def74ef01d commit 053e0364d33f0432ec0b168afa2067def74ef01d Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2020-04-16 07:35:50 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2020-04-16 07:43:00 +0000 sys-libs/newlib: restore newlib-3.1.0 for msp430 newlib-3.3.0 is not compatible with any released gcc. https://sourceware.org/legacy-ml/newlib/2019/msg00343.html This partially reverts commit ae8fe4521b047d71437f98218ff595715f41cfc9. Reported-by: tomtom69 Bug: https://bugs.gentoo.org/717610 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> sys-libs/newlib/Manifest | 1 + sys-libs/newlib/newlib-3.1.0.ebuild | 141 ++++++++++++++++++++++++++++++++++++ 2 files changed, 142 insertions(+)
Created attachment 633172 [details] MSP430 test program for TI launchpad with MSP430G2553 I attached a sample file. It is a simple LED blink test for the MSP430 Launchpad demo board. It can be compiled with the following command: "msp430-elf-gcc -mmcu=msp430g2553 -o main.elf main.c" gcc-9.3.0 also returns the error message "/usr/libexec/gcc/msp430-elf/ld: cannot find crtn.o".
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=30acdae94828f74ba9a4c0702bdb1d8aec447c0d commit 30acdae94828f74ba9a4c0702bdb1d8aec447c0d Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2020-05-17 09:32:23 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2020-05-17 09:33:35 +0000 sys-libs/newlib: allow gcc-10.1 for msp430-elf targets, bug #717610 Closes: https://bugs.gentoo.org/717610 Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> sys-libs/newlib/newlib-3.3.0.ebuild | 6 ++++-- sys-libs/newlib/newlib-9999.ebuild | 9 +++++++++ 2 files changed, 13 insertions(+), 2 deletions(-)