Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Solved QBS, how to remove -fPIC option

    Tools
    qbs gcc fpic pic
    1
    2
    2013
    Loading More Posts
    • 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
      bterrier last edited by

      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 Reply Quote 0
      • B
        bterrier last edited by

        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 Reply Quote 0
        • First post
          Last post