Added HOST=mingw32-linux64 setting.

Fixed various small breakage for linux64 host.

svn path=/trunk/; revision=14910
This commit is contained in:
Art Yerkes 2005-05-01 11:24:07 +00:00
parent 515d8e34ac
commit 196bd4d6aa
21 changed files with 85 additions and 55 deletions

View file

@ -129,7 +129,7 @@ void printf __P((const char *, ...));
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;

View file

@ -11,11 +11,8 @@ TARGET_TYPE = library
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)/helper.mk
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

View file

@ -19,7 +19,7 @@ TARGET_CLEAN = authors.c
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

View file

@ -72,7 +72,27 @@ endif
#
# 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 @@ endif
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 MS2PS = $(Q)$(TOOLS_PATH)/ms2ps/ms2ps
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)

View file

@ -3,11 +3,10 @@ PATH_TO_TOP = ..
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 @@ clean:
$(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

View file

@ -19,11 +19,10 @@ mkstemps.o: mkstemps.c
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

View file

@ -26,12 +26,11 @@ buildno$(EXE_POSTFIX): $(OBJECTS)
$(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

View file

@ -2473,7 +2473,7 @@ unsigned long CCabinet::ComputeChecksum(void* Buffer,
/* 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

View file

@ -33,12 +33,11 @@ dfp.o: dfp.cxx
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)

View file

@ -22,12 +22,11 @@ llmosrt.o: llmosrt.c
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)

View file

@ -230,6 +230,7 @@ ifeq ($(TARGET_TYPE),host_library)
MK_DEFEXT := .a
MK_CFLAGS :=
MK_CPPFLAGS :=
MK_HOST_CFLAGS := yes
MK_LIBPATH := .
MK_IMPLIB := no
MK_IMPLIBONLY := no
@ -513,6 +514,7 @@ ifeq ($(TARGET_TYPE),winedll)
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 @@ ifeq ($(TARGET_TYPE),winedrv)
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 @@ ifeq ($(MK_MODE),user)
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 @@ endif
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 @@ endif
ifeq ($(TARGET_WINETESTS),yes)
all:
- $(MAKE) -C winetests
MK_REGTESTS_CLEAN := clean_winetests
MK_REGTESTS_CLEAN := clean_winetests
endif
ifeq ($(TARGET_INSTALL),)

View file

@ -36,6 +36,11 @@ clean:
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

View file

@ -19,12 +19,11 @@ llmosrt.o: llmosrt.c
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)

View file

@ -12,10 +12,9 @@ include $(PATH_TO_TOP)/rules.mak
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

View file

@ -34,7 +34,7 @@ LIBS = $(LIB_WPP_DIR)/libwpp.a
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_CFLAGS = -DYYDEBUG=1 -DINT16=SHORT -D__USE_W32API \
$(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

View file

@ -16,11 +16,10 @@ wine2ros.o: wine2ros.c
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

View file

@ -22,19 +22,23 @@ OBJECTS = \
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

View file

@ -703,6 +703,7 @@ static int output_immediate_imports( FILE *outfile )
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 @@ static int output_immediate_imports( FILE *outfile )
#else
#error You need to define import thunks for your architecture!
#endif
#endif /*__REACTOS__*/
fprintf( outfile, "\"\n" );
output_function_size( outfile, name );
}

View file

@ -40,12 +40,11 @@ write.o: write.c
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)

View file

@ -6,7 +6,7 @@ TARGET_TYPE = host_library
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

View file

@ -33,7 +33,7 @@ LIBS = $(LIB_UNICODE_DIR)/libunicode.a $(LIB_WPP_DIR)/libwpp.a
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_CFLAGS = -D__USE_W32API -DWINE_UNICODE_API= \
$(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