To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 3196
3195  |  3197
Subject: 
Re: Gcc/BrickOS installation issues
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Tue, 25 Mar 2003 21:46:22 GMT
Viewed: 
2891 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:
  Re: Gcc/BrickOS installation issues
 
(...) It is extremely difficult to get GCC to build under cygwin. I would highly recommend installing the pre-built binaries from Hitachi's website. I have a set of instructions at (URL) Hansen (21 years ago, 25-Mar-03, to lugnet.robotics.rcx.legos)

5 Messages in This Thread:



Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR