summaryrefslogtreecommitdiff
path: root/include/makeinclude/platform_linux_kcc.GNU
diff options
context:
space:
mode:
authoroci <oci@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-02-14 18:57:00 +0000
committeroci <oci@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-02-14 18:57:00 +0000
commitafcaba768dc2d447ee1828c42493955483c26094 (patch)
tree9eb46a2e7b5e000f39a17dbbd5b7bfdc95576daa /include/makeinclude/platform_linux_kcc.GNU
parent944cbe6d8eded65630b90dea9874474fa402d045 (diff)
downloadATCD-afcaba768dc2d447ee1828c42493955483c26094.tar.gz
Changes for building on HPUX, Solaris, and Linux with KCC
Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'include/makeinclude/platform_linux_kcc.GNU')
-rw-r--r--include/makeinclude/platform_linux_kcc.GNU33
1 files changed, 29 insertions, 4 deletions
diff --git a/include/makeinclude/platform_linux_kcc.GNU b/include/makeinclude/platform_linux_kcc.GNU
index 0b9c912e3b9..f2e4eaec0ad 100644
--- a/include/makeinclude/platform_linux_kcc.GNU
+++ b/include/makeinclude/platform_linux_kcc.GNU
@@ -14,26 +14,51 @@ debug = 0
exceptions =
optimize = 1
-CC = /opt/KCC/KCC_BASE/bin/KCC
+CC = KCC
CXX = $(CC)
CFLAGS += -D_POSIX_THREADS -D_POSIX_THREAD_SAFE_FUNCTIONS -D_REENTRANT \
-D_GNU_SOURCE
+
CCFLAGS += $(CFLAGS) -DNULL=0
DCFLAGS += +K0 -g
DLD = $(CC)
LD = $(CC)
-LIBS += -ldl -lpthread -lm
+LIBS += -Bdynamic -ldl -lpthread -lm
ifndef exceptions
EXCEPTION = --no_exceptions
endif # ! exceptions
+# KCC allows suppresion of warnings and errors.
+# Warning #280 declaration of a member with the same name as its class
+CCFLAGS += --diag_suppress 280
+
+ifdef static_libs_only
+ ifneq ($(static_libs_only),0)
+ static_libs=1
+ endif
+endif
+# Kind of a hack since LDFLAGS is used for both non-static
+# library generation and binary generation. LD is only used for
+# binary generation.
+ifneq ($(static_libs),0)
+ CCFLAGS += --one_instantiation_per_object
+ LD += -Bstatic
+ # If we must link with static libraries, libc must be linked in dynamically
+ # or else the executable will core dump. This is only necessary because the
+ # -Bstatic causes the hidden libraries (KCC, gcc and c) to get statically
+ # linked. You might get a big warning at link time. It's nothing with
+ # which to be concerned.
+ LIBS += -lc -Bstatic
+endif
+
OCFLAGS += +K3 -O --one_instantiation_per_object $(EXCEPTION)
PIC = -fPIC
AR = $(CC)
-ARFLAGS = $(EXCEPTION) -o
+ARFLAGS = $(EXCEPTION) -Bstatic -o
RANLIB = @true
-SOFLAGS = $(CPPFLAGS) $(EXCEPTION)
+SOFLAGS = $(EXCEPTION)
SOBUILD = $(COMPILE.cc) $(PIC) $(EXCEPTION) -o $(VSHDIR)$*.o $<
PRELIB = @true
PRELIB_USES_OBJ_ONLY = 1
+