From f1760c0b76ca4fc64cabadeb949d5fc403d5eb8b Mon Sep 17 00:00:00 2001 From: "Janet B. Anderson" Date: Fri, 25 Feb 2005 16:02:57 +0000 Subject: [PATCH] CC and CCC definitions changed to reflect GNU defaults. --- configure/CONFIG.gnuCommon | 4 +-- configure/CONFIG_COMMON | 2 ++ configure/os/CONFIG.Common.linux-x86 | 21 ++----------- configure/os/CONFIG.Common.linuxCommon | 31 +++++++++++++++++++ configure/os/CONFIG.Common.vxWorksCommon | 5 +++ configure/os/CONFIG.aix-ppc-gnu.aix-ppc-gnu | 3 -- .../os/CONFIG.hpux-parisc-gnu.hpux-parisc-gnu | 2 -- configure/os/CONFIG.linux-x86.linux-x86 | 3 -- ...CONFIG.solaris-sparc-gnu.solaris-sparc-gnu | 2 -- .../os/CONFIG.solaris-x86-gnu.solaris-x86-gnu | 2 -- configure/os/CONFIG_SITE.linux-x86.UnixCommon | 3 -- 11 files changed, 42 insertions(+), 36 deletions(-) create mode 100644 configure/os/CONFIG.Common.linuxCommon diff --git a/configure/CONFIG.gnuCommon b/configure/CONFIG.gnuCommon index dddcd6583..9ea5fe5c0 100644 --- a/configure/CONFIG.gnuCommon +++ b/configure/CONFIG.gnuCommon @@ -15,8 +15,8 @@ GNU = YES GNU_BIN = $(GNU_DIR)/bin GNU_LIB = $(GNU_DIR)/lib -CC = $(GNU_BIN)/$(CMPLR_PREFIX)cc$(CMPLR_SUFFIX) -CCC = $(GNU_BIN)/$(CMPLR_PREFIX)cc$(CMPLR_SUFFIX) +CC = $(GNU_BIN)/$(CMPLR_PREFIX)gcc$(CMPLR_SUFFIX) +CCC = $(GNU_BIN)/$(CMPLR_PREFIX)g++$(CMPLR_SUFFIX) AR = $(GNU_BIN)/$(CMPLR_PREFIX)ar$(CMPLR_SUFFIX) -rc LD = $(GNU_BIN)/$(CMPLR_PREFIX)ld$(CMPLR_SUFFIX) -r CPP = $(CC) -x c -E diff --git a/configure/CONFIG_COMMON b/configure/CONFIG_COMMON index adba21cbf..692c46688 100644 --- a/configure/CONFIG_COMMON +++ b/configure/CONFIG_COMMON @@ -103,6 +103,8 @@ GNU=NO DEP=.depends OBJ = . RES = . +CMPLR_SUFFIX= +CMPLR_PREFIX= #------------------------------------------------------- # tools for installing libraries and products diff --git a/configure/os/CONFIG.Common.linux-x86 b/configure/os/CONFIG.Common.linux-x86 index 07417d7e8..72c72db0a 100644 --- a/configure/os/CONFIG.Common.linux-x86 +++ b/configure/os/CONFIG.Common.linux-x86 @@ -7,28 +7,13 @@ # Sites may override these definitions in CONFIG_SITE.Common.linux-x86 #------------------------------------------------------- -# Include definitions common to all Unix targets -include $(CONFIG)/os/CONFIG.Common.UnixCommon +# Include definitions common to all linux targets +include $(CONFIG)/os/CONFIG.Common.linuxCommon -OS_CLASS = Linux ARCH_CLASS = x86 -CODE_CPPFLAGS = -D_REENTRANT - -POSIX_CPPFLAGS_YES = -D_POSIX_C_SOURCE=199506L -D_POSIX_THREADS -D_XOPEN_SOURCE=500 -POSIX_CPPFLAGS_NO = -POSIX_LDLIBS_YES = -lpthread - -# -D_BSD_SOURCE for gethostname() in unistd.h as needed by cacChannelIO.cpp. -OP_SYS_CPPFLAGS += -D_BSD_SOURCE -OP_SYS_CPPFLAGS += -Dlinux -OP_SYS_LDLIBS += -lrt - ARCH_DEP_CPPFLAGS += -D_X86_ -# Set runtime path for shared libraries -RUNTIME_LDFLAGS = $(SHRLIB_SEARCH_FULLPATHDIRS:%=-Wl,-rpath,%) - ifeq ($(BUILD_CLASS),CROSS) ifeq ($(EPICS_HOST_ARCH),linux-x86) # Added for 386,486,... cross builds @@ -48,5 +33,3 @@ else endif endif -LDLIBS_READLINE = -lreadline -lcurses - diff --git a/configure/os/CONFIG.Common.linuxCommon b/configure/os/CONFIG.Common.linuxCommon new file mode 100644 index 000000000..830eeb6de --- /dev/null +++ b/configure/os/CONFIG.Common.linuxCommon @@ -0,0 +1,31 @@ +# CONFIG.Common.linuxCommon +# +# $Id$ +# This file is maintained by the build community. +# +# Definitions for linux target builds +# Sites may override these definitions in CONFIG_SITE.Common.linuxCommon +#------------------------------------------------------- + +# Include definitions common to all Unix targets +include $(CONFIG)/os/CONFIG.Common.UnixCommon + +OS_CLASS = Linux + +CODE_CPPFLAGS = -D_REENTRANT + +POSIX_CPPFLAGS_YES = -D_POSIX_C_SOURCE=199506L -D_POSIX_THREADS -D_XOPEN_SOURCE=500 +POSIX_CPPFLAGS_NO = +POSIX_LDLIBS_YES = -lpthread + +# -D_BSD_SOURCE for gethostname() in unistd.h as needed by cacChannelIO.cpp. +OP_SYS_CPPFLAGS += -D_BSD_SOURCE +OP_SYS_CPPFLAGS += -Dlinux +OP_SYS_LDLIBS += -lrt + +# Set runtime path for shared libraries +RUNTIME_LDFLAGS = $(SHRLIB_SEARCH_FULLPATHDIRS:%=-Wl,-rpath,%) + +# Definitions used when COMMANDLINE_LIBRARY is READLINE +LDLIBS_READLINE = -lreadline -lcurses + diff --git a/configure/os/CONFIG.Common.vxWorksCommon b/configure/os/CONFIG.Common.vxWorksCommon index 0f31a63f5..1843791d2 100644 --- a/configure/os/CONFIG.Common.vxWorksCommon +++ b/configure/os/CONFIG.Common.vxWorksCommon @@ -23,6 +23,11 @@ LIB_PREFIX =lib LIB_SUFFIX = .a MUNCH_SUFFIX = .munch +#------------------------------------------------------- +# Compiler definitions +CC = $(GNU_BIN)/$(CMPLR_PREFIX)cc$(CMPLR_SUFFIX) +CCC = $(GNU_BIN)/$(CMPLR_PREFIX)cc$(CMPLR_SUFFIX) + #------------------------------------------------------- # Library definitions LIBNAME = $(BUILD_LIBRARY:%=$(LIB_PREFIX)%$(LIB_SUFFIX)) diff --git a/configure/os/CONFIG.aix-ppc-gnu.aix-ppc-gnu b/configure/os/CONFIG.aix-ppc-gnu.aix-ppc-gnu index 54a4be7d9..af4959831 100644 --- a/configure/os/CONFIG.aix-ppc-gnu.aix-ppc-gnu +++ b/configure/os/CONFIG.aix-ppc-gnu.aix-ppc-gnu @@ -10,9 +10,6 @@ include $(CONFIG)/CONFIG.gnuCommon GNU_DIR = /usr/common/usg/gcc/3.2.1 -CC = $(GNU_BIN)/gcc -CCC = $(GNU_BIN)/g++ - AR = ar ARFLAGS = rcv RANLIB = ranlib -t diff --git a/configure/os/CONFIG.hpux-parisc-gnu.hpux-parisc-gnu b/configure/os/CONFIG.hpux-parisc-gnu.hpux-parisc-gnu index 0910bc7fe..7326bea09 100644 --- a/configure/os/CONFIG.hpux-parisc-gnu.hpux-parisc-gnu +++ b/configure/os/CONFIG.hpux-parisc-gnu.hpux-parisc-gnu @@ -10,8 +10,6 @@ # Include common gnu compiler definitions include $(CONFIG)/CONFIG.gnuCommon -CC = $(GNU_BIN)/gcc -CCC = $(GNU_BIN)/g++ AR = ar -rc RANLIB= LD = ld -r diff --git a/configure/os/CONFIG.linux-x86.linux-x86 b/configure/os/CONFIG.linux-x86.linux-x86 index 4f55970ab..aa2b0e89a 100644 --- a/configure/os/CONFIG.linux-x86.linux-x86 +++ b/configure/os/CONFIG.linux-x86.linux-x86 @@ -11,9 +11,6 @@ include $(CONFIG)/CONFIG.gnuCommon GNU_DIR = /usr -CC = $(GNU_BIN)/gcc -CCC = $(GNU_BIN)/g++ - STATIC_LDFLAGS_YES= -Wl,-Bstatic STATIC_LDFLAGS_NO= STATIC_LDLIBS_YES= -Wl,-Bdynamic diff --git a/configure/os/CONFIG.solaris-sparc-gnu.solaris-sparc-gnu b/configure/os/CONFIG.solaris-sparc-gnu.solaris-sparc-gnu index 0bd6b9780..0785c15f5 100644 --- a/configure/os/CONFIG.solaris-sparc-gnu.solaris-sparc-gnu +++ b/configure/os/CONFIG.solaris-sparc-gnu.solaris-sparc-gnu @@ -10,8 +10,6 @@ # Include common gnu compiler definitions include $(CONFIG)/CONFIG.gnuCommon -CC = $(GNU_BIN)/gcc -CCC = $(GNU_BIN)/g++ AR = ar -rc RANLIB= LD = ld -r diff --git a/configure/os/CONFIG.solaris-x86-gnu.solaris-x86-gnu b/configure/os/CONFIG.solaris-x86-gnu.solaris-x86-gnu index ab7e477f5..82e6e8c8f 100644 --- a/configure/os/CONFIG.solaris-x86-gnu.solaris-x86-gnu +++ b/configure/os/CONFIG.solaris-x86-gnu.solaris-x86-gnu @@ -10,8 +10,6 @@ # Include common gnu compiler definitions include $(CONFIG)/CONFIG.gnuCommon -CC = $(GNU_BIN)/gcc -CCC = $(GNU_BIN)/g++ AR = ar -rc RANLIB= LD = ld -r diff --git a/configure/os/CONFIG_SITE.linux-x86.UnixCommon b/configure/os/CONFIG_SITE.linux-x86.UnixCommon index cd860d2aa..bc547bcd6 100644 --- a/configure/os/CONFIG_SITE.linux-x86.UnixCommon +++ b/configure/os/CONFIG_SITE.linux-x86.UnixCommon @@ -4,6 +4,3 @@ # Site Specific Configuration Information # Only the local epics system manager should modify this file -CC = $(GNU_BIN)/$(CMPLR_PREFIX)gcc$(CMPLR_SUFFIX) -CCC = $(GNU_BIN)/$(CMPLR_PREFIX)g++$(CMPLR_SUFFIX) -