Uploaded image for project: 'Qbs ("Cubes")'
  1. Qbs ("Cubes")
  2. QBS-1123

Link Fails Due to cpp.linkerFlags Parameters Order

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 1.7.1
    • API: C++
    • None
    • macOS 10.12.4

    Description

      I've defined the following cpp.linkerFlags with Qbs 1.7.1 / Qt Creator 4.2.1

      cpp.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.elf is performed as

      arm-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 -lgcc

      How to define the last two lines with Qbs

      boardPackagePath+"system/driverlib/libdriverlib.a", "-lm","-lc","-lgcc"

      so they are included after the list of .o files?

      Thank you!

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kandeler Christian Kandeler
            reivilo Rei Vilo
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes