[Qbs] qbs ignores the 'manual' cpp.linkerMode behavior

Denis Shienkov denis.shienkov at gmail.com
Mon Oct 9 17:32:06 CEST 2017


Hi all,

I use the AVR-GCC compiler, and I need to use following command line:

"-nostartfiles -nodefaultlibs -nostdlib -Wl,-Map="$(OutputFileName).map"
-Wl,--start-group -Wl,-lm  -Wl,--end-group -Wl,--gc-sections -mrelax
-Wl,-section-start=.text=0x1f400 -Wl,-section-start=.ExtReset=0x1e000
-Wl,-section-start=.noinit=0x801032  -mmcu=at90can128 -B "C:\Program Files
(x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.132\gcc\dev\at90can128" "

but, the qbs is too 'intelligent' and generates a wrong command line for
this options:

cpp.linkerMode: "manual"
cpp.linkerName: cpp.compilerName

cpp.linkerFlags: [

        "-nostartfiles",

        "-nodefaultlibs",

        "-nostdlib",

        "-Wl,-Map=" + product.targetName + ".map",

        "-Wl,--start-group",

        "-Wl,--end-group",

        "-Wl,--gc-sections",

        "-Wl,-section-start=.text=0x1f400",

        "-Wl,-section-start=.ExtReset=0x1e000",

        "-Wl,-section-start=.noinit=0x801032",

        "-Wc,-mmcu=" + avrdevice,

        "-B",

        "C:/Program Files
(x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.2.132/gcc/dev/" +
avrdevice,

        "-mrelax",

    ]


resulting line looks like:

"
"C:\Program Files
(x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-gcc.exe"
-Xlinker -nostartfiles -Xlinker -nodefaultlibs -Xlinker -nostdlib -Xlinker
"-Wl,-Map=monitorapp.map" -Xlinker "-Wl,--start-group" -Xlinker
"-Wl,--end-group" -Xlinker "-Wl,--gc-sections" -Xlinker
"-Wl,-section-start=.text=0x1f400" -Xlinker
"-Wl,-section-start=.ExtReset=0x1e000" -Xlinker
"-Wl,-section-start=.noinit=0x801032" -Xlinker "-Wc,-mmcu=at90can128"
-Xlinker -B -Xlinker "C:/Program Files
(x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.2.132/gcc/dev/at90can128"
-Xlinker -mrelax
"
it insert еру -XLinker flags everywher*e...*

How to disable an 'intelligent' feature ?

BR,
Denis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20171009/33686e96/attachment.html>


More information about the Qbs mailing list