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

Incorrect build of compiler and linker options

    XMLWordPrintable

Details

    Description

      When I use arm-gnu cross compiler with bare metal, I need to set linker and compiler option "-u _printf_float"

      When I set 

          cpp.driverFlags:
          [
              "-specs=nano.specs",
              "-u _printf_float",
              "-u _scanf_float",
              "-specs=nosys.specs",
              "-specs=rdimon.specs",
              "-mthumb",
              "-mcpu=cortex-m4",
              "-mfpu=fpv4-sp-d16",
              "-mfloat-abi=hard",
              "-g3",
              "-mfpu=vfp",
      ]

      I get compiler options

      gcc.exe -g -O0 -Wall -Wextra "-specs=nano.specs" "-u _printf_float" "-u _scanf_float" "-specs=nosys.specs" "-specs=rdimon.specs" -mthumb "-mcpu=cortex-m4" "-mfpu=fpv4-sp-d16" "-mfloat-abi=hard" -g3 "-mfpu=vfp"
      

      some options inside quotes. Here is very difficult to search errors. "-u" option have to be without quotes.

      I have to split it into two parts.

          cpp.driverFlags:
          [
              "-specs=nano.specs",
              "-u", "_printf_float",
              "-u", "_scanf_float",
              "-specs=nosys.specs",
              "-specs=rdimon.specs",
              "-mthumb",
              "-mcpu=cortex-m4",
              "-mfpu=fpv4-sp-d16",
              "-mfloat-abi=hard",
              "-g3",
              "-mfpu=vfp",
      ]
      

      and result is 

      gcc.exe -g -O0 -Wall -Wextra "-specs=nano.specs" -u _printf_float -u _scanf_float "-specs=nosys.specs" "-specs=rdimon.specs" -mthumb "-mcpu=cortex-m4" "-mfpu=fpv4-sp-d16" "-mfloat-abi=hard" -g3 "-mfpu=vfp"
      

      It is right. I searched this error 2 days...

      Attachments

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

        Activity

          People

            leenam Leena Miettinen
            seniorandre Andrey
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes