Description: <short summary of the patch>
 TODO: Put a short summary on the line above and replace this paragraph
 with a longer explanation of this change. Complete the meta-information
 with other relevant fields (see below for details). To make it easier, the
 information below has been extracted from the changelog. Adjust it or drop
 it.
 .
 gcl (2.6.7+dfsga-34) unstable; urgency=high
 .
   * sgc link_array mark fix;rb_end across save fix;more stable gcc on older arches
Author: Camm Maguire <camm@debian.org>

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: http://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: <YYYY-MM-DD>

--- gcl-2.6.7+dfsga.orig/configure
+++ gcl-2.6.7+dfsga/configure
@@ -4228,32 +4228,36 @@ case $use in
 esac
 
 if test "$enable_gprof" = "yes" ; then
-        TCFLAGS="$TCFLAGS -pg";
-        TLIBS="$TLIBS -pg";
-	TFPFLAG=""
-
-$as_echo "#define GCL_GPROF 1" >>confdefs.h
-
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for text start" >&5
 $as_echo_n "checking for text start... " >&6; }
 	echo 'int main () {return(0);}' >foo.c
 	$CC foo.c -o foo
 	GCL_GPROF_START=`nm foo | $AWK  '/  *T  *__*start$/ {print $NF}'`
 	rm -f foo.c foo
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCL_GPROF_START" >&5
+	if test "GCL_GPROF_START" != "" ; then #FIXME ppc64 fails here
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCL_GPROF_START" >&5
 $as_echo "$GCL_GPROF_START" >&6; }
 
 cat >>confdefs.h <<_ACEOF
 #define GCL_GPROF_START $GCL_GPROF_START
 _ACEOF
 
-	case "$use" in
-	  arm*)
-	#FIXME report and remove this when done
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Reducing optimization on profiling arm build to workaround gcc bug" >&5
+		case "$use" in
+		   arm*)
+	             #FIXME report and remove this when done
+	             { $as_echo "$as_me:${as_lineno-$LINENO}: result: Reducing optimization on profiling arm build to workaround gcc bug" >&5
 $as_echo "Reducing optimization on profiling arm build to workaround gcc bug" >&6; }
-		enable_debug=yes;;
-	esac
+		     enable_debug=yes;;
+		esac
+                TCFLAGS="$TCFLAGS -pg";
+                TLIBS="$TLIBS -pg";
+        	TFPFLAG=""
+
+$as_echo "#define GCL_GPROF 1" >>confdefs.h
+
+	else
+                enable_gprof="no";
+	fi
 fi
 
 if $CC -v 2>&1 | tail -n 1 | grep -q "gcc version 4.6.1" ; then
@@ -4286,7 +4290,9 @@ case $use in
 #		amd64*) # stack-boundary option does not work
 #			TCFLAGS="$TCFLAGS -m64 -mpreferred-stack-boundary=8";;
 		alpha*)
-			TCFLAGS="$TCFLAGS -mieee";;
+			TCFLAGS="$TCFLAGS -mieee"
+			if test "$enable_debug" != "yes" ; then TO3FLAGS="-O0" ; fi #FIXME needed asof gcc 4.8.1
+			;;
 #		m68k*)
 #			TCFLAGS="$TCFLAGS -ffloat-store";;
 		hppa*)
@@ -4299,7 +4305,7 @@ case $use in
 #			if test "$enable_debug" != "yes" ; then TO3FLAGS="-O0" ; fi #FIXME needed asof gcc 4.6.2
 			;;
 		ia64*)
-#			if test "$enable_debug" != "yes" ; then TO3FLAGS="-O" ; fi #FIXME needed asof gcc 4.6.2
+			if test "$enable_debug" != "yes" ; then TO3FLAGS="-O" ; fi #FIXME needed asof gcc 4.8.1
 			;;
 		arm*)
 			TCFLAGS="$TCFLAGS -mlong-calls -fdollars-in-identifiers -g "
--- gcl-2.6.7+dfsga.orig/configure.in
+++ gcl-2.6.7+dfsga/configure.in
@@ -519,23 +519,27 @@ case $use in
 esac		     
 
 if test "$enable_gprof" = "yes" ; then
-        TCFLAGS="$TCFLAGS -pg";
-        TLIBS="$TLIBS -pg";
-	TFPFLAG=""
-	AC_DEFINE(GCL_GPROF,1,[use gprof profiling])
 	AC_MSG_CHECKING(for text start)
 	echo 'int main () {return(0);}' >foo.c
 	$CC foo.c -o foo
 	GCL_GPROF_START=`nm foo | $AWK  '/  *T  *_[_]*start$/ {print $NF}'`
 	rm -f foo.c foo
-	AC_MSG_RESULT($GCL_GPROF_START)
-	AC_DEFINE_UNQUOTED(GCL_GPROF_START,$GCL_GPROF_START,[starting address for gprof])
-	case "$use" in	
-	  arm*)	
-	#FIXME report and remove this when done
-		AC_MSG_RESULT(Reducing optimization on profiling arm build to workaround gcc bug)
-		enable_debug=yes;;
-	esac
+	if test "GCL_GPROF_START" != "" ; then #FIXME ppc64 fails here
+		AC_MSG_RESULT($GCL_GPROF_START)
+		AC_DEFINE_UNQUOTED(GCL_GPROF_START,$GCL_GPROF_START,[starting address for gprof])
+		case "$use" in	
+		   arm*)	
+	             #FIXME report and remove this when done
+	             AC_MSG_RESULT(Reducing optimization on profiling arm build to workaround gcc bug)
+		     enable_debug=yes;;
+		esac
+                TCFLAGS="$TCFLAGS -pg";
+                TLIBS="$TLIBS -pg";
+        	TFPFLAG=""
+ 		AC_DEFINE(GCL_GPROF,1,[use gprof profiling])
+	else			   
+                enable_gprof="no";
+	fi			   
 fi
 
 if $CC -v 2>&1 | tail -n 1 | grep -q "gcc version 4.6.1" ; then
@@ -567,7 +571,9 @@ case $use in
 #		amd64*) # stack-boundary option does not work
 #			TCFLAGS="$TCFLAGS -m64 -mpreferred-stack-boundary=8";;  
 		alpha*)
-			TCFLAGS="$TCFLAGS -mieee";;
+			TCFLAGS="$TCFLAGS -mieee"
+			if test "$enable_debug" != "yes" ; then TO3FLAGS="-O0" ; fi #FIXME needed asof gcc 4.8.1
+			;;
 #		m68k*)
 #			TCFLAGS="$TCFLAGS -ffloat-store";;
 		hppa*)
@@ -580,7 +586,7 @@ case $use in
 #			if test "$enable_debug" != "yes" ; then TO3FLAGS="-O0" ; fi #FIXME needed asof gcc 4.6.2
 			;;
 		ia64*)
-#			if test "$enable_debug" != "yes" ; then TO3FLAGS="-O" ; fi #FIXME needed asof gcc 4.6.2
+			if test "$enable_debug" != "yes" ; then TO3FLAGS="-O" ; fi #FIXME needed asof gcc 4.8.1
 			;;
 		arm*)
 			TCFLAGS="$TCFLAGS -mlong-calls -fdollars-in-identifiers -g "
