Subject:
|
Re: Gcc/BrickOS installation issues
|
Newsgroups:
|
lugnet.robotics.rcx.legos
|
Date:
|
Tue, 25 Mar 2003 21:46:22 GMT
|
Viewed:
|
3111 times
|
| |
| |
John Hansen wrote:
> In lugnet.robotics.rcx.legos, Steven McNutt writes:
> > Hi, I'm trying to compile Gcc/BrickOS under cygwin. I have latest
> > version of BrickOS.
>
> It is extremely difficult to get GCC to build under cygwin.
Not so. Here is the script I use.
I suspect that the buildgcc.sh may have omitted to make sure the
newly-installed binutils were in the PATH whilst building gcc.
Max.
BEGIN-SCRIPT
#!/bin/bash
# Syntax: ./build-h8x (binutils-srcdir|gcc-srcdir)
PREFIX=/usr/h8300-hitachi-hms
echo "PREFIX = $PREFIX"
for i in $*; do
[ -z "$i" ] && { echo 'Empty argument!' >&2; exit 2; }
[ ! -d "$i" ] && { echo "'$i' is not a directory!" >&2; exit 2; }
export PATH=$PREFIX/bin:$PATH
if [ -d "$i/binutils" -a -d "$i/gcc" ]; then
{ echo "Sorry, script does not support combined trees!" >&2; exit 2; };
elif [ -d "$i/binutils" ]; then
pushd "$i" && rm -rf _obj && mkdir _obj && cd _obj &&
echo -e '\033[31m' &&
../configure --prefix=$PREFIX --target=h8300-hitachi-hms --disable-nls &&
echo -e '\033[32m' && make &&
echo -e '\033[33m' && make install && popd &&
echo -e '\033[37mDone Binutils!\033[0m' || { echo -e '\033[37;1mBinutils
Build \033[31;1mFailed\033[0m' >&2; exit 1; }
elif [ -d "$i/gcc" ]; then
pushd "$i" && rm -rf _obj && mkdir _obj && cd _obj &&
echo -e '\033[34m' &&
../configure --prefix=$PREFIX --target=h8300-hitachi-hms --disable-nls --ena
ble-languages=c,c++ --with-newlib &&
echo -e '\033[35m' && make ALL_TARGET_MODULES="" &&
echo -e '\033[36m' && make INSTALL_TARGET_MODULES="" install && popd &&
echo -e '\033[37mDone GCC!\033[0m' || { echo -e '\033[37;1mGCC Build
\033[31;1mFailed\033[0m' >&2; exit 1; }
else
{ echo "No recognized software in '$i'!" >&2; exit 2; };
fi
done
END-SCRIPT
|
|
Message is in Reply To:
5 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|