I am trying to compile QT for ARM.
But the linker requires “–sysroot” option to be added for linking files.
So in qmake.conf file, we added under QMAKE_LFLAGS.
But when we compile, its adding this even for initial tools build on the x86 PC. So gcc complains and gives error.
The cross compiler tool chain which doesnt have a .pc file.
Please let me know where to add the “–sysroot” so that this is added only when it tries to cross compile.
Thanks.
Hari
You can do this using qmake scopes – specifically platform scope variables. To ensure that
-sysrootis only evaluated for your ARM builds you can do something like this:You may need to change the scope, depending on the platform you’re actually targetting.