On Aug 18, 2019, at 12:52 PM, Francois-Xavier Le Bail
<[email protected]> wrote:
> From my experience, it's not the same to build
> with 1) compiler for arch i386 (e.g. debian packages xxx:i386)
> than with 2) compiler for arch amd64 with -m32 option.
According to the GCC 9.2 manual:
https://gcc.gnu.org/onlinedocs/gcc-9.2.0/gcc/x86-Options.html#x86-Options
there are the following -m options for x86 compilers that include x86-64
support:
The -m32 option sets int, long, and pointer types to 32 bits, and
generates code that runs on any i386 system.
The -m64 option sets int to 32 bits and long and pointer types to 64
bits, and generates code for the x86-64 architecture. For Darwin only the -m64
option also turns off the -fno-picand -mdynamic-no-pic options.
The -mx32 option sets int, long, and pointer types to 32 bits, and
generates code for the x86-64 architecture.
The -m16 option is the same as -m32, except for that it outputs the
.code16gcc assembly directive at the beginning of the assembly output so that
the binary can run in 16-bit mode.
The -miamcu option generates code which conforms to Intel MCU psABI. It
requires the -m32 option to be turned on.
Perhaps the -m32 code generator in GCC for x86-64 behaves differently from the
code generator in GCC for IA-32, rather than having the -m32 option invoking a
GCC-for-IA-32 compiler. GCC for other targets with
64-bit-extension-from-32-bits ISAs also have flags that allow generating code
for 32-bit or 64-bit targets, but not all have -m32 and -m64, for various
reasons.
_______________________________________________
tcpdump-workers mailing list
[email protected]
https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers