[Efi332] Building newlib/libgloss for MPC555

David Eicher sailors3
Mon Jul 25 02:54:00 UTC 2005


Wow, thanks Gunter! Appreciate the history on PowerPC, not wonder I'm so
confused all the time. I designed and built a 68000 based computer in the
late 1970s (1977,8?), I paid $360 for an engineering sample of the part. I
learned and loved that instruction set (only 58 instructions and 14
addressing modes). But my company went Intel......, no tools for Motorola
processors, so I lost track of where that all went, I saw a little here and
there on 68010, 68020 --- 68040, and then lost it completely. For years I've
thought the PowerPC was just where those processors ended up. You can
imagine my shock when I started debugging the ported quickstart/eabi code
and discovered the instruction set was nothing like I remembered. 

Thanks to you I think I'm starting to pull this thing together.

>BTW: Seems you have a cross compiler. Make sure you configure newlib
>with the same target spec as the other cross tools, and install them
>at the same prefix (normally /usr/local, unless you have specified
>--prefix=...) You might fall into subtile troubles during compilation if
>you don't adhere to this. Rather reconfigure and recompile binutils, gcc
>with powerpc-eabi...

My GNU tools (Macraigor) are at usr/local/bin (gcc, as, ld). I want to make
sure I correctly interpret your comments. My newlib-1.13.0 under
usr/local/powerpc-elf/newlib-1.13.0 because of the way I interpreted the
instructions in their readme file. So, would you say that is the correct
prefix then? Another concern I have then, I'm not sure what the target spec
is for my cross tools, I just took what Macraigor had on their website. One
of my linker flags is -melf32ppc, which I believe I saw in a Macraigor demo
makefile. I'm not sure it this is a useful hint of what the target spec
might be or not.

>What I meant in a previous post regarding glancing at the 68k subtree
>was to lift source code from that part of the tree (for example an SCI
>driver for the 68332) into the rs6000 subtree of libgloss. You then
>have to compile that lifted code with a powerpc-eabi compiler to get
>something usable. The configure system for newlib enforces that. Don't
>work against the configure system.

I see..., okay. I've got tested routines for SCI, routines built on the
eabi. So.., it looks like I can just go into the inbyte and outbyte routines
and replace with code with mine. No..., at least one of the inbyte.c files
under libgloss has a read( ) call in it. So there must be a read and write I
need to modify. Well, I'll just try running the configure. Maybe during the
build somewhere the linker will tell me what it needs (like you suggested
earlier).

MERCY! I just worked up the courage to run configure, then make. Configure
made some wrong decisions, and make didn't go very far. I suspect I have the
troubles you are referring to above, I'm not in the right directories.

So..., it looks like I have to find the right place in the directory
structure. Problems include:

1) Configure decided I don't have a cross compiler, but I do.
2) Configure found the tools to build GNU on the host (i686), not the tools
to build a powerpc program..., hmmm.
3) make assumed the compiler is powerpc-eabi-gcc, but mine is
powerpc-elf-gcc, could this be a result of using target=powerpc-eabi?

Man oh man, this thing is complicated! A 256k makefile! I'm a beginner at
makefile language, this could take a while.....

It could be I just have one or two issues to fix, the key is identifying
what they are, and taking the correct action. I've included the outputs from
configure and make below, if anyone has the time to look them over. I know
you are all busy too...

Sure do appreciate the help, thanks again,

Dave

===================configure===========================
Dave at Dell8400 /usr/local/powerpc-elf/newlib-ppc-aout
$ ../newlib-1.13.0/configure --target=powerpc-eabi
creating cache ./config.cache
checking host system type... i686-pc-cygwin
checking target system type... powerpc-unknown-eabi
checking build system type... i686-pc-cygwin
checking for a BSD compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
-v: not found
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking for gnatbind... no
checking whether compiler driver understands Ada... no
checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1
$$f2
checking for correct version of gmp.h... no
checking for bison... bison
checking for bison... bison -y
checking for gm4... no
checking for gnum4... no
checking for m4... m4
checking for flex... flex
checking for flex... flex
checking for makeinfo... makeinfo
checking for i686-pc-cygwin-ar... no
checking for ar... ar
checking for i686-pc-cygwin-as... no
checking for as... as
checking for i686-pc-cygwin-dlltool... no
checking for dlltool... dlltool
checking for i686-pc-cygwin-ld...
/usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/../../../../i686-pc-cygwin/bin/ld.exe
checking for i686-pc-cygwin-nm... no
checking for nm... nm
checking for i686-pc-cygwin-ranlib... no
checking for ranlib... ranlib
checking for i686-pc-cygwin-windres... no
checking for windres... windres
checking for i686-pc-cygwin-objcopy... no
checking for objcopy... objcopy
checking for i686-pc-cygwin-objdump... no
checking for objdump... objdump
checking for powerpc-eabi-ar... no
checking for powerpc-eabi-as... no
checking for powerpc-eabi-dlltool... no
checking for powerpc-eabi-ld... no
checking for powerpc-eabi-nm... no
checking for powerpc-eabi-ranlib... no
checking for powerpc-eabi-windres... no
checking whether to enable maintainer-specific portions of Makefiles... no
checking if symbolic links between directories work... yes
updating cache ./config.cache
creating ./config.status
creating Makefile

=======================Make ============================
Dave at Dell8400 /usr/local/powerpc-elf/newlib-ppc-aout
$ make
Configuring in etc
creating cache ./config.cache
checking for a BSD compatible install... /usr/bin/install -c
updating cache ./config.cache
creating ./config.status
creating Makefile
make[1]: Entering directory `/usr/local/powerpc-elf/newlib-ppc-aout/etc'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/usr/local/powerpc-elf/newlib-ppc-aout/etc'
Checking multilib configuration...
powerpc-eabi-gcc: not found
mv: cannot stat `multilib.tmp': No such file or directory
make: *** [multilib.out] Error 1

Dave at Dell8400 /usr/local/powerpc-elf/newlib-ppc-aout
$





More information about the Efi332 mailing list