Cross compler for ppc succeeds on Linux, fails on Cygwin
Dan Kegel
dank@kegel.com
Mon May 10 01:28:00 GMT 2004
Don Parsons wrote:
> Using crosstool-0.28-rc7 package, making the cross-compiler was easy on
> Linux for powerpc 7400. Much thanks to Dan and others for this excellent
> package.
>
> Using the same setup and latest cygwin as of yesterday, it fails early
> in binutil/libiberty when ./configure tests for _doprnt :
>
> ...
> checking for working fork... yes
> checking for working vfork... (cached) yes
> checking for _doprnt... 6 [main] sh 940 cmalloc: cmalloc returned
> NULL
> Signal 11
> make: *** [configure-libiberty] Error 1
>
> Is there an environment variable you could set to say _doprnt answer is
> "no" and skip testing?
You can find this yourself, if you're brave enough, by reading the
configure script. Let's see... yes, I think
export ac_cv_func__doprnt=no
would do it. Odd that sh is crashing on you, though. I haven't seen that.
What operating system are you running? And are you running cygwin-1.59.1?
Finally, did you download the latest *snapshot* of cygwin1.dll? It's at
http://cygwin.com/snapshots/cygwin1-20040507.dll.bz2
> Here are two files I created for ppc-7400 (and other dat file I used):
>
> [crosstool-0.28-rc7] # cat demo-ppc7400.sh
> #!/bin/sh
> set -ex
> TARBALLS_DIR=$HOME/cross_downloads
> RESULT_TOP=/opt/crosstool
> export TARBALLS_DIR RESULT_TOP
> GCC_LANGUAGES="c,c++,f77"
> export GCC_LANGUAGES
>
> mkdir -p /opt/crosstool
> eval `cat powerpc-7400.dat gcc-3.4.0-glibc-2.2.5.dat` sh all.sh --notest
> echo Done.
>
> [crosstool-0.28-rc7] # cat powerpc-7400.dat
> TARGET=powerpc-7400-linux-gnu
> TARGET_CFLAGS="-O"
> GCC_EXTRA_CONFIG="--with-cpu=7400 --enable-altivec \
> --enable-threads=posix --with-stabs --without-dwarf1 --without-dwarf2"
Thanks. Can you explain what you needed the option
--enable-threads=posix
for? I used to have that, but I think it turned out to cause problems
when compiling with glibc-2.1.3. And even LFS stopped recommending it:
http://linuxfromscratch.org/pipermail/lfs-dev/2002-September/028385.html
Also, I'm not familiar with stabs format; what made you need to do
--with-stabs --without-dwarf1 --without-dwarf2
? (I'm just curious.)
> There seems to be a step overlooked by the crosstools.sh script.
> Although it does not seem serious. The binutils package from
> BINUTILS_URL several lines up is intended to be run by doing:
> rpmbuild -ta binutils-xx.xx.xx.xx.xx.tar.bz2
> and this will apply five patches in its patch dir. via:
> /bin/sh patches/README
> but crosstool.sh misses this step. But is usually works anyway or
> maybe the crosstool patches already include these?
Already included; see the last eight lines of getandpatch.sh, starting
with "# binutils-2.14.90.0.3 and up want you to apply a patch".
> Getting back to the _doprnt problem
>
> In case you can read a stackdump
Nope :-)
> Can anyone suggest a solution or work around for this error? I could go
> in and take check for _doprnt out but crosstool.sh I think deletes tree
> each time it is run and would remove any changes I made.
Try setting ac_cv_func__doprnt=no and see if that helps. I worry, though,
that something strange is going on. I never ran into that in my testing.
I didn't enable Fortran, though, so who knows.
It might be good if you could create a minimal test case for
the doprnt problem, and submit a bug report to Cygwin...
- Dan
--
My technical stuff: http://kegel.com
My politics: see http://www.misleader.org for examples of why I'm for regime change
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
More information about the crossgcc
mailing list