[linux-sh:03316] Re: Building a cross compiler for the Dreamcast

"Gregg C Levine" <[email protected]> Sun, 19 Sep 2004 20:38:55 -0400
Newsgroups gmane.linux.ports.sh.general
Message-ID <000d01c49eaa$3784de60$6401a8c0@who5>
Hello from Gregg C Levine
Hmm. What I posted there, was a copy & paste from that newgroup posting.
Evidently I did forget to provide a script of what the script does. Here
comes the actual script:
Script started on Sun 19 Sep 2004 08:25:48 PM EDT
root@who4:/usr/local/src/crosstool-0.28-rc36# sh demo-sh4.sh
+ TARBALLS_DIR=/root/downloads
+ RESULT_TOP=/opt/crosstool
+ export TARBALLS_DIR RESULT_TOP
+ GCC_LANGUAGES=c,c++
+ export GCC_LANGUAGES
+ mkdir -p /opt/crosstool
++ cat sh4.dat gcc-3.4.1-glibc-2.3.3.dat
+ eval 'KERNELCONFIG=`pwd`/sh4.config' TARGET=sh4-unknown-linux-gnu
'TARGET_CFLAGS="-O' -ml '-m4"' 'GLIBC_CONFIGPARMS="no-z-defs=yes"'
BINUTILS_DIR=binutils-2.15 GCC_DIR=gcc-3.4.1 GLIBC_DIR=glibc-2.3.3
LINUX_DIR=linux-2.6.8 GLIBCTHREADS_FILENAME=glibc-linuxthreads-2.3.3 sh
all.sh --notest
+++ pwd
++ KERNELCONFIG=/usr/local/src/crosstool-0.28-rc36/sh4.config
++ TARGET=sh4-unknown-linux-gnu
++ TARGET_CFLAGS=-O -ml -m4
++ GLIBC_CONFIGPARMS=no-z-defs=yes
++ BINUTILS_DIR=binutils-2.15
++ GCC_DIR=gcc-3.4.1
++ GLIBC_DIR=glibc-2.3.3
++ LINUX_DIR=linux-2.6.8
++ GLIBCTHREADS_FILENAME=glibc-linuxthreads-2.3.3
++ sh all.sh --notest
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
GLIBC_ADDON_OPTIONS not set, so building all glibc add-on's
+ TOOLCOMBO=gcc-3.4.1-glibc-2.3.3
++ pwd
+
BUILD_DIR=/usr/local/src/crosstool-0.28-rc36/build/sh4-unknown-linux-gnu/gcc
-3.4.1-glibc-2.3.3
++ pwd
+ TOP_DIR=/usr/local/src/crosstool-0.28-rc36
+ test -z ''
+
SRC_DIR=/usr/local/src/crosstool-0.28-rc36/build/sh4-unknown-linux-gnu/gcc-3
.4.1-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
+ abort 'Don'\''t run all.sh or crosstool.sh as root, it'\''s dangerous'
+ echo 'Don'\''t' run all.sh or crosstool.sh as root, 'it'\''s' dangerous
Don't run all.sh or crosstool.sh as root, it's dangerous
+ exec false
root@who4:/usr/local/src/crosstool-0.28-rc36# exit
Script done on Sun 19 Sep 2004 08:26:21 PM EDT

I think that output clarifies my position. And your right. Packages for
Slackware are indeed tarballs, except the makepkg tool adds a script which
adds it to the records of what's installed on the system. Since your tool
says it can make RPM packages, I can convert those to ny Slackware packages.
What I'd really like is a few pointers suggesting where I should go next.
Gregg C Levine drwho8 atsign worldnet dot att dot net
"Oh my!" The Second Doctor's nearly favorite phrase.

----- Original Message ----- 
From: "Dan Kegel" <[email protected]>
To: "Gregg C Levine" <[email protected]>
Cc: <[email protected]>; <[email protected]>
Sent: Sunday, September 19, 2004 8:14 PM
Subject: Re: [linux-sh:03313] Re: Building a cross compiler for the
Dreamcast


> Gregg C Levine wrote:
> > Hello from Gregg C Levine
> > Actually yes I did. And something within the scripts didn't appreciate
my
> > efforts. I posted my efforts to the newgroup. In case you didn't see it
> > there, I've got a local copy:
> >
> > Hello from Gregg C Levine
> > I did that. I used the default browser for KDE to download that one. Tar
> > complained so I grabbed it via wget. Extracted it into the
/usr/local/src
> > directory.
> >
> > I then ran the script for setting things for the SH4.
>
> Which script was that?  Note that the recommended way to run for starters
is
>    sh demo-sh4.sh
>
>  > I should have
> > mentioned, that my target isn't one of the developer boards from the
> > company, its a Dreamcast that's my target.
> >
> > I then ran the next script, it complained about not having a couple of
> > variables set.
> > Same with the crosstool.sh script. I also created a script file to
explain
> > this:
> > Script started on Thu 16 Sep 2004 12:21:11 AM EDT
> > root@who4:/usr/local/src/crosstool-0.28-rc35# sh all.sh
> > Please set TARGET to the Gnu target identifier (e.g. pentium-linux)
> > root@who4:/usr/local/src/crosstool-0.28-rc35# sh crosstool.sh
> > Please set PREFIX to where you want the toolchain installed.
> > root@who4:/usr/local/src/crosstool-0.28-rc35# exit
> > Script done on Thu 16 Sep 2004 12:23:17 AM EDT
>
> That's exactly what you would expect if you ran all.sh or crosstool.sh
> without setting those variables.
>
> > I did read the documentation pointed to inside the
> > doc directory that the README file points to.
>
> Evidently the doc sucks.  If I can figure out how, I'll improve it.
>
>  > Also I'd like to have the crosstool scripts build Slackware packages.
>
> Can't help you there.  I don't know what those are.  Aren't they just
tarballs?
>
>  > I'm also going to post the output from the demo-sh4.sh script:
> >
> > #!/bin/sh
> > set -ex
> > TARBALLS_DIR=/usr/local/src/sh4
> > RESULT_TOP=/opt/crosstool
> > export TARBALLS_DIR RESULT_TOP
> > GCC_LANGUAGES="c,c++"
> > export GCC_LANGUAGES
> >
> > # 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
> >
> > # Build the toolchain.  Takes a couple hours and a couple gigabytes.
> > # note: binutils < 2.13 doesn't know about sh4, so don't try building
gcc-2.95
> > # note: gcc-3.2.3 has ICE compiling glibc for sh4
(http://gcc.gnu.org/PR6954), so don't try building gcc-3.2.3
> >
> > #eval `cat sh4.dat gcc-3.3-glibc-2.2.5.dat`    sh all.sh --notest
> > #eval `cat sh4.dat gcc-3.3-glibc-2.3.2.dat`    sh all.sh --notest
> > #eval `cat sh4.dat gcc-3.3.2-glibc-2.3.2.dat`  sh all.sh --notest
> > #eval `cat sh4.dat gcc-3.3.3-glibc-2.3.2.dat`  sh all.sh --notest
> > #eval `cat sh4.dat gcc-3.4.0-glibc-2.3.2.dat`  sh all.sh --notest
> >  eval `cat sh4.dat gcc-3.4.1-glibc-2.3.3.dat`  sh all.sh --notest
> > #eval `cat sh4.dat gcc-3.4.1-glibc-20040827.dat`  sh all.sh --notest
> >
> > echo Done.
>
> Er, that's not the output from the script, that's the script itself.
> Are you quite sure you ran it?
>
> - Dan
>
> -- 
> My technical stuff: http://kegel.com
> My politics: see http://www.misleader.org for examples of why I'm for
regime change