DPRG List  

[DPRG] Off Topic: gcc help

Subject: [DPRG] Off Topic: gcc help
From: warm38 at juno.com warm38 at juno.com
Date: Fri Jul 16 15:13:47 CDT 2010

Well, supposedly, the work has already been done to create the port.
<insert frustrated scream here>
All I'm supposed to do is set up some testing for regression testing for
future mods to the compiler.
There was a test run and GCC reported over 39000 tests run.  A summary of
the data is all that is given and  nothing else.  So I'm trying to rerun
the tests and get more details so that I can select what to run and what
not to run and get all the coverage needed as the compiler grows and

On Ubuntu in /usr/src/binutils/bfd/configure acutally does have the
processor already listed as one of the archetectures.
So why can I not build for it?  It should be a breeze and I should be
running the tests.  Right?

The archetectrue is simple with 32 instructions.    A call or a branch is
limited to 2K instructions.  Processor RAM is 32 bytes (external RAM can
be available up to 4GB using registers to access it in 256 byte pages).

I actually ran the "configure --target= --prefix=" every time and t
SEEMED like it ran -- it didn't offer any complaints -- and yet make
still bombs every time.
Configure generates a HUGE Makefile which dies.

On Fri, 16 Jul 2010 12:32:09 -0700 Chuck McManis
<chuck.mcmanis at gmail.com> writes:
On Fri, Jul 16, 2010 at 11:08 AM, <warm38 at juno.com> wrote:


I have a real problem.   EVEN under ubuntu it is TOAST with the same
<cuss> error:
"make" is what kills me EVERY time with:
*** BFD does not support target xxx-unknown-none
*** Look in bfd/config.bfd for supported targets.
Error 2

I tried to do the work in /usr/src but I got too many complaints even
using "sudo"
So I went back to my /home/Wade and did the work there.  It bombed again.
I am So Outta Luck.   And this is using the code and instuctions that I
was given.
I may be missing something. (between the ears?)

Any suggestions?  Even in Linux land.

Hire a consultant? (only partially kidding, porting Gcc is not for the
faint of heart)

To your specific problem, you need to teach bfd about your architecture.
There are really three major packages in the gcc 'suite' one is called
'binutils' and that is what you want to get running first, it includes
things like linker support, assembler support, etc. The second is the gcc
compiler proper. Using a combination of a native gcc and the bootstrapped
cross gcc you will end up building the librarys and what not which are
expected by gcc tools. The third component is gdb which is the debugger
and you won't get to that until you have both a working binutils and gcc.

Depending on the CPU architecture (is it 'simple' or 'complex' ?) you may
find different approaches work better or worse. One thing you might do is
to look at how the gcc-avr chain is built (you can apt-get the sources
with Ubuntu and rebuild it from scratch to watch how it works if you
want), that also works for an Arm variant.

Oh and the reason there is a Makefile.in and not a Makefile is that the
gcc tools expect you create the build environment by using the
'configure' script. That script will generate the necessary makefiles
based on the architecture you've selected. Since you're going to have to
give all these changes to Gcc back to the community anyway it will be
helpful for you to understand the autoconfig system and how it creates
those files.

When you're "done" it should be possible to unpack the binutils, gcc, and
gdb trees then configure --target=YOURCPU from each directory, and build
them in binutils, gcc, gdb order.

Good luck,



On Fri, 16 Jul 2010 12:20:35 -0400 warm38 at juno.com writes:
In Steve Rainwater's contribution:


it has:
export PREFIX=/usr/local/cross
export TARGET=i586-elf
cd /usr/src
mkdir build-binutils build-gcc
cd /usr/src/build-binutils
../binutils-x.xx/configure --target=$TARGET --prefix=$PREFIX
make all
make install
My instructions did not have "cd /usr/src".  I built it at
"/home/Wade/binutils-xxx".  Is that a problem?
I also did not use "--disable-nls".  It indicates that to be a speed up
so it shouldnt be a problem... I hope.
Also I was told "make" not "make all".
"make" is what kills me EVERY time with:
*** BFD does not support target xxx-unknown-none
*** Look in bfd/config.bfd for supported targets.
Error 2

I am setting up Ubuntu 10.04 and I'll try it there.

Oh, and http://wiki.osdev.org/GCC_Cross-Compiler says it is not to help
you compile applications.
Consider that the processor can only jump 2K instructions.  Not gonna be
doing any OS kernel any time soon nor any math libraries.  8-)


On Thu, 15 Jul 2010 22:53:04 -0500 Stuart Stegall <keltor at keltor.org>
> http://gcc.gnu.org/simtest-howto.html
> This is a general hint of how you'll do this.
> You of course cannot actually "test" a cross compiler without a
> simulator ... since you of course cannot actually execute the new
> executables. :)
> I have quite a bit of porting/gcc experience if you are needing
> further help, though I would fairly strongly suggest moving your
> cross-compiler host to Linux.  It's the host for most GCC 
> development
> and it's probably responsible for about 99.9% of processor testing
> these days (at least at AMD, Intel, Samsung, and virtually any ARM
> licensee.)
> _______________________________________________
> DPRGlist mailing list
> DPRGlist at dprg.org
> http://list.dprg.org/mailman/listinfo/dprglist

Go Green! # 1 Energy Pick
Think Big Oil has a future? AEGY - Think Green, Renewable Energy!

DPRGlist mailing list
DPRGlist at dprg.org
Penny Stock Jumping 2000%
Sign up to the #1 voted penny stock newsletter for free today!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.dprg.org/pipermail/dprglist/attachments/20100716/6e1583fb/attachment.html

More information about the DPRG mailing list