Menu

Compiling source with gcc

Greenhorn
2010-04-19
2013-04-20
  • Greenhorn

    Greenhorn - 2010-04-19

    Hi japhet,

    I tried to compile the source files for JWasm 2.02 on my Ubuntu system, using the GccUnix.mak makefile and gcc 4.4.3.
    But I get some warnings and an error.
    See output below, please …

    greenhorn@greenhorn-desktop:~/Downloads/JWasm202s$ make -f GccUnix.mak
    mkdir GccUnixR
    gcc -c -IH -D__UNIX__ -DNDEBUG -O2 -march=native -mtune=native -o GccUnixR/main.o main.c
    In file included from main.c:35:
    H/globals.h:522: warning: ‘struct asmfixup’ declared inside parameter list
    H/globals.h:522: warning: its scope is only this definition or declaration, which is probably not what you want
    main.c: In function ‘ReadParamFile’:
    main.c:903: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result
    gcc -c -IH -D__UNIX__ -DNDEBUG -O2 -march=native -mtune=native -o GccUnixR/assemble.o assemble.c
    In file included from assemble.c:34:
    H/globals.h:522: warning: ‘struct asmfixup’ declared inside parameter list
    H/globals.h:522: warning: its scope is only this definition or declaration, which is probably not what you want
    assemble.c:428: error: conflicting types for ‘OutputBytesAndFixup’
    H/globals.h:522: note: previous declaration of ‘OutputBytesAndFixup’ was here
    make: *** [GccUnixR/assemble.o] Fehler 1
    

    I'm not such an advanced C-Coder, so please, could you give me a hint how to correct this ?

    Thanks in advance
    Greenhorn

     
  • Jalen

    Jalen - 2011-05-06

    I'm having issues compiling this on OSX.  I'm not very skilled with code, but I'm also getting a failure while compiling. 

    See the output for using the GccUnix.mak

    Midgard:jwasm205s jalen$ make -f GccUnix.mak
    gcc GccUnixR/main.o     GccUnixR/assemble.o GccUnixR/assume.o GccUnixR/directiv.o GccUnixR/posndir.o  GccUnixR/segment.o GccUnixR/expreval.o GccUnixR/memalloc.o GccUnixR/errmsg.o GccUnixR/macro.o    GccUnixR/string.o   GccUnixR/condasm.o GccUnixR/types.o    GccUnixR/fpfixup.o  GccUnixR/invoke.o GccUnixR/equate.o   GccUnixR/mangle.o   GccUnixR/loop.o GccUnixR/parser.o   GccUnixR/tokenize.o GccUnixR/input.o GccUnixR/expans.o   GccUnixR/symbols.o  GccUnixR/labels.o GccUnixR/fixup.o    GccUnixR/codegen.o  GccUnixR/data.o GccUnixR/insthash.o GccUnixR/branch.o   GccUnixR/queue.o GccUnixR/hll.o      GccUnixR/proc.o     GccUnixR/option.o GccUnixR/omf.o      GccUnixR/omfint.o   GccUnixR/omffixup.o GccUnixR/coff.o     GccUnixR/elf.o      GccUnixR/bin.o GccUnixR/listing.o  GccUnixR/fatal.o GccUnixR/context.o  GccUnixR/extern.o   GccUnixR/simsegm.o GccUnixR/apiemu.o   GccUnixR/dbgcv.o    GccUnixR/end.o GccUnixR/backptch.o GccUnixR/msgtext.o  GccUnixR/tbyte.o GccUnixR/cpumodel.o GccUnixR/safeseh.o  GccUnixR/cmdline.o -s -o GccUnixR/jwasm -Wl,-Map,GccUnixR/jwasm.map
    ld: warning: option -s is obsolete and being ignored
    ld: unknown option: -Map
    collect2: ld returned 1 exit status
    make: *** [GccUnixR/jwasm] Error 1
    
     
  • japheth

    japheth - 2011-05-06

    I cannot help, sorry! OSX is not supported.

     
  • lbr

    lbr - 2013-03-27

    Man.. I understand it, being iOS dev I hate everything what was 'touched' by poisonous breath of venoumous thrown away fruit..

    However, if you replace -Map with -map, it all compiles smoothly under Mac OS X 10.6.x ; )
    Apple's LD only know "-map".. no capital letters ; )

     

Log in to post a comment.