Author: sebor
Date: Thu Sep 6 16:43:30 2007
New Revision: 573411
URL: http://svn.apache.org/viewvc?rev=573411&view=rev
Log:
2007-09-06 Martin Sebor <[EMAIL PROTECTED]>
STDCXX-501
* acc.config (CXXFLAGS, CPPFLAGS, LDFLAGS): Used -AA and aCC's own
C library headers by default regardless of platform (i.e., PA-RISC
as well as IPF), unless -Aa is specified in _CXXOPTS.
* libc_decl.sh (CXXFLAGS): Appended -I/usr/include only when -Aa
is specified instead of based on the compiler version.
Modified:
incubator/stdcxx/trunk/etc/config/acc.config
incubator/stdcxx/trunk/etc/config/src/libc_decl.sh
Modified: incubator/stdcxx/trunk/etc/config/acc.config
URL:
http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/acc.config?rev=573411&r1=573410&r2=573411&view=diff
==============================================================================
--- incubator/stdcxx/trunk/etc/config/acc.config (original)
+++ incubator/stdcxx/trunk/etc/config/acc.config Thu Sep 6 16:43:30 2007
@@ -4,7 +4,27 @@
#
# configuration file for HP aCC on HP-UX
#
-##############################################################################
+########################################################################
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed
+# with this work for additional information regarding copyright
+# ownership. The ASF licenses this file to you under the Apache
+# License, Version 2.0 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# permissions and limitations under the License.
+#
+# Copyright 1999-2007 Rogue Wave Software, Inc.
+#
+########################################################################
CXX = aCC
@@ -72,13 +92,16 @@
# of the respective variables w/o underscores on HP-UX where the latter are
# used directly by the compiler and linker, respectively
-ifeq ($(shell [ $(aCC_MAJOR) -ge 5 ] && echo 1),1)
-# use -AA with aCC 5 and 6
+# use -AA by default, allow -Aa as an option
+use_Aa := $(filter -Aa,$(_CXXOPTS))
+
+ifneq ($(use_Aa),-Aa)
CXXFLAGS = -AA "$$"(_CXXOPTS)
CXXPRELINK =
CPPFLAGS = "$$"(_CPPOPTS)
LDFLAGS = -AA +nostl -Wl,+s "$$"(_LDOPTS)
else
+# -Aa was specified in _CXXOPTS
CXXFLAGS = -Aa +nostl "$$"(_CXXOPTS)
CXXPRELINK =
CPPFLAGS = -I$(TOPDIR)/include/ansi -I/usr/include "$$"(_CPPOPTS)
Modified: incubator/stdcxx/trunk/etc/config/src/libc_decl.sh
URL:
http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/src/libc_decl.sh?rev=573411&r1=573410&r2=573411&view=diff
==============================================================================
--- incubator/stdcxx/trunk/etc/config/src/libc_decl.sh (original)
+++ incubator/stdcxx/trunk/etc/config/src/libc_decl.sh Thu Sep 6 16:43:30 2007
@@ -20,7 +20,7 @@
# implied. See the License for the specific language governing
# permissions and limitations under the License.
#
-# Copyright 2001-2006 Rogue Wave Software.
+# Copyright 2001-2007 Rogue Wave Software, Inc.
#
##############################################################################
#
@@ -82,9 +82,13 @@
if [ "$CXX" = "aCC" ] ; then
cxx_major="`echo $CXX_VER | sed 's/.*\.\([0-9][0-9]*\)\..*/\1/'`"
+ echo $CXXFLAGS | grep '[-]Aa' >/dev/null 2>&1
+ has_Aa=$?
- if [ "$cxx_major" -le "05" ] ; then
- # prepend -I/usr/include to CXXOPTS for HP aCC on PA but not IPF
+ if [ "$cxx_major" -le "05" -a $has_Aa -eq 0 ] ; then
+ # prepend -I/usr/include to CXXOPTS for HP aCC when the -Aa
+ # command line option is specified (aCC 3 and 5 but not aCC
+ # 6 on IPF)
CXXFLAGS="$CXXFLAGS -I/usr/include"
fi