aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@qt.io>2017-03-23 16:34:20 -0700
committerJoerg Bornemann <joerg.bornemann@qt.io>2017-03-29 14:13:03 +0000
commit976c111036317056410c5e011428eb1a211a3342 (patch)
tree8696fce316cdc2cdcb4121b5aaaddba742976428
parent3df01e970913a9d3007319519097c9e2c44478a3 (diff)
Specify target linker flags for GNU ld
Facilitates cross compiling between x86 and x86_64 on non-Darwin Unix when using the system linker. Change-Id: I4cb8fc7f7eb4ee13527fabcf91e8cf1d0fe1fcef Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
-rw-r--r--share/qbs/modules/cpp/gcc.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/share/qbs/modules/cpp/gcc.js b/share/qbs/modules/cpp/gcc.js
index 3d3e69827..4cd863e06 100644
--- a/share/qbs/modules/cpp/gcc.js
+++ b/share/qbs/modules/cpp/gcc.js
@@ -1155,6 +1155,10 @@ function targetFlags(tool, hasTargetOption, target, targetArch, machineType) {
"i386": ["-m32"],
"x86_64": ["-m64"],
},
+ "linker": {
+ "i386": ["-m", "elf_i386"],
+ "x86_64": ["-m", "elf_x86_64"],
+ },
"assembler": {
"i386": ["--32"],
"x86_64": ["--64"],