]> https://gitweb.dealii.org/ - dealii.git/commitdiff
On OSF1, the assembler can't handle long symbols, so we have to use
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 12 Oct 2000 09:22:47 +0000 (09:22 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 12 Oct 2000 09:22:47 +0000 (09:22 +0000)
-gstabs instead of -ggdb there.

git-svn-id: https://svn.dealii.org/trunk@3426 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/configure
deal.II/configure.in

index 6971b3b1b31fcc1562c3c3adc38f4003832c4f61..b5dc715e7a89f9d88f51e993425929b7fd014ae6 100755 (executable)
@@ -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*
index 13b8d59994534a33ed69680c8e314a13dbf306dd..ef94987d1ea61c3c278d88098a2969dc7460b011 100644 (file)
@@ -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 <string>
+#include <map>
+
+typedef map<string,map<string,pair<string,string> > > T;
+
+bool f(T& t1, const T* t2) {
+  t1["s"] = map<string,pair<string,string> >();
+  map<string,map<string,pair<string,string> > >::const_iterator i2=t1.begin();
+  map<string,map<string,pair<string,string> > >::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
-
-
-
-
 
 
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.