I've got a proprietary program that I'm trying to use on a 64 bit system.
When I launch the setup it works ok, but after it tries to update itself and compile some modules and it fails to load them.
I'm suspecting it's because it's using gcc and gcc tries to compile them for a 64 bit system and therefore this program cannot use these modules.
Is there any way (some environmental variables or something like that) to force gcc to do everything for a 32 bit platform. Would a 32 bit chroot work?
To check this, we have to type this command. gcc –v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/7/lto-wrapper OFFLOAD_TARGET_NAMES=nvptx-none OFFLOAD_TARGET_DEFAULT=1 Target: x86_64-linux-gnu ........... ........... ...........
If gcc -v shows GCC was configured with a --with-arch option (or --with-arch-32 and/or --with-arch-64 ) then that's what will be the default. Without a --with-arch option (and if there isn't a custom specs file in use) then the arch used will be the default for the target.
The -m32 flag tells GCC to compile in 32-bit mode.
It depends upon the compiler if your processor is 8 bit then 2 if it 16 bit then 4 if it 64 then 8. Instead, if P is a character pointer, then also the output is 4.
You need to make GCC use the -m32
flag.
You could try writing a simple shell script to your $PATH
and call it gcc (make sure you don't overwrite the original gcc, and make sure the new script comes earlier in $PATH
, and that it uses the full path to GCC.
I think the code you need is just something like /bin/gcc -m32 $*
depending on your shell (the $*
is there to include all arguments, although it might be something else – very important!)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With