QBS, how to remove -fPIC option

  • 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.

  • 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.

Log in to reply