Added HOST=mingw32-linux64 setting. Fixed various small breakage for linux64 host. Modified: trunk/reactos/drivers/lib/oskittcp/include/freebsd/src/sys/sys/systm.h Modified: trunk/reactos/drivers/lib/oskittcp/makefile Modified: trunk/reactos/lib/shell32/Makefile.ros-template Modified: trunk/reactos/rules.mak Modified: trunk/reactos/tools/Makefile Modified: trunk/reactos/tools/bin2res/Makefile Modified: trunk/reactos/tools/buildno/Makefile Modified: trunk/reactos/tools/cabman/cabinet.cxx Modified: trunk/reactos/tools/cabman/makefile Modified: trunk/reactos/tools/cdmake/Makefile Modified: trunk/reactos/tools/helper.mk Modified: trunk/reactos/tools/mkhive/Makefile Modified: trunk/reactos/tools/rgenstat/Makefile Modified: trunk/reactos/tools/tools-check.mak Modified: trunk/reactos/tools/widl/Makefile Modified: trunk/reactos/tools/wine2ros/Makefile Modified: trunk/reactos/tools/winebuild/Makefile Modified: trunk/reactos/tools/winebuild/import.c Modified: trunk/reactos/tools/wmc/makefile Modified: trunk/reactos/tools/wpp/Makefile Modified: trunk/reactos/tools/wrc/Makefile _____
Modified: trunk/reactos/drivers/lib/oskittcp/include/freebsd/src/sys/sys/systm.h --- trunk/reactos/drivers/lib/oskittcp/include/freebsd/src/sys/sys/systm.h 2005-05-01 11:15:11 UTC (rev 14909) +++ trunk/reactos/drivers/lib/oskittcp/include/freebsd/src/sys/sys/systm.h 2005-05-01 11:24:07 UTC (rev 14910) @@ -129,7 +129,7 @@
int __cdecl vprintf(const char *, va_list);
#define log bsd_log -static inline int bsd_log ( int blah, const char* fmt, ... ) +static int bsd_log ( int blah, const char* fmt, ... ) { va_list arg; int i; _____
Modified: trunk/reactos/drivers/lib/oskittcp/makefile --- trunk/reactos/drivers/lib/oskittcp/makefile 2005-05-01 11:15:11 UTC (rev 14909) +++ trunk/reactos/drivers/lib/oskittcp/makefile 2005-05-01 11:24:07 UTC (rev 14910) @@ -11,11 +11,8 @@
TARGET_NAME = oskittcp
#-DMEMTRACK -TARGET_CFLAGS = -g -D__REACTOS__=1 -D__NTDRIVER__ -DKERNEL -Iinclude/freebsd -Iinclude/freebsd/sys/include -Iinclude/freebsd/src/sys -Iinclude/freebsd/dev/include -Iinclude/freebsd/net/include -Iinclude -I$(PATH_TO_TOP)/w32api/include -I$(PATH_TO_TOP)/include
# require os code to explicitly request A/W version of structs/functions -TARGET_CFLAGS += -D_DISABLE_TIDENTS - TARGET_ASFLAGS = -I $(PATH_TO_TOP)/include
TARGET_LFLAGS = -Wl,--file-alignment,0x1000 \ @@ -71,6 +68,8 @@
include $(TOOLS_PATH)/depend.mk
+TARGET_CFLAGS += -D__REACTOS__=1 -D__NTDRIVER__ -DKERNEL -Iinclude/freebsd -Iinclude/freebsd/sys/include -Iinclude/freebsd/src/sys -Iinclude/freebsd/dev/include -Iinclude/freebsd/net/include -Iinclude + %/TAGS: etags -o $(@D)/TAGS $(@D)/*.c
_____
Modified: trunk/reactos/lib/shell32/Makefile.ros-template --- trunk/reactos/lib/shell32/Makefile.ros-template 2005-05-01 11:15:11 UTC (rev 14909) +++ trunk/reactos/lib/shell32/Makefile.ros-template 2005-05-01 11:24:07 UTC (rev 14910) @@ -19,7 +19,7 @@
default: all
authors.c: -ifeq ($(HOST),mingw32-linux) +ifeq ($(HOST_TYPE),unix) echo 'const char * const SHELL_Authors[] = { "Copyright 1993-2005 WINE team", "Copyright 1998-2005 ReactOS team", 0 };' > authors.c else echo const char * const SHELL_Authors[] = { "Copyright 1993-2005 WINE team", "Copyright 1998-2005 ReactOS team", 0 }; > authors.c _____
Modified: trunk/reactos/rules.mak --- trunk/reactos/rules.mak 2005-05-01 11:15:11 UTC (rev 14909) +++ trunk/reactos/rules.mak 2005-05-01 11:24:07 UTC (rev 14910) @@ -72,7 +72,27 @@
# # Choose various options # +ifeq ($(HOST),mingw32-linux64) +export HOST_TYPE = unix +export NASM_FORMAT = win32 +export PREFIX = mingw32- +export EXE_POSTFIX := +export EXE_PREFIX := ./ +export DLLTOOL = $(PREFIX)dlltool --as=$(PREFIX)as +# +# Do not change NASM_CMD to NASM because older versions of +# nasm doesn't like an environment variable NASM +# +export NASM_CMD = nasm +export DOSCLI = +export FLOPPY_DIR = /mnt/floppy +export SEP := / +export PIPE := +export HOST_ARCH := -m32 +endif + ifeq ($(HOST),mingw32-linux) +export HOST_TYPE = unix export NASM_FORMAT = win32 export PREFIX = mingw32- export EXE_POSTFIX := @@ -132,8 +152,8 @@
export CC = $(Q)$(PREFIX)gcc export CXX = $(Q)$(PREFIX)g++ -export HOST_CC = $(Q)gcc -export HOST_CXX = $(Q)g++ +export HOST_CC = $(Q)gcc $(HOST_ARCH) +export HOST_CXX = $(Q)g++ $(HOST_ARCH) export HOST_AR = $(Q)ar export HOST_NM = $(Q)nm export LD = $(Q)$(PREFIX)ld @@ -169,7 +189,9 @@ export WRC = $(Q)$(TOOLS_PATH)/wrc/wrc export WIDL = $(Q)$(TOOLS_PATH)/widl/widl
+export HOST_STD_CFLAGS = -I$(PATH_TO_TOP)/include -I$(W32API_PATH)/include -pipe -D_M_IX86 $(HOSTARCH) export STD_CFLAGS = -I$(PATH_TO_TOP)/include -I$(W32API_PATH)/include -pipe -march=$(OARCH) -D_M_IX86 +export HOST_STD_CPPFLAGS = $(HOST_STD_CFLAGS) export STD_CPPFLAGS = $(STD_CFLAGS) # Check for 3GB ifeq ($(3GB), 1) _____
Modified: trunk/reactos/tools/Makefile --- trunk/reactos/tools/Makefile 2005-05-01 11:15:11 UTC (rev 14909) +++ trunk/reactos/tools/Makefile 2005-05-01 11:24:07 UTC (rev 14910) @@ -3,11 +3,10 @@
include $(PATH_TO_TOP)/rules.mak
CFLAGS += -Wall -Werror -ifeq ($(HOST),mingw32-linux) +ifeq ($(HOST_TYPE),unix) CFLAGS += -DUNIX_PATHS rm := @rm -endif -ifeq ($(HOST),mingw32-windows) +else CFLAGS += -DDOS_PATHS rm := -@del endif @@ -152,11 +151,10 @@ $(MAKE) --silent -C ../lib/zlib -f Makefile.host clean $(MAKE) -C wpp clean $(MAKE) -C unicode clean -ifeq ($(HOST),mingw32-linux) +ifeq ($(HOST_TYPE),unix) @rm mkconfig @rm $(TOOLS) -endif -ifeq ($(HOST),mingw32-windows) +else $(MAKE) --silent -C pipetools clean $(rm) *$(EXE_POSTFIX) endif _____
Modified: trunk/reactos/tools/bin2res/Makefile --- trunk/reactos/tools/bin2res/Makefile 2005-05-01 11:15:11 UTC (rev 14909) +++ trunk/reactos/tools/bin2res/Makefile 2005-05-01 11:24:07 UTC (rev 14910) @@ -19,11 +19,10 @@
bin2res$(EXE_POSTFIX): $(OBJECTS) $(HOST_CC) -g $(OBJECTS) -o $(TARGET)
-ifeq ($(HOST),mingw32-linux) +ifeq ($(HOST_TYPE),unix) clean: rm -f *.o $(TARGET) -endif -ifneq ($(HOST),mingw32-linux) +else clean: del *.o $(TARGET) endif _____
Modified: trunk/reactos/tools/buildno/Makefile --- trunk/reactos/tools/buildno/Makefile 2005-05-01 11:15:11 UTC (rev 14909) +++ trunk/reactos/tools/buildno/Makefile 2005-05-01 11:24:07 UTC (rev 14910) @@ -26,12 +26,11 @@
$(HOST_CXX) -g $(OBJECTS) -o $(TARGET) @$(EXE_PREFIX)buildno$(EXE_POSTFIX)
-ifeq ($(HOST),mingw32-linux) +ifeq ($(HOST_TYPE),unix) clean: -rm -f *.o $(TARGET) -rm $(PATH_TO_TOP)/include/reactos/buildno.h -endif -ifneq ($(HOST),mingw32-linux) +else clean: -del *.o $(TARGET) -del ....\include\reactos\buildno.h _____
Modified: trunk/reactos/tools/cabman/cabinet.cxx --- trunk/reactos/tools/cabman/cabinet.cxx 2005-05-01 11:15:11 UTC (rev 14909) +++ trunk/reactos/tools/cabman/cabinet.cxx 2005-05-01 11:24:07 UTC (rev 14910) @@ -2473,7 +2473,7 @@
/* FIXME: Doesn't seem to be correct. EXTRACT.EXE won't accept checksums computed by this routine */
- DPRINT(MIN_TRACE, ("Checksumming buffer (0x%X) Size (%d)\n", (unsigned int)Buffer, Size)); + DPRINT(MIN_TRACE, ("Checksumming buffer (0x%p) Size (%d)\n", Buffer, Size));
UlongCount = Size / 4; // Number of ULONGs Checksum = Seed; // Init checksum _____
Modified: trunk/reactos/tools/cabman/makefile --- trunk/reactos/tools/cabman/makefile 2005-05-01 11:15:11 UTC (rev 14909) +++ trunk/reactos/tools/cabman/makefile 2005-05-01 11:24:07 UTC (rev 14910) @@ -33,12 +33,11 @@
cabman$(EXE_POSTFIX): $(OBJECTS) $(HOST_CXX) $(OBJECTS) $(HOST_LFLAGS) -o cabman$(EXE_POSTFIX)
-ifeq ($(HOST),mingw32-linux) +ifeq ($(HOST_TYPE),unix) clean: rm -f *.o rm -f cabman$(EXE_POSTFIX) -endif -ifeq ($(HOST),mingw32-windows) +else clean: -del *.o -del cabman$(EXE_POSTFIX) _____
Modified: trunk/reactos/tools/cdmake/Makefile --- trunk/reactos/tools/cdmake/Makefile 2005-05-01 11:15:11 UTC (rev 14909) +++ trunk/reactos/tools/cdmake/Makefile 2005-05-01 11:24:07 UTC (rev 14910) @@ -22,12 +22,11 @@
cdmake$(EXE_POSTFIX): $(OBJECTS) $(HOST_CC) $(OBJECTS) -o cdmake$(EXE_POSTFIX)
-ifeq ($(HOST),mingw32-linux) +ifeq ($(HOST_TYPE),unix) clean: rm -f *.o rm -f cdmake$(EXE_POSTFIX) -endif -ifeq ($(HOST),mingw32-windows) +else clean: -del *.o -del cdmake$(EXE_POSTFIX) _____
Modified: trunk/reactos/tools/helper.mk --- trunk/reactos/tools/helper.mk 2005-05-01 11:15:11 UTC (rev 14909) +++ trunk/reactos/tools/helper.mk 2005-05-01 11:24:07 UTC (rev 14910) @@ -230,6 +230,7 @@
MK_DEFEXT := .a MK_CFLAGS := MK_CPPFLAGS := + MK_HOST_CFLAGS := yes MK_LIBPATH := . MK_IMPLIB := no MK_IMPLIBONLY := no @@ -513,6 +514,7 @@ MK_SDKLIBS := MK_CFLAGS := -D__USE_W32API -D_WIN32_IE=0x600 -D_WIN32_WINNT=0x501 -DWINVER=0x501 -D_STDDEF_H -I$(PATH_TO_TOP)/include/wine MK_CPPFLAGS := -D__USE_W32API -D_WIN32_IE=0x600 -D_WIN32_WINNT=0x501 -DWINVER=0x501 -D__need_offsetof -I$(PATH_TO_TOP)/include -I$(PATH_TO_TOP)/include/wine + MK_HOST_CFLAGS := yes MK_PREPROC_FOR_RC_FLAGS := -xc -E -DRC_INVOKED -D__USE_W32API -I$(PATH_TO_TOP)/include/wine -I$(PATH_TO_TOP)/include -I$(PATH_TO_TOP)/w32api/include MK_IMPLIB := yes MK_IMPLIBONLY := no @@ -547,6 +549,7 @@ MK_SDKLIBS := MK_CFLAGS := -D__USE_W32API -D_WIN32_IE=0x600 -D_WIN32_WINNT=0x501 -DWINVER=0x501 -D__need_offsetof -I$(PATH_TO_TOP)/include/wine MK_CPPFLAGS := -D__USE_W32API -D_WIN32_IE=0x600 -D_WIN32_WINNT=0x501 -DWINVER=0x501 -D__need_offsetof -I$(PATH_TO_TOP)/include -I$(PATH_TO_TOP)/include/wine + MK_HOST_CFLAGS := yes MK_RCFLAGS := --define __USE_W32API --include-dir $(PATH_TO_TOP)/include/wine MK_IMPLIB := yes MK_IMPLIBONLY := no @@ -641,6 +644,13 @@ endif endif
+ifeq ($(MK_HOST_CFLAGS),yes) + MK_CFLAGS += $(HOST_STD_CFLAGS) + MK_CPPFLAGS += $(HOST_STD_CPPFLAGS) +else + MK_CFLAGS += $(STD_CFLAGS) + MK_CPPFLAGS += $(STD_CPPFLAGS) +endif
ifeq ($(MK_MODE),kernel) MK_DEFBASE := 0x10000 @@ -709,9 +719,9 @@ include $(PATH_TO_TOP)/config
-TARGET_CFLAGS += $(MK_CFLAGS) $(STD_CFLAGS) -g +TARGET_CFLAGS += $(MK_CFLAGS) -g
-TARGET_CPPFLAGS += $(MK_CPPFLAGS) $(STD_CPPFLAGS) -g +TARGET_CPPFLAGS += $(MK_CPPFLAGS) -g
TARGET_RCFLAGS += $(MK_RCFLAGS) $(STD_RCFLAGS)
@@ -767,7 +777,7 @@ ifeq ($(TARGET_WINETESTS),yes) all: - $(MAKE) -C winetests - MK_REGTESTS_CLEAN := clean_winetests + MK_REGTESTS_CLEAN := clean_winetests endif
ifeq ($(TARGET_INSTALL),) _____
Modified: trunk/reactos/tools/mkhive/Makefile --- trunk/reactos/tools/mkhive/Makefile 2005-05-01 11:15:11 UTC (rev 14909) +++ trunk/reactos/tools/mkhive/Makefile 2005-05-01 11:24:07 UTC (rev 14910) @@ -36,6 +36,11 @@
rm -f *.o rm -f mkhive$(EXE_POSTFIX) endif +ifeq ($(HOST),mingw32-linux64) +clean: + rm -f *.o + rm -f mkhive$(EXE_POSTFIX) +endif ifeq ($(HOST),mingw32-windows) clean: -del *.o _____
Modified: trunk/reactos/tools/rgenstat/Makefile --- trunk/reactos/tools/rgenstat/Makefile 2005-05-01 11:15:11 UTC (rev 14909) +++ trunk/reactos/tools/rgenstat/Makefile 2005-05-01 11:24:07 UTC (rev 14910) @@ -19,12 +19,11 @@
rgenstat$(EXE_POSTFIX): $(OBJECTS) $(HOST_CC) $(OBJECTS) -o rgenstat$(EXE_POSTFIX)
-ifeq ($(HOST),mingw32-linux) +ifeq ($(HOST_TYPE),unix) clean: rm -f *.o rm -f rgenstat$(EXE_POSTFIX) -endif -ifeq ($(HOST),mingw32-windows) +else clean: -del *.o -del rgenstat$(EXE_POSTFIX) _____
Modified: trunk/reactos/tools/tools-check.mak --- trunk/reactos/tools/tools-check.mak 2005-05-01 11:15:11 UTC (rev 14909) +++ trunk/reactos/tools/tools-check.mak 2005-05-01 11:24:07 UTC (rev 14910) @@ -12,10 +12,9 @@
BINUTILS_VERSION_DATE=$(word 5,$(shell $(PREFIX)ld -v))
all: -ifeq ($(HOST),mingw32-linux) +ifeq ($(HOST_TYPE),unix) @echo "#define BINUTILS_VERSION_DATE $(BINUTILS_VERSION_DATE)" > tools-check.h -endif -ifeq ($(HOST),mingw32-windows) +else @echo #define BINUTILS_VERSION_DATE $(BINUTILS_VERSION_DATE) > tools-check.h endif $(HOST_CC) -c tools-check.c -o tools-check.temp _____
Modified: trunk/reactos/tools/widl/Makefile --- trunk/reactos/tools/widl/Makefile 2005-05-01 11:15:11 UTC (rev 14909) +++ trunk/reactos/tools/widl/Makefile 2005-05-01 11:24:07 UTC (rev 14910) @@ -34,7 +34,7 @@
CLEAN_FILES = *.o $(TARGET)
-HOST_CFLAGS = -DYYDEBUG=1 -DINT16=SHORT -D__USE_W32API \ +HOST_CFLAGS = $(HOSTARCH) -DYYDEBUG=1 -DINT16=SHORT -D__USE_W32API \ -I$(LIB_WPP_DIR) -I$(PATH_TO_TOP)/include/wine \ -I$(PATH_TO_TOP)/include -I$(PATH_TO_TOP)/w32api/include \ -Werror -Wall @@ -43,13 +43,12 @@ $(HOST_CC) $(HOST_CFLAGS) -c $< -o $@
$(TARGET): $(OBJECTS) $(LIBS) - $(HOST_CC) -o $(TARGET) $(OBJECTS) $(LIBS) + $(HOST_CC) $(HOSTARCH) -o $(TARGET) $(OBJECTS) $(LIBS)
-ifeq ($(HOST),mingw32-linux) +ifeq ($(HOST_TYPE),unix) clean: -rm -f $(OBJECTS) $(TARGET) -endif -ifneq ($(HOST),mingw32-linux) +else clean: -del $(TARGET) -del *.o _____
Modified: trunk/reactos/tools/wine2ros/Makefile --- trunk/reactos/tools/wine2ros/Makefile 2005-05-01 11:15:11 UTC (rev 14909) +++ trunk/reactos/tools/wine2ros/Makefile 2005-05-01 11:24:07 UTC (rev 14910) @@ -16,11 +16,10 @@
wine2ros$(EXE_POSTFIX): $(OBJECTS) $(HOST_CC) -g $(OBJECTS) -o $(TARGET)
-ifeq ($(HOST),mingw32-linux) +ifeq ($(HOST_TYPE),unix) clean: rm -f *.o $(TARGET) -endif -ifneq ($(HOST),mingw32-linux) +else clean: del *.o $(TARGET) endif _____
Modified: trunk/reactos/tools/winebuild/Makefile --- trunk/reactos/tools/winebuild/Makefile 2005-05-01 11:15:11 UTC (rev 14909) +++ trunk/reactos/tools/winebuild/Makefile 2005-05-01 11:24:07 UTC (rev 14910) @@ -22,20 +22,24 @@
CLEAN_FILES = *.o $(TARGET)
-HOST_CFLAGS = -D__USE_W32API -I$(PATH_TO_TOP)/include/wine +HOST_CFLAGS = $(HOSTARCH) -D__USE_W32API -I$(PATH_TO_TOP)/include/wine
%.o: %.c $(HOST_CC) $(HOST_CFLAGS) -c $< -o $@
$(TARGET): $(OBJECTS) - $(HOST_CC) $(OBJECTS) -o $(TARGET) + $(HOST_CC) $(HOSTARCH) $(OBJECTS) -o $(TARGET)
ifeq ($(HOST),mingw32-linux) clean: rm -f $(CLEAN_FILES) endif -ifneq ($(HOST),mingw32-linux) +ifeq ($(HOST),mingw32-linux64) clean: + rm -f $(CLEAN_FILES) +endif +ifeq ($(HOST),mingw32-windows) +clean: del $(CLEAN_FILES) endif
_____
Modified: trunk/reactos/tools/winebuild/import.c --- trunk/reactos/tools/winebuild/import.c 2005-05-01 11:15:11 UTC (rev 14909) +++ trunk/reactos/tools/winebuild/import.c 2005-05-01 11:24:07 UTC (rev 14910) @@ -703,6 +703,7 @@
fprintf( outfile, " "\t.globl " __ASM_NAME("%s") "\n"\n", name ); fprintf( outfile, " "" __ASM_NAME("%s") ":\n\t", name);
+#ifndef __REACTOS__ #if defined(__i386__) if (strstr( name, "__wine_call_from_16" )) fprintf( outfile, ".byte 0x2e\n\tjmp *(imports+%d)\n\tnop\n", pos ); @@ -754,6 +755,7 @@ #else #error You need to define import thunks for your architecture! #endif +#endif /*__REACTOS__*/ fprintf( outfile, ""\n" ); output_function_size( outfile, name ); } _____
Modified: trunk/reactos/tools/wmc/makefile --- trunk/reactos/tools/wmc/makefile 2005-05-01 11:15:11 UTC (rev 14909) +++ trunk/reactos/tools/wmc/makefile 2005-05-01 11:24:07 UTC (rev 14910) @@ -40,12 +40,11 @@
y_tab.o: y_tab.c $(HOST_CC) $(HOST_CFLAGS) -g -c y_tab.c -o y_tab.o
-ifeq ($(HOST),mingw32-linux) +ifeq ($(HOST_TYPE),unix) clean: rm -f *.o rm -f wmc$(EXE_POSTFIX) -endif -ifeq ($(HOST),mingw32-windows) +else clean: -del *.o -del wmc$(EXE_POSTFIX) _____
Modified: trunk/reactos/tools/wpp/Makefile --- trunk/reactos/tools/wpp/Makefile 2005-05-01 11:15:11 UTC (rev 14909) +++ trunk/reactos/tools/wpp/Makefile 2005-05-01 11:24:07 UTC (rev 14910) @@ -6,7 +6,7 @@
TARGET_NAME = wpp
-TARGET_CFLAGS = -D__USE_W32API -I$(PATH_TO_TOP)/include/wine +TARGET_CFLAGS = $(HOSTARCH) -D__USE_W32API -I$(PATH_TO_TOP)/include/wine
TARGET_OBJECTS = preproc.o wpp.o wpp.tab.o lex.yy.o
_____
Modified: trunk/reactos/tools/wrc/Makefile --- trunk/reactos/tools/wrc/Makefile 2005-05-01 11:15:11 UTC (rev 14909) +++ trunk/reactos/tools/wrc/Makefile 2005-05-01 11:24:07 UTC (rev 14910) @@ -33,7 +33,7 @@
CLEAN_FILES = *.o $(TARGET)
-HOST_CFLAGS = -D__USE_W32API -DWINE_UNICODE_API= \ +HOST_CFLAGS = $(HOSTARCH) -D__USE_W32API -DWINE_UNICODE_API= \ -Dwchar_t="unsigned short" -D_WCHAR_T_DEFINED \ -I$(LIB_UNICODE_DIR) -I$(LIB_WPP_DIR) -I$(PATH_TO_TOP)/include/wine \ -I$(PATH_TO_TOP)/include -I$(PATH_TO_TOP)/w32api/include @@ -42,13 +42,12 @@ $(HOST_CC) $(HOST_CFLAGS) -c $< -o $@
$(TARGET): $(OBJECTS) $(LIBS) - $(HOST_CC) -o $(TARGET) $(OBJECTS) $(LIBS) + $(HOST_CC) $(HOSTARCH) -o $(TARGET) $(OBJECTS) $(LIBS)
-ifeq ($(HOST),mingw32-linux) +ifeq ($(HOST_TYPE),unix) clean: -rm -f $(OBJECTS) $(TARGET) -endif -ifneq ($(HOST),mingw32-linux) +else clean: -del $(TARGET) -del *.o