NASM 2.09 turns on optimisation by default
Posted: Fri Jul 15, 2011 10:24 am
Hi folks,
Just something I discovered today that may be useful (although I guess many people will already know about it). I was having some strange problems with MikeOS after building it on Ubuntu 11.04 (my test box had been running Ubuntu 9.04 before that). It turns out that NASM 2.09, released last year, enables the -Ox optimisation flag by default, which was doing funny things to my executables.
Using "-O0" (dash oh zero) fixed that and left the resulting binaries as intended. Just thought I'd note it here in case anyone has similar problems in the future and suspects it's something else in eg Linux/QEMU that's at fault (like I did for a few hours!).
Cheers,
Mike
Just something I discovered today that may be useful (although I guess many people will already know about it). I was having some strange problems with MikeOS after building it on Ubuntu 11.04 (my test box had been running Ubuntu 9.04 before that). It turns out that NASM 2.09, released last year, enables the -Ox optimisation flag by default, which was doing funny things to my executables.
Using "-O0" (dash oh zero) fixed that and left the resulting binaries as intended. Just thought I'd note it here in case anyone has similar problems in the future and suspects it's something else in eg Linux/QEMU that's at fault (like I did for a few hours!).
Cheers,
Mike