No -m32 switch for gcc? - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: PINE A64(+) (https://forum.pine64.org/forumdisplay.php?fid=4) +--- Forum: Linux on Pine A64(+) (https://forum.pine64.org/forumdisplay.php?fid=6) +---- Forum: Ubuntu (https://forum.pine64.org/forumdisplay.php?fid=27) +---- Thread: No -m32 switch for gcc? (/showthread.php?tid=1396) |
No -m32 switch for gcc? - prawn - 06-15-2016 I'm trying to compile a "hello world" assembly program written for 32-bit ARM. I was told this would work: gcc -o hello -m32 hello.S But I get this error: gcc: error: unrecognized command line option '-m32' I installed build-essential but nothing else. Am I just missing some component that allows this switch, or am I out of luck? Sorry if this is a stupid question, but I'm just another one of the newbs having fun crawling through the dark trying to make things work. RE: No -m32 switch for gcc? - longsleep - 06-15-2016 Gcc does not have this flag on aarch64. RE: No -m32 switch for gcc? - ssvb - 06-16-2016 You can install a 32-bit crosscompiler. Try something like Code: sudo apt-get install gcc-arm-linux-gnueabihf Code: arm-linux-gnueabihf-gcc -o hello hello.S |