mirror of https://github.com/FDOS/kernel.git
ia16-elf-gcc: enable and fix basic warnings; don't do strict ptr aliasing for now
This commit is contained in:
parent
ce8e4fd091
commit
a70f31bf61
|
@ -48,7 +48,6 @@ additionally:
|
||||||
/*extern struct DynS FAR Dyn;*/
|
/*extern struct DynS FAR Dyn;*/
|
||||||
|
|
||||||
#ifndef __TURBOC__
|
#ifndef __TURBOC__
|
||||||
#include "init-dat.h"
|
|
||||||
extern struct DynS DOSFAR ASM Dyn;
|
extern struct DynS DOSFAR ASM Dyn;
|
||||||
#else
|
#else
|
||||||
extern struct DynS FAR ASM Dyn;
|
extern struct DynS FAR ASM Dyn;
|
||||||
|
|
|
@ -353,8 +353,13 @@ extern struct RelocationTable
|
||||||
|
|
||||||
extern void FAR *DOSFAR ASM XMSDriverAddress;
|
extern void FAR *DOSFAR ASM XMSDriverAddress;
|
||||||
#define XMSDriverAddress DOSDATA(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 _EnableA20(VOID);
|
||||||
extern VOID ASMPASCAL FAR _DisableA20(VOID);
|
extern VOID ASMPASCAL FAR _DisableA20(VOID);
|
||||||
|
#endif
|
||||||
|
|
||||||
extern void FAR * ASMPASCAL DetectXMSDriver(VOID);
|
extern void FAR * ASMPASCAL DetectXMSDriver(VOID);
|
||||||
extern int ASMPASCAL init_call_XMScall(void FAR * driverAddress, UWORD ax,
|
extern int ASMPASCAL init_call_XMScall(void FAR * driverAddress, UWORD ax,
|
||||||
|
|
|
@ -36,7 +36,7 @@ LIBPLUS=
|
||||||
LIBTERM=
|
LIBTERM=
|
||||||
|
|
||||||
TINY=-mcmodel=tiny
|
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=
|
CFLAGSC=
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -44,16 +44,18 @@ CFLAGSC=
|
||||||
#
|
#
|
||||||
# -mcmodel=small small memory model (small code/small data)
|
# -mcmodel=small small memory model (small code/small data)
|
||||||
# -Os -> favor code size over execution time in optimizations
|
# -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
|
# -fleading-underscore underscores leading field for DOS compiler compat
|
||||||
# -fno-common no "common" variables, just BSS for uninitialized data
|
# -fno-common no "common" variables, just BSS for uninitialized data
|
||||||
# -fpack-struct pack structure members
|
# -fpack-struct pack structure members
|
||||||
# -ffreestanding don't assume any headers
|
# -ffreestanding don't assume any headers
|
||||||
# -fcall-used-es es clobbered in function calls
|
# -fcall-used-es es clobbered in function calls
|
||||||
# -mrtd use stdcall calling convention
|
# -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
|
# -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 $@
|
INITCFLAGS=$(ALLCFLAGS) -o $@
|
||||||
CFLAGS=$(ALLCFLAGS) -o $@
|
CFLAGS=$(ALLCFLAGS) -o $@
|
||||||
|
|
||||||
|
|
|
@ -1128,7 +1128,7 @@ int generic_block_ioctl(unsigned drive, unsigned cx, unsigned char *par);
|
||||||
|
|
||||||
#ifndef __TURBOC__
|
#ifndef __TURBOC__
|
||||||
|
|
||||||
int2526readwrite(int DosDrive, void *diskReadPacket, unsigned intno)
|
int int2526readwrite(int DosDrive, void *diskReadPacket, unsigned intno)
|
||||||
{
|
{
|
||||||
union REGS regs;
|
union REGS regs;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue