User Tools

Site Tools


codebase:remove_m32
Sender  Vodur~
Date    Fri Jun 16 00:49:37 2017~
Stamp   1497588608
Expire  1507956584
To      imm~
Subject removing -m32 flag~
Text
I propose to remove -m32 flag from makefile.
What we gain from this is mostly future pain of setting up 32-bit build
dependencies on 64-bit systems (as we've all done by now).
Potential issues, as far as I understand, would be if we have code that assumes
size of types. Here are the sizes with and without -m32.
 
                      -m32     no -m32
The size of int         4       4
The size of short       2       2
The size of long        4       8
The size of float       4       4
The size of double      8       8
The size of long double 12      16
The size of char        1       1
The size of enum        4       4
The size of pointer     4       8
So only long, long double, and pointer sizes have changed. This being the case
I say the risk of issues from size change is low.
 
I verified code can compile and run just fine without -m32. Only issue I see at
the moment is there is casting between void * and int in hunt.c which gets a
warning since they are different sizes with no -m32.
 
Thoughts?
 
P.S.: On a related note, we are currently using gcc 6.2.1 on the host right now
(through scl devtoolset-6), which for some reason can't link libstdc++ 32-bit,
so if/when we do start adding C++ code, we would need to turn -m32 off or go
back to gcc 4.1.2.
~
codebase/remove_m32.txt · Last modified: 2018/08/23 07:30 by vodur