cmm: - added __COFF__ predefined macro (for mark MSCOFF build);

- edited makefiles (added compiler -fpack-struct=2 option/for correct struct
       packing)

git-svn-id: svn://kolibrios.org@9695 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Coldy 2022-02-07 09:45:44 +00:00
parent 28bfa13e88
commit 115b81881f
8 changed files with 14 additions and 11 deletions

View File

@ -2,8 +2,8 @@
Compiler = gcc Compiler = gcc
Compiler_Options = -m32 -c -fno-exceptions -D_UNIX_ Compiler_Options = -m32 -c -fpack-struct=2 -fno-exceptions -D_UNIX_
#Compiler_Options = -c -fno-exceptions -O2 -D_WIN32_ #Compiler_Options = -c -fpack-struct=2 -fno-exceptions -O2 -D_WIN32_
#-D: _WIN32_ or _UNIX_ #-D: _WIN32_ or _UNIX_
#-D: for _WIN32_ add -D__CONSOLE__ #-D: for _WIN32_ add -D__CONSOLE__

View File

@ -1,4 +1,4 @@
CPPFLAGS=-m32 -fno-exceptions -std=c++03 -Wno-write-strings -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp -DO_BINARY=0 -D_UNIX_ CPPFLAGS=-m32 -fpack-struct=2 -fno-exceptions -std=c++03 -Wno-write-strings -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp -DO_BINARY=0 -D_UNIX_
LDFLAGS=-m32 LDFLAGS=-m32
OBJS=$(patsubst %.cpp, %.o, $(wildcard *.cpp)) OBJS=$(patsubst %.cpp, %.o, $(wildcard *.cpp))

View File

@ -1,7 +1,7 @@
Compiler = gcc Compiler = gcc
#Compiler_Options = -c -fno-exceptions -D_UNIX_ #Compiler_Options = -c -fpack-struct=2 -fno-exceptions -D_UNIX_
Compiler_Options = -c -fno-exceptions -O2 -D_WIN32_ Compiler_Options = -c -fpack-struct=2 -fno-exceptions -O2 -D_WIN32_
#-D: _WIN32_ or _UNIX_ #-D: _WIN32_ or _UNIX_
#-D: for _WIN32_ add -D__CONSOLE__ #-D: for _WIN32_ add -D__CONSOLE__

View File

@ -1,4 +1,4 @@
CPPFLAGS=-m32 -fno-exceptions -std=c++03 -Wno-write-strings -D_WIN32_ CPPFLAGS=-m32 -fpack-struct=2 -fno-exceptions -std=c++03 -Wno-write-strings -D_WIN32_
LDFLAGS=-m32 LDFLAGS=-m32
OBJS=$(patsubst %.cpp, %.o, $(wildcard *.cpp)) OBJS=$(patsubst %.cpp, %.o, $(wildcard *.cpp))

View File

@ -7,7 +7,7 @@ Includes = -Id:\TEMP\mprog\kos\includes -I$(SDK_DIR)/sources/newlib/libc/include
Compatib_Posix = -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp Compatib_Posix = -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp
Compiler_Options = -c -fno-exceptions -D_KOS_ -U_Win32 -U_WIN32 -U__MINGW32__ \ Compiler_Options = -c -fpack-struct=2 -fno-exceptions -D_KOS_ -U_Win32 -U_WIN32 -U__MINGW32__ \
-mno-ms-bitfields -Wno-write-strings $(Includes) $(Compatib_Posix) -mno-ms-bitfields -Wno-write-strings $(Includes) $(Compatib_Posix)
Exe_file = cmm.kex Exe_file = cmm.kex

View File

@ -1,7 +1,7 @@
Compiler = gcc Compiler = gcc
Compiler_Options = -c -m32 -fno-exceptions -D_UNIX_ Compiler_Options = -c -m32 -fpack-struct=2 -fno-exceptions -D_UNIX_
#Compiler_Options = -c -fno-exceptions -O2 -D_WIN32_ #Compiler_Options = -c -fpack-struct=2 -fno-exceptions -O2 -D_WIN32_
#-D: _WIN32_ or _UNIX_ #-D: _WIN32_ or _UNIX_
#-D: for _WIN32_ add -D__CONSOLE__ #-D: for _WIN32_ add -D__CONSOLE__

View File

@ -1,8 +1,8 @@
Compiler = gcc Compiler = gcc
Compatib_Posix = -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp Compatib_Posix = -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp
Compiler_Options = -m32 -c -fno-exceptions -D_UNIX_ $(Compatib_Posix) -Wno-narrowing Compiler_Options = -m32 -c -fpack-struct=2 -fno-exceptions -D_UNIX_ $(Compatib_Posix) -Wno-narrowing
#Compiler_Options = -c -fno-exceptions -O2 -D_WIN32_ #Compiler_Options = -c -fpack-struct=2 -fno-exceptions -O2 -D_WIN32_
#-D: _WIN32_ or _UNIX_ #-D: _WIN32_ or _UNIX_
#-D: for _WIN32_ add -D__CONSOLE__ #-D: for _WIN32_ add -D__CONSOLE__

View File

@ -4264,6 +4264,9 @@ int ifdefconst()
if(comfile==file_meos&&strcmp((char *)string+2,"MEOS__")==0)return TRUE; if(comfile==file_meos&&strcmp((char *)string+2,"MEOS__")==0)return TRUE;
if((sobj||fobj)&&strcmp((char *)string+2,"OBJ__")==0)return TRUE; if((sobj||fobj)&&strcmp((char *)string+2,"OBJ__")==0)return TRUE;
// Added by Coldy (for mark MSCOFF build)
if ((ocoff&&sobj) && strcmp((char *)string + 2, "COFF__") == 0)return TRUE;
if(comfile==file_exe){ if(comfile==file_exe){