Ignore:
Timestamp:
Jan 3, 2013, 1:22:56 PM (13 years ago)
Author:
rousseau
Message:

Fixed the Open Watcom build

Building with Open Watcom produced a non working driver.

Causes & Fixes

o Enum types were 8 bits when using WCC

This caused the functions with variable arguments to fail.
Adding the -ei compiler-flag to WCC solved this issue.

o Incorrect inline assembler syntax to call DeviceHelp in os2ahci.c

DeviceHelp is a 16:16 far pointer residing in memory.
MASM interprets 'call DeviceHelp' differently than WASM.
The correct syntax is: 'call dword ptr [DeviceHelp]'.

o Missing segments from TGROUP in init.asm

WLINK then generates the AUTO class, most probably causing incorrect
relocation fixups.

Enhancements

o WASM (or JWASM) can now be used instead of ALP
o WCC can now be used instead of CL
o The Open Watcom linker (WLINK) can now be used instead of LINK
o Streamlined both makefiles a notch so it's easy to use both tool-chains

To investigate

o CL barks about a missing prototype for DevHelp_Yield() in lib.c

The prototype is actually defined in dhcalls.h but CL still barks.

o Using WCC with ALP and WLINK produces an oversized image

Probaly due to misplaced BSS segments. WCC with ALP and LINK produces
a normal sized image however.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/os2ahci/Makefile

    r143 r144  
    5555               -I$(DDK)\base\src\dev\dasd\diskh \
    5656               -I$(DDK)\base\src\dev\thinkpad\dockii\apmcalls \
    57                -I$(CC16)\include
     57#               -I$(CC16)\include
    5858
    5959AS_INCLUDE   = -I:$(DDK)\base\inc \
     
    6363               $(DDK)\base\src\dev\dasd\devhlp\ \
    6464               $(DDK)\base\src\dev\thinkpad\dockii\apmcalls\ \
    65                $(CC16)\lib\ \
     65#               $(CC16)\lib\ \
    6666
    6767
     
    8585
    8686clean:
    87         rm -f $(OBJS) $(TARGET) *.cod *.lst *.def *.map *.sym bldday.h
     87        rm -f $(OBJS) $(TARGET) *.cod *.lst *.def *.map *.sym *.err *.lnk \
     88                bldday.h
    8889
    8990
     
    132133.asm.obj:
    133134        $(AS) $(AFLAGS) $(AS_INCLUDE) $*.asm
     135        wdis -l $*.obj
    134136
    135137.c.obj:
    136138        $(CC) $(CFLAGS) $(CC_INCLUDE) $*.c
     139        wdis -l $*.obj
    137140
    138141os2ahci.def:
     
    143146        $(LD) $(LFLAGS) $(OBJS),$(TARGET),$*.map,$(LIB_DIRS) $(LIBS),$*.def
    144147        $(MAPSYM) os2ahci
    145 
    146 
Note: See TracChangeset for help on using the changeset viewer.