This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: Help with Gcc-3.0.3 cross-compile
- From: "Shureih, Tariq" <tariq dot shureih at intel dot com>
- To: "'Steve Christiansen'" <smc at us dot ibm dot com>, "'Jim Wilson'" <wilson at redhat dot com>
- Cc: "'gcc at gcc dot gnu dot org'" <gcc at gcc dot gnu dot org>
- Date: Fri, 8 Feb 2002 15:29:06 -0800
- Subject: RE: Help with Gcc-3.0.3 cross-compile
First, thank you very much for the quick response.
I got the latest source from CVS for gcc-3.1 experimental, but now I am
running into another problem.
I compiled gcc for my host (i686-pc-linux-gnu) and installed it in the
environment I'm building everything in.
Then I compiled binutils, using the new compiler, for a cross compile.
The broke with the following message:
Start*********************************
make[2]: Leaving directory `/cross-compile/gcc-build/gcc/intl'
gcc -DIN_GCC -DCROSS_COMPILE -g -O2 -W -Wall -Wwrite-strings
-Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic
-Wno-long-long -DHAVE_CONFIG_H -o Tcollect2 \
collect2.o tlink.o hash.o intl.o underscore.o version.o
../libiberty/libiberty.a
mv -f Tcollect2 collect2
if [ -f specs.ready ] ; then \
true; \
else \
echo timestamp > specs.ready; \
fi
/cross-compile/gcc-build/gcc/xgcc -B/cross-compile/gcc-build/gcc/
-B=/home/cross-tools-ia64//ia64-pc-linux-gnu/bin/
-B=/home/cross-tools-ia64//ia64-pc-linux-gnu/lib/ -isystem
=/home/cross-tools-ia64//ia64-pc-linux-gnu/include -c -o crtbegin.o -x
assembler-with-cpp ../../gcc-3.1-beta/gcc/config/ia64/crtbegin.asm
as: unrecognized option `-x'
make[1]: *** [crtbegin.o] Error 1
make[1]: Leaving directory `/cross-compile/gcc-build/gcc'
make: *** [all-gcc] Error 2
Master Tariq@gcc-build#:
******************************End
So I read a bit more and noticed that I need glibc 2.2.4 or higher.
I am building this whole thing inside a "root-jail" environment, so I
upgraded it to glibc-2.2.4 and now I get the following error:
Start**********************************************
/cross-compile/gcc-build/gcc/xgcc -B/cross-compile/gcc-build/gcc/
-B/home/cross-tools-ia64//ia64-pc-linux-gnu/bin/
-B/home/cross-tools-ia64//ia64-pc-linux-gnu/lib/ -isystem
/home/cross-tools-ia64//ia64-pc-linux-gnu/include -O2 -DIN_GCC
-DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-prototypes
-isystem ./include -fPIC -g1 -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED
-Dinhibit_libc -I. -I. -I../../gcc-3.1-beta/gcc -I../../gcc-3.1-beta/gcc/.
-I../../gcc-3.1-beta/gcc/config -I../../gcc-3.1-beta/gcc/../include
-DL_muldi3 -c ../../gcc-3.1-beta/gcc/libgcc2.c -o libgcc/./_muldi3.o
In file included from tconfig.h:21,
from ../../gcc-3.1-beta/gcc/libgcc2.c:36:
../../gcc-3.1-beta/gcc/config/ia64/linux.h:67:20: signal.h: No such file or
directory
../../gcc-3.1-beta/gcc/config/ia64/linux.h:68:26: sys/ucontext.h: No such
file or directory
make[2]: *** [libgcc/./_muldi3.o] Error 1
make[2]: Leaving directory `/cross-compile/gcc-build/gcc'
make[1]: *** [libgcc.a] Error 2
make[1]: Leaving directory `/cross-compile/gcc-build/gcc'
make: *** [all-gcc] Error 2
Master Tariq@gcc-build#:
*************************************End
I appreciate all the help.
Any ideas what to do next?
--
Tariq
-----Original Message-----
From: Steve Christiansen [mailto:smc@us.ibm.com]
Sent: Thursday, February 07, 2002 5:05 PM
To: Shureih, Tariq
Cc: 'gcc@gcc.gnu.org'
Subject: Re: Help with Gcc-3.0.3 cross-compile
On Thu, Feb 07, 2002 at 04:49:50PM -0800, Shureih, Tariq wrote:
> ../../gcc-3.0.3/gcc/libgcc2.h:101: no data type for mode `TI'
> ../../gcc-3.0.3/gcc/libgcc2.h:102: no data type for mode `TI'
> In file included from ../../gcc-3.0.3/gcc/libgcc2.c:47:
> ../../gcc-3.0.3/gcc/libgcc2.h:101: no data type for mode `TI'
> ../../gcc-3.0.3/gcc/libgcc2.h:102: no data type for mode `TI'
This is no longer a problem in the CVS mainline. Use CVS or a
recent snapshot if you can. If you must stay with 3.0.3, you can
try the following patch. It's a hack, but it works for me.
Steve
*** gcc/config/ia64/ia64.h.save Sun Jan 20 15:40:31 2002
--- gcc/config/ia64/ia64.h Sun Jan 20 15:41:20 2002
*************** extern const char *ia64_fixed_range_stri
*** 269,274 ****
--- 269,280 ----
/* Number of storage units in a word; normally 4. */
#define UNITS_PER_WORD 8
+ /* MIN_UNITS_PER_WORD defaults to UNITS_PER_WORD. That doesn't work when
+ * building a cross libgcc.a. */
+ #if IN_LIBGCC2
+ #define MIN_UNITS_PER_WORD 4
+ #endif
+
/* Width of a pointer, in bits. You must specify a value no wider than
the
width of `Pmode'. If it is not equal to the width of `Pmode', you must
define `POINTERS_EXTEND_UNSIGNED'. */
*** gcc/config/ia64/lib1funcs.asm.save Thu Jan 17 15:32:18 2002
--- gcc/config/ia64/lib1funcs.asm Thu Jan 17 15:34:40 2002
***************
*** 1,4 ****
! #ifdef L__divtf3
// Compute a 80-bit IEEE double-extended quotient.
//
// From the Intel IA-64 Optimization Guide, choose the minimum latency
--- 1,4 ----
! #ifdef L_divtf3
// Compute a 80-bit IEEE double-extended quotient.
//
// From the Intel IA-64 Optimization Guide, choose the minimum latency
*************** __divtf3:
*** 40,46 ****
.endp __divtf3
#endif
! #ifdef L__divdf3
// Compute a 64-bit IEEE double quotient.
//
// From the Intel IA-64 Optimization Guide, choose the minimum latency
--- 40,46 ----
.endp __divtf3
#endif
! #ifdef L_divdf3
// Compute a 64-bit IEEE double quotient.
//
// From the Intel IA-64 Optimization Guide, choose the minimum latency
*************** __divdf3:
*** 82,88 ****
.endp __divdf3
#endif
! #ifdef L__divsf3
// Compute a 32-bit IEEE float quotient.
//
// From the Intel IA-64 Optimization Guide, choose the minimum latency
--- 82,88 ----
.endp __divdf3
#endif
! #ifdef L_divsf3
// Compute a 32-bit IEEE float quotient.
//
// From the Intel IA-64 Optimization Guide, choose the minimum latency
*************** __divsf3:
*** 118,124 ****
.endp __divsf3
#endif
! #ifdef L__divdi3
// Compute a 64-bit integer quotient.
//
// From the Intel IA-64 Optimization Guide, choose the minimum latency
--- 118,124 ----
.endp __divsf3
#endif
! #ifdef L_divdi3
// Compute a 64-bit integer quotient.
//
// From the Intel IA-64 Optimization Guide, choose the minimum latency
*************** __divdi3:
*** 168,174 ****
.endp __divdi3
#endif
! #ifdef L__moddi3
// Compute a 64-bit integer modulus.
//
// From the Intel IA-64 Optimization Guide, choose the minimum latency
--- 168,174 ----
.endp __divdi3
#endif
! #ifdef L_moddi3
// Compute a 64-bit integer modulus.
//
// From the Intel IA-64 Optimization Guide, choose the minimum latency
*************** __moddi3:
*** 222,228 ****
.endp __moddi3
#endif
! #ifdef L__udivdi3
// Compute a 64-bit unsigned integer quotient.
//
// From the Intel IA-64 Optimization Guide, choose the minimum latency
--- 222,228 ----
.endp __moddi3
#endif
! #ifdef L_udivdi3
// Compute a 64-bit unsigned integer quotient.
//
// From the Intel IA-64 Optimization Guide, choose the minimum latency
*************** __udivdi3:
*** 272,278 ****
.endp __udivdi3
#endif
! #ifdef L__umoddi3
// Compute a 64-bit unsigned integer modulus.
//
// From the Intel IA-64 Optimization Guide, choose the minimum latency
--- 272,278 ----
.endp __udivdi3
#endif
! #ifdef L_umoddi3
// Compute a 64-bit unsigned integer modulus.
//
// From the Intel IA-64 Optimization Guide, choose the minimum latency
*************** __umoddi3:
*** 327,333 ****
.endp __umoddi3
#endif
! #ifdef L__divsi3
// Compute a 32-bit integer quotient.
//
// From the Intel IA-64 Optimization Guide, choose the minimum latency
--- 327,333 ----
.endp __umoddi3
#endif
! #ifdef L_divsi3
// Compute a 32-bit integer quotient.
//
// From the Intel IA-64 Optimization Guide, choose the minimum latency
*************** __divsi3:
*** 370,376 ****
.endp __divsi3
#endif
! #ifdef L__modsi3
// Compute a 32-bit integer modulus.
//
// From the Intel IA-64 Optimization Guide, choose the minimum latency
--- 370,376 ----
.endp __divsi3
#endif
! #ifdef L_modsi3
// Compute a 32-bit integer modulus.
//
// From the Intel IA-64 Optimization Guide, choose the minimum latency
*************** __modsi3:
*** 417,423 ****
.endp __modsi3
#endif
! #ifdef L__udivsi3
// Compute a 32-bit unsigned integer quotient.
//
// From the Intel IA-64 Optimization Guide, choose the minimum latency
--- 417,423 ----
.endp __modsi3
#endif
! #ifdef L_udivsi3
// Compute a 32-bit unsigned integer quotient.
//
// From the Intel IA-64 Optimization Guide, choose the minimum latency
*************** __udivsi3:
*** 460,466 ****
.endp __udivsi3
#endif
! #ifdef L__umodsi3
// Compute a 32-bit unsigned integer modulus.
//
// From the Intel IA-64 Optimization Guide, choose the minimum latency
--- 460,466 ----
.endp __udivsi3
#endif
! #ifdef L_umodsi3
// Compute a 32-bit unsigned integer modulus.
//
// From the Intel IA-64 Optimization Guide, choose the minimum latency
*** gcc/config/ia64/t-ia64.save Thu Jan 17 15:31:47 2002
--- gcc/config/ia64/t-ia64 Thu Jan 17 15:34:40 2002
*************** CROSS_LIBGCC1 = libgcc1-asm.a
*** 5,16 ****
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 \
__nonlocal_goto __restore_stack_nonlocal __trampoline
# ??? Hack to get -P option used when compiling lib1funcs.asm, because
Intel
--- 5,17 ----
LIBGCC1 = libgcc1-asm.a
LIB1ASMSRC = ia64/lib1funcs.asm
! # 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