#137 (2.05) Linux gcc build problem

Peter Flass

Precompiled Linux 2.05 works fine. When I recompile everything on Linux using "make -f GccUnix.mak" without debug defined, the executable seems to resolve all constants to 0, for example, the statement 'DD 10' interprets the 10 as 0 and generates a dword of zero. For some reason the same compile with DEBUG=1 in the makefile works fine. I don't know what other information would be relevant here - gvv version? Linux distro and version?


  • japheth

    > I don't know what other information would be relevant here

    I guess the only thing which is relevant is the "bitness" of the OS. Are you running a 64-bit Linux? Then the compiler most likely defaults to 64-bit object modules.

    While a 64-bit JWasm for Windows should be no problem at all, for 64-bin Linux things are slightly differently, because someone has decided that type "int" is 64-bit there ( on Win64 it's still 32-bit). The JWasm source code might need a few adjustments to be compatible with 64-bit "int".

    As for now, the simplest fix is to tell the compiler that it should create 32-bit object modules.

  • Peter Flass
    Peter Flass

    This is 32-bit Fedora 13, so I assume gcc is defaulting to that. Anyhow, like I said, it works if compiled with DEBUG=1 and appears broken without it. I spent a couple of days assuming it was something I had done, and finally recompiled the sources as downloaded with no changes and found this behavior. I had tracked it into the program that encodes the constants, whose name I can't recall just now. It does appear to have something to do with 64-bit.