* how could I compile a gcc that can run on a powerpc target
@ 2012-04-15 14:41 lei yang
[not found] ` <CA+5N1gxo+25oKHsjqL9CPfeswfe+2mQDFE30J0485Yn9YjU7ig@mail.gmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: lei yang @ 2012-04-15 14:41 UTC (permalink / raw)
To: crossgcc
Hello,
I'm not sure this is the right place to ask this question,but I
attempt to ask here
I have a powerpc board running with linux. I want build some
application *on this board* (not cross build)
so I need a gcc can running on the board. I have a cross gcc named
"powerpc-linux-gcc",
How could I compiler a gcc that can run on the powerpc target,can
someone give me a
step?
Lei
--
For unsubscribe information see http://sourceware.org/lists.html#faq
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: how could I compile a gcc that can run on a powerpc target
[not found] ` <CA+5N1gxo+25oKHsjqL9CPfeswfe+2mQDFE30J0485Yn9YjU7ig@mail.gmail.com>
@ 2012-04-16 15:09 ` lei yang
0 siblings, 0 replies; 2+ messages in thread
From: lei yang @ 2012-04-16 15:09 UTC (permalink / raw)
To: David Smoot, crossgcc
On Mon, Apr 16, 2012 at 2:59 AM, David Smoot <davidsmoot@gmail.com> wrote:
> When you create a toolchain, you have three variables:
>
> The target architecture that the toolchain will produce binaries for.
> In this case you have said you want to make powerPC binaries.
>
> The host that the toolchain will run upon. You have also stated that
> this is powerPC.
>
> The question is, where do you want to create this toolchain? If you
> want to create this toolchain on a non-powerPC host, you are in the
> right place. This is known as a "Canandian Cross" and is one of the
> more difficult things to do.
>
Thanks for the response, and what you said make me clear more.
yes, I will crate a toolchain on a x86 platform and the toolchain
created by it can run on a powerpc target and produce powerpc binary
my cross-toochain for powerpc on x86 is named
"/buildarea1/lyang0/fsl_p4080.tool/host-cross/powerpc-wrs-linux-gnu/x86-linux2/powerpc-wrs-linux-gnu-ppc_e500mc-glibc_std-gcc"
and I have cross built gmp and mfpr and put it on
/buildarea1/lyang0/gcc/gmp and buildarea1/lyang0/gcc/mpfr
my step is
export CC="/buildarea1/lyang0/fsl_p4080.tool/host-cross/powerpc-wrs-linux-gnu/x86-linux2/powerpc-wrs-linux-gnu-ppc_e500mc-glibc_std-gcc"
&& export CXX="/buildarea1/lyang0/fsl_p4080.tool/host-cross/powerpc-wrs-linux-gnu/x86-linux2/powerpc-wrs-linux-gnu-ppc_e500mc-glibc_std-g++"
&& export AR="/buildarea1/lyang0/fsl_p4080.tool/host-cross/powerpc-wrs-linux-gnu/x86-linux2/powerpc-wrs-linux-gnu-ppc_e500mc-glibc_std-ar"&&
export AS="/buildarea1/lyang0/fsl_p4080.tool/host-cross/powerpc-wrs-linux-gnu/x86-linux2/powerpc-wrs-linux-gnu-ppc_e500mc-glibc_std-as"
&& export RANLIB="/buildarea1/lyang0/fsl_p4080.tool/host-cross/powerpc-wrs-linux-gnu/x86-linux2/powerpc-wrs-linux-gnu-ppc_e500mc-glibc_std-ranlib"
&& export LD="/buildarea1/lyang0/fsl_p4080.tool/host-cross/powerpc-wrs-linux-gnu/x86-linux2/powerpc-wrs-linux-gnu-ppc_e500mc-glibc_std-ld"
&& export STRIP="/buildarea1/lyang0/fsl_p4080.tool/host-cross/powerpc-wrs-linux-gnu/x86-linux2/powerpc-wrs-linux-gnu-ppc_e500mc-glibc_std-strip"
&& export NM="/buildarea1/lyang0/fsl_p4080.tool/host-cross/powerpc-wrs-linux-gnu/x86-linux2/powerpc-wrs-linux-gnu-ppc_e500mc-glibc_std-nm"
./configure --prefix=/buildarea1/lyang0/gcc/mygcc
--with-local-prefix=/buildarea1/lyang0/gcc/mygcc
-with-gmp=/buildarea1/lyang0/gcc/gmp
--with-mpfr=/buildarea1/lyang0/gcc/mpfr --disable-multilib
--host=powerpc-unknown-linux-gnu --build=x86_64 --target=powerpc-elf
--disable-multilib --disable-libgomp --enable-c99 --disable-nls
--disable-libssp --disable-libmudflap --enable-languages=c
--enable-__cxa_atexit --enable-clocale=gnu --enable-long-long
--enable-shared
make CROSS_COMPILE=/buildarea1/lyang0/fsl_p4080.tool/host-cross/powerpc-wrs-linux-gnu/x86-linux2/powerpc-wrs-linux-gnu-ppc_e500mc-glibc_std-
I met below error:
.........
.........
/buildarea1/lyang0/fsl_p4080.tool/host-cross/powerpc-wrs-linux-gnu/x86-linux2/powerpc-wrs-linux-gnu-ppc_e500mc-glibc_std-gcc
--sysroot=/buildarea1/lyang0/fsl_p4080.tool/export/sysroot/fsl_p4080-glibc_std/sysroot
-g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wwrite-strings
-Wstrict-prototypes -Wmissing-prototypes -Wcast-qual
-Wold-style-definition -Wc++-compat -Wmissing-format-attribute
-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings
-DHAVE_CONFIG_H -o cpp gcc.o opts-common.o gcc-options.o cppspec.o \
intl.o prefix.o version.o driver-rs6000.o ../libcpp/libcpp.a
../libiberty/libiberty.a ../libdecnumber/libdecnumber.a
powerpc-elf-gcc -dumpspecs > tmp-specs
/bin/sh: powerpc-elf-gcc: command not found
make[2]: *** [specs]
Any help?
Lei
> If you want to build your toolchain from source on your PowerPC, then
> there is nothing "cross" about your toolchain. It is a less common
> architecture than x86 but fully supported by several distributions.
> In that case, you are not in the right place.
>
> Hope that makes sense and I hope I am correct.
> David
>
>
> On Sun, Apr 15, 2012 at 9:41 AM, lei yang <yanglei.fage@gmail.com> wrote:
>> Hello,
>>
>> I'm not sure this is the right place to ask this question,but I
>> attempt to ask here
>>
>> I have a powerpc board running with linux. I want build some
>> application *on this board* (not cross build)
>> so I need a gcc can running on the board. I have a cross gcc named
>> "powerpc-linux-gcc",
>> How could I compiler a gcc that can run on the powerpc target,can
>> someone give me a
>> step?
>>
>> Lei
>>
>> --
>> For unsubscribe information see http://sourceware.org/lists.html#faq
>>
--
For unsubscribe information see http://sourceware.org/lists.html#faq
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-04-16 15:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-15 14:41 how could I compile a gcc that can run on a powerpc target lei yang
[not found] ` <CA+5N1gxo+25oKHsjqL9CPfeswfe+2mQDFE30J0485Yn9YjU7ig@mail.gmail.com>
2012-04-16 15:09 ` lei yang
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).