GCC10 linker warning Topic is solved

Report here problems in any of ChibiOS components. This forum is NOT for support.
steved
Posts: 823
Joined: Fri Nov 09, 2012 2:22 pm
Has thanked: 12 times
Been thanked: 135 times

GCC10 linker warning  Topic is solved

Postby steved » Mon Apr 26, 2021 1:26 pm

Using GCC 10.2.1, Chibi 20.3 with a reasonably straightforward application (on 32F091 at present, but seen on other processors as well) I get the following harmless warning during compilation:

Code: Select all

lto-wrapper.exe: warning: Options to Xassembler do not match: -alms=Build/lst/crt1.lst, -alms=Build/lst/hal.lst, dropping all -Xassembler and -Wa options.

Makefile options that may be relevant (or different to the demos):

Code: Select all

USE_LDOPT = -lstdc++ -lm -Wl,--wrap,_malloc_r -Wl,--wrap,atexit
USE_OPT = -O0 -ggdb -fomit-frame-pointer -falign-functions=16
USE_CPPOPT = -fno-rtti -fno-non-call-exceptions -fno-exceptions -fno-threadsafe-statics -fno-use-cxa-atexit
USE_LTO = yes
USE_SMART_BUILD = yes

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: GCC10 linker warning

Postby Giovanni » Mon Apr 26, 2021 1:33 pm

Hi,

The difference is the .lst file name which of course is wrong, try removing that option (or fake always the same file name) and it will disappear.

Cannot be fixed because it is a compiler bug IMHO, not sure if it has already been reported.

Giovanni

Thargon
Posts: 135
Joined: Wed Feb 04, 2015 5:03 pm
Location: CITEC, Bielefeld University, germany
Has thanked: 15 times
Been thanked: 24 times
Contact:

Re: GCC10 linker warning

Postby Thargon » Tue Dec 07, 2021 5:22 pm

The issue still persists with ChibiOS 20.11.x and GCC 10.3. Is there any news regarding this topic?

Without LTO, my code does not fit for some small MCUs, while it does when I compile it with GCC 9. I'd like to upgrade the toolchain, but this issue holds me back.

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: GCC10 linker warning

Postby Giovanni » Tue Dec 07, 2021 5:32 pm

Giovanni wrote:Hi,

The difference is the .lst file name which of course is wrong, try removing that option (or fake always the same file name) and it will disappear.

Cannot be fixed because it is a compiler bug IMHO, not sure if it has already been reported.

Giovanni

ych
Posts: 33
Joined: Tue Mar 03, 2015 11:38 pm
Has thanked: 7 times
Been thanked: 9 times

Re: GCC10 linker warning

Postby ych » Sun Mar 03, 2024 11:11 am

Giovanni wrote:... try removing that option (or fake always the same file name) and it will disappear. ...

Could you please clarify what exact option you mean to remove?

See the same warning on building RT-STM32F413ZH-NUCLEO144 demo from stable_21.11.x branch:

Code: Select all

$ make
...
Linking build/ch.elf
lto-wrapper: warning: Options to '-Xassembler' do not match: -alms=./build/lst/crt1.lst, -alms=./build/lst/hal.lst, dropping all '-Xassembler' and '-Wa' options.
lto-wrapper: warning: using serial compilation of 2 LTRANS jobs
lto-wrapper: note: see the '-flto' option documentation for more information
...

With the following GCC version:

Code: Select all

$ arm-none-eabi-gcc --version
arm-none-eabi-gcc (Arm GNU Toolchain 13.2.rel1 (Build arm-13.7)) 13.2.1 20231009
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: GCC10 linker warning

Postby Giovanni » Sun Mar 03, 2024 4:39 pm

Hi,

You need to edit rules.mk, find -alms=xxxxx and remove it.

Note that the linker works also with the warning.

Giovanni


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 11 guests