Bug 52096 - -dumpmachine does not respect -m32
Summary: -dumpmachine does not respect -m32
Status: RESOLVED WONTFIX
Alias: None
Product: gcc
Classification: Unclassified
Component: driver (show other bugs)
Version: 4.4.3
: P3 minor
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-02 16:27 UTC by matze
Modified: 2012-02-02 16:30 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description matze 2012-02-02 16:27:25 UTC
On a x86_64-linux-gnu machine calling
  gcc -m32 -dumpmachine
gives
 x86_64-linux-gnu
while I would have expected something like
 i686-linux-gnu

Docu says "print the compilers target machine" in the presence of "-m32" I'm not sure that the right answer would be. The most usefull answer for me would be i686-linux-gnu, as I am using gcc -dumpmachine in my makefiles and users passing in CFLAGS="-m32" break the build.
Comment 1 Andrew Pinski 2012-02-02 16:30:16 UTC
No, dumpmachine should dump the target which gcc was built.  It should not be made multilib aware.

If you want to make sure you are compiling for 32bit, then check the preprocessed predefines instead.
Comment 2 Andrew Pinski 2012-02-02 16:30:59 UTC
Also the dumpmachine does not work for things like x32 where just the ABI changes.