GCC 10 lto Topic is solved

Report here problems in any of ChibiOS components. This forum is NOT for support.
Tuxford
Posts: 25
Joined: Fri Nov 06, 2020 3:28 pm
Location: Salivonky City
Has thanked: 4 times
Been thanked: 4 times

GCC 10 lto  Topic is solved

Postby Tuxford » Tue Jun 20, 2023 9:30 am

Hi All,
After migration from older GCC to 10.2 linker produces warning regarding incorrect usage of -flto
I found that in ChibiOS it without value but should be with value.
I added next thing and warning doesn't appear anymore. Is it correct way?

Code: Select all

--- a/os/common/startup/ARMCMx/compilers/GCC/mk/rules.mk
+++ b/os/common/startup/ARMCMx/compilers/GCC/mk/rules.mk
@@ -24,7 +24,7 @@ endif
 
 # Link time optimizations
 ifeq ($(USE_LTO),yes)
-  OPT += -flto
+  OPT += -flto=auto^M
 endif

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

Re: GCC 10 lto

Postby Giovanni » Tue Jun 20, 2023 10:31 am

Hi,

Is this compatible with older GCCs?

Giovanni

Tuxford
Posts: 25
Joined: Fri Nov 06, 2020 3:28 pm
Location: Salivonky City
Has thanked: 4 times
Been thanked: 4 times

Re: GCC 10 lto

Postby Tuxford » Wed Jun 21, 2023 8:55 am

I can't check on very old GCC. On GCC 7 auto is good.

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

Re: GCC 10 lto

Postby Giovanni » Wed Jun 21, 2023 9:54 am

Thanks, GCC7 is old enough.

Giovanni

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

Re: GCC 10 lto

Postby Giovanni » Sun Jul 02, 2023 9:34 am

Thanks, change committed.

Giovanni


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 5 guests