From: Darrell Bellert <dbellert@boulder.qms.com>
To: gcc-help@gcc.gnu.org
Subject: Issues in building i686 to mips cross compiler
Date: Thu, 30 Nov 2000 13:36:00 -0000 [thread overview]
Message-ID: <3A26C85E.A8094D1D@boulder.qms.com> (raw)
Hello, I have a couple of concerns in creating a mips-ecoff cross
compiler on RedHat 7.0 that I was hoping someone could address.
First, however, here is the script I used (modeled after section 4.1 of
the FAQ) in order to create the compiler:
-------------------------------------------------------------------------------------------------------------------------------------
#!/bin/sh
########################################################################################################
#Script to create a cross compiler
########################################################################################################
#<<<<<------------------------- VARIABLES
-------------------------->>>>>
############################################
##### VERSIONS OF UTILITIES TO INSTALL #####
############################################
BINUTILS=binutils-2.10.1 # Name of bin-utils directory
GCC=gcc-2.95.2 # Name of gcc directory
NEWLIB=newlib-1.8.2 # Name of newlib directory
GDB=gdb-5.0 # Name of gdb directory
###################################
##### INSTALLATION PARAMETERS #####
###################################
HOST=i686-pc-linux-gnu # Host machine (machine where you are building
the compiler)
TARGET=mips-ecoff # Target machine (machine for which the compiler
will generate code)
PREFIX=/pika/dbellert/MIPS2 # Root directory for compiler
HEADERS=`pwd`/Include # Target machine header files
LIBS=`pwd`/Lib # Target machine libraries
CC=/usr/bin/gcc # A working C compiler
#<<<<<------------------------- PROCEDURE
-------------------------->>>>>
###########################################################
##### THROW IN SOME BLANK SPACE TO DELINEATE SECTIONS #####
###########################################################
delineate(){
echo
echo
echo
echo $1
echo
"<--------------------------------------------------------------------------------->"
echo
echo
echo
}
#################################################
##### REPORT A CONFIGURATION ERROR AND EXIT #####
#################################################
config_err(){
echo
echo
echo "Error configuring $1"
exit
}
########################################
##### REPORT A MAKE ERROR AND EXIT #####
########################################
make_err(){
echo
echo
echo "Error making $1"
exit
}
###############################################
##### PROCEDURE FOR MAKING CROSS COMPILER #####
###############################################
export CC
PATH=$PATH:$PREFIX/bin
for i in build-binutils build-gcc build-newlib build-gdb
do
if [[ -d $i ]]
then
rm -r $i
fi
mkdir $i
done
cd build-binutils
delineate "CONFIGURING BINUTILS"
../$BINUTILS/configure --host=$HOST --target=$TARGET --prefix=$PREFIX -v
|| config_err BINUTILS
delineate "MAKING BINUTILS"
make all install || make_err BINUTILS
cd ../build-gcc
delineate "CONFIGURING GCC"
../$GCC/configure --host=$HOST --target=$TARGET --prefix=$PREFIX -v
--with-headers=$HEADERS --with-libs=$LIBS --with-gnu-as --with-gnu-ld
--with-newlib || config_err GCC
delineate "MAKING GCC"
make all install || make_err GCC
cd ../build-newlib
delineate "CONFIGURING NEWLIB"
../$NEWLIB/configure --host=$HOST --target=$TARGET --prefix=$PREFIX -v
|| config_err NEWLIB
delineate "MAKING NEWLIB"
make all install || make_err NEWLIB
cd ../build-gdb
delineate "CONFIGURING GDB"
../$GDB/configure --target=$TARGET --prefix=$PREFIX -v || config_err GDB
delineate "MAKING GDB"
make all install || make_err GDB
--------------------------------------------------------------------------------------------------------------------------------------------------------
Here are my concerns:
(1) In order for GCC to build correctly, I had to setup the PATH
variable to include $PREFIX/bin. Without doing this, I would get an
error:
/bin/sh: mips-ecoff-ar: command not found
The reason for this concern is that the FAQ does not mention modifying
the PATH variable until you get to NEWLIB. I just wanted to make sure
that modifying my path did not have any adverse effects that are not
obvious. Any thoughts?
(2) I got three errors while making GCC:
make[3]: Entering directory
`/pika/dbellert/Stuff6/build-gcc/mips-ecoff/libstdc++/testsuite'
make[3]: Leaving directory
`/pika/dbellert/Stuff6/build-gcc/mips-ecoff/libstdc++/testsuite'
make[2]: Leaving directory
`/pika/dbellert/Stuff6/build-gcc/mips-ecoff/libstdc++'
make[1]: Leaving directory
`/pika/dbellert/Stuff6/build-gcc/mips-ecoff/libstdc++'
Configuring in mips-ecoff/libf2c
creating cache ./config.cache
checking if compiler f771 has been built... yes
checking for gcc... /home/dbellert/Stuff6/build-gcc/gcc/xgcc
-B/home/dbellert/Stuff6/build-gcc/gcc/
-B/home/dbellert/Stuff6/Build/mips-ecoff/bin/
checking whether the C compiler
(/home/dbellert/Stuff6/build-gcc/gcc/xgcc
-B/home/dbellert/Stuff6/build-gcc/gcc/
-B/home/dbellert/Stuff6/Build/mips-ecoff/bin/ -g -O2 ) works... no
configure: error: installation or configuration problem: C compiler
cannot create executables.
Configuring in mips-ecoff/libchill
creating cache ./config.cache
checking if compiler cc1chill has been built... yes
checking for gcc... /home/dbellert/Stuff6/build-gcc/gcc/xgcc
-B/home/dbellert/Stuff6/build-gcc/gcc/
-B/home/dbellert/Stuff6/Build/mips-ecoff/bin/
checking whether the C compiler
(/home/dbellert/Stuff6/build-gcc/gcc/xgcc
-B/home/dbellert/Stuff6/build-gcc/gcc/
-B/home/dbellert/Stuff6/Build/mips-ecoff/bin/ -g -O2 ) works... no
configure: error: installation or configuration problem: C compiler
cannot create executables.
Configuring in mips-ecoff/libobjc
creating cache ./config.cache
checking if compiler cc1obj has been built... yes
checking for gcc... /home/dbellert/Stuff6/build-gcc/gcc/xgcc
-B/home/dbellert/Stuff6/build-gcc/gcc/
-B/home/dbellert/Stuff6/Build/mips-ecoff/bin/
checking whether the C compiler
(/home/dbellert/Stuff6/build-gcc/gcc/xgcc
-B/home/dbellert/Stuff6/build-gcc/gcc/
-B/home/dbellert/Stuff6/Build/mips-ecoff/bin/ -g -O2 ) works... no
configure: error: installation or configuration problem: C compiler
cannot create executables.
/bin/sh ../gcc-2.95.2/mkinstalldirs /home/dbellert/Stuff6/Build
/home/dbellert/Stuff6/Build
Even though installation ultimately completed, is there any reason for
concern for the above errors (configure: error: installation or
configuration problem: C compiler cannot create executables.)?
(3) I got numerous warnings during the make process (about 4300). Is
this normal or should this also be a cause for concern?
If anyone has any comments for these concerns, please share.
Thanks,
Darrell
next reply other threads:[~2000-11-30 13:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-11-30 13:36 Darrell Bellert [this message]
2000-11-30 14:03 ` Alexandre Oliva
2000-12-01 8:07 ` Darrell Bellert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3A26C85E.A8094D1D@boulder.qms.com \
--to=dbellert@boulder.qms.com \
--cc=gcc-help@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).