public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* RE: trying to create cross compiler for mipsel-linux
@ 2001-11-20 13:16 Mark and Janice Juszczec
  2001-11-27 11:43 ` Mark and Janice Juszczec
  0 siblings, 1 reply; 6+ messages in thread
From: Mark and Janice Juszczec @ 2001-11-20 13:16 UTC (permalink / raw)
  To: me; +Cc: gcc-help


Rupert

you wrote:

>Subject: RE: trying to create cross compiler for mipsel-linux
>Date: Tue, 27 Nov 2001 07:23:02 -0000
>

>newlib is intended for embedded systems; you shouldn't use it to target
>mipsel-linux system.
>

    I'm planning to compile on an intel based pc running RedHat 7.0 but I 
want to run stuff on a PDA with a 75MHz Philips R3912-based mips processor.  
That's why I figured I needed newlib.  Am I wrong or is mipsel-linux the 
wrong target to use for this processor?


>Instead you should use copies of files from the target mipsel-linux
>distribution:
>
>   * target /usr/include to /usr/local/mipsel-linux/sys-include
>     (making sure that you get the contents of linux and asm and not
>      just dangling symlinks)
>
>   * target /lib in /usr/local/mipsel-linux/lib
>     (won't need subdirectories)
>
>   * target *.o from /usr/lib to /usr/local/mipsel-linux/lib
>     (plus any other libs you think you might need; won't need
>      subdirectories)
>

      Let me make sure I understand this.  I need the contents of 
/usr/include, /lib and /usr/lib/*.o from a mips system.  How are these used 
in the creation of a cross compiler?  Will an intel system (the one where 
I'm compiling gcc to make a cross compiler) understand mips object files and 
libraries?

> > I configured/tried to make gcc as follows:
> >
> > /usr/local/src/gcc-3.0.2/configure --target=mipsel-linux
> > --with-newlib
> > --with-headers=/usr/local/src/newlib-1.9.0/newlib/libc/include
> > --enable-static --disable-shared
>
>You can use '--with-headers' and '--with-libs' twice to do the above
>copies but I'm not sure if they copy subdirectories or not, or whether
>they'll copy include/linux and include/asm correctly.

     Does this mean that these options attempt to do the copies (the ones 
you described at the beginning of your email) at compile time?  Do you 
suggest manual copies because these options may not copy everything in all 
the subdirectories?

>
>I don't think '--enable-static' does anything, but I guess it won't
>hurt.
>

     Does this mean that only --disable-shared is needed?

>If you're lucky

     Well, so far I haven't been ;-(
     But that's got to change soon.

     Thanks for all the information.

     Mark


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: trying to create cross compiler for mipsel-linux
  2001-11-20 13:16 trying to create cross compiler for mipsel-linux Mark and Janice Juszczec
@ 2001-11-27 11:43 ` Mark and Janice Juszczec
  0 siblings, 0 replies; 6+ messages in thread
From: Mark and Janice Juszczec @ 2001-11-27 11:43 UTC (permalink / raw)
  To: me; +Cc: gcc-help

Rupert

you wrote:

>Subject: RE: trying to create cross compiler for mipsel-linux
>Date: Tue, 27 Nov 2001 07:23:02 -0000
>

>newlib is intended for embedded systems; you shouldn't use it to target
>mipsel-linux system.
>

    I'm planning to compile on an intel based pc running RedHat 7.0 but I 
want to run stuff on a PDA with a 75MHz Philips R3912-based mips processor.  
That's why I figured I needed newlib.  Am I wrong or is mipsel-linux the 
wrong target to use for this processor?


>Instead you should use copies of files from the target mipsel-linux
>distribution:
>
>   * target /usr/include to /usr/local/mipsel-linux/sys-include
>     (making sure that you get the contents of linux and asm and not
>      just dangling symlinks)
>
>   * target /lib in /usr/local/mipsel-linux/lib
>     (won't need subdirectories)
>
>   * target *.o from /usr/lib to /usr/local/mipsel-linux/lib
>     (plus any other libs you think you might need; won't need
>      subdirectories)
>

      Let me make sure I understand this.  I need the contents of 
/usr/include, /lib and /usr/lib/*.o from a mips system.  How are these used 
in the creation of a cross compiler?  Will an intel system (the one where 
I'm compiling gcc to make a cross compiler) understand mips object files and 
libraries?

> > I configured/tried to make gcc as follows:
> >
> > /usr/local/src/gcc-3.0.2/configure --target=mipsel-linux
> > --with-newlib
> > --with-headers=/usr/local/src/newlib-1.9.0/newlib/libc/include
> > --enable-static --disable-shared
>
>You can use '--with-headers' and '--with-libs' twice to do the above
>copies but I'm not sure if they copy subdirectories or not, or whether
>they'll copy include/linux and include/asm correctly.

     Does this mean that these options attempt to do the copies (the ones 
you described at the beginning of your email) at compile time?  Do you 
suggest manual copies because these options may not copy everything in all 
the subdirectories?

>
>I don't think '--enable-static' does anything, but I guess it won't
>hurt.
>

     Does this mean that only --disable-shared is needed?

>If you're lucky

     Well, so far I haven't been ;-(
     But that's got to change soon.

     Thanks for all the information.

     Mark


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: trying to create cross compiler for mipsel-linux
  2001-11-19 20:22 ` Rupert Wood
@ 2001-11-26 23:23   ` Rupert Wood
  0 siblings, 0 replies; 6+ messages in thread
From: Rupert Wood @ 2001-11-26 23:23 UTC (permalink / raw)
  To: 'Mark and Janice Juszczec'; +Cc: gcc-help

Mark Juszczec wrote:

> I have the following installed on a RedHat 7.0, kernel 
> 2.2.16-22, i586:
> 
> /usr/local/src/binutils-2.11.2
> /usr/local/src/build-binutils
> /usr/local/src/build-gcc
> /usr/local/src/gcc-3.0.2
> /usr/local/src/newlib-1.9.0

newlib is intended for embedded systems; you shouldn't use it to target
mipsel-linux system.

Instead you should use copies of files from the target mipsel-linux
distribution:

  * target /usr/include to /usr/local/mipsel-linux/sys-include
    (making sure that you get the contents of linux and asm and not
     just dangling symlinks)

  * target /lib in /usr/local/mipsel-linux/lib
    (won't need subdirectories)

  * target *.o from /usr/lib to /usr/local/mipsel-linux/lib
    (plus any other libs you think you might need; won't need
     subdirectories)

> I configured/tried to make gcc as follows:
> 
> /usr/local/src/gcc-3.0.2/configure --target=mipsel-linux 
> --with-newlib 
> --with-headers=/usr/local/src/newlib-1.9.0/newlib/libc/include 
> --enable-static --disable-shared

You can use '--with-headers' and '--with-libs' twice to do the above
copies but I'm not sure if they copy subdirectories or not, or whether
they'll copy include/linux and include/asm correctly.

I don't think '--enable-static' does anything, but I guess it won't
hurt.

> /usr/local/src/build-gcc/mipsel-linux/libstdc++-v3/include/mip
> sel-linux/bits/os_defines.h:37:22: 
> features.h: No such file or directory

If you're lucky then this is related to assumptions about the wrong
header files and will just go away :-)

Good luck,
Rup.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* trying to create cross compiler for mipsel-linux
  2001-11-19 16:39 Mark and Janice Juszczec
  2001-11-19 20:22 ` Rupert Wood
@ 2001-11-26 13:18 ` Mark and Janice Juszczec
  1 sibling, 0 replies; 6+ messages in thread
From: Mark and Janice Juszczec @ 2001-11-26 13:18 UTC (permalink / raw)
  To: gcc-help

Hello all

on Fri, 23 Nov 2001 09:26:23 John Zaitseff wrote:

>A number of people have previously queried compiling GCC 3.0 as a 
>cross-compiler for embedded systems under Linux.  These people have had 
>problems in doing so, with apparently no answers to their queries.
>I also have had problems compiling GCC 3.0.2 as a cross-compiler (in my 
>case, for arm-elf) under Linux.  I have found a suitable workaround, which 
>others having the same problems may like to know.  It probably would be 
>good if someone got around to FIXING the problems as well...

(I've snipped the instructions so this won't be terribly long)

I have the following installed on a RedHat 7.0, kernel 2.2.16-22, i586:

/usr/local/src/binutils-2.11.2
/usr/local/src/build-binutils
/usr/local/src/build-gcc
/usr/local/src/gcc-3.0.2
/usr/local/src/newlib-1.9.0


I configured/made binutils as follows:

../binutils-2.11.2/configure --target=mipsel-linux -v
make all install

and then I made the following links:

cd /usr/local/mipsel-linux/
mkdir sys-include
ln -s sys-include include
chmod o+w sys-include
cd /usr/local/lib
ls
mkdir -p gcc-lib/mipsel-linux
chmod o+w gcc-lib/mipsel-linux

I configured/tried to make gcc as follows:

/usr/local/src/gcc-3.0.2/configure --target=mipsel-linux --with-newlib 
--with-headers=/usr/local/src/newlib-1.9.0/newlib/libc/include 
--enable-static --disable-shared

make all

I've attached the make errors at the end of this message.  Can anyone tell 
if this is some kind of missing link to an include file problem like what 
you've dealt with?  If it is, how can I fix it?  Has anyone out there made a 
cross compiler for mipsel-linux?  If so, can you tell me how you did it?

Thanks

Mark

/usr/local/src/build-gcc/gcc/xgcc -B/usr/local/src/build-gcc/gcc/
-nostdinc++ -L/usr/local/src/build-gcc/mipsel-linux/libstdc++-v3/src
-L/usr/local/src/build-gcc/mipsel-linux/libstdc++-v3/src/.libs
-nostdinc -B/usr/local/src/build-gcc/mipsel-linux/newlib/
-isystem /usr/local/src/build-gcc/mipsel-linux/newlib/targ-include
-isystem /usr/local/src/gcc-3.0.2/newlib/libc/include
-B/usr/local/mipsel-linux/bin/ -B/usr/local/mipsel-linux/lib/
-isystem /usr/local/mipsel-linux/include
-I/usr/local/src/gcc-3.0.2/libstdc++-v3/../gcc 
-I/usr/local/src/gcc-3.0.2/libstdc++-v3/../include
-I/usr/local/src/build-gcc/mipsel-linux/libstdc++-v3/include/mipsel-linux
-I/usr/local/src/build-gcc/mipsel-linux/libstdc++-v3/include -
I/usr/local/src/gcc-3.0.2/libstdc++-v3/libsupc++
-g -O2 -D_GNU_SOURCE -fno-implicit-templates
-Wall -Wno-format -W -Wwrite-strings -Winline
-fdiagnostics-show-location=once -ffunction-sections -fdata-sections
-g -c /usr/local/src/gcc-3.0.2/libstdc++-v3/libsupc++/eh_alloc.cc

In file included from 
/usr/local/src/build-gcc/mipsel-linux/libstdc++-v3/include/mipsel-linux/bits/c++config.h:34,
                 from 
/usr/local/src/build-gcc/mipsel-linux/libstdc++-v3/include/bits/std_cstdlib.h:37,
                 from 
/usr/local/src/build-gcc/mipsel-linux/libstdc++-v3/include/cstdlib:31,
                 from 
/usr/local/src/gcc-3.0.2/libstdc++-v3/libsupc++/eh_alloc.cc:34:
/usr/local/src/build-gcc/mipsel-linux/libstdc++-v3/include/mipsel-linux/bits/os_defines.h:37:22: 
features.h: No such file or directory
/usr/local/src/build-gcc/mipsel-linux/libstdc++-v3/include/mipsel-linux/bits/os_defines.h:44:23: 
gnu/types.h: No such file or directory
In file included from 
/usr/local/src/build-gcc/mipsel-linux/libstdc++-v3/include/mipsel-linux/bits/c++config.h:34,
                 from 
/usr/local/src/build-gcc/mipsel-linux/libstdc++-v3/include/bits/std_cstdlib.h:37,
                 from 
/usr/local/src/build-gcc/mipsel-linux/libstdc++-v3/include/cstdlib:31,
                 from 
/usr/local/src/gcc-3.0.2/libstdc++-v3/libsupc++/eh_alloc.cc:34:
/usr/local/src/build-gcc/mipsel-linux/libstdc++-v3/include/mipsel-linux/bits/os_defines.h:45: 
syntax
   error before `;' token
make[3]: *** [eh_alloc.lo] Error 1
make[3]: Leaving directory 
`/usr/local/src/build-gcc/mipsel-linux/libstdc++-v3/libsupc++'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory 
`/usr/local/src/build-gcc/mipsel-linux/libstdc++-v3'
make[1]: *** [all-recursive-am] Error 2
make[1]: Leaving directory 
`/usr/local/src/build-gcc/mipsel-linux/libstdc++-v3'
make: *** [all-target-libstdc++-v3] Error 2


but

find . -name features.h -print
./newlib-1.9.0/newlib/libc/include/sys/features.h
./gcc-3.0.2/libstdc++-v3/include/c_shadow/features.h

find . -name types.h -print
./binutils-2.11.2/include/mpw/sys/types.h
./newlib-1.9.0/newlib/libc/include/machine/types.h
./newlib-1.9.0/newlib/libc/include/sys/types.h
./newlib-1.9.0/newlib/libc/sys/linux/sys/types.h
./newlib-1.9.0/newlib/libc/sys/rtems/sys/types.h
./gcc-3.0.2/gcc/fixinc/tests/base/sys/types.h

The syntax error is in:

39 #if !defined (__GLIBC__) || (__GLIBC__ == 2 && __GLIBC_MINOR__+ 0 == 0)
40
41 // The types __off_t and __off64_t are not defined through <sys/types.h>
42 // as _G_config assumes.  For libc5 and glibc 2.0 instead use
43 // <gnu/types.h> and the old name for __off64_t.
44 #include <gnu/types.h>
45 typedef __loff_t __off64_t;




_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: trying to create cross compiler for mipsel-linux
  2001-11-19 16:39 Mark and Janice Juszczec
@ 2001-11-19 20:22 ` Rupert Wood
  2001-11-26 23:23   ` Rupert Wood
  2001-11-26 13:18 ` Mark and Janice Juszczec
  1 sibling, 1 reply; 6+ messages in thread
From: Rupert Wood @ 2001-11-19 20:22 UTC (permalink / raw)
  To: 'Mark and Janice Juszczec'; +Cc: gcc-help

Mark Juszczec wrote:

> I have the following installed on a RedHat 7.0, kernel 
> 2.2.16-22, i586:
> 
> /usr/local/src/binutils-2.11.2
> /usr/local/src/build-binutils
> /usr/local/src/build-gcc
> /usr/local/src/gcc-3.0.2
> /usr/local/src/newlib-1.9.0

newlib is intended for embedded systems; you shouldn't use it to target
mipsel-linux system.

Instead you should use copies of files from the target mipsel-linux
distribution:

  * target /usr/include to /usr/local/mipsel-linux/sys-include
    (making sure that you get the contents of linux and asm and not
     just dangling symlinks)

  * target /lib in /usr/local/mipsel-linux/lib
    (won't need subdirectories)

  * target *.o from /usr/lib to /usr/local/mipsel-linux/lib
    (plus any other libs you think you might need; won't need
     subdirectories)

> I configured/tried to make gcc as follows:
> 
> /usr/local/src/gcc-3.0.2/configure --target=mipsel-linux 
> --with-newlib 
> --with-headers=/usr/local/src/newlib-1.9.0/newlib/libc/include 
> --enable-static --disable-shared

You can use '--with-headers' and '--with-libs' twice to do the above
copies but I'm not sure if they copy subdirectories or not, or whether
they'll copy include/linux and include/asm correctly.

I don't think '--enable-static' does anything, but I guess it won't
hurt.

> /usr/local/src/build-gcc/mipsel-linux/libstdc++-v3/include/mip
> sel-linux/bits/os_defines.h:37:22: 
> features.h: No such file or directory

If you're lucky then this is related to assumptions about the wrong
header files and will just go away :-)

Good luck,
Rup.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* trying to create cross compiler for mipsel-linux
@ 2001-11-19 16:39 Mark and Janice Juszczec
  2001-11-19 20:22 ` Rupert Wood
  2001-11-26 13:18 ` Mark and Janice Juszczec
  0 siblings, 2 replies; 6+ messages in thread
From: Mark and Janice Juszczec @ 2001-11-19 16:39 UTC (permalink / raw)
  To: gcc-help


Hello all

on Fri, 23 Nov 2001 09:26:23 John Zaitseff wrote:

>A number of people have previously queried compiling GCC 3.0 as a 
>cross-compiler for embedded systems under Linux.  These people have had 
>problems in doing so, with apparently no answers to their queries.
>I also have had problems compiling GCC 3.0.2 as a cross-compiler (in my 
>case, for arm-elf) under Linux.  I have found a suitable workaround, which 
>others having the same problems may like to know.  It probably would be 
>good if someone got around to FIXING the problems as well...

(I've snipped the instructions so this won't be terribly long)

I have the following installed on a RedHat 7.0, kernel 2.2.16-22, i586:

/usr/local/src/binutils-2.11.2
/usr/local/src/build-binutils
/usr/local/src/build-gcc
/usr/local/src/gcc-3.0.2
/usr/local/src/newlib-1.9.0


I configured/made binutils as follows:

../binutils-2.11.2/configure --target=mipsel-linux -v
make all install

and then I made the following links:

cd /usr/local/mipsel-linux/
mkdir sys-include
ln -s sys-include include
chmod o+w sys-include
cd /usr/local/lib
ls
mkdir -p gcc-lib/mipsel-linux
chmod o+w gcc-lib/mipsel-linux

I configured/tried to make gcc as follows:

/usr/local/src/gcc-3.0.2/configure --target=mipsel-linux --with-newlib 
--with-headers=/usr/local/src/newlib-1.9.0/newlib/libc/include 
--enable-static --disable-shared

make all

I've attached the make errors at the end of this message.  Can anyone tell 
if this is some kind of missing link to an include file problem like what 
you've dealt with?  If it is, how can I fix it?  Has anyone out there made a 
cross compiler for mipsel-linux?  If so, can you tell me how you did it?

Thanks

Mark

/usr/local/src/build-gcc/gcc/xgcc -B/usr/local/src/build-gcc/gcc/
-nostdinc++ -L/usr/local/src/build-gcc/mipsel-linux/libstdc++-v3/src
-L/usr/local/src/build-gcc/mipsel-linux/libstdc++-v3/src/.libs
-nostdinc -B/usr/local/src/build-gcc/mipsel-linux/newlib/
-isystem /usr/local/src/build-gcc/mipsel-linux/newlib/targ-include
-isystem /usr/local/src/gcc-3.0.2/newlib/libc/include
-B/usr/local/mipsel-linux/bin/ -B/usr/local/mipsel-linux/lib/
-isystem /usr/local/mipsel-linux/include
-I/usr/local/src/gcc-3.0.2/libstdc++-v3/../gcc 
-I/usr/local/src/gcc-3.0.2/libstdc++-v3/../include
-I/usr/local/src/build-gcc/mipsel-linux/libstdc++-v3/include/mipsel-linux
-I/usr/local/src/build-gcc/mipsel-linux/libstdc++-v3/include -
I/usr/local/src/gcc-3.0.2/libstdc++-v3/libsupc++
-g -O2 -D_GNU_SOURCE -fno-implicit-templates
-Wall -Wno-format -W -Wwrite-strings -Winline
-fdiagnostics-show-location=once -ffunction-sections -fdata-sections
-g -c /usr/local/src/gcc-3.0.2/libstdc++-v3/libsupc++/eh_alloc.cc

In file included from 
/usr/local/src/build-gcc/mipsel-linux/libstdc++-v3/include/mipsel-linux/bits/c++config.h:34,
                 from 
/usr/local/src/build-gcc/mipsel-linux/libstdc++-v3/include/bits/std_cstdlib.h:37,
                 from 
/usr/local/src/build-gcc/mipsel-linux/libstdc++-v3/include/cstdlib:31,
                 from 
/usr/local/src/gcc-3.0.2/libstdc++-v3/libsupc++/eh_alloc.cc:34:
/usr/local/src/build-gcc/mipsel-linux/libstdc++-v3/include/mipsel-linux/bits/os_defines.h:37:22: 
features.h: No such file or directory
/usr/local/src/build-gcc/mipsel-linux/libstdc++-v3/include/mipsel-linux/bits/os_defines.h:44:23: 
gnu/types.h: No such file or directory
In file included from 
/usr/local/src/build-gcc/mipsel-linux/libstdc++-v3/include/mipsel-linux/bits/c++config.h:34,
                 from 
/usr/local/src/build-gcc/mipsel-linux/libstdc++-v3/include/bits/std_cstdlib.h:37,
                 from 
/usr/local/src/build-gcc/mipsel-linux/libstdc++-v3/include/cstdlib:31,
                 from 
/usr/local/src/gcc-3.0.2/libstdc++-v3/libsupc++/eh_alloc.cc:34:
/usr/local/src/build-gcc/mipsel-linux/libstdc++-v3/include/mipsel-linux/bits/os_defines.h:45: 
syntax
   error before `;' token
make[3]: *** [eh_alloc.lo] Error 1
make[3]: Leaving directory 
`/usr/local/src/build-gcc/mipsel-linux/libstdc++-v3/libsupc++'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory 
`/usr/local/src/build-gcc/mipsel-linux/libstdc++-v3'
make[1]: *** [all-recursive-am] Error 2
make[1]: Leaving directory 
`/usr/local/src/build-gcc/mipsel-linux/libstdc++-v3'
make: *** [all-target-libstdc++-v3] Error 2


but

find . -name features.h -print
./newlib-1.9.0/newlib/libc/include/sys/features.h
./gcc-3.0.2/libstdc++-v3/include/c_shadow/features.h

find . -name types.h -print
./binutils-2.11.2/include/mpw/sys/types.h
./newlib-1.9.0/newlib/libc/include/machine/types.h
./newlib-1.9.0/newlib/libc/include/sys/types.h
./newlib-1.9.0/newlib/libc/sys/linux/sys/types.h
./newlib-1.9.0/newlib/libc/sys/rtems/sys/types.h
./gcc-3.0.2/gcc/fixinc/tests/base/sys/types.h

The syntax error is in:

39 #if !defined (__GLIBC__) || (__GLIBC__ == 2 && __GLIBC_MINOR__+ 0 == 0)
40
41 // The types __off_t and __off64_t are not defined through <sys/types.h>
42 // as _G_config assumes.  For libc5 and glibc 2.0 instead use
43 // <gnu/types.h> and the old name for __off64_t.
44 #include <gnu/types.h>
45 typedef __loff_t __off64_t;




_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2001-11-27 19:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-20 13:16 trying to create cross compiler for mipsel-linux Mark and Janice Juszczec
2001-11-27 11:43 ` Mark and Janice Juszczec
  -- strict thread matches above, loose matches on Subject: below --
2001-11-19 16:39 Mark and Janice Juszczec
2001-11-19 20:22 ` Rupert Wood
2001-11-26 23:23   ` Rupert Wood
2001-11-26 13:18 ` Mark and Janice Juszczec

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).