From dcc27843f090832ee63522ec340d64bfbe05c5da Mon Sep 17 00:00:00 2001 From: Fons Rademakers <Fons.Rademakers@cern.ch> Date: Fri, 9 Jun 2000 14:56:44 +0000 Subject: [PATCH] port to IA-64 git-svn-id: http://root.cern.ch/svn/root/trunk@98 27541ba8-7e3a-0410-8455-c3a389f83636 --- base/inc/RConfig.h | 21 +++++++++++++++++---- base/src/TStorage.cxx | 8 ++++++-- cint/src/newlink.c | 2 +- cint/src/v6_newlink.cxx | 2 +- new/src/NewDelete.cxx | 17 +++++++++++++---- test/Makefile.in | 9 +++++++++ 6 files changed, 47 insertions(+), 12 deletions(-) diff --git a/base/inc/RConfig.h b/base/inc/RConfig.h index 6e6d1981023..abf4efcf84f 100644 --- a/base/inc/RConfig.h +++ b/base/inc/RConfig.h @@ -1,4 +1,4 @@ -/* @(#)root/base:$Name$:$Id$ */ +/* @(#)root/base:$Name: $:$Id: RConfig.h,v 1.1.1.1 2000/05/16 17:00:39 rdm Exp $ */ /************************************************************************* * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * @@ -89,16 +89,24 @@ # endif #endif -#if defined(__linux) && !defined(__powerpc__) +#if defined(__linux) && !defined(__powerpc__) && !defined(__ia64__) # define R__LINUX # define R__UNIX # define R__BYTESWAP # ifndef __i486__ -# define __i486__ /* turn off if you really want to run on an i386 */ +# define __i486__ /* turn off if you really want to run on an i386 */ # endif # define NEED_SIGJMP #endif +#if defined(__linux) && defined(__ia64__) +# define R__LINUX +# define R__UNIX +# define R__BYTESWAP +# define R__B64 +# define NEED_SIGJMP +#endif + #if defined(__linux__) && defined(__powerpc__) # define R__MKLINUX # define R__LINUX @@ -138,7 +146,12 @@ # define R__VECNEWDELETE /* supports overloading of new[] and delete[] */ # define R__PLACEMENTDELETE /* supports overloading placement delete */ # endif -# if __GNUC_MINOR__ >= 91 /* egcs 1.1 */ +# if __GNUC_MINOR__ >= 91 /* egcs 1.1.x */ +# define R__ANSISTREAM /* ANSI C++ Standard Library conformant */ +# endif +# if defined(__ia64__) /* gcc 2.9x (MINOR is 9! So above tests fail) */ +# define R__VECNEWDELETE /* supports overloading of new[] and delete[] */ +# define R__PLACEMENTDELETE /* supports overloading placement delete */ # define R__ANSISTREAM /* ANSI C++ Standard Library conformant */ # endif #endif diff --git a/base/src/TStorage.cxx b/base/src/TStorage.cxx index 756b7a7cff3..5acbe3ba2ff 100644 --- a/base/src/TStorage.cxx +++ b/base/src/TStorage.cxx @@ -1,4 +1,4 @@ -// @(#)root/base:$Name$:$Id$ +// @(#)root/base:$Name: $:$Id: TStorage.cxx,v 1.1.1.1 2000/05/16 17:00:39 rdm Exp $ // Author: Fons Rademakers 29/07/95 /************************************************************************* @@ -49,7 +49,11 @@ #endif #ifdef MEM_DEBUG -# define storage_size(p) ((size_t)(((int*)p)[-2])) +# ifdef R__B64 +# define storage_size(p) ((size_t)(((size_t*)p)[-1])) +# else +# define storage_size(p) ((size_t)(((int*)p)[-2])) +# endif #else # define storage_size(p) ((size_t)0) #endif diff --git a/cint/src/newlink.c b/cint/src/newlink.c index 02336477728..fbd68812d2e 100644 --- a/cint/src/newlink.c +++ b/cint/src/newlink.c @@ -628,7 +628,7 @@ void G__gen_cpplink() G__cpplink_global(fp); G__cpplink_func(fp); G__cpplink_tagtable(fp,hfp); - fprintf(fp,"extern \"C\" void G__cpp_setup%s() {\n",G__DLLID); + fprintf(fp,"extern \"C\" void G__cpp_setup%s(void) {\n",G__DLLID); #ifndef G__OLDIMPLEMENTATION1169 fprintf(fp," G__check_setup_version(%d,\"G__cpp_setup%s()\");\n", G__CREATEDLLREV,G__DLLID); diff --git a/cint/src/v6_newlink.cxx b/cint/src/v6_newlink.cxx index 02336477728..fbd68812d2e 100644 --- a/cint/src/v6_newlink.cxx +++ b/cint/src/v6_newlink.cxx @@ -628,7 +628,7 @@ void G__gen_cpplink() G__cpplink_global(fp); G__cpplink_func(fp); G__cpplink_tagtable(fp,hfp); - fprintf(fp,"extern \"C\" void G__cpp_setup%s() {\n",G__DLLID); + fprintf(fp,"extern \"C\" void G__cpp_setup%s(void) {\n",G__DLLID); #ifndef G__OLDIMPLEMENTATION1169 fprintf(fp," G__check_setup_version(%d,\"G__cpp_setup%s()\");\n", G__CREATEDLLREV,G__DLLID); diff --git a/new/src/NewDelete.cxx b/new/src/NewDelete.cxx index 0a31b24e170..c956604f747 100644 --- a/new/src/NewDelete.cxx +++ b/new/src/NewDelete.cxx @@ -1,4 +1,4 @@ -// @(#)root/new:$Name$:$Id$ +// @(#)root/new:$Name: $:$Id: NewDelete.cxx,v 1.1.1.1 2000/05/16 17:00:44 rdm Exp $ // Author: Fons Rademakers 29/07/95 /************************************************************************* @@ -92,21 +92,30 @@ static ReAllocInit realloc_init; #ifdef MEM_DEBUG # define MEM_MAGIC ((unsigned char)0xAB) +#ifdef R__B64 +# define storage_size(p) ((size_t)(((size_t*)p)[-1])) +# define RealStart(p) ((char*)(p) - sizeof(size_t)) +# define StoreSize(p, sz) (*((size_t*)(p)) = (sz)) +# define ExtStart(p) ((char*)(p) + sizeof(size_t)) +# define RealSize(sz) ((sz) + sizeof(size_t) + sizeof(char)) +# define StoreMagic(p, sz) *((unsigned char*)(p)+sz+sizeof(size_t)) = MEM_MAGIC +#else # define storage_size(p) ((size_t)(((int*)p)[-2])) # define RealStart(p) ((char*)(p) - 2*sizeof(int)) # define StoreSize(p, sz) (*((int*)(p)) = (sz)) # define ExtStart(p) ((char*)(p) + 2*sizeof(int)) -# define MemClear(p, start, len) \ - if ((len) > 0) memset(&((char*)(p))[(start)], 0, (len)) # define RealSize(sz) ((sz) + 2*sizeof(int) + sizeof(char)) # define StoreMagic(p, sz) *((unsigned char*)(p)+sz+2*sizeof(int)) = MEM_MAGIC +#endif +# define MemClear(p, start, len) \ + if ((len) > 0) memset(&((char*)(p))[(start)], 0, (len)) # define TestMagic(p, sz) (*((unsigned char*)(p)+sz) != MEM_MAGIC) # define CheckMagic(p, s, where) \ if (TestMagic(p, s)) \ Fatal(where, "storage area overwritten"); # define CheckFreeSize(p, where) \ if (storage_size((p)) > TStorage::GetMaxBlockSize()) \ - Fatal(where, "unreasonable size (%d)", storage_size(p)); + Fatal(where, "unreasonable size (%ld)", storage_size(p)); # define RemoveStatMagic(p, where) \ CheckFreeSize(p, where); \ RemoveStat(p); \ diff --git a/test/Makefile.in b/test/Makefile.in index 8514f07f665..2a35b50d02c 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -266,6 +266,15 @@ LDFLAGS = -O SOFLAGS = -shared -Wl,-soname, endif +ifeq ($(ARCH),linuxia64gcc) +# Itanium Linux with gcc 2.9x +CXX = g++ +CXXFLAGS = -O -Wall -fPIC +LD = g++ +LDFLAGS = -O +SOFLAGS = -shared +endif + ifeq ($(ARCH),mklinux) # MkLinux with libc5 CXX = g++ -- GitLab