QBS 1.7.1 on Qt Creator 4.2.1 — Link Fails Due to cpp.linkerFlags Parameters Order
-
I've defined the following
cpp.linkerFlagson QBS 1.7.1 for Qt Creator 4.2.1cpp.linkerFlags: [ "-mcpu=cortex-m4", "-mfloat-abi=hard","-mfpu=fpv4-sp-d16","-mabi=aapcs","-fsingle-precision-constant", "-T",boardPackagePath+"variants/EK-TM4C123GXL/lm4fcpp_blizzard.ld", "-mthumb","-nostdlib","-nostartfiles", "-Wl,--gc-sections","-Wl,--check-sections","-Wl,--gc-sections","-Wl,--entry=ResetISR", "-Wl,--unresolved-symbols=report-all","-Wl,--warn-common","-Wl,--warn-section-align", boardPackagePath+"system/driverlib/libdriverlib.a", "-lm","-lc","-lgcc" ]The resulting Linking
Test_2.elfis performed asarm-none-eabi-g++ {cpp.linkerFlags} {list of .o files}while the correct syntax for linking would be
arm-none-eabi-g++ {cpp.linkerFlags} {list of .o files} {boardPackagePath}+system/driverlib/libdriverlib.a -lm -lc -lgccHow to define the last two lines with QBS
boardPackagePath+"system/driverlib/libdriverlib.a", "-lm","-lc","-lgcc"so they are included after the list of
.ofiles?Thank you!
-
Please find the solution at https://bugreports.qt.io/browse/QBS-1123.
Main culprit is the lack of structured documentation for Qbs available today.
-
I've defined the following
cpp.linkerFlagson QBS 1.7.1 for Qt Creator 4.2.1cpp.linkerFlags: [ "-mcpu=cortex-m4", "-mfloat-abi=hard","-mfpu=fpv4-sp-d16","-mabi=aapcs","-fsingle-precision-constant", "-T",boardPackagePath+"variants/EK-TM4C123GXL/lm4fcpp_blizzard.ld", "-mthumb","-nostdlib","-nostartfiles", "-Wl,--gc-sections","-Wl,--check-sections","-Wl,--gc-sections","-Wl,--entry=ResetISR", "-Wl,--unresolved-symbols=report-all","-Wl,--warn-common","-Wl,--warn-section-align", boardPackagePath+"system/driverlib/libdriverlib.a", "-lm","-lc","-lgcc" ]The resulting Linking
Test_2.elfis performed asarm-none-eabi-g++ {cpp.linkerFlags} {list of .o files}while the correct syntax for linking would be
arm-none-eabi-g++ {cpp.linkerFlags} {list of .o files} {boardPackagePath}+system/driverlib/libdriverlib.a -lm -lc -lgccHow to define the last two lines with QBS
boardPackagePath+"system/driverlib/libdriverlib.a", "-lm","-lc","-lgcc"so they are included after the list of
.ofiles?Thank you!
-
Please find the solution at https://bugreports.qt.io/browse/QBS-1123.
Main culprit is the lack of structured documentation for Qbs available today.