public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Moore, Jason" <Jason_Moore@gilbarco.com>
To: "'JAY LULLA'" <JAY.LULLA@Sun.COM>,
	crossgcc@sourceware.cygnus.com, gcc-help@gcc.gnu.org
Subject: RE: Installing cross-compiler for PowerPC 603, pSOS
Date: Fri, 14 Jan 2000 12:50:00 -0000	[thread overview]
Message-ID: <200001142049.PAA24692@hoover.gilbarco.com> (raw)

>Hi. I would like to get some advice about cross-compiling GCC for a Sun
>Solaris host, and PowerPC target.

I am trying to install gcc as a linux to sco cross compiler.  I have asked
several of these same questions over the last few days.

>We have already installed gcc-2.95.2, with its complete source.

>Here are some issues I need to address:
>- should the cross-compiler be installed in the same dir as the native
>compiler, and then be called with a special flag, or should it be
>installed in a whole new directory altogether?

I believe that it has to me installed in a separate directory, but I am not
sure.  Everything I have read suggest that you must have 2 separate
compilers.  One native, and one cross.  One solution is to create a script
that can determine which version to use.

>- should we use flags such as 'with-as' 'with-ld' and 'with-headers' to
>specify directories for the assembler, linker, and headers, or is it
>best to leave these out, and then specify which assemblers, linkers etc
>to use as flags when we actually use the cross-gcc? - If we use the
>flags when we actually run gcc, we would have more flexibility in trying
>different assemblers and linkers, or have the option of not linking at
>all, right? - Or would you have the same flexibility by installing it
>with default directories, and then overriding the defaults if you choose
>to do so when running gcc?

I was instructed to use with-as and with-ld.  You must use with-headers and
with-lib to specify the directory which contains the headers and libraries
for the target platform.  configure copies the headers and libraries over
when it runs.

>- does it matter what version of 'make' one uses? ie whether we use
>'make' from cc or from GNU?

From the CrossGCC FAQ page.

"4.4 Can I use a non-GNU make? 

Yes. 

However, there are a few things to be wary of: 

you must build in the source tree 
testing generally isn't done with non-GNU makes, so one is more likely to
run into build problems. These problems can be fixed of course, but it may
require effort on your part."

http://www.objsw.com/CrossGCC/ might be helpful

>- I've never used binutils before. What is it all about? Does it have
>any useful tools for profiling the code (analyzing it to produce a
>function call graph, for example)?
>-----------------------------

Binutils contains your linker, assembler and other tools needed to get the
compiler running.  All I know for sure is that you must configure and
install binutils for your target platform for the compiler to fully install.
I have a problem where "make all" for gcc can't find my ld.  I don't know
about code profiling.

You can install binutils in the same place as your other binutils, where
"ld" currently sits, but you must be sure to configure it for both your
target and host emulation modes, or else you'll have a linker that only does
one or the other.  Running the binutils "configure" with the
"--enable-targets='target','host'" will accomplish this.

>On a related note, I notice that GCC has tools to make it compatible
>with certain embedded operating systems. Are there any tools for pSOS? I
>couldn't find any...
>
>Thanks,
>Jay Lulla
>jay.lulla@ebay.sun.com

Don't know, but if you find out, could you let me know?

One other thing that might save you some time.  You need a file called
"libgcc1.a" for your target os.  The best way to get this is to:

1. Get a copy from someone who has installed gcc on your target.

2. Install gcc on your target yourself and then copy the file.

Best of luck to you!  I know it can be frustrating.  I have spent all week
getting to this point.

-Jason Moore
ja_moore@bigfoot.com

WARNING: multiple messages have this Message-ID
From: "Moore, Jason" <Jason_Moore@gilbarco.com>
To: "'JAY LULLA'" <JAY.LULLA@Sun.COM>,
	crossgcc@sourceware.cygnus.com, gcc-help@gcc.gnu.org
Subject: RE: Installing cross-compiler for PowerPC 603, pSOS
Date: Sat, 01 Apr 2000 00:00:00 -0000	[thread overview]
Message-ID: <200001142049.PAA24692@hoover.gilbarco.com> (raw)
Message-ID: <20000401000000.UcbokBQkR8qTXXczTVfN8qVblFQcqLXi0Q8LoSuOWXo@z> (raw)

>Hi. I would like to get some advice about cross-compiling GCC for a Sun
>Solaris host, and PowerPC target.

I am trying to install gcc as a linux to sco cross compiler.  I have asked
several of these same questions over the last few days.

>We have already installed gcc-2.95.2, with its complete source.

>Here are some issues I need to address:
>- should the cross-compiler be installed in the same dir as the native
>compiler, and then be called with a special flag, or should it be
>installed in a whole new directory altogether?

I believe that it has to me installed in a separate directory, but I am not
sure.  Everything I have read suggest that you must have 2 separate
compilers.  One native, and one cross.  One solution is to create a script
that can determine which version to use.

>- should we use flags such as 'with-as' 'with-ld' and 'with-headers' to
>specify directories for the assembler, linker, and headers, or is it
>best to leave these out, and then specify which assemblers, linkers etc
>to use as flags when we actually use the cross-gcc? - If we use the
>flags when we actually run gcc, we would have more flexibility in trying
>different assemblers and linkers, or have the option of not linking at
>all, right? - Or would you have the same flexibility by installing it
>with default directories, and then overriding the defaults if you choose
>to do so when running gcc?

I was instructed to use with-as and with-ld.  You must use with-headers and
with-lib to specify the directory which contains the headers and libraries
for the target platform.  configure copies the headers and libraries over
when it runs.

>- does it matter what version of 'make' one uses? ie whether we use
>'make' from cc or from GNU?

From the CrossGCC FAQ page.

"4.4 Can I use a non-GNU make? 

Yes. 

However, there are a few things to be wary of: 

you must build in the source tree 
testing generally isn't done with non-GNU makes, so one is more likely to
run into build problems. These problems can be fixed of course, but it may
require effort on your part."

http://www.objsw.com/CrossGCC/ might be helpful

>- I've never used binutils before. What is it all about? Does it have
>any useful tools for profiling the code (analyzing it to produce a
>function call graph, for example)?
>-----------------------------

Binutils contains your linker, assembler and other tools needed to get the
compiler running.  All I know for sure is that you must configure and
install binutils for your target platform for the compiler to fully install.
I have a problem where "make all" for gcc can't find my ld.  I don't know
about code profiling.

You can install binutils in the same place as your other binutils, where
"ld" currently sits, but you must be sure to configure it for both your
target and host emulation modes, or else you'll have a linker that only does
one or the other.  Running the binutils "configure" with the
"--enable-targets='target','host'" will accomplish this.

>On a related note, I notice that GCC has tools to make it compatible
>with certain embedded operating systems. Are there any tools for pSOS? I
>couldn't find any...
>
>Thanks,
>Jay Lulla
>jay.lulla@ebay.sun.com

Don't know, but if you find out, could you let me know?

One other thing that might save you some time.  You need a file called
"libgcc1.a" for your target os.  The best way to get this is to:

1. Get a copy from someone who has installed gcc on your target.

2. Install gcc on your target yourself and then copy the file.

Best of luck to you!  I know it can be frustrating.  I have spent all week
getting to this point.

-Jason Moore
ja_moore@bigfoot.com

             reply	other threads:[~2000-01-14 12:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-01-14 12:50 Moore, Jason [this message]
2000-01-14 13:25 ` Doug Evans
2000-04-01  0:00   ` Doug Evans
2000-04-01  0:00 ` Moore, Jason
  -- strict thread matches above, loose matches on Subject: below --
2000-01-14 11:35 JAY LULLA
2000-04-01  0:00 ` JAY LULLA

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200001142049.PAA24692@hoover.gilbarco.com \
    --to=jason_moore@gilbarco.com \
    --cc=JAY.LULLA@Sun.COM \
    --cc=crossgcc@sourceware.cygnus.com \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).