From f0769d4ca6c819d2c4976b19adca453f69f4f07b Mon Sep 17 00:00:00 2001 From: Fons Rademakers <Fons.Rademakers@cern.ch> Date: Thu, 4 Oct 2001 16:48:06 +0000 Subject: [PATCH] port to Intel icc C/C++ compiler under Linux on IA-32. This compiler is also available under Linux on IA-64. For Linux the C/C++ and Fortran compilers can be downloaded for free as "Non-commercial Unsupported Software". See: http://developer.intel.com/software/products/compilers/ and http://developer.intel.com/software/products/eval/. git-svn-id: http://root.cern.ch/svn/root/trunk@2972 27541ba8-7e3a-0410-8455-c3a389f83636 --- base/inc/RConfig.h | 6 ++--- cint/Module.mk | 8 ++++--- cint/iosenum/iosenum.linuxicc | 39 +++++++++++++++++++++++++++++++ config/ARCHS | 3 ++- config/Makefile.linuxicc | 44 +++++++++++++++++++++++++++++++++++ config/root-config.in | 6 +++++ test/Makefile.in | 11 ++++++++- 7 files changed, 109 insertions(+), 8 deletions(-) create mode 100644 cint/iosenum/iosenum.linuxicc create mode 100644 config/Makefile.linuxicc diff --git a/base/inc/RConfig.h b/base/inc/RConfig.h index e0c1f8dc923..e0e2f2daceb 100644 --- a/base/inc/RConfig.h +++ b/base/inc/RConfig.h @@ -1,4 +1,4 @@ -/* @(#)root/base:$Name: $:$Id: RConfig.h,v 1.23 2001/06/26 16:32:35 rdm Exp $ */ +/* @(#)root/base:$Name: $:$Id: RConfig.h,v 1.24 2001/07/23 17:27:51 rdm Exp $ */ /************************************************************************* * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * @@ -236,8 +236,8 @@ # define ANSICPP #endif -#ifdef __ECC -# define R__ECC +#ifdef __INTEL_COMPILER +# define R__INTEL_COMPILER # define R__ANSISTREAM /* ANSI C++ Standard Library conformant */ # define R__VECNEWDELETE /* supports overloading of new[] and delete[] */ # define R__PLACEMENTDELETE /* supports overloading placement delete */ diff --git a/cint/Module.mk b/cint/Module.mk index ae1943ebc23..5afaad52f8a 100644 --- a/cint/Module.mk +++ b/cint/Module.mk @@ -71,6 +71,7 @@ CINTS2 += $(MODDIRS)/libstrm.cxx endif endif ifeq ($(PLATFORM),aix3) +CINTS1 += $(MODDIRS)/dlfcn.c CINTS2 += $(MODDIRS)/libstrm.cxx endif ifeq ($(PLATFORM),aix) @@ -92,9 +93,6 @@ endif ifeq ($(PLATFORM),sunos) CINTS1 += $(MODDIRS)/sunos.c endif -ifeq ($(PLATFORM),aix3) -CINTS1 += $(MODDIRS)/dlfcn.c -endif ifeq ($(PLATFORM),macos) CINTS1 += $(MODDIRS)/macos.c CINTS2 += $(MODDIRS)/fakestrm.cxx @@ -112,6 +110,10 @@ endif ifeq ($(PLATFORM),vms) CINTS2 += $(MODDIRS)/fakestrm.cxx endif +ifeq ($(CXX),icc) +CINTS2 := $(filter-out $(MODDIRS)/libstrm.%,$(CINTS2)) +CINTS2 += $(MODDIRS)/fakestrm.cxx +endif ifeq ($(CXX),ecc) CINTS2 := $(filter-out $(MODDIRS)/libstrm.%,$(CINTS2)) CINTS2 += $(MODDIRS)/fakestrm.cxx diff --git a/cint/iosenum/iosenum.linuxicc b/cint/iosenum/iosenum.linuxicc new file mode 100644 index 00000000000..10aa06e19bd --- /dev/null +++ b/cint/iosenum/iosenum.linuxicc @@ -0,0 +1,39 @@ +/* include/platform/iosenum.h + * This file contains platform dependent ios enum value. + * Run 'cint iosenum.cxx' to create this file. It is done + * only once at installation. */ +static int ios::goodbit=0; +static int ios::eofbit=1; +static int ios::failbit=2; +static int ios::badbit=4; +static int ios::hardfail=16; +static int ios::in=1; +static int ios::out=2; +static int ios::ate=4; +static int ios::app=8; +static int ios::trunc=16; +static int ios::nocreate=32; +static int ios::noreplace=64; +static int ios::binary=128; +static int ios::beg=0; +static int ios::cur=1; +static int ios::end=2; +static int ios::boolalpha=32768; +static int ios::adjustfield=14; +static int ios::basefield=112; +static int ios::floatfield=6144; +static int ios::skipws=1; +static int ios::left=2; +static int ios::right=4; +static int ios::internal=8; +static int ios::dec=16; +static int ios::oct=32; +static int ios::hex=64; +static int ios::showbase=128; +static int ios::showpoint=256; +static int ios::uppercase=512; +static int ios::showpos=1024; +static int ios::scientific=2048; +static int ios::fixed=4096; +static int ios::unitbuf=8192; +static int ios::stdio=16384; diff --git a/config/ARCHS b/config/ARCHS index e3e3f06d351..9c18c02a545 100644 --- a/config/ARCHS +++ b/config/ARCHS @@ -5,7 +5,8 @@ linuxrh51 for Linux gcc 2.7.x.x and glibc linuxrh42 for Linux gcc 2.7.x.x and libc5 linuxdeb for Linux (Debian) egcs and glibc linuxdeb2 for Linux (Debian v2.0) egcs and glibc -linuxkcc for Linux KCC and glibc +linuxkcc for Linux KAI's KCC and glibc +linuxicc for Linux Intel's icc and glibc linuxsuse6 for Linux (SuSE v6.0) egcs and glibc linuxpgcc for Linux pgcc and glibc linuxppcegcs for PPC Linux egcs and glibc diff --git a/config/Makefile.linuxicc b/config/Makefile.linuxicc new file mode 100644 index 00000000000..57f809e1bb4 --- /dev/null +++ b/config/Makefile.linuxicc @@ -0,0 +1,44 @@ +# Makefile of ROOT for Linux with glibc and Intel icc compiler + +PLATFORM = linux + +ifeq (debug,$(findstring debug,$(ROOTBUILD))) +OPT = -g +NOOPT = +else +OPT = -O +NOOPT = +endif + +# Compiler: +CXX = icc +CC = icc +CXXFLAGS = -KPIC $(EXTRA_CXXFLAGS) +CFLAGS = -KPIC $(EXTRA_CFLAGS) +CINTCXXFLAGS = -KPIC $(EXTRA_CXXFLAGS) \ + -DG__REGEXP -DG__UNIX -DG__SHAREDLIB \ + -DG__OSFDLL -DG__ROOT -DG__REDIRECTIO +CINTCFLAGS = -KPIC $(EXTRA_CFLAGS) \ + -DG__REGEXP -DG__UNIX -DG__SHAREDLIB \ + -DG__OSFDLL -DG__ROOT -DG__REDIRECTIO + +# Linker: +LD = icc +LDFLAGS = $(OPT) $(EXTRA_LDFLAGS) +SOFLAGS = -shared -Qoption,ld,-soname, +SOEXT = so + +# System libraries: +SYSLIBS = -lm -ldl $(OSTHREADLIBDIR) $(OSTHREADLIB) -rdynamic +XLIBS = $(XPMLIBDIR) $(XPMLIB) -L/usr/X11R6/lib -lX11 +CILIBS = -lm -ldl -rdynamic +CRYPTLIBS = -lcrypt + +# Fortran: +F77 = ifc +F77FLAGS = +F77LIBS = + +# Extras +GLLIBEXTRA = $(OPENGLLIBDIR) $(OPENGLULIB) $(OPENGLLIB) \ + -L/usr/X11R6/lib -lXmu diff --git a/config/root-config.in b/config/root-config.in index 8b035108d76..8c24aad51e9 100755 --- a/config/root-config.in +++ b/config/root-config.in @@ -174,6 +174,12 @@ linuxkcc) auxlibs="-lm -ldl -rdynamic" auxglibs=${auxlibs} ;; +linuxicc) + # Linux with the Intel icc compiler + auxcflags= + auxlibs="-lm -ldl" + auxglibs=${auxlibs} + ;; linuxppcegcs) # Linux/ppc with gcc/glibc auxcflags="-fsigned-char -I/usr/X11/include" diff --git a/test/Makefile.in b/test/Makefile.in index a921db255ed..d770ccda629 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -288,6 +288,15 @@ LDFLAGS = -O SOFLAGS = endif +ifeq ($(ARCH),linuxicc) +# Linux with Intel icc compiler +CXX = icc +CXXFLAGS = -O -KPIC +LD = icc +LDFLAGS = -O +SOFLAGS = -shared +endif + ifeq ($(ARCH),linuxppcegcs) # MkLinux with egcs/glibc CXX = g++ @@ -318,7 +327,7 @@ endif ifeq ($(ARCH),linuxia64ecc) # Itanium Linux with Intel ecc CXX = ecc -CXXFLAGS = -O -kPIC +CXXFLAGS = -O -KPIC LD = ecc LDFLAGS = -O SOFLAGS = -shared -- GitLab