This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Hi, I'm trying to build a cross compiler with target alpha-linux on an intel linux. The host machine is a pentium III with RedHat 6.2 for Intel and the binary generated by the cross-compiler will be installed on an Alpha with RedHat 6.2 for Alpha. I have tried what is in section 4.1 of the FAQ but I'm not getting pass building gcc. I went through some of the archives in the mailing list an found about linking include to the newlib include. I do that but then I find that newlib-1.X doesn't know about alpha CPUs (first hint, it doesn't know which endian it is). I decided to go with glibc. But this time the include link trick doesn't work, the glibc-X/include doesn't look the same as it will be when installed. I read more in the archive, and find out that to build a binary I will need crt*.o files and stuff. At that point, I decide to get some of the RedHat-alpha RPMs to get the crt*.o files and the includes. kernel-headers-2.2.14-6.0.alpha.rpm glibc-2.1.3-16.alpha.rpm glibc-devel-2.1.3-16.alpha.rpm I installed these RPMs (in a seperate root), make some apropriate links. Now I get pretty far in the compilation but still no crosscompiler. I get to the following error: make[2]: Leaving directory `/opt/cross-alpha/SRC/Build-gcc/alpha-linux/libio' cd ../libiberty ; make "SHELL=/bin/sh" "INSTALL=/bin/sh /opt/cross-alpha/SRC/gcc-2.95.3/install-sh -c" "INSTALL_DATA=/bin/sh /opt/cross-alpha/SRC/gcc-2.95.3/install-sh -c -m 644" "INSTALL_PROGRAM=/bin/sh /opt/cross-alpha/SRC/gcc-2.95.3/install-sh -c " "prefix=/opt/cross-alpha" "exec_prefix=/opt/cross-alpha" "tooldir=/opt/cross-alpha/alpha-linux" "gxx_include_dir=/opt/cross-alpha/include/g++-3" "libsubdir=/opt/cross-alpha/lib/gcc-lib/alpha-linux/2.95.3" "gcc_version=2.95.3" "gcc_version_trigger=/opt/cross-alpha/SRC/gcc-2.95.3/gcc/version.c" "AR=alpha-linux-ar" "AR_FLAGS=rc" "CC=/opt/cross-alpha/SRC/Build-gcc/gcc/xgcc -B/opt/cross-alpha/SRC/Build-gcc/gcc/ -B/opt/cross-alpha/alpha-linux/bin/" "CXX=/opt/cross-alpha/SRC/Build-gcc/gcc/xgcc -B/opt/cross-alpha/SRC/Build-gcc/gcc/ -B/opt/cross-alpha/alpha-linux/bin/" "CFLAGS=-g -O2" "CXXFLAGS=-g -O2 -fvtable-thunks -D_GNU_SOURCE" "NM=alpha-linux-nm" "RANLIB=alpha-linux-ranlib" "LIBCFLAGS=-g -O2" "LIBCXXFLAGS=-g -O2 -fvtable-thunks -D_GNU_SOURCE -fno-implicit-templates" "LOADLIBES=" "LDFLAGS=" "MAKEINFO=/opt/cross-alpha/SRC/Build-gcc/texinfo/makeinfo/makeinfo " "SHLIB=libstdc++.so.2.10.0" "SHCURSES=" "RUNTESTFLAGS=" make[2]: Entering directory `/opt/cross-alpha/SRC/Build-gcc/alpha-linux/libiberty' make[2]: *** No targets specified and no makefile found. Stop. make[2]: Leaving directory `/opt/cross-alpha/SRC/Build-gcc/alpha-linux/libiberty' make[1]: *** [../libiberty/libiberty.a] Error 2 make[1]: Leaving directory `/opt/cross-alpha/SRC/Build-gcc/alpha-linux/libstdc++' make: *** [all-target-libstdc++] Error 2 There are no Makefile in alpha-linux/libiberty because of the following error (in alpha-linux/libiberty/config.log): configure:1765: /opt/cross-alpha/SRC/Build-gcc/gcc/xgcc -B/opt/cross-alpha/SRC/Build-gcc/gcc/ -B/opt/cross-alpha/alpha-linux/bin/ -o conftest -g -O2 conftest.c 1>&5 /opt/cross-alpha/alpha-linux/bin/ld: cannot find /lib/libc.so.6.1 collect2: ld returned 1 exit status the thing is here, I had the same message before about /lib/crt0.o for which I created a link into the library path, and I did the same for libc.so.6.1 So now, I'm short of answers. Am I expecting to much to be able the create a cross-compiler that will generate an "a.out" to be ran another platform? Below is a script equivalant of what I have done so far: ############################################################ #!/bin/sh TARGETDIR=/opt/cross-alpha TARGET=alpha-linux # Installing Linux Redhat alpha RPMs in TARGETDIR # Assuming that RPMs are allready in TARGETDIR/RPMS mkdir -p $TARGETDIR/var/lib/rpm cd $TARGETDIR/RPMS RPMCOMMAND="rpm --ignorearch --nodeps --noscripts --notriggers --root $TARGETDIR -ivh" $RPMCOMMAND kernel-headers-2.2.14-6.0.alpha.rpm $RPMCOMMAND glibc-2.1.3-16.alpha.rpm $RPMCOMMAND glibc-devel-2.1.3-16.alpha.rpm # because of --noscripts --notriggers the following link is missing cd $TARGETDIR/usr/src ln -s linux-2.2.14/ linux # making links to installed RPM # The includes... mkdir -p $TARGETDIR/$TARGET cd $TARGETDIR/$TARGET ln -s ../usr/include include # The object files *crt*.o libc* mkdir -p $TARGETDIR/$TARGET/lib cd $TARGETDIR/$TARGET/lib ln -s ../../usr/lib/* . ln -s ../../lib/* . # creation of directory so gcc go down into the directory and ../../../.. back up mkdir -p $TARGETDIR/lib/gcc-lib/alpha-linux/2.95.3 PATH=$TARGETDIR/bin:$PATH export PATH # Now building stuff # Assuming that the sources have already been untared in TARGETDIR/SRC SRCBINUTILS=binutils-2.10.1 SRCGCC=gcc-2.95.3 SRCLIBC=glibc-2.1.3 cd $TARGETDIR/SRC mkdir -p $TARGETDIR/SRC/Build-binutils cd $TARGETDIR/SRC/Build-binutils ../$SRCBINUTILS/configure --target=alpha-linux --prefix=/opt/cross-alpha -v make all install mkdir -p $TARGETDIR/SRC/Build-gcc cd $TARGETDIR/SRC/Build-gcc ../$SRCGCC/configure --target=alpha-linux --prefix=/opt/cross-alpha -v make all install -- Richard Lefebvre, Sys-admin, CERCA, (514)369-5224 "Don't Panic" Richard.Lefebvre(@AROBAS)cerca(.POINT)umontreal(.POINT)ca -- THGTTG http://www.CERCA.UMontreal.CA/~rick/ ------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |