Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
1.16.0
-
None
-
Description
If we use the CppApplication, with the assembler files (e.g. with one 'main.s' file), then the specified cpp.driverFlags does not passed to the linker:
import qbs CppApplication { name: "hello-gcc" cpp.positionIndependentCode: false cpp.driverFlags: ["-mmcu=msp430f5529"] /// < Desired driver flag files: ["main.s"] /// < One assembler file }
In this case the flag "-mmcu=msp430f5529" will be not passed to the linker:
C:\GCC\mspgcc-20120406-p20120911\bin\msp430-as.exe -g -o E:/git/ng/git/123/qbs-git/tests/build-hello-gcc-msp430-asm-debug/Debug_GCC_MSP4_ef01812d3f4e98a3/hello-gcc.5eaf30bd/3a52ce780950d4d9/main.s.o E:/git/ng/git/123/qbs-git/tests/hello-gcc-msp430-asm/main.s C:\GCC\mspgcc-20120406-p20120911\bin\msp430-ld.exe -o E:/git/ng/git/123/qbs-git/tests/build-hello-gcc-msp430-asm-debug/Debug_GCC_MSP4_ef01812d3f4e98a3/hello-gcc.5eaf30bd/hello-gcc E:/git/ng/git/123/qbs-git/tests/build-hello-gcc-msp430-asm-debug/Debug_GCC_MSP4_ef01812d3f4e98a3/hello-gcc.5eaf30bd/3a52ce780950d4d9/main.s.o C:\GCC\mspgcc-20120406-p20120911\bin\msp430-ld.exe: cannot open linker script file memory.x: No such file or directory
That leads to the linking error.
In other case, if try to use the C-source file instead (e.g. 'main.c' file), then all passes and compiles correctly:
C:\GCC\mspgcc-20120406-p20120911\bin\msp430-gcc.exe -g -O0 -Wall -Wextra "-mmcu=msp430f5529" -pipe "-fvisibility=default" -o E:/git/ng/git/123/qbs-git/tests/build-hello-gcc-msp430-asm-debug/Debug_GCC_MSP4_ef01812d3f4e98a3/hello-gcc.5eaf30bd/3a52ce780950d4d9/main.c.o -c E:/git/ng/git/123/qbs-git/tests/hello-gcc-msp430-asm/main.c C:\GCC\mspgcc-20120406-p20120911\bin\msp430-gcc.exe "-mmcu=msp430f5529" -o E:/git/ng/git/123/qbs-git/tests/build-hello-gcc-msp430-asm-debug/Debug_GCC_MSP4_ef01812d3f4e98a3/hello-gcc.5eaf30bd/hello-gcc E:/git/ng/git/123/qbs-git/tests/build-hello-gcc-msp430-asm-debug/Debug_GCC_MSP4_ef01812d3f4e98a3/hello-gcc.5eaf30bd/3a52ce780950d4d9/main.c.o
Seems, this related not only to the 'bare-metal' GCC, but also and to any GCC toolchains.
UPD: Also, it is strange, that in case of an assembler file, calls the 'msp430-as' and the 'msp430-ld' directly, instead of 'msp430-gcc'.