Fixed compatibility mode for HP (both native and GNU compilers)

This commit is contained in:
Ralph Lange
2003-04-15 11:34:38 +00:00
parent 57db879905
commit ef8fb769a1
5 changed files with 105 additions and 68 deletions

View File

@@ -14,81 +14,60 @@
ARCH_CLASS = hpux
SHARED_LIBRARIES=YES
# Include definitions common to all Unix archs
include $(EPICS_BASE)/config/CONFIG.Host.UnixCommon
SHRLIB_SUFFIX = .sl
AR = ar
AR = ar -rc
# Configure OS vendor C compiler
ACC = cc
ACC_ANSI = $(ACC) -Aa
ACC_STRICT = $(ACC) -Aa
ACC_TRAD = $(ACC)
ACC_TRAD = $(ACC) -Ac
ACC_WARN_YES =
ACC_WARN_NO = -w
ACC_OPT_YES = -O
ACC_OPT_NO = -g
ACC_SFLAGS_YES= -Wl,-a,archive
ACC_SFLAGS_NO=
# Always keep libc shared to force using the one supplied with the
# target machine (HP system and libc must match - important e.g. for
# multi-CPU-systems)
ACC_SLDFLAGS_YES= -Wl,-a,archive -l:libc.sl
ACC_SFLAGS_NO =
ACC_SLIBS_YES =
ACC_SLIBS_NO=
ACC_SHRLIB_CFLAGS_YES = +Z
ACC_SLIBS_NO =
ACC_SHRLIB_LDFLAGS_YES = -b
ACC_DEP_CFLAGS=+DAportable
# Configure OS vendor C++ compiler
HPCC = cc
HPCC_ANSI = $(HPCC) -Aa
HPCC_STRICT = $(HPCC) -Aa
HPCC_TRAD = $(HPCC) -Ac
HPCC_WARN_YES =
HPCC_WARN_NO = -w
HPCC_OPT_YES = -O
HPCC_OPT_NO = -g
HPCC_SFLAGS_YES= -Wl,-a,archive
HPCC_SFLAGS_NO=
HPCC_SLIBS_YES =
HPCC_SLIBS_NO=
HPCC_SHRLIB_CFLAGS_YES = +Z
HPCC_SHRLIB_LDFLAGS_YES = -b
HPCC_DEP_CFLAGS=+DAportable
#Old HP C++ compiler
#CCC = CC
#CCC_NORMAL = $(CCC) +p
#New HP C++ compiler
# aCC HP C++ compiler
CCC = aCC
# avoid treating "future errors" as actual errors
CCC_NORMAL = $(CCC) +W302 +W829 +W818 +W392 +W469 +W495 +W749 +W667 +W392 +W684
CCC_STRICT = $(CCC) +p
# Suppress bogus warnings created by the aCC compiler
CCC_NORMAL = $(CCC) -AA -Aa -mt +W302 +W829 +W818 +W392 +W469 +W495 +W749 +W667 +W392 +W684
CCC_STRICT = $(CCC) -AA -Aa -mt
CCC_TEMPL_INST_FLAG =
CCC_WARN_YES = +w
CCC_WARN_NO =
CCC_OPT_YES = -O
CCC_OPT_YES = +O3
CCC_OPT_NO = -g
CCC_SFLAGS_YES= -Wl,-a,archive
# Always keep libc shared to force using the one supplied with the
# target machine (HP system and libc must match - important e.g. for
# multi-CPU-systems)
CCC_SLDFLAGS_YES= -Wl,-a,archive -l:libc.sl
CCC_SFLAGS_NO=
CCC_SLIBS_YES =
CCC_SLIBS_NO=
CCC_SHRLIB_CFLAGS_YES = +Z
# shared libs will be found by searching environment variable SHLIB_PATH,
# then by searching the specified path (see below)
CCC_SHRLIB_LDFLAGS_YES = -b
CCC_DEPENDS_FLAG = +m
CCC_DEP_CFLAGS=+DAportable
# +DAportable causes portable object code to be created for execution
# on different PA-Risc machines
ARCH_DEP_CFLAGS = -D_HPUX_SOURCE -DHP_UX
ARCH_DEP_CXXFLAGS = -D_HPUX_SOURCE -DHP_UX
ARCH_DEP_LDLIBS =
ARCH_DEP_LDFLAGS = -Wl,+b$(DEFAULT_SHRLIB_SEARCH_PATH),+s
# Runtime ldflags
RUNTIME_LIBS =$(EPICS_BASE)/lib/$(EPICS_HOST_ARCH)\
$(EPICS_EXTENSIONS)/lib/$(EPICS_HOST_ARCH)
RUNTIME_LDFLAGS = $(RUNTIME_LIBS:%=-Wl,-rpath,%)
# Portability across different PA-RISC architecture versions, position
# independent code, "-mt" (s.a.) handles all the posix stuff
ARCH_DEP_CPPFLAGS = -DHP_UX +DAportable +z
ARCH_DEP_CFLAGS = -D_HPUX_SOURCE
# Set runtime path for shared libraries
empty:= # trick from the make docs...
space:= $(empty) $(empty)
RUNTIME_LDFLAGS_YES = -Wl,+b$(subst $(space),:,$(sort $(SHRLIB_SEARCH_DIRS))),+s
RUNTIME_LDFLAGS += $(RUNTIME_LDFLAGS_$(SHARED_LIBRARIES))

View File

@@ -0,0 +1,49 @@
#*************************************************************************
# Copyright (c) 2002 The University of Chicago, as Operator of Argonne
# National Laboratory.
# Copyright (c) 2002 The Regents of the University of California, as
# Operator of Los Alamos National Laboratory.
# EPICS BASE Versions 3.13.7
# and higher are distributed subject to a Software License Agreement found
# in file LICENSE that is included with this distribution.
#*************************************************************************
# CONFIG.Host.hpux-parisc-gnu
#
# This file is maintained by the EPICS community.
# Sites may override these definitions in CONFIG_SITE.Host.hpux-parisc-gnu
ARCH_CLASS = hpux
SHARED_LIBRARIES=YES
# Include definitions common to all Unix archs
include $(EPICS_BASE)/config/CONFIG.Host.UnixCommon
AR = ar -rc
ARCMD = $(AR) $@
#==========================
# These are overrides of ANSI and CPLUSPLUS values in CONFIG_SITE
ANSI=GCC
CPLUSPLUS=G++
#==========================
# Always keep libc shared to force using the one supplied with the
# target machine (HP system and libc must match - important e.g. for
# multi-CPU-systems)
GCC_SLDFLAGS_YES = -l:libc.sl
G++_SLDFLAGS_YES = -l:libc.sl
# socket and nsl needed by libca.a
#ARCH_DEP_LDLIBS += -lsocket -lnsl
ARCH_DEP_LDLIBS += -lpthread
ARCH_DEP_CPPFLAGS += -D_PTHREADS -DOSITHREAD_USE_DEFAULT_STACK
# Allows R3.13 built extensions to load R3.14 shared libs
SYS_DLL_LIBS_hpux += pthread
# Set runtime path for shared libraries
empty:= # trick from the make docs...
space:= $(empty) $(empty)
RUNTIME_LDFLAGS_YES = -Wl,+b$(subst $(space),:,$(sort $(SHRLIB_SEARCH_DIRS))),+s
RUNTIME_LDFLAGS += $(RUNTIME_LDFLAGS_$(SHARED_LIBRARIES))

View File

@@ -0,0 +1,13 @@
#*************************************************************************
# Copyright (c) 2002 The University of Chicago, as Operator of Argonne
# National Laboratory.
# Copyright (c) 2002 The Regents of the University of California, as
# Operator of Los Alamos National Laboratory.
# EPICS BASE Versions 3.13.7
# and higher are distributed subject to a Software License Agreement found
# in file LICENSE that is included with this distribution.
#*************************************************************************
# $Id$
# hpux-parisc is the new name for hp700
-include $(EPICS_BASE)/config/CONFIG_HOST_ARCH.hp700

View File

@@ -4,23 +4,8 @@
# Site Specific Configuration Information
# Only the local epics system manager should modify this file
# by default, build and use shared libraries
SHARED_LIBRARIES=YES
# where we expect to find shared libraries if not found elsewhere
# DEFAULT_SHRLIB_SEARCH_PATH = /home/controls/epics/cdev/lib/hpux-10.20:/home/controls/epics/cdev/lib/hpux-10.XX:/opt/TclTk/lib:/opt/xpm/lib/X11:/usr/lib/pa1.1:/usr/lib:/lib:/opt/csr/installed/HP-UX/lib::/opt/OPI/GUI/lib/hp700:/opt/OPI/MapperApplications/lib/hp700:/opt/OPI/cdevAppl/lib/hp700:/opt/OPI/cmlog/lib/hp700:/opt/OPI/models/lib/hp700:/opt/OPI/sddsAppl/lib/hp700
DEFAULT_SHRLIB_SEARCH_PATH = /cs/lib/R$(EPICS_VERSION).$(EPICS_REVISION).$(EPICS_MODIFICATION).$(EPICS_UPDATE_NAME)$(EPICS_UPDATE_LEVEL):$(INSTALL_LIB)
#No special action should be required to build or use shared libraries.
#However, when a new shared library is built using the above configuration,
#it should be copied into the location specified by DEFAULT_SHRLIB_SEARCH_PATH
#which in this specific case is: /cs/lib/R3.13.1.1/
# cal added this so that libraries can be built with position
# independent code even if shared libraries aren't being built
ifeq ($(RELOCATABLE), YES)
ARCH_DEP_CFLAGS += +Z
ARCH_DEP_CXXFLAGS += +Z
endif
# By default, shared libraries are built and used. Override here.
#SHARED_LIBRARIES=NO
# This is the absolute path to the generic INSTALL_LOCATION, for SHARED_LIBRARY searches.
SHRLIB_SEARCH_DIRS += /opt/epics/R$(EPICS_VERSION).$(EPICS_REVISION).$(EPICS_MODIFICATION)/support/base/$(EPICS_VERSION)-$(EPICS_REVISION)-$(EPICS_MODIFICATION)-$(EPICS_UPDATE_NAME)$(EPICS_UPDATE_LEVEL)/lib/$(EPICS_HOST_ARCH)

View File

@@ -0,0 +1,11 @@
#
# $Id$
#
# Site Specific Configuration Information
# Only the local epics system manager should modify this file
# By default, shared libraries are built and used. Override here.
#SHARED_LIBRARIES=NO
# This is the absolute path to the generic INSTALL_LOCATION, for SHARED_LIBRARY searches.
SHRLIB_SEARCH_DIRS += /opt/epics/R$(EPICS_VERSION).$(EPICS_REVISION).$(EPICS_MODIFICATION)/support/base/$(EPICS_VERSION)-$(EPICS_REVISION)-$(EPICS_MODIFICATION)-$(EPICS_UPDATE_NAME)$(EPICS_UPDATE_LEVEL)/lib/$(EPICS_HOST_ARCH)