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] |
Other format: | [Raw text] |
Guten Tag Clemens, The "error" might be spurious. The binutils build may have completed fine - it's possible that crosstoo.sh is 'test'ing something that isn't correct. My first suggestion would be to check and see what's in /gnusperoot. If the build did indeed fail, my next suggestion would be to try without --nounpack. Steve -----Original Message----- From: Clemens Koller [mailto:clemens.koller@anagramm.de] Sent: Monday, February 07, 2005 6:13 AM To: Steven J. Magnani Cc: crossgcc@sources.redhat.com Subject: Re: crosstool for native compiler on new system. Hello, Steven! I am still working on the native build using your pathes. Currently, my mileage vary a little as I guess I still didn't understand all the things I did. As you remember, I use the Kumar's e500/spe patches within an ppc_8xx ELDK 3.1 environment (the working one). I ran the following: sh ./demo-e500-cross.sh 2>&1 |tee log-cross2.log -----8<----------------------------------------------------------------- #!/bin/sh # # demo-e500-cross.sh # set -ex PREFIX=${PREFIX-/opt/crosstool} GCC_LANGUAGES="c,c++" EXTRA_PATCHES="spe" TARBALLS_DIR=$HOME/downloads export PREFIX GCC_LANGUAGES EXTRA_PATCHES TARBALLS_DIR #RESULT_TOP=$HOME/top #export RESULT_TOP # Really, you should do the mkdir before running this, # and chown /opt/crosstool to yourself so you don't need to run as root. #mkdir -p $RESULT_TOP mkdir -p $PREFIX # Build the toolchain. eval `cat powerpc-e500.dat gcc-3.4.3-e500-glibc-2.3.3-spe.dat` sh all.sh --notest --nopurge --nounpack echo Done. -----8<--------------------------------------------------------------- which works fine. Actually, I didn't want to wait for hours again after a successful build, so I added the --nounpack option after the first run! I hope this is okay?! Then I added the new powerpc-linux-gnuspe-gcc (3.4.3) to the PATH in first place: export PATH=/opt/crosstool/bin:/usr/bin:/bin:/usr/sbin:/sbin:.... Otherwise I get errors as it cannot find the new powerpc-linux-gnuspe- compilers. now I ran my version (adopted from yours) of the native.sh: -----8<--------------------------------------------------------------- #!/bin/sh # # demo-e500-native.sh # set -ex export PREFIX=/usr export GCC_HOST=powerpc-linux-gnuspe export TARGET_ROOT=/gnusperoot # Cross-compile a native compiler ./demo-e500-cross.sh echo Done. -----8<--------------------------------------------------------------- The goal is to get the new compiler in the /gnusperoot directory which I can add to my LinuxFromScratch later. Well, okay... but now I ran into the problem that it cannot build binutils. Did I miss something? -----8<------------sorry for the long log----------------------------- + export PREFIX=/usr + PREFIX=/usr + export GCC_HOST=powerpc-linux-gnuspe GCC_HOST=powerpc-linux-gnuspe + export TARGET_ROOT=/gnusperoot + TARGET_ROOT=/gnusperoot + ./demo-e500-cross.sh + PREFIX=/usr + GCC_LANGUAGES=c,c++ + EXTRA_PATCHES=spe + TARBALLS_DIR=/home/clemens/downloads + export PREFIX GCC_LANGUAGES EXTRA_PATCHES TARBALLS_DIR + mkdir -p /usr ++ cat powerpc-e500.dat gcc-3.4.3-e500-glibc-2.3.3-spe.dat + eval TARGET=powerpc-linux-gnuspe 'TARGET_CFLAGS="-O"' 'GLIBC_ADDON_OPTIONS="=linuxthreads,spe"' 'KERNELCONFIG=`pwd`/ powerpc-e500.config' BINUTILS_DIR=binutils-2.15 GCC_DIR=gcc-3.4.3 GLIBC_DIR=glibc-2.3.3 LINUX_DIR=linux-2.6.9 GLIBCTHR EADS_FILENAME=glibc-linuxthreads-2.3.3 sh all.sh --notest --nopurge --nounpack ++ TARGET=powerpc-linux-gnuspe ++ TARGET_CFLAGS=-O ++ GLIBC_ADDON_OPTIONS==linuxthreads,spe +++ pwd ++ KERNELCONFIG=/home/clemens/cross/crosstool-0.28-rc37/powerpc-e500.con ++ fig ++ BINUTILS_DIR=binutils-2.15 ++ GCC_DIR=gcc-3.4.3 ++ GLIBC_DIR=glibc-2.3.3 ++ LINUX_DIR=linux-2.6.9 ++ GLIBCTHREADS_FILENAME=glibc-linuxthreads-2.3.3 ++ sh all.sh --notest --nopurge --nounpack DEJAGNU not set, so not running any regression tests GCC_EXTRA_CONFIG not set, so not passing any extra options to gcc's configure script + TOOLCOMBO=gcc-3.4.3-glibc-2.3.3 ++ pwd + BUILD_DIR=/home/clemens/cross/crosstool-0.28-rc37/build/powerpc-linux-gn uspe/gcc-3.4.3-glibc-2.3.3 ++ pwd + TOP_DIR=/home/clemens/cross/crosstool-0.28-rc37 + test -z '' + SRC_DIR=/home/clemens/cross/crosstool-0.28-rc37/build/powerpc-linux-gnus pe/gcc-3.4.3-glibc-2.3.3 + echo 'SRC_DIR not set, so source tarballs will be unpacked in the build directory' SRC_DIR not set, so source tarballs will be unpacked in the build directory + test -w /tmp + TARBALLS_DIR=/home/clemens/downloads ++ cd /home/clemens/downloads ++ pwd + TARBALLS_DIR=/home/clemens/downloads + RESULT_TOP=/home/clemens/cross/crosstool-0.28-rc37/result + PREFIX=/usr + cd /home/clemens/cross/crosstool-0.28-rc37 + export TOOLCOMBO + export PREFIX + export BUILD_DIR + export SRC_DIR + export TARBALLS_DIR + export TOP_DIR + '[' 3 -gt 0 ']' + opt_no_test=1 ...skipping... build-binutils/libiberty' /home/clemens/cross/crosstool-0.28-rc37/build/powerpc-linux-gnuspe/gcc-3 .4.3-glibc-2.3.3/build-binutils/libiberty/test suite make[2]: Entering directory `/home/clemens/cross/crosstool-0.28-rc37/build/powerpc-linux-gnuspe/gcc- 3.4.3-glibc-2.3.3/ build-binutils/libiberty/testsuite' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/home/clemens/cross/crosstool-0.28-rc37/build/powerpc-linux-gnuspe/gcc- 3.4.3-glibc-2.3.3/b uild-binutils/libiberty/testsuite' /bin/sh /home/clemens/cross/crosstool-0.28-rc37/build/powerpc-linux-gnuspe/gcc-3 .4.3-glibc-2.3.3/binutils-2.15/libiber ty/../mkinstalldirs /gnusperoot/opt/crosstool/lib mkdir -p -- /gnusperoot/opt/crosstool/lib /usr/bin/install -c -m 644 ./libiberty.a /gnusperoot/opt/crosstool/lib/./libiberty.an ( cd /gnusperoot/opt/crosstool/lib ; ranlib ./libiberty.an ) mv -f /gnusperoot/opt/crosstool/lib/./libiberty.an /gnusperoot/opt/crosstool/lib/./libiberty.a if test -n ""; then \ case "" in \ /*) thd=;; \ *) thd=/opt/crosstool/include/;; \ esac; \ /bin/sh /home/clemens/cross/crosstool-0.28-rc37/build/powerpc-linux-gnuspe/gcc-3 .4.3-glibc-2.3.3/binutils-2.15/libib erty/../mkinstalldirs /gnusperoot${thd}; \ for h in /home/clemens/cross/crosstool-0.28-rc37/build/powerpc-linux-gnuspe/gcc-3 .4.3-glibc-2.3.3/binutils-2.15/libi berty/../include/ansidecl.h /home/clemens/cross/crosstool-0.28-rc37/build/powerpc-linux-gnuspe/gcc-3 .4.3-glibc-2.3.3/b inutils-2.15/libiberty/../include/demangle.h /home/clemens/cross/crosstool-0.28-rc37/build/powerpc-linux-gnuspe/gcc-3 . 4.3-glibc-2.3.3/binutils-2.15/libiberty/../include/dyn-string.h /home/clemens/cross/crosstool-0.28-rc37/build/powerpc- linux-gnuspe/gcc-3.4.3-glibc-2.3.3/binutils-2.15/libiberty/../include/fi bheap.h /home/clemens/cross/crosstool-0.28-rc3 7/build/powerpc-linux-gnuspe/gcc-3.4.3-glibc-2.3.3/binutils-2.15/libiber ty/../include/floatformat.h /home/clemens/cros s/crosstool-0.28-rc37/build/powerpc-linux-gnuspe/gcc-3.4.3-glibc-2.3.3/b inutils-2.15/libiberty/../include/hashtab.h /h ome/clemens/cross/crosstool-0.28-rc37/build/powerpc-linux-gnuspe/gcc-3.4 .3-glibc-2.3.3/binutils-2.15/libiberty/../incl ude/libiberty.h /home/clemens/cross/crosstool-0.28-rc37/build/powerpc-linux-gnuspe/gcc-3 .4.3-glibc-2.3.3/binutils-2.15 /libiberty/../include/objalloc.h /home/clemens/cross/crosstool-0.28-rc37/build/powerpc-linux-gnuspe/gcc-3 .4.3-glibc-2. 3.3/binutils-2.15/libiberty/../include/partition.h /home/clemens/cross/crosstool-0.28-rc37/build/powerpc-linux-gnuspe/ gcc-3.4.3-glibc-2.3.3/binutils-2.15/libiberty/../include/safe-ctype.h /home/clemens/cross/crosstool-0.28-rc37/build/po werpc-linux-gnuspe/gcc-3.4.3-glibc-2.3.3/binutils-2.15/libiberty/../incl ude/sort.h /home/clemens/cross/crosstool-0.28- rc37/build/powerpc-linux-gnuspe/gcc-3.4.3-glibc-2.3.3/binutils-2.15/libi berty/../include/splay-tree.h /home/clemens/cr oss/crosstool-0.28-rc37/build/powerpc-linux-gnuspe/gcc-3.4.3-glibc-2.3.3 /binutils-2.15/libiberty/../include/ternary.h; do \ /usr/bin/install -c -m 644 $h /gnusperoot${thd}; \ done; \ fi /home/clemens/cross/crosstool-0.28-rc37/build/powerpc-linux-gnuspe/gcc-3 .4.3-glibc-2.3.3/build-binutils/libiberty/test suite make[2]: Entering directory `/home/clemens/cross/crosstool-0.28-rc37/build/powerpc-linux-gnuspe/gcc- 3.4.3-glibc-2.3.3/ build-binutils/libiberty/testsuite' make[2]: Nothing to be done for `install'. make[2]: Leaving directory `/home/clemens/cross/crosstool-0.28-rc37/build/powerpc-linux-gnuspe/gcc- 3.4.3-glibc-2.3.3/b uild-binutils/libiberty/testsuite' make[1]: Leaving directory `/home/clemens/cross/crosstool-0.28-rc37/build/powerpc-linux-gnuspe/gcc- 3.4.3-glibc-2.3.3/b uild-binutils/libiberty' + cd .. + test -x /gnusperoot//usr/powerpc-linux-gnuspe/bin/ld + abort Build failed during binutils + echo Build failed during binutils Build failed during binutils + exec false -----8<-------------------------------------------------------------- Thank you in advance... Best greets, Clemens ----------- > I've had time to bake it a little more and think I've corrected the > deficiencies I noted below, with the exception of crosstool-cygwin.sh > and mkoverride.sh. > > It looks like crosstool-cygwin.sh isn't intended to build tools that > can be used for cross-compilation of Linux userland applications, only > Linux itself. So, it didn't seem that changes to crosstool-cygwin were > necessary. Please let me know if I've got it wrong! > > I think that mkoverride is broken, because (1) it doesn't seem to > account for the USE_SYSROOT case, and (2) the 'find' it does to locate > files doesn't work, at least on my system, because the files that > match the -name clause are symbolic links and are excluded by the > -type clause. > > Enjoy, > Steve > www.digidescorp.com > > -----Original Message----- > From: Steven J. Magnani [mailto:steve@digidescorp.com] > Sent: Wednesday, February 02, 2005 10:55 AM > To: 'Clemens Koller'; 'crossgcc@sources.redhat.com' > Subject: RE: crosstool for native compiler on new system. > > > One other important thing to mention. The native gcc build installs a > "specs" file under TARGET_ROOT (I believe to > $TARGET_ROOT/$PREFIX/lib/gcc/$TARGET/x.y.z/specs) that represents the > cross-compiler, not the native compiler. You'll need to delete that > file after building the native compiler in order for the native > compiler to run correctly. Probably this step belongs in crosstool.sh. > > Steve > www.digidescorp.com > > -----Original Message----- > From: Steven J. Magnani [mailto:steve@digidescorp.com] > Sent: Wednesday, February 02, 2005 10:25 AM > To: 'Clemens Koller'; 'crossgcc@sources.redhat.com' > Subject: RE: crosstool for native compiler on new system. > > > Guten Tag Clemens, > > I recently went through something similar, cross-building for ARM on > i386. One thing I found is that if you use the crosstool scripts > without change to produce a native compiler, the native compiler > believes it is a cross-compiler. This causes it to behave slightly > differently than you might expect when running it natively. Also I > think there are parts of glibc (i.e. ldd) that build only when they > believe they are for a native compiler. > > I ended up patching the crosstool-0.28-rc37 source to allow > cross-building of a "true" native compiler. The native cross-build > mode is triggered by GCC_HOST = TARGET. Then, TARGET_ROOT specifies > the root of your native system as mounted on your build system (i.e. > the so-called DESTDIR). > > Some things to note: > > * The patch updates all.sh and crosstool.sh. It does not update > crosstool-cygwin.sh. > > * The changes to crosstool.sh may be a little more than you need. I > also changed the "sysroot"ing from ${PREFIX}/${TARGET}/sys-root to > just $PREFIX when building a cross-compiler (as opposed to > cross-building a native compiler). Rather than try to back that part > of it out and hand you something less stable, I left it in. > > * I added a "--nopurge" option to all.sh that prevents it from > deleting previous results. I find this helpful when cross-building a > native root filesystem - if I regenerate the toolchain, I don't want > to lose the rest of my cross-userland doing it. > > * crosstool.sh puts results of a native compiler build beneath > TARGET_ROOT. The all.sh script doesn't know whether the build is for a > cross compiler or a native compiler; it assumes that the build results > are in $PREFIX. Until this discrepancy is reconciled you should > probably always specify --nopurge when calling all.sh. > > * I disabled mkoverride.sh, since I didn't need it for what I was > doing and didn't have time to dig into it. Looking at it this morning, > I think it might have a bug when crosstool is run with USE_SYSROOT - > the paths coded into mkoverride are the "plain old way" not the > "spiffy new sysroot way". > > Attached are 4 files - the patch to crosstool-0.28-rc37, the script I > use for building the cross-compiler, the script I use to build the > native compiler, and the .dat file I use. > > Hope these help. Feedback is most welcome - these are works in > progress. > > Regards, > Steve Magnani > www.digidescorp.com > > > -----Original Message----- > From: Clemens Koller [mailto:clemens.koller@anagramm.de] > Sent: Wednesday, February 02, 2005 8:39 AM > To: crossgcc@sources.redhat.com > Subject: crosstool for native compiler on new system. > > > Hello, > > Well, some days ago, I was successfully running crossgcc on MPC8540 > (e500, SPE) (no changes were necessary within crosstool, to answer your > last question, Steve.) > > Now I want to use or re-use the binaries for a new Linux From Scratch > root on a harddisk in i.e. /mnt. > > So, my question is: what things do I need to take care about to get my > new compiler+binutils+? as my (one and only) native compiler in > /usr/bin on the host system as well as in the new root of > /mnt/usr/bin. Is it okay to set the TARGET_DIR to put the compiler to > i.e. /mnt/usr/bin (which might be dangerous)? > > It is possible to relocate the whole (crossgcc-) build, copy the libs, > edit the specs file and move (or put symlinks) > powerpc-linux-gnuspe-* to /usr/bin/* > (I would prefer not to use any powerpc-linux-sth-prefixes anymore). > > Is the specs file the one and only place for gcc+friends which needs > to fit the environment? > > Well, I've read several howtos as well as the LFS docu... > but I still feel unsafe in what I am doing. Can you please point me to > some more installation FAQs or examples or give me a short sketch of > the things I need to take care? > > Is it possible to get out a tar.gz'ed file out of crosstool with only > the binaries which are needed in a plain, native Linux? (like a > --buildnativetar) > > Thank you! > -- Clemens Koller _______________________________ R&D Imaging Devices Anagramm GmbH Rupert-Mayer-Str. 45/1 81379 Muenchen Germany http://www.anagramm.de Phone: +49-89-741518-50 Fax: +49-89-741518-19 ------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |