********> DEC alpha porting changes Authors: Bill Ross and Vladimir Romanovski Date: 4/24/95 Programs: xleap Severity: fatal on DEC alpha Problem: crashes on startup, on other things when that is fixed Affects: xleap (but not tleap) Cause: alpha links its own shared libs in preference to leap's, and being a 64-bit machine allows assumptions about word size to cause problems Fix: The Imakefile changes (1st below) solve the first problem by renaming the libs, the second by invoking 32-bit addressing After changing the Imakefiles, go to amber41/leap/ and "make World", then "cd src/leap ; make install" ======================== leap/src/Wc/ =============================== *** OLD Imakefile --- NEW Imakefile *************** *** 20,26 #define AvoidNullMakeCommand YES ! #define LibraryName Wc #include "../Leap_lib.tmpl" --- 20,27 ----- #define AvoidNullMakeCommand YES ! #define LibraryName WcLeap ! LIBRARY_DIRNAME = Wc #include "../Leap_lib.tmpl" *************** *** 33,38 WONDER_PRINTF = #endif CREATE_DEFS = -DWCL_ERRORDB=\"$(LIBDIR)/WclErrorDB\" LOAD_DEFS = -DXAPPDIR=\"$(XAPPLOADDIR)\" NAME_DEFS = $(WONDER_PRINTF) --- 34,49 ----- WONDER_PRINTF = #endif + + #if defined(AlphaArchitecture) + + # -taso: force address space to 32 bits to avoid + # side effects of bad casts for 64-bit + + CC = $(CC) -taso -non_shared + + #endif + CREATE_DEFS = -DWCL_ERRORDB=\"$(LIBDIR)/WclErrorDB\" LOAD_DEFS = -DXAPPDIR=\"$(XAPPLOADDIR)\" NAME_DEFS = $(WONDER_PRINTF) *************** *** 205,211 SpecialObjectRule(WcLoadRes.o,WcLoadRes.c,$(LOAD_DEFS)) SpecialObjectRule(WcName.o,WcName.c,$(NAME_DEFS)) */ ! LeapBuildIncludes($(HEADERS),$(LIBRARY_NAME),../../..) #if DoSharedLib LeapSharedLibraryRevisionLink($(SOWCREV)) --- 216,222 ----- SpecialObjectRule(WcLoadRes.o,WcLoadRes.c,$(LOAD_DEFS)) SpecialObjectRule(WcName.o,WcName.c,$(NAME_DEFS)) */ ! LeapBuildIncludes($(HEADERS),$(LIBRARY_DIRNAME),../../..) #if DoSharedLib LeapSharedLibraryRevisionLink($(SOWCREV)) --------------------------------------------------------------------- ======================== leap/src/Xaw3dR4/ ========================== *** OLD Imakefile --- NEW Imakefile *************** *** 20,26 #define AvoidNullMakeCommand YES ! LIBRARY_NAME = Xaw3d #if (ProjectX < 5) --- 20,27 ----- #define AvoidNullMakeCommand YES ! LIBRARY_NAME = Xaw3dLeap ! LIBRARY_DIRNAME = Xaw3d #if (ProjectX < 5) *************** *** 305,310 SpecialObjectRule(Paned.o, ,-hnoopt) #endif DependTarget() NormalLintTarget($(SRCS)) --- 306,320 ----- SpecialObjectRule(Paned.o, ,-hnoopt) #endif + #if defined(AlphaArchitecture) + + # -taso: force address space to 32 bits to avoid + # side effects of bad casts for 64-bit + + CC = $(CC) -taso -non_shared + + #endif + DependTarget() NormalLintTarget($(SRCS)) *************** *** 309,315 NormalLintTarget($(SRCS)) ! LeapBuildIncludes($(HEADERS),$(LIBRARY_NAME),../../..) LeapBuildIncludes($(HEADERS),Xaw,../../..) #if DoSharedLib --- 319,325 ----- NormalLintTarget($(SRCS)) ! LeapBuildIncludes($(HEADERS),$(LIBRARY_DIRNAME),../../..) LeapBuildIncludes($(HEADERS),Xaw,../../..) #if DoSharedLib --------------------------------------------------------------------- ======================== leap/src/Xpm/ ============================== *** OLD Imakefile --- NEW Imakefile *************** *** 20,26 #define AvoidNullMakeCommand YES ! LIBRARY_NAME = Xpm #include "../Leap_lib.tmpl" --- 20,27 ----- #define AvoidNullMakeCommand YES ! LIBRARY_NAME = XpmLeap ! LIBRARY_DIRNAME = Xpm #include "../Leap_lib.tmpl" *************** *** 41,47 /**/# on Dec Alpha we need to define the following to build the shared library #ifdef AlphaArchitecture ! SO_REQLIBS=-lX11 -lc #endif /**/## if your system doesn't provide strcasecmp add -DNEED_STRCASECMP --- 42,55 ----- /**/# on Dec Alpha we need to define the following to build the shared library #ifdef AlphaArchitecture ! SO_REQLIBS=-lX11 -lc ! ! # -taso: force address space to 32 bits to avoid ! # side effects of bad casts for 64-bit ! ! CC = $(CC) -taso -non_shared ! ! #endif /**/## if your system doesn't provide strcasecmp add -DNEED_STRCASECMP *************** *** 189,195 DependTarget() ! LeapBuildIncludes($(HEADERS),$(LIBRARY_NAME),../../..) #if DoSharedLib LeapSharedLibraryRevisionLink($(SOX_REVISION)) --- 197,203 ----- DependTarget() ! LeapBuildIncludes($(HEADERS),$(LIBRARY_DIRNAME),../../..) #if DoSharedLib LeapSharedLibraryRevisionLink($(SOX_REVISION)) --------------------------------------------------------------------- ======================== leap/src/leap/ ============================= *** OLD Imakefile --- NEW Imakefile *************** *** 266,271 /**/##################################################################### /**/# /**/# NeXT platform /**/# /**/# --- 266,291 ----- /**/##################################################################### /**/# + /**/# Alpha + /**/# + + #if defined(AlphaArchitecture) + + # -taso: force address space to 32 bits to avoid + # side effects of bad casts for 64-bit + + CDEBUGFLAGS = $(LEAP_FLAGS) -w -taso -non_shared + + # EXTRA_LIBRARIES causes '-ldnet_stub' to be added, but just + # adding it explicitly causes some unsatisfied refs: + + EXTRA_LIBRARIES = $(DNETLIB) + + #endif + + + /**/##################################################################### + /**/# /**/# NeXT platform /**/# /**/# *************** *** 408,416 XAW3DDIR = ../Xaw3dR$(PROJECTX) ! WCLLIB = -L../Wc -lWc ! XPMLIB = -L../Xpm -lXpm ! XAW3DLIB = -L$(XAW3DDIR) -lXaw3d #if DoSharedLib WCLDEP_s = ../Wc/libWc.so --- 428,436 ----- XAW3DDIR = ../Xaw3dR$(PROJECTX) ! WCLLIB = -L../Wc -lWcLeap ! XPMLIB = -L../Xpm -lXpmLeap ! XAW3DLIB = -L$(XAW3DDIR) -lXaw3dLeap #if DoSharedLib WCLDEP_s = ../Wc/libWc.so *************** *** 423,431 #endif #if DoNormalLib ! WCLDEP_n = ../Wc/libWc.a ! XPMDEP_n = ../Xpm/libXpm.a ! XAW3DDEP_n = $(XAW3DDIR)/libXaw3d.a #else WCLDEP_n = XPMDEP_n = --- 443,451 ----- #endif #if DoNormalLib ! WCLDEP_n = ../Wc/libWcLeap.a ! XPMDEP_n = ../Xpm/libXpmLeap.a ! XAW3DDEP_n = $(XAW3DDIR)/libXaw3dLeap.a #else WCLDEP_n = XPMDEP_n = ---------------------------------------------------------------------