Skip to content

Unable to build for NUCLEO-L432KC under Arch Linux using ARM GNU toolchain in package repository #3209

Closed

Description

@NeoChen1024

Distro: Arch Linux
GCC -v output:

Using built-in specs.
COLLECT_GCC=arm-none-eabi-gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-none-eabi/10.2.0/lto-wrapper
Target: arm-none-eabi
Configured with: /build/arm-none-eabi-gcc/src/gcc-10.2.0/configure --target=arm-none-eabi --prefix=/usr --with-sysroot=/usr/arm-none-eabi --with-native-system-header-dir=/include --libexecdir=/usr/lib --enable-languages=c,c++ --enable-plugins --disable-decimal-float --disable-libffi --disable-libgomp --disable-libmudflap --disable-libquadmath --disable-libssp --disable-libstdcxx-pch --disable-nls --disable-shared --disable-threads --disable-tls --with-gnu-as --with-gnu-ld --with-system-zlib --with-newlib --with-headers=/usr/arm-none-eabi/include --with-python-dir=share/gcc-arm-none-eabi --with-gmp --with-mpfr --with-mpc --with-isl --with-libelf --enable-gnu-indirect-function --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --with-pkgversion='Arch Repository' --with-bugurl=https://bugs.archlinux.org/ --with-multilib-list=rmprofile
Thread model: single
Supported LTO compression algorithms: zlib zstd
gcc version 10.2.0 (Arch Repository)

ld -v output:

GNU ld (GNU Binutils) 2.36.1

Log:

echo "LD: nuttx"
LD: nuttx
arm-none-eabi-ld --entry=__start -nostartfiles -nodefaultlibs -g -T/usr/neo_chen/vcs/NuttX/nuttx/boards/arm/stm32l4/nucleo-l432kc/scripts/l432kc.ld  -L"/usr/neo_chen/vcs/NuttX/nuttx/staging" -L"/usr/neo_chen/vcs/NuttX/nuttx/arch/arm/src/board" -L "/usr/lib/gcc/arm-none-eabi/10.2.0/thumb/v7e-m+fp/hard" -L "/usr/lib/gcc/arm-none-eabi/10.2.0/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard" \
        -o "/usr/neo_chen/vcs/NuttX/nuttx/nuttx"   \
        --start-group -lsched -ldrivers -lboards -lc -lmm -larch -lxx -lapps -lcrypto -lfs -lbinfmt -lboard -lgcc -lm --end-group
arm-none-eabi-ld: Error: unable to disambiguate: -nostartfiles (did you mean --nostartfiles ?)
make[1]: *** [Makefile:156: nuttx] Error 1
make[1]: Leaving directory '/usr/neo_chen/vcs/NuttX/nuttx/arch/arm/src'
make: *** [tools/Makefile.unix:422: nuttx] Error 2

Activity

  1. NeoChen1024 commented on Mar 28, 2021

    @NeoChen1024
    Author

    But this happens to AVR Toolchain too, it seems newer version of GNU ld dropped these parameters

  2. Ouss4 commented on Mar 28, 2021

    @Ouss4
    Member

    Could be the case, I had other similar LD issues with other options (in building something not related to NuttX). Do you have any release notes that explain these new modification?

  3. btashton commented on Mar 29, 2021

    @btashton
    Contributor

    The latest release still seems to have them and they are quite standard linker flags, I suspect something else is going on here
    https://gcc.gnu.org/onlinedocs/gcc-10.2.0/gcc/Link-Options.html#Link-Options

  4. NeoChen1024 commented on Mar 29, 2021

    @NeoChen1024
    Author

    Maybe something's wrong with Arch Linux's cross toolchain

  5. hartmannathan commented on Jun 10, 2021

    @hartmannathan
    Contributor

    This is caused by Binutils being updated to the 2.36.x line.

    This is fixed by PR #3836

    This is now documented at Release Notes for the (future) NuttX-10.2 release:

    https://cwiki.apache.org/confluence/display/NUTTX/NuttX+10.2#ld-now-called-through-gcc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions