diff --git a/kernel/dyninit.c b/kernel/dyninit.c index 8bd0d37..c028501 100644 --- a/kernel/dyninit.c +++ b/kernel/dyninit.c @@ -48,7 +48,6 @@ additionally: /*extern struct DynS FAR Dyn;*/ #ifndef __TURBOC__ -#include "init-dat.h" extern struct DynS DOSFAR ASM Dyn; #else extern struct DynS FAR ASM Dyn; diff --git a/kernel/init-mod.h b/kernel/init-mod.h index 8e3257a..f04e178 100644 --- a/kernel/init-mod.h +++ b/kernel/init-mod.h @@ -353,8 +353,13 @@ extern struct RelocationTable extern void FAR *DOSFAR ASM XMSDriverAddress; #define XMSDriverAddress DOSDATA(XMSDriverAddress) +#ifdef __GNUC__ +extern VOID _EnableA20(VOID); +extern VOID _DisableA20(VOID); +#else extern VOID ASMPASCAL FAR _EnableA20(VOID); extern VOID ASMPASCAL FAR _DisableA20(VOID); +#endif extern void FAR * ASMPASCAL DetectXMSDriver(VOID); extern int ASMPASCAL init_call_XMScall(void FAR * driverAddress, UWORD ax, diff --git a/mkfiles/gcc.mak b/mkfiles/gcc.mak index 88ac5d4..b5cd9be 100644 --- a/mkfiles/gcc.mak +++ b/mkfiles/gcc.mak @@ -36,7 +36,7 @@ LIBPLUS= LIBTERM= TINY=-mcmodel=tiny -CFLAGST=-Os -fpack-struct -fcall-used-es -w -o $@ +CFLAGST=-Os -fno-strict-aliasing -fpack-struct -fcall-used-es -Wno-pointer-to-int-cast -Wno-pragmas -Wno-array-bounds -Werror -o $@ CFLAGSC= # @@ -44,16 +44,18 @@ CFLAGSC= # # -mcmodel=small small memory model (small code/small data) # -Os -> favor code size over execution time in optimizations +# -fno-strict-aliasing don't assume strict aliasing rules # -fleading-underscore underscores leading field for DOS compiler compat # -fno-common no "common" variables, just BSS for uninitialized data # -fpack-struct pack structure members # -ffreestanding don't assume any headers # -fcall-used-es es clobbered in function calls # -mrtd use stdcall calling convention -# -w disable warnings for now +# -Wno-pointer-to-int-cast do not warn about FP_OFF +# -Wno-pragmas do not warn about #pragma pack # -Werror treat all warnings as errors -ALLCFLAGS+=-I../hdr $(TARGETOPT) -mcmodel=small -fleading-underscore -fno-common -fpack-struct -ffreestanding -fcall-used-es -mrtd -w -Werror -Os +ALLCFLAGS+=-I../hdr $(TARGETOPT) -mcmodel=small -fleading-underscore -fno-common -fpack-struct -ffreestanding -fcall-used-es -mrtd -Wno-pointer-to-int-cast -Wno-pragmas -Werror -Os -fno-strict-aliasing INITCFLAGS=$(ALLCFLAGS) -o $@ CFLAGS=$(ALLCFLAGS) -o $@ diff --git a/sys/sys.c b/sys/sys.c index a68c9f0..c9cbc92 100644 --- a/sys/sys.c +++ b/sys/sys.c @@ -1128,7 +1128,7 @@ int generic_block_ioctl(unsigned drive, unsigned cx, unsigned char *par); #ifndef __TURBOC__ -int2526readwrite(int DosDrive, void *diskReadPacket, unsigned intno) +int int2526readwrite(int DosDrive, void *diskReadPacket, unsigned intno) { union REGS regs;