Index: CLFS/clfs.xsl
===================================================================
--- CLFS/clfs.xsl	(revision 7a84ba7713f9ff3379fd6da4e84bff0c0da905b1)
+++ CLFS/clfs.xsl	(revision 650acce1b8349a7f99470bf010db514d460e377a)
@@ -42,4 +42,7 @@
   <!-- Locale settings -->
   <xsl:param name="lang" select="C"/>
+
+  <!-- Sparc64 processor type -->
+  <xsl:param name="sparc" select="1"/>
 
   <xsl:template match="/">
@@ -281,4 +284,38 @@
         <xsl:value-of select="$page"/>
       </xsl:when>
+      <xsl:when test="ancestor::sect1[@id='ch-cross-tools-flags']">
+        <xsl:choose>
+          <xsl:when test="contains(string(),'BUILD32')">
+            <xsl:choose>
+              <xsl:when test="$sparc = '1' or $sparc = '2'">
+                <xsl:text>-m32 -mcpu=ultrasparc -mtune=ultrasparc</xsl:text>
+              </xsl:when>
+              <xsl:when test="$sparc = '3'">
+                <xsl:text>-m32 -mcpu=ultrasparc3 -mtune=ultrasparc3</xsl:text>
+              </xsl:when>
+            </xsl:choose>
+          </xsl:when>
+          <xsl:when test="contains(string(),'BUILD64')">
+            <xsl:choose>
+              <xsl:when test="$sparc = '1' or $sparc = '2'">
+                <xsl:text>-m64 -mcpu=ultrasparc -mtune=ultrasparc</xsl:text>
+              </xsl:when>
+              <xsl:when test="$sparc = '3'">
+                <xsl:text>-m64 -mcpu=ultrasparc3 -mtune=ultrasparc3</xsl:text>
+              </xsl:when>
+            </xsl:choose>
+          </xsl:when>
+          <xsl:when test="contains(string(),'GCCTARGET')">
+            <xsl:choose>
+              <xsl:when test="$sparc = '1' or $sparc = '2'">
+                <xsl:text>-mcpu=ultrasparc -mtune=ultrasparc</xsl:text>
+              </xsl:when>
+              <xsl:when test="$sparc = '3'">
+                <xsl:text>-mcpu=ultrasparc3 -mtune=ultrasparc3</xsl:text>
+              </xsl:when>
+            </xsl:choose>
+          </xsl:when>
+        </xsl:choose>
+      </xsl:when>
       <xsl:otherwise>
         <xsl:text>**EDITME</xsl:text>
Index: Config.in
===================================================================
--- Config.in	(revision 7a84ba7713f9ff3379fd6da4e84bff0c0da905b1)
+++ Config.in	(revision 650acce1b8349a7f99470bf010db514d460e377a)
@@ -144,5 +144,5 @@
 	choice
 		prompt	"Processor type"
-		depends	(BOOK_CLFS || BOOK_CLFS2 || BOOK_CLFS3) && ((ARCH_X86 && !(DATA_64 || DATA_MULTI)) || ARCH_MIPS || ARCH_HPPA || ARCH_ALPHA || (ARCH_ARM && BOOK_CLFS3))
+		depends	(BOOK_CLFS || BOOK_CLFS2 || BOOK_CLFS3) && ((ARCH_X86 && !(DATA_64 || DATA_MULTI)) || ARCH_MIPS || ARCH_HPPA || ARCH_ALPHA || (ARCH_SPARC && (DATA_64 || DATA_MULTI)) || (ARCH_ARM && BOOK_CLFS3))
 		help
 			#-- Choose the target system processor
@@ -201,4 +201,13 @@
 		config	PROC_ARM5B
 			bool	"Generic arm, version 5, big endian"			if ARCH_ARM
+
+		config	PROC_ULTRA1
+			bool	"UtraSparc"						if ARCH_SPARC && (DATA_64 || DATA_MULTI)
+
+		config	PROC_ULTRA2
+			bool	"UtraSparc2"						if ARCH_SPARC && (DATA_64 || DATA_MULTI)
+
+		config	PROC_ULTRA3
+			bool	"UtraSparc3"						if ARCH_SPARC && (DATA_64 || DATA_MULTI)
 	endchoice
 
@@ -278,6 +287,13 @@
 	config  PLATFORM
 		string
-		default "GENERIC"                       if (!BOOK_CLFS3) || PLATFORM_GENERIC
-		default	"WRT - Wireless Router"         if PLATFORM_WRT
+		default "GENERIC"			if (!BOOK_CLFS3) || PLATFORM_GENERIC
+		default	"WRT - Wireless Router"		if PLATFORM_WRT
+
+	config  SPARC64_PROC
+		string
+		default "none"				if !(ARCH_SPARC && (DATA_64 || DATA_MULTI))
+		default	"1"				if PROC_ULTRA1
+		default	"2"				if PROC_ULTRA2
+		default	"3"				if PROC_ULTRA3
 
 	config	ARCH
Index: common/libs/func_book_parser
===================================================================
--- common/libs/func_book_parser	(revision 7a84ba7713f9ff3379fd6da4e84bff0c0da905b1)
+++ common/libs/func_book_parser	(revision 650acce1b8349a7f99470bf010db514d460e377a)
@@ -94,4 +94,5 @@
                  --stringparam page $PAGE \
                  --stringparam lang $LANG \
+                 --stringparam sparc $SPARC64_PROC \
                  -o ./${PROGNAME}-commands/ $XSL $BOOK/$ARCH-index.xml >>$LOGDIR/$LOG 2>&1
       ;;
