ease the use of G++ as LD when needed

Use this forum for requesting small changes in ChibiOS. Large changes should be discussed in the development forum. This forum is NOT for support.
User avatar
alex31
Posts: 360
Joined: Fri May 25, 2012 10:23 am
Location: toulouse, france
Has thanked: 36 times
Been thanked: 56 times
Contact:

ease the use of G++ as LD when needed

Postby alex31 » Fri Apr 29, 2022 9:15 am

Hello,

Before 21.11, the compiler settings where done in the top level makefile.
Now, it's done in arm-none-eabi.mk sub makefile included at the end of the top level makefile.

Some project need to link with G++ (example : when there is global objects with virtual constructor / destructor)

I propose that, at least for LD, the setting be done only if LD is empty, or left to the non arm-none-eabi one :

Code: Select all

ifeq (,$(findstring $(TRGT),$(LD)))
LD   = $(TRGT)gcc
endif


So far, if one puts his own definition in the compiler option section of the makefile (which is before the include of arm-none-eabi.mk), his own LD definition will not be overwritten.

Alexandre

Return to “Small Change Requests”

Who is online

Users browsing this forum: No registered users and 5 guests