Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • after reading your answer i want to ask that if the WORDSIZE has been defined as 16bits then would that show some effect on the opcode that is generated by GCC when i compile with the -S flag. i mean would the instructions be different. Commented May 4, 2013 at 11:48
  • @ArunKumar: No, it would not affect the assembly code. I should have been more consistent in using __WORDSIZE in my answer as well. Never use underscore in front of defines (unless you really know what you are doing) as they are (normally) reserved for the compiler. Also if you added a define like __WORDSIZE 16 that would most likely be overruled by the compiler to 32. If you want to cross-compile 64-bit code on a 32-bit machine you would also need multilib. Note that this adds a lot of extra. Commented May 4, 2013 at 12:09
  • i am looking into multilib.. heard about it ryt now only and also tried the -m32, -m64 and -mx32 flags. all compilation except the one with -m32 failed. can i assume that i dont have a multilib gcc installed on my system. how do i check for that? Commented May 4, 2013 at 12:32