diff --git a/gcc/config.sub b/gcc/config.sub
index 2bfef025088aeaf484ccda74fbfe59ac64bec850..e40e14d8269e8e940b950e161a94b0834e698a92 100755
--- a/gcc/config.sub
+++ b/gcc/config.sub
@@ -78,7 +78,7 @@ case $basic_machine in
 	# Recognize the basic CPU types with without company name.
 	# Some are omitted here because they have special meanings below.
 	tahoe | i[34]86 | i860 | m68k | m68000 | m88k | ns32k | arm | pyramid \
-		| tron | a29k | 580 | i960 | h8300 | hppa1.0 | hppa1.1)
+		| tron | a29k | 580 | i960 | h8300 | hppa1.0 | hppa1.1 | we32)
 		basic_machine=$basic_machine-unknown
 		;;
 	# Recognize the basic CPU types with with company name.
@@ -86,7 +86,7 @@ case $basic_machine in
 	      | sparc-* | ns32k-* | fx80-* | arm-* | c[123]* \
 	      | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
 	      | none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* \
-	      | hppa1.0-* | hppa1.1-*)
+	      | hppa1.0-* | hppa1.1-* | we32-*)
 		;;
 	# Recognize the various machine names and aliases which stand
 	# for a CPU type and a company and sometimes even an OS.
@@ -176,6 +176,9 @@ case $basic_machine in
 	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
 		basic_machine=m68000-att
 		;;
+	3b*)
+		basic_machine=we32-att
+		;;
 	delta | 3300 | motorola-3300 | motorola-delta \
 	      | 3300-motorola | delta-motorola)
 		basic_machine=m68k-motorola
diff --git a/gcc/varasm.c b/gcc/varasm.c
index fad48642dbc0acf64c17d7a06be6b08b1cc061b7..da4849e7a162cd12c2daf15e0f11cf6da825f906 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -109,19 +109,6 @@ text_section ()
     }
 }
 
-/* Tell assembler to switch to read-only data section.  This is normally
-   the text section.  */
-
-void
-readonly_data_section ()
-{
-#ifdef READONLY_DATA_SECTION
-  READONLY_DATA_SECTION ();
-#else
-  text_section ();
-#endif
-}
-
 /* Tell assembler to switch to data section.  */
 
 void
@@ -144,6 +131,19 @@ data_section ()
     }
 }
 
+/* Tell assembler to switch to read-only data section.  This is normally
+   the text section.  */
+
+void
+readonly_data_section ()
+{
+#ifdef READONLY_DATA_SECTION
+  READONLY_DATA_SECTION ();  /* Note this can call data_section.  */
+#else
+  text_section ();
+#endif
+}
+
 /* Determine if we're in the text section. */
 
 int