Bug 539957 - CDT internal builder doesn't expand $* in commands
Summary: CDT internal builder doesn't expand $* in commands
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-build (show other bugs)
Version: 9.4.3   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: cdt-build-inbox@eclipse.org CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-09 07:18 EDT by David Crocker CLA
Modified: 2020-09-04 15:22 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Crocker CLA 2018-10-09 07:18:58 EDT
Using this setting for "Other flags" in the Cross G++ Compiler settings:

-c -std=gnu++17 -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections -fno-threadsafe-statics -fno-rtti -fno-exceptions -nostdlib -Wdouble-promotion -fsingle-precision-constant -Wa,-ahl=$*.s

the $* should get expanded to the base name of the source file. It works fine if I select "External builder" using either of two different external 'make' programs, but if I select "Internal builder" then the $* doesn't get expanded and the compiler is called like this:

arm-none-eabi-g++ -D__SAM4E8E__ -DRTOS -DDUET_NG -D_XOPEN_SOURCE -IC:\Eclipse\Firmware\CoreNG\cores\arduino -IC:\Eclipse\Firmware\CoreNG\libraries\Flash -IC:\Eclipse\Firmware\CoreNG\libraries\SharedSpi -IC:\Eclipse\Firmware\CoreNG\libraries\Storage -IC:\Eclipse\Firmware\CoreNG\libraries\Wire -IC:\Eclipse\Firmware\CoreNG\asf -IC:\Eclipse\Firmware\CoreNG\asf\common\utils -IC:\Eclipse\Firmware\CoreNG\asf\common\services\clock -IC:\Eclipse\Firmware\CoreNG\asf\common\services\ioport -IC:\Eclipse\Firmware\CoreNG\asf\sam\drivers -IC:\Eclipse\Firmware\CoreNG\asf\sam\services\flash_efc -IC:\Eclipse\Firmware\CoreNG\asf\sam\utils -IC:\Eclipse\Firmware\CoreNG\asf\sam\utils\cmsis\sam4e\include -IC:\Eclipse\Firmware\CoreNG\asf\sam\utils\header_files -IC:\Eclipse\Firmware\CoreNG\asf\sam\utils\preprocessor -IC:\Eclipse\Firmware\CoreNG\asf\thirdparty\CMSIS\Include -IC:\Eclipse\Firmware\CoreNG\variants\duetNG -IC:\Eclipse\Firmware\RepRapFirmware\src -IC:\Eclipse\Firmware\RepRapFirmware\src\DuetNG -IC:\Eclipse\Firmware\RepRapFirmware\src\Networking -IC:\Eclipse\Firmware\DuetWiFiSocketServer\src\include -IC:\Eclipse\Firmware\FreeRTOS\src\include -IC:\Eclipse\Firmware\FreeRTOS\src\portable\GCC\ARM_CM4F -IC:\Eclipse\Firmware\RRFLibraries\src -O2 -Wall -c -std=gnu++17 -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections -fno-threadsafe-statics -fno-rtti -fno-exceptions -nostdlib -Wdouble-promotion -fsingle-precision-constant -Wa,-ahl=$*.s -o src\Tools\Filament.o ..\src\Tools\Filament.cpp 


The $* near the end has not been expanded. This causes the compiler to send the assembler output to stdout and then produce an error message that it can't find file $*.S.
Comment 1 Torbjörn Svensson CLA 2020-06-20 16:01:40 EDT
I guess this is expected since $* is in reality a make variable and has nothing to do with the internal builder. The internal builder in CDT was never intended to be a dropin replacement for make.