From 2edcb32455909c1d2f0bc0179b359a8ba5890dde Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Thu, 12 Oct 2000 09:22:47 +0000 Subject: [PATCH] On OSF1, the assembler can't handle long symbols, so we have to use -gstabs instead of -ggdb there. git-svn-id: https://svn.dealii.org/trunk@3426 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/configure | 8 +++--- deal.II/configure.in | 64 +++++++++++++++++++++++++++++++++++--------- 2 files changed, 56 insertions(+), 16 deletions(-) diff --git a/deal.II/configure b/deal.II/configure index 6971b3b1b3..b5dc715e7a 100755 --- a/deal.II/configure +++ b/deal.II/configure @@ -1,6 +1,6 @@ #! /bin/sh -# From configure.in Revision: 1.39 +# From configure.in Revision: 1.40 @@ -1300,8 +1300,8 @@ fi -echo $ac_n "checking whether -ggdb works""... $ac_c" 1>&6 -echo "configure:1305: checking whether -ggdb works" >&5 +echo $ac_n "checking whether -ggdb works for long symbols""... $ac_c" 1>&6 +echo "configure:1305: checking whether -ggdb works for long symbols" >&5 case "$target" in alpha*-osf*) CXXFLAGS="-ggdb $CXXFLAGSG" @@ -1339,7 +1339,7 @@ else rm -rf conftest* CXXFLAGSG="-gstabs $CXXFLAGSG" - echo "$ac_t""no" 1>&6 + echo "$ac_t""no -- using -gstabs" 1>&6 fi rm -f conftest* diff --git a/deal.II/configure.in b/deal.II/configure.in index 13b8d59994..ef94987d1e 100644 --- a/deal.II/configure.in +++ b/deal.II/configure.in @@ -164,7 +164,7 @@ dnl ------------------------------------------------------------- if test $GXX = yes ; then CXXFLAGSO="$CXXFLAGS -O2 -Wuninitialized -felide-constructors -ftemplate-depth-32" - CXXFLAGSG="$CXXFLAGS -DDEBUG -ggdb -ansi -pedantic -Wall -W -Wpointer-arith -Wwrite-strings -Wmissing-prototypes -Winline -Woverloaded-virtual -Wstrict-prototypes -Wsynth -Wsign-compare -Wconversion -Wswitch -ftemplate-depth-32" + CXXFLAGSG="$CXXFLAGS -DDEBUG -ansi -pedantic -Wall -W -Wpointer-arith -Wwrite-strings -Wmissing-prototypes -Winline -Woverloaded-virtual -Wstrict-prototypes -Wsynth -Wsign-compare -Wconversion -Wswitch -ftemplate-depth-32" dnl set some flags that are specific to some versions of the dnl compiler: @@ -223,6 +223,57 @@ AC_SUBST(CXXFLAGSO) +dnl We still need to set the flag for debug output. We will usually +dnl use -ggdb, but on DEC Alpha OSF1, this leads to stabs symbols that are +dnl too long for the system assembler. We will therefore check whether the +dnl assembler can handle these symbols by a rather perverse function with +dnl many templates, and if the assembler can't handle them, then use +dnl -gstabs instead. This reduces debugging possibilities, but no other +dnl way is known at present. +AC_MSG_CHECKING(whether -ggdb works for long symbols) +case "$target" in + dnl On Alpha, use the special treatment + alpha*-osf*) + CXXFLAGS="-ggdb $CXXFLAGSG" + AC_TRY_COMPILE( + [ +#include +#include + +typedef map > > T; + +bool f(T& t1, const T* t2) { + t1["s"] = map >(); + map > >::const_iterator i2=t1.begin(); + map > >::const_iterator i1=t2->begin(); + return (i1==i2); +} + ], + [ + ; + ], + [ + CXXFLAGSG="-ggdb $CXXFLAGSG" + AC_MSG_RESULT(yes) + ], + [ + CXXFLAGSG="-gstabs $CXXFLAGSG" + AC_MSG_RESULT(no -- using -gstabs) + ]) + ;; + + dnl For all other systems assume that -ggdb works (we can't make the test + dnl above the default, as stabs are not the default debugging format on many + dnl systems, and we only want to use it where necessary + *) + AC_MSG_RESULT(yes) + CXXFLAGSG="-ggdb $CXXFLAGSG" + ;; +esac + + + + dnl On some systems (well, DEC Alphas are the only ones we know of), dnl gcc2.95 throws the hands in the air if it sees one of the AssertThrow dnl calls, and dies with an internal compiler error. If this is the case, @@ -414,17 +465,6 @@ dnl ------------------------------------------------------------- DEAL_II_CHECK_GETRUSAGE DEAL_II_CHECK_ISNAN -case "$target" in - dnl On Alpha, there was an internal compiler error in exceptions.h. - dnl Disable "throw" for this platform - alpha*-linux*) - AC_DEFINE(NO_THROW) - ;; -esac - - - - -- 2.39.5