From c53f7fd2ca7d605397091294683eaf63d6b922f2 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Mon, 27 Feb 2006 19:22:08 +0000 Subject: Qing Dong provided a set of changes to allow krb5 to build under the Microsoft Visual Studio 8 compiler in 64-bit mode and produce file names that do not conflict with the names produced by the 32-bit build. That patch was modified to work on Unix and also include processor dependent pre-processor definitions to remove warnings. ticket: 3415 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17680 dc483132-0cff-0310-8789-dd5450dbe970 --- src/config/ChangeLog | 4 ++++ src/config/win-post.in | 8 ++++++++ src/config/win-pre.in | 35 ++++++++++++++++++++++++++++++----- 3 files changed, 42 insertions(+), 5 deletions(-) (limited to 'src/config') diff --git a/src/config/ChangeLog b/src/config/ChangeLog index 5bfca9e..f61eef6 100644 --- a/src/config/ChangeLog +++ b/src/config/ChangeLog @@ -1,3 +1,7 @@ +2006-02-24 Jeffrey Altman + + * win-pre.in, win-post.in: support for 64-bit Windows builds + 2006-01-25 Ken Raeburn * shlib.conf (*-*-linux*): Run export-check.pl after building a diff --git a/src/config/win-post.in b/src/config/win-post.in index 7424175..a568bf9 100644 --- a/src/config/win-post.in +++ b/src/config/win-post.in @@ -34,6 +34,14 @@ Makefile: Makefile.in $(BUILDTOP)\config\win-pre.in $(BUILDTOP)\config\win-post. $(WCONFIG) $(BUILDTOP)\config < Makefile.in > Makefile !endif +!if ("$(CPU)" == "IA64" ) || ("$(CPU)" == "AMD64" ) || ("$(CPU)" == "ALPHA64" ) +!if defined(WIN64LIBNAME) +LIBNAME=$(WIN64LIBNAME) +!endif +!if defined(WIN64OBJFILE) +OBJFILE=$(WIN64OBJFILE) +!endif +!endif !if defined(LIBNAME) diff --git a/src/config/win-pre.in b/src/config/win-pre.in index 73e7bea..2f8b0da 100644 --- a/src/config/win-pre.in +++ b/src/config/win-pre.in @@ -31,8 +31,8 @@ CPU=i386 CPU=i386 !endif # CPU == X86 -!if ( "$(CPU)" != "i386" ) && ( "$(CPU)" != "ALPHA" ) -!error Must specify CPU environment variable ( CPU=i386, CPU=ALPHA) +!if ( "$(CPU)" != "i386" ) && ( "$(CPU)" != "ALPHA" ) && ( "$(CPU)" != "ALPHA64" ) && ( "$(CPU)" != "IA64" ) && ( "$(CPU)" != "AMD64" ) +!error Must specify CPU environment variable ( CPU=i386, CPU=ALPHA, CPU=ALPHA64,CPU=IA64, CPU=AMD64) !endif # # End of figuring out CPU @@ -116,6 +116,10 @@ DNSLIBS= DNSFLAGS= !endif +!if ("$(CPU)" == "i386") +TIME_T_FLAGS=-D_USE_32BIT_TIME_T +!endif + !if defined(KRB5_KFW_COMPILE) KFWFLAGS=-DUSE_LEASH=1 !endif @@ -126,10 +130,20 @@ KFWFLAGS=-DUSE_LEASH=1 CC=cl PDB_OPTS=-Fd$(OUTPRE)\ -FD -CPPFLAGS=-I$(SRCTOP)\include -I$(SRCTOP)\include\krb5 $(DNSFLAGS) -DKRB5_PRIVATE=1 -DWIN32_LEAN_AND_MEAN -DKRB5_DEPRECATED=1 $(KFWFLAGS) +CPPFLAGS=-I$(SRCTOP)\include -I$(SRCTOP)\include\krb5 $(DNSFLAGS) -DKRB5_PRIVATE=1 -DWIN32_LEAN_AND_MEAN -DKRB5_DEPRECATED=1 -D_CRT_SECURE_NO_DEPRECATE $(KFWFLAGS) $(TIME_T_FLAGS) CCOPTS=-nologo /W3 $(PDB_OPTS) $(DLL_FILE_DEF) LOPTS=-nologo -incremental:no +!if ("$(CPU)" == "IA64" ) || ("$(CPU)" == "AMD64" ) || ("$(CPU)" == "ALPHA64" ) +CCLINKOPTION=/link bufferoverflowu.lib +SCLIB=bufferoverflowu.lib +DEBUGOPT=/Zi +!else +CCLINKOPTION= +SCLIB= +DEBUGOPT=/ZI +!endif + # /ZI gives better debug info in each object file (MSVC 6.0 or higher). # /Zi gives debug info in each object file. # /Gs Avoid stack probes (they don't seem to work anyway) @@ -143,13 +157,13 @@ LOPTS=-nologo -incremental:no # !ifdef NODEBUG !ifdef DEBUG_SYMBOL -CCOPTS=/ZI $(CCOPTS) +CCOPTS=$(DEBUGOPT) $(CCOPTS) LOPTS=$(LOPTS) -debug !endif CCOPTS=/Os /MD $(CCOPTS) LOPTS=$(LOPTS) !else -CCOPTS=/Od /ZI /MDd $(CCOPTS) +CCOPTS=/Od $(DEBUGOPT) /MDd $(CCOPTS) LOPTS=$(LOPTS) -debug !endif @@ -178,6 +192,17 @@ SLIB=$(BUILDTOP)\lib\$(OUTPRE)k5sprt32.lib GLIB=$(BUILDTOP)\lib\$(OUTPRE)gssapi32.lib WLIB= +!if ("$(CPU)" == "IA64" ) || ("$(CPU)" == "AMD64" ) || ("$(CPU)" == "ALPHA64" ) +CLIB=$(BUILDTOP)\lib\$(OUTPRE)comerr64.lib +PLIB=$(BUILDTOP)\lib\$(OUTPRE)xpprof64.lib +KLIB=$(BUILDTOP)\lib\$(OUTPRE)krb5_64.lib +K4LIB=$(BUILDTOP)\lib\$(OUTPRE)krb4_64.lib +SLIB=$(BUILDTOP)\lib\$(OUTPRE)k5sprt64.lib +GLIB=$(BUILDTOP)\lib\$(OUTPRE)gssapi64.lib +WLIB= + +!endif + KRB4_INCLUDES=-I$(BUILDTOP)/include/kerberosIV COM_ERR_DEPS = $(BUILDTOP)/include/com_err.h -- cgit v1.1