Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. QBS, how to remove -fPIC option

QBS, how to remove -fPIC option

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
qbsgccfpicpic
2 Posts 1 Posters 2.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    bterrier
    wrote on last edited by
    #1

    I'm trying to use QBS to build an embedded non-Qt application using (arm-elf-gcc).
    So far everything seems ok except that QBS adds -fPIC when compiling c files to object files which later make the link step return an error. If I manually execute tha same commands than QBS, without the -fPIC flag it works fine.

    I've looked the documentation, but I can't find a way to tell QBS not to set this flag.

    1 Reply Last reply
    0
    • B Offline
      B Offline
      bterrier
      wrote on last edited by
      #2

      I've found the response.
      There is a positionIndependentCode property in the cpp module.
      So on can remove -fPIC by adding cpp.positionIndependentCode: false.

      This property is supposed to be undefined by default, but it seems to resolve to true for my toolchain.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved