This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more infromation.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE:How to make a gcc for MPC860 ?



Could you help me out or give some advice?
(what kind of flags/files/ENVs should I have?)

I try that the the make process goes fine. My
custom part of "configure" is 

--target=powerpc-eabi
--prefix=/tmp/pun \
--exec-prefix=/tmp/pun/H-i686-pc-linux-gnu \

but I get the following error. 


The following are the errors
--- from terminal (when I comment out the "#include <stdio.h>") ---
ship@marlet[/tmp/pun/test]73>/tmp/pun/H-i686-pc-linux-gnu/bin/powerpc-eabi-gcc
nn.c -I/tmp/pun/gcc/gcc-2.95.2/libio
-I/tmp/pun/gcc/gcc-2.95.2/libio/stdio
/tmp/pun/H-i686-pc-linux-gnu/powerpc-eabi/bin/ld: warning: cannot
find entry symbol _start; defaulting to 01800074
/tmp/pun/H-i686-pc-linux-gnu/lib/gcc-lib/powerpc-eabi/2.95.2/libgcc.a(eabi.o)(.got2+0x8): undefined
reference to `__SDATA_START__'
/tmp/pun/H-i686-pc-linux-gnu/lib/gcc-lib/powerpc-eabi/2.95.2/libgcc.a(eabi.o)(.got2+0xc): undefined
reference to `__SBSS_END__'
/tmp/pun/H-i686-pc-linux-gnu/lib/gcc-lib/powerpc-eabi/2.95.2/libgcc.a(eabi.o)(.got2+0x14): undefined
reference to `__SDATA2_START__'
/tmp/pun/H-i686-pc-linux-gnu/lib/gcc-lib/powerpc-eabi/2.95.2/libgcc.a(eabi.o)(.got2+0x18): undefined
reference to `__SBSS2_END__'
/tmp/pun/H-i686-pc-linux-gnu/lib/gcc-lib/powerpc-eabi/2.95.2/libgcc.a(eabi.o)(.got2+0x1c): undefined
reference to `__GOT_START__'
/tmp/pun/H-i686-pc-linux-gnu/lib/gcc-lib/powerpc-eabi/2.95.2/libgcc.a(eabi.o)(.got2+0x28): undefined
reference to `__GOT_END__'
/tmp/pun/H-i686-pc-linux-gnu/lib/gcc-lib/powerpc-eabi/2.95.2/libgcc.a(eabi.o)(.got2+0x2c): undefined
reference to `__GOT2_START__'
/tmp/pun/H-i686-pc-linux-gnu/lib/gcc-lib/powerpc-eabi/2.95.2/libgcc.a(eabi.o)(.got2+0x30): undefined
reference to `__GOT2_END__'
/tmp/pun/H-i686-pc-linux-gnu/lib/gcc-lib/powerpc-eabi/2.95.2/libgcc.a(eabi.o)(.got2+0x34): undefined
reference to `__FIXUP_START__'
/tmp/pun/H-i686-pc-linux-gnu/lib/gcc-lib/powerpc-eabi/2.95.2/libgcc.a(eabi.o)(.got2+0x38): undefined
reference to `__FIXUP_END__'
/tmp/pun/H-i686-pc-linux-gnu/lib/gcc-lib/powerpc-eabi/2.95.2/libgcc.a(eabi.o)(.got2+0x4c): undefined
reference to `__EXCEPT_START__'
/tmp/pun/H-i686-pc-linux-gnu/lib/gcc-lib/powerpc-eabi/2.95.2/libgcc.a(eabi.o)(.got2+0x50): undefined
reference to `__EXCEPT_END__'
/tmp/pun/H-i686-pc-linux-gnu/lib/gcc-lib/powerpc-eabi/2.95.2/libgcc.a(eabi-ctors.o)(.sdata+0x0): undefined
reference to `__init'
/tmp/pun/H-i686-pc-linux-gnu/lib/gcc-lib/powerpc-eabi/2.95.2/libgcc.a(eabi-ctors.o): In
function `__do_global_ctors':
/tmp/build/gcc/gcc/eabi-ctors.c(.sdata+0x4): undefined reference to `__fini'
collect2: ld returned 1 exit status
--- from terminal (when I comment out the "#include <stdio.h>") ---

--- from terminal (when I have "#include <stdio.h>")  ---
ship@marlet[/tmp/pun/test]75>/tmp/pun/H-i686-pc-linux-gnu/bin/powerpc-eabi-gcc
nn.c -I/tmp/pun/gcc/gcc-2.95.2/libio
-I/tmp/pun/gcc/gcc-2.95.2/libio/stdio In file included from
/tmp/pun/gcc/gcc-2.95.2/libio/stdio/stdio.h:29,
                 from nn.c:1:
/tmp/pun/gcc/gcc-2.95.2/libio/libio.h:30: _G_config.h: No such file or directory
--- from terminal (when I have "#include <stdio.h>")  ---
thank you, 
pun

On Wed, 27 Sep 2000, [big5] ¨H´f¦p wrote:

> Hi
> 
> Firstly, I would like to say thanks to bie.jiuling for his reply to my question
> I have not try his patch file yet.
> I think it will work well. :)
> 
> One thing I would like to share with everyone who try to make a gcc compiler for 860 is :
> get "gcc.2.95.2.tar.gz"  not  "gcc.2.95.2.core + gcc.2.95.2.g++" <-- according to  <http://sources.redhat.com/ecos/tools/linux-powerpc-eabi.html>
> I check my configure.out, and find that it seems that I miss some files.
> So I get lots of error "can't find file xxx"
> I try the gcc.2.95.2.tar.gz and follow the steps in the <http://sources.redhat.com/ecos/tools/linux-powerpc-eabi.html>
> Thank God, everything works ! :)
> 
> good luck to everyone !
> 
> Ruby
> 
#include <stdio.h>

// testing part --- begin
#define ADDRESS1 (volatile unsigned long *) 0xFFF0002C
#define ADDRESS2 (volatile unsigned long *) 0xFFF00030
#define ADDRESS3 (volatile unsigned long *) 0xFFF00034
#define ADDRESS4 (volatile unsigned long *) 0xFFF00038

int a = 0;
int b = 0;
int c = 0;

// testing part --- end

#define ROW 5
#define COL 5

#ifndef F
#define F -1
#endif

#ifndef R
#define R 0
#endif

#ifndef G
#define G 1
#endif

#define DETECT (volatile unsigned long *) 0xFFF00020
#define ARRAY  (volatile unsigned long *) 0xFFF0002C
#define ary(a,b) (*(ARRAY + (ROW*(a))+b))

long *array;

int h[2][3];

long dec_init;

int hello();

int main (void)
{

  // testing part --- begin
  int hi = 0;
  int i=0;
  int j=0;

  *ADDRESS1 = 10;
  *ADDRESS1 = 11;
  *ADDRESS1 = 12;
  *ADDRESS1 = 13;
  *ADDRESS1 = 14;
  *ADDRESS1 = 15;

  *ADDRESS1 = 5;
  *ADDRESS2 = 6;
  *ADDRESS3 = 7;
  *ADDRESS4 = 8;

  hi =  *ADDRESS1;
  hi =  *ADDRESS2;
  hi =  *ADDRESS3;
  hi =  *ADDRESS4;

  i = hello();
  i = 0;

  /* testing int2bin */
  *ADDRESS4 = 8;
  *ADDRESS4 = -1;
  *ADDRESS4 = 0;
  *ADDRESS4 = 1;
  *ADDRESS4 = 10;

  *ADDRESS1 = 8;
  *ADDRESS1 = 10;
  *ADDRESS1 = 2;
  *ADDRESS1 = 5;
  *ADDRESS1 = -7;

  // try array mapping 
  h[0][0] = 11;
  h[0][1] = 12;
  h[1][0] = 21;
  h[1][1] = 22;

  // reset deadlock-asic
  *DETECT = 0;
  //*DETECT = 1;
  //*DETECT = 0;

  // testing part --- end

  // write -1
  i = 0;
  j = 0;
  for (i=0; i< 5; i++) {
    for (j=0; j< 5; j++) {
      ary(i,j) = -1;
    }
  }

  // write 0
  i = 0;
  j = 0;
  for (i=0; i< 5; i++) {
    for (j=0; j< 5; j++) {
      ary(i,j) = 0;
    }
  }

  // write 1
  i = 0;
  j = 0;
  for (i=0; i< 5; i++) {
    for (j=0; j< 5; j++) {
      ary(i,j) = 1;
    }
  }

  // array = 0xFFF0002C;
  
  ary(0,0) = 11;
  ary(0,1) = 12;
  ary(0,2) = 13;
  ary(0,3) = 14;
  ary(0,4) = 15;

  ary(1,0) = 21;
  ary(1,1) = 22;
  ary(1,2) = 23;
  ary(1,3) = 24;
  ary(1,4) = 25;

  ary(2,0) = 31;
  ary(2,1) = 32;
  ary(2,2) = 33;
  ary(2,3) = 34;
  ary(2,4) = 35;

  ary(3,0) = 41;
  ary(3,1) = 42;
  ary(3,2) = 43;
  ary(3,3) = 44;
  ary(3,4) = 45;

  ary(4,0) = 51;
  ary(4,1) = 52;
  ary(4,2) = 53;
  ary(4,3) = 54;
  ary(4,4) = 55;

  *DETECT = 1;
  //*DETECT = 0;

  /* test livelock */
  // write -1
  i = 0;
  j = 0;
  for (i=0; i< 5; i++) {
    for (j=0; j< 5; j++) {
      ary(i,j) = -1;
    }
  }

  ary(0,0) = R;
  ary(0,1) = G;
  ary(0,2) = F;
  ary(0,3) = F;
  ary(0,4) = F;

  ary(1,0) = F;
  ary(1,1) = R;
  ary(1,2) = G;
  ary(1,3) = F;
  ary(1,4) = F;

  ary(2,0) = F;
  ary(2,1) = F;
  ary(2,2) = R;
  ary(2,3) = G;
  ary(2,4) = F;

  ary(3,0) = F;
  ary(3,1) = F;
  ary(3,2) = F;
  ary(3,3) = R;
  ary(3,4) = G;

  ary(4,0) = F;
  ary(4,1) = F;
  ary(4,2) = F;
  ary(4,3) = F;
  ary(4,4) = R;

  *DETECT = 1;
  //*DETECT = 0;

  /* test deadlock */
  // write -1
  i = 0;
  j = 0;
  for (i=0; i< 5; i++) {
    for (j=0; j< 5; j++) {
      ary(i,j) = -1;
    }
  }

  ary(0,0) = R;
  ary(0,1) = G;
  ary(0,2) = F;
  ary(0,3) = F;
  ary(0,4) = F;

  ary(1,0) = F;
  ary(1,1) = R;
  ary(1,2) = G;
  ary(1,3) = F;
  ary(1,4) = F;

  ary(2,0) = F;
  ary(2,1) = F;
  ary(2,2) = R;
  ary(2,3) = G;
  ary(2,4) = F;

  ary(3,0) = F;
  ary(3,1) = F;
  ary(3,2) = F;
  ary(3,3) = R;
  ary(3,4) = G;

  ary(4,0) = G;
  ary(4,1) = F;
  ary(4,2) = F;
  ary(4,3) = F;
  ary(4,4) = R;

  *DETECT = 1;
  //*DETECT = 0;

  /* test deadlock 2nd */
  // write -1
  i = 0;
  j = 0;
  for (i=0; i< 5; i++) {
    for (j=0; j< 5; j++) {
      ary(i,j) = -1;
    }
  }

  ary(0,0) = R;
  ary(0,1) = G;
  ary(0,2) = F;
  ary(0,3) = F;
  ary(0,4) = F;

  ary(1,0) = F;
  ary(1,1) = R;
  ary(1,2) = G;
  ary(1,3) = F;
  ary(1,4) = F;

  ary(2,0) = G;
  ary(2,1) = F;
  ary(2,2) = R;
  ary(2,3) = G;
  ary(2,4) = F;

  ary(3,0) = R;
  ary(3,1) = F;
  ary(3,2) = F;
  ary(3,3) = R;
  ary(3,4) = G;

  ary(4,0) = F;
  ary(4,1) = F;
  ary(4,2) = R;
  ary(4,3) = F;
  ary(4,4) = R;

  *DETECT = 1;
  //*DETECT = 0;

}

int hello()
{
  int i=0;
  int j=0;

  i = 1;
  i = i*2;
  j = i*3 + j;

  return j;

}
------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]