summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-03-03 03:56:34 +0000
committerlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-03-03 03:56:34 +0000
commit032f60faa79000ac14fa022ec093e29a03be8439 (patch)
tree07d3202c1cbc54daaaa0c63010f3f2ccc8c170d8 /include
parent53027e27d75e06d8df9d263f6947d85f63ced1ad (diff)
downloadATCD-032f60faa79000ac14fa022ec093e29a03be8439.tar.gz
added automatic support for warning flag 1136
Diffstat (limited to 'include')
-rw-r--r--include/makeinclude/platform_osf1_4.0.GNU31
1 files changed, 23 insertions, 8 deletions
diff --git a/include/makeinclude/platform_osf1_4.0.GNU b/include/makeinclude/platform_osf1_4.0.GNU
index 967417aec59..3919af1b893 100644
--- a/include/makeinclude/platform_osf1_4.0.GNU
+++ b/include/makeinclude/platform_osf1_4.0.GNU
@@ -13,6 +13,20 @@ CXX = $(CC)
#### instead, change "-pthread" to "-threads".
CFLAGS += -pthread
+ifndef CXX_VERSION
+ CXX_VERSION := $(shell $(CXX) -V)
+endif # CXX_VERSION
+
+ifeq (6.0-,$(findstring 6.0-,$(CXX_VERSION)))
+ PRE6_2 = 1
+else
+ifeq (6.1-,$(findstring 6.1-,$(CXX_VERSION)))
+ PRE6_2 = 1
+else # 6.2 or later
+ PRE6_2 = 0
+endif # 6.2 or later
+endif # 6.0
+
#### These flags can only be used with cxx Version 6.0 and later.
#### They are enabled by default; they can be disabled by settting
#### CXX_VER to CXX_5 either on the make command line, or by
@@ -28,9 +42,13 @@ CFLAGS += -pthread
# 839: no_corresponding_delete (until this is fixed in libTAO)
# 1136: conversion to integral type of smaller size could lose data
ifneq ($(CXX_VER),CXX_5)
- WARNING_FLAGS += -w0 -msg_display_number \
- -msg_disable 9,174,193,236,401,610,835,839,1136
-endif
+ WARNING_FLAGS += -w0 -msg_display_number
+ ifeq (1,$(PRE6_2))
+ WARNING_FLAGS += -msg_disable 9,174,193,236,401,610,835,839
+ else # 6.2 or later
+ WARNING_FLAGS += -msg_disable 9,174,193,236,401,610,835,839,1136
+ endif # 6.2 or later
+endif # 6.0 or later
CCFLAGS += $(CFLAGS) -ptr ptrepository $(WARNING_FLAGS)
ifeq ($(rtti),)
@@ -59,10 +77,7 @@ ifndef exceptions
#### Disable the default exception handling of cxx >= 6.0.
#### This is untested. exceptions=1 is the default, so it's not used
#### by default.
- CXX_HAS_EXCEPTIONS := \
- $(shell if cxx -V | egrep -v 'C\+\+ [a-zA-Z][6-9]' > /dev/null; then \
- echo 1; fi)
- ifdef CXX_HAS_EXCEPTIONS
+ ifeq (6.,$(findstring 6.,$(CXX_VERSION)))
CCFLAGS += -nocleanup
- endif # CXX_HAS_EXCEPTIONS
+ endif # 6.x
endif # ! exceptions