Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 717610 - sys-devel/gcc: not compatible with newlib-3.3.0 for msp430-* targets
Summary: sys-devel/gcc: not compatible with newlib-3.3.0 for msp430-* targets
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: Other Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard: wait for gcc-10 release
Keywords:
Depends on:
Blocks: CVE-2019-14871, CVE-2019-14872, CVE-2019-14873, CVE-2019-14874, CVE-2019-14875, CVE-2019-14876, CVE-2019-14877, CVE-2019-14878
  Show dependency tree
 
Reported: 2020-04-15 18:17 UTC by tomtom69
Modified: 2020-05-17 09:33 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
MSP430 test program for TI launchpad with MSP430G2553 (main.c,547 bytes, text/x-csrc)
2020-04-16 10:42 UTC, tomtom69
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tomtom69 2020-04-15 18:17:32 UTC
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?
Comment 1 Sergei Trofimovich (RETIRED) gentoo-dev 2020-04-16 07:12:17 UTC
(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?
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2020-04-16 07:35:15 UTC
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.
Comment 3 Larry the Git Cow gentoo-dev 2020-04-16 07:43:18 UTC
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(+)
Comment 4 tomtom69 2020-04-16 10:42:31 UTC
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".
Comment 5 Larry the Git Cow gentoo-dev 2020-05-17 09:33:41 UTC
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(-)