On 9 May 2018 at 10:08, Jonathan Wakely wrote: > On 9 May 2018 at 10:01, Warlich, Christof wrote: >> Hi, >> >> I'm surprised: On an x86_64 machine, "gcc -dumpmachine" prints "x86_64-linux-gnu" as expected. But "gcc -m32 -dumpmachine" prints the same, whereas I'd expected it to print something like "i686-linux-gnu" instead, as indicated by gcc's usage: >> >> $ gcc -help >> ... >> -dumpmachine Display the compiler's target processor >> >> After all, I've explicitly told it to build for 32-bit targets. And for this part: I assume the reason is that -dumpmachine doesn't actually build anything. Adding -m32 doesn't tell the compiler to build for 32-bit targets, since it's not building, it's just dumping part of its configuration settings. >> But anyhow, is there any other way to obtain the target triplet (or at least the target processor that gcc would actually build for, depending on the switches being passed? > > gcc -m32 -Q --help=target | fgrep -- -march