gcc3 ia64 bootstrap fix
Janis Johnson
janis@us.ibm.com
Tue May 22 16:02:00 GMT 2001
There's a simple way to prevent the duplicate functions in libgcc,
which I used as part of a local hack to do cross builds from i686-linux.
The script mklibgcc removes names from LIB2FUNCS that are also in
LIB1ASMFUNCS, but that functionality didn't exist when the IA-64 port
was added so it didn't take advantage of that.
These changes are needed to build libgcc.a for a cross compiler on ix86.
They are needed for a native compiler if HOST_BITS_PER_WIDE_BIT is not
defined. They won't hurt a native build if HOST_BITS_PER_WIDE_BIT is
defined (that isn't addressed here).
These changes were tested by building a cross compiler with host
i686-pc-linux-gnu and target ia64-linux, and a native bootstrap and test
run on ia64-linux, both using the 20010521 snapshot.
Janis
--- gcc/config/ia64/t-ia64.orig Tue May 22 08:36:40 2001
+++ gcc/config/ia64/t-ia64 Tue May 22 09:36:54 2001
@@ -5,12 +5,13 @@
LIBGCC1 = libgcc1-asm.a
LIB1ASMSRC = ia64/lib1funcs.asm
-# ??? We change the names of the DImode div/mod files so that they won't
-# accidentally be overridden by libgcc2.c files. We used to use __ia64 as
-# a prefix, now we use __ as the prefix.
-LIB1ASMFUNCS = __divtf3 __divdf3 __divsf3 \
- __divdi3 __moddi3 __udivdi3 __umoddi3 \
- __divsi3 __modsi3 __udivsi3 __umodsi3 __save_stack_nonlocal \
+# The names of the DImode div/mod files are the same as those used in
+# libgcc2.c, but the script mklibgcc removes names from LIB2FUNCS that
+# are also defined in LIB1ASMFUNCS. Previously, these names used __ as
+# the prefix and before that, __ia64.
+LIB1ASMFUNCS = _divtf3 _divdf3 _divsf3 \
+ _divdi3 _moddi3 _udivdi3 _umoddi3 \
+ _divsi3 _modsi3 _udivsi3 _umodsi3 __save_stack_nonlocal \
__nonlocal_goto __restore_stack_nonlocal __trampoline
# ??? Hack to get -P option used when compiling lib1funcs.asm, because Intel
--- gcc/config/ia64/lib1funcs.asm.orig
+++ gcc/config/ia64/lib1funcs.asm
@@ -1,4 +1,4 @@
-#ifdef L__divtf3
+#ifdef L_divtf3
// Compute a 80-bit IEEE double-extended quotient.
//
// From the Intel IA-64 Optimization Guide, choose the minimum latency
@@ -40,7 +40,7 @@
.endp __divtf3
#endif
-#ifdef L__divdf3
+#ifdef L_divdf3
// Compute a 64-bit IEEE double quotient.
//
// From the Intel IA-64 Optimization Guide, choose the minimum latency
@@ -82,7 +82,7 @@
.endp __divdf3
#endif
-#ifdef L__divsf3
+#ifdef L_divsf3
// Compute a 32-bit IEEE float quotient.
//
// From the Intel IA-64 Optimization Guide, choose the minimum latency
@@ -118,7 +118,7 @@
.endp __divsf3
#endif
-#ifdef L__divdi3
+#ifdef L_divdi3
// Compute a 64-bit integer quotient.
//
// From the Intel IA-64 Optimization Guide, choose the minimum latency
@@ -168,7 +168,7 @@
.endp __divdi3
#endif
-#ifdef L__moddi3
+#ifdef L_moddi3
// Compute a 64-bit integer modulus.
//
// From the Intel IA-64 Optimization Guide, choose the minimum latency
@@ -222,7 +222,7 @@
.endp __moddi3
#endif
-#ifdef L__udivdi3
+#ifdef L_udivdi3
// Compute a 64-bit unsigned integer quotient.
//
// From the Intel IA-64 Optimization Guide, choose the minimum latency
@@ -272,7 +272,7 @@
.endp __udivdi3
#endif
-#ifdef L__umoddi3
+#ifdef L_umoddi3
// Compute a 64-bit unsigned integer modulus.
//
// From the Intel IA-64 Optimization Guide, choose the minimum latency
@@ -327,7 +327,7 @@
.endp __umoddi3
#endif
-#ifdef L__divsi3
+#ifdef L_divsi3
// Compute a 32-bit integer quotient.
//
// From the Intel IA-64 Optimization Guide, choose the minimum latency
@@ -370,7 +370,7 @@
.endp __divsi3
#endif
-#ifdef L__modsi3
+#ifdef L_modsi3
// Compute a 32-bit integer modulus.
//
// From the Intel IA-64 Optimization Guide, choose the minimum latency
@@ -417,7 +417,7 @@
.endp __modsi3
#endif
-#ifdef L__udivsi3
+#ifdef L_udivsi3
// Compute a 32-bit unsigned integer quotient.
//
// From the Intel IA-64 Optimization Guide, choose the minimum latency
@@ -460,7 +460,7 @@
.endp __udivsi3
#endif
-#ifdef L__umodsi3
+#ifdef L_umodsi3
// Compute a 32-bit unsigned integer modulus.
//
// From the Intel IA-64 Optimization Guide, choose the minimum latency
More information about the Gcc-patches
mailing list