public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Compiling gcc with sparc-elf target
@ 2011-01-06 13:28 alsp
  2011-01-06 14:24 ` Andrew Haley
  2011-01-06 14:29 ` Ian Lance Taylor
  0 siblings, 2 replies; 8+ messages in thread
From: alsp @ 2011-01-06 13:28 UTC (permalink / raw)
  To: gcc-help


Hi,

I would like to compile a version of gcc using the sparc-elf target. I have
successfully managed to compile gcc by using the --host=mingw32 and
--target=mingw32 configure flags. When I change the target to be sparc-elf
and run Make, I get this error: "/bin/sh: sparc-elf-gcc: command not found".

I am compiling under msys on Windows 7 and have installed the various
prerequisites: Binutils, Flex, Bison, GMP, MPFR and MPC.

Here is my full configure command:
../gcc_4_3_0_release_src/configure --prefix=/sparc-gcc --host=mingw32
--target=sparc-elf --program-prefix=""
--with-lib-path=/mingw/mingw32/lib:/mingw/lib:/usr/local/lib:/lib:/usr/lib
--with-gcc --with-gnu-as --with-gnu-ld --disable-nls --disable-shared
--enable-languages=c,c++

Does anyone have any ideas?

I can provide further details if that would help but wanted to start with
the basics.

Best regards,
Alan
-- 
View this message in context: http://old.nabble.com/Compiling-gcc-with-sparc-elf-target-tp30605094p30605094.html
Sent from the gcc - Help mailing list archive at Nabble.com.

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

* Re: Compiling gcc with sparc-elf target
  2011-01-06 13:28 Compiling gcc with sparc-elf target alsp
@ 2011-01-06 14:24 ` Andrew Haley
  2011-01-06 14:29 ` Ian Lance Taylor
  1 sibling, 0 replies; 8+ messages in thread
From: Andrew Haley @ 2011-01-06 14:24 UTC (permalink / raw)
  To: gcc-help

On 01/06/2011 01:28 PM, alsp wrote:
>
> I would like to compile a version of gcc using the sparc-elf target. I have
> successfully managed to compile gcc by using the --host=mingw32 and
> --target=mingw32 configure flags. When I change the target to be sparc-elf
> and run Make, I get this error: "/bin/sh: sparc-elf-gcc: command not found".

When?  Early on, or when building target libraries?

Andrew.

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

* Re: Compiling gcc with sparc-elf target
  2011-01-06 13:28 Compiling gcc with sparc-elf target alsp
  2011-01-06 14:24 ` Andrew Haley
@ 2011-01-06 14:29 ` Ian Lance Taylor
  2011-01-10 14:01   ` alsp
  1 sibling, 1 reply; 8+ messages in thread
From: Ian Lance Taylor @ 2011-01-06 14:29 UTC (permalink / raw)
  To: alsp; +Cc: gcc-help

alsp <alansparkstar@gmail.com> writes:

> I am compiling under msys on Windows 7 and have installed the various
> prerequisites: Binutils, Flex, Bison, GMP, MPFR and MPC.
>
> Here is my full configure command:
> ../gcc_4_3_0_release_src/configure --prefix=/sparc-gcc --host=mingw32
> --target=sparc-elf --program-prefix=""
> --with-lib-path=/mingw/mingw32/lib:/mingw/lib:/usr/local/lib:/lib:/usr/lib
> --with-gcc --with-gnu-as --with-gnu-ld --disable-nls --disable-shared
> --enable-languages=c,c++
>
> Does anyone have any ideas?

I think you need to add --build=mingw32.  That should at least get you
to a different problem.

Ian

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

* Re: Compiling gcc with sparc-elf target
  2011-01-06 14:29 ` Ian Lance Taylor
@ 2011-01-10 14:01   ` alsp
  2011-01-10 18:45     ` Jonathan Wakely
  2011-01-10 19:44     ` Kai Ruottu
  0 siblings, 2 replies; 8+ messages in thread
From: alsp @ 2011-01-10 14:01 UTC (permalink / raw)
  To: gcc-help



Ian Lance Taylor-3 wrote:
> 
> 
> I think you need to add --build=mingw32.  That should at least get you
> to a different problem.
> 
> 

Thanks Ian,

Sorry for the delay in responding.

I have now tried adding --build=mingw32 to my configure command. I am indeed
getting a different error now:

checking for sparc-elf-gcc... /d/Development/gcc/gcc_4_3_0_release_o
bj/./gcc/xgcc -B/d/Development/gcc/gcc_4_3_0_release_obj/./gcc/ -B/s
parc-gcc/sparc-elf/bin/ -B/sparc-gcc/sparc-elf/lib/ -isystem
/sparc-gcc/sparc-el
f/include -isystem /sparc-gcc/sparc-elf/sys-include
checking for suffix of object files... configure: error: cannot compute
suffix o
f object files: cannot compile

I'm also working through a slightly different process for compiling gcc and
noticed that it is compiling binutils with the sparc-elf target. This is not
something that I was doing and may or not be an influencing factor (mine was
compiled for mingw32)?

Alan

P.S. In response to Andrew's question. It was failing very late in the
compile and I assume that it was building the target libraries.
-- 
View this message in context: http://old.nabble.com/Compiling-gcc-with-sparc-elf-target-tp30605094p30633979.html
Sent from the gcc - Help mailing list archive at Nabble.com.

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

* Re: Compiling gcc with sparc-elf target
  2011-01-10 14:01   ` alsp
@ 2011-01-10 18:45     ` Jonathan Wakely
  2011-01-10 19:44     ` Kai Ruottu
  1 sibling, 0 replies; 8+ messages in thread
From: Jonathan Wakely @ 2011-01-10 18:45 UTC (permalink / raw)
  To: alsp; +Cc: gcc-help

On 10 January 2011 14:01, alsp wrote:
>
> I have now tried adding --build=mingw32 to my configure command. I am indeed
> getting a different error now:
>
> checking for sparc-elf-gcc... /d/Development/gcc/gcc_4_3_0_release_o
> bj/./gcc/xgcc -B/d/Development/gcc/gcc_4_3_0_release_obj/./gcc/ -B/s
> parc-gcc/sparc-elf/bin/ -B/sparc-gcc/sparc-elf/lib/ -isystem
> /sparc-gcc/sparc-el
> f/include -isystem /sparc-gcc/sparc-elf/sys-include
> checking for suffix of object files... configure: error: cannot compute
> suffix o
> f object files: cannot compile

You'll need to look in the relevant config.log to see more details
about what failed.  A likely suspect is that a prerequisite lib such
as libgmp.so can't be found by the dynamic linker.

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

* Re: Compiling gcc with sparc-elf target
  2011-01-10 14:01   ` alsp
  2011-01-10 18:45     ` Jonathan Wakely
@ 2011-01-10 19:44     ` Kai Ruottu
  2011-01-10 19:50       ` Kai Ruottu
  2011-01-11 10:15       ` alsp
  1 sibling, 2 replies; 8+ messages in thread
From: Kai Ruottu @ 2011-01-10 19:44 UTC (permalink / raw)
  To: gcc-help

10.1.2011 16:01, alsp kirjoitti:

> checking for sparc-elf-gcc... /d/Development/gcc/gcc_4_3_0_release_o
> bj/./gcc/xgcc -B/d/Development/gcc/gcc_4_3_0_release_obj/./gcc/ -B/s
> parc-gcc/sparc-elf/bin/ -B/sparc-gcc/sparc-elf/lib/ -isystem
> /sparc-gcc/sparc-el
> f/include -isystem /sparc-gcc/sparc-elf/sys-include
> checking for suffix of object files... configure: error: cannot compute
> suffix o
> f object files: cannot compile
>
> I'm also working through a slightly different process for compiling gcc and
> noticed that it is compiling binutils with the sparc-elf target. This is not
> something that I was doing and may or not be an influencing factor (mine was
> compiled for mingw32)?

Is this kind of "clean room" approach really necessary?  The
alternative would be to download some existing 'sparc-elf'
targeted toolchain for MinGW host from the net, then look what
it includes and so learn what on earth to build, the toolchain
docs probably telling also how to reinvent the wheel via doing
the same build oneself... For instance :

http://www.gaisler.com/cms/index.php?option=com_content&task=view&id=147&Itemid=31

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

* Re: Compiling gcc with sparc-elf target
  2011-01-10 19:44     ` Kai Ruottu
@ 2011-01-10 19:50       ` Kai Ruottu
  2011-01-11 10:15       ` alsp
  1 sibling, 0 replies; 8+ messages in thread
From: Kai Ruottu @ 2011-01-10 19:50 UTC (permalink / raw)
  To: gcc-help

10.1.2011 21:43, Kai Ruottu kirjoitti:

> http://www.gaisler.com/cms/index.php?option=com_content&task=view&id=147&Itemid=31

ftp://gaisler.com/gaisler.com/bcc/bin/windows/

has the MinGW-hosted binaries, but built on Linux like :

C:\opt\sparc-elf-4.4.2-mingw\bin>sparc-elf-gcc -v
Using built-in specs.
Target: sparc-elf
Configured with: ../gcc-4.4.2/configure --target=sparc-elf 
--host=i686-mingw32 -
-build=i486-slackware-linux-gnu 
--prefix=/usr/devel/prj/bcc/toolchains/sparc-elf
-4.4.2-1.0.36b-mingw 
--with-gmp=/usr/devel/prj/bcc/gcc-4.4.2-mingw-1.0.36bgmp-4.
2.4-install 
--with-mpfr=/usr/devel/prj/bcc/gcc-4.4.2-mingw-1.0.36bmpfr-2.4.1-ins
tall --with-gnu-as --with-gnu-ld --verbose --enable-languages=c,c++ 
--disable-sh
ared --disable-nls --with-pkgversion='BCC 4.4.2 release 1.0.36b' 
--with-newlib -
-with-cpu=leon
Thread model: single
gcc version 4.4.2 (BCC 4.4.2 release 1.0.36b)

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

* Re: Compiling gcc with sparc-elf target
  2011-01-10 19:44     ` Kai Ruottu
  2011-01-10 19:50       ` Kai Ruottu
@ 2011-01-11 10:15       ` alsp
  1 sibling, 0 replies; 8+ messages in thread
From: alsp @ 2011-01-11 10:15 UTC (permalink / raw)
  To: gcc-help



Kai Ruottu-3 wrote:
> 
> 
> Is this kind of "clean room" approach really necessary?  The
> alternative would be to download some existing 'sparc-elf'
> targeted toolchain for MinGW host from the net, then look what
> it includes and so learn what on earth to build, the toolchain
> docs probably telling also how to reinvent the wheel via doing
> the same build oneself... For instance :
> 
> http://www.gaisler.com/cms/index.php?option=com_content&task=view&id=147&Itemid=31
> 
> 

Thanks for the suggestion. I was hoping that it would be a lot simpler to
compile a "bare-metal" version of GCC. However, I now realize that it is a
bit of a minefield of different versions and configuration options.

Will take a look.

Alan
-- 
View this message in context: http://old.nabble.com/Compiling-gcc-with-sparc-elf-target-tp30605094p30642142.html
Sent from the gcc - Help mailing list archive at Nabble.com.

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

end of thread, other threads:[~2011-01-11 10:15 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-06 13:28 Compiling gcc with sparc-elf target alsp
2011-01-06 14:24 ` Andrew Haley
2011-01-06 14:29 ` Ian Lance Taylor
2011-01-10 14:01   ` alsp
2011-01-10 18:45     ` Jonathan Wakely
2011-01-10 19:44     ` Kai Ruottu
2011-01-10 19:50       ` Kai Ruottu
2011-01-11 10:15       ` alsp

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).