* Cross compiler build instructions - PowerPC @ 2011-03-23 4:58 Rohit Arul Raj 2011-03-23 12:25 ` Joseph S. Myers 0 siblings, 1 reply; 11+ messages in thread From: Rohit Arul Raj @ 2011-03-23 4:58 UTC (permalink / raw) To: gcc Hello All, I have been trying to build a cross compiler (for PowerPC) on x86_64 linux host. I followed the build procedure given in the link below: http://www.eglibc.org/archives/patches/msg00078.html The build instructions in the link works perfectly fine with the following revisions: GCC v4.1.2 Binutils v2.17 linux v2.16.19.1 eglibc v2.5 But while trying to build with the latest revisions, i get some build errors: GCC v4.5.1 Binutils v2.20.51 linux 2.6.35.2 libc 2.13 (from eglibc) Error while building 1st stage GCC: ------------------------------------------------------------- make[4]: Entering directory `/cross_build/ppc45/obj/gcc1/powerpc-linux-gnu/nof/libgcc' # If this is the top-level multilib, build all the other # multilibs. /cross_build/ppc45/obj/gcc1/./gcc/xgcc -MD -MP -MF decContext.dep -c /cross_build/ppc45/src/gcc-4.5-2010.09/libgcc/../libdecnumber/decContext.c /cross_build/ppc45/src/gcc-4.5-2010.09/libgcc/../libdecnumber/decContext.c:33:43: fatal error: string.h: No such file or directory compilation terminated. make[4]: *** [decContext.o] Error 1 make[4]: Leaving directory `/cross_build/ppc45/obj/gcc1/powerpc-linux-gnu/nof/libgcc' make[3]: *** [multi-do] Error 1 I was expecting that 'libgcc' will not be built in the first stage? Is that right? If i try configuring with '--disable-libgcc', i get errors while building 'libiberty' & 'zlib'. Disabling all three does help to build the first stage of GCC but was not sure if this was the right way to do it. Do we have different build instructions other than the one mentioned in the link above to build the latest sources? Thanks, Rohit ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Cross compiler build instructions - PowerPC 2011-03-23 4:58 Cross compiler build instructions - PowerPC Rohit Arul Raj @ 2011-03-23 12:25 ` Joseph S. Myers 2011-07-08 8:08 ` Rohit Arul Raj 0 siblings, 1 reply; 11+ messages in thread From: Joseph S. Myers @ 2011-03-23 12:25 UTC (permalink / raw) To: Rohit Arul Raj; +Cc: gcc, patches, maxim On Wed, 23 Mar 2011, Rohit Arul Raj wrote: > Hello All, > > I have been trying to build a cross compiler (for PowerPC) on x86_64 > linux host. I followed the build procedure given in the link below: > > http://www.eglibc.org/archives/patches/msg00078.html You should be referring to the current checked-in version of this documentation, not a four-year-old draft. However, it doesn't appear to have relevant changes. Maxim, perhaps we should add --disable-decimal-float --disable-libffi --disable-libquadmath to the configure options for the first GCC in EGLIBC.cross-building? -- Joseph S. Myers joseph@codesourcery.com ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Cross compiler build instructions - PowerPC 2011-03-23 12:25 ` Joseph S. Myers @ 2011-07-08 8:08 ` Rohit Arul Raj 2011-07-08 9:12 ` Andreas Schwab ` (2 more replies) 0 siblings, 3 replies; 11+ messages in thread From: Rohit Arul Raj @ 2011-07-08 8:08 UTC (permalink / raw) To: Joseph S. Myers; +Cc: gcc, patches, maxim On Wed, Mar 23, 2011 at 5:55 PM, Joseph S. Myers <joseph@codesourcery.com> wrote: > On Wed, 23 Mar 2011, Rohit Arul Raj wrote: > >> Hello All, >> >> I have been trying to build a cross compiler (for PowerPC) on x86_64 >> linux host. I followed the build procedure given in the link below: >> >> http://www.eglibc.org/archives/patches/msg00078.html > > You should be referring to the current checked-in version of this > documentation, not a four-year-old draft. However, it doesn't appear to > have relevant changes. Maxim, perhaps we should add > --disable-decimal-float --disable-libffi --disable-libquadmath to the > configure options for the first GCC in EGLIBC.cross-building? > > -- > Joseph S. Myers > joseph@codesourcery.com > Any updates on this one yet? Adding "--disable-decimal-float --disable-libffi --disable-libquadmath" to configure options gives the same error. Regards, Rohit ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Cross compiler build instructions - PowerPC 2011-07-08 8:08 ` Rohit Arul Raj @ 2011-07-08 9:12 ` Andreas Schwab 2011-07-08 13:55 ` Joseph S. Myers 2011-07-08 14:34 ` [patches] " Khem Raj 2 siblings, 0 replies; 11+ messages in thread From: Andreas Schwab @ 2011-07-08 9:12 UTC (permalink / raw) To: Rohit Arul Raj; +Cc: Joseph S. Myers, gcc, patches, maxim Rohit Arul Raj <rohitarulraj@gmail.com> writes: > Any updates on this one yet? > Adding "--disable-decimal-float --disable-libffi > --disable-libquadmath" to configure options gives the same error. It is much easier to bootstrap with some previous glibc build (any one will do) already in sysroot. Andreas. -- Andreas Schwab, schwab@redhat.com GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84 5EC7 45C6 250E 6F00 984E "And now for something completely different." ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Cross compiler build instructions - PowerPC 2011-07-08 8:08 ` Rohit Arul Raj 2011-07-08 9:12 ` Andreas Schwab @ 2011-07-08 13:55 ` Joseph S. Myers 2011-07-08 14:34 ` [patches] " Khem Raj 2 siblings, 0 replies; 11+ messages in thread From: Joseph S. Myers @ 2011-07-08 13:55 UTC (permalink / raw) To: Rohit Arul Raj; +Cc: gcc, patches, maxim On Fri, 8 Jul 2011, Rohit Arul Raj wrote: > Adding "--disable-decimal-float --disable-libffi > --disable-libquadmath" to configure options gives the same error. Then you must debug the issue yourself, on the system you are using for building, and gain sufficient understanding of the code in the process to work out why --disable-decimal-float isn't disabling the build of the libdecnumber code for the target. -- Joseph S. Myers joseph@codesourcery.com ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [patches] Re: Cross compiler build instructions - PowerPC 2011-07-08 8:08 ` Rohit Arul Raj 2011-07-08 9:12 ` Andreas Schwab 2011-07-08 13:55 ` Joseph S. Myers @ 2011-07-08 14:34 ` Khem Raj 2011-07-18 12:44 ` Rohit Arul Raj 2011-07-19 18:33 ` Anthony Foiani 2 siblings, 2 replies; 11+ messages in thread From: Khem Raj @ 2011-07-08 14:34 UTC (permalink / raw) To: Rohit Arul Raj; +Cc: Joseph S. Myers, gcc, patches, maxim On Fri, Jul 8, 2011 at 1:08 AM, Rohit Arul Raj <rohitarulraj@gmail.com> wrote: > On Wed, Mar 23, 2011 at 5:55 PM, Joseph S. Myers > <joseph@codesourcery.com> wrote: >> On Wed, 23 Mar 2011, Rohit Arul Raj wrote: >> >>> Hello All, >>> >>> I have been trying to build a cross compiler (for PowerPC) on x86_64 >>> linux host. I followed the build procedure given in the link below: >>> >>> http://www.eglibc.org/archives/patches/msg00078.html >> >> You should be referring to the current checked-in version of this >> documentation, not a four-year-old draft. However, it doesn't appear to >> have relevant changes. Maxim, perhaps we should add >> --disable-decimal-float --disable-libffi --disable-libquadmath to the >> configure options for the first GCC in EGLIBC.cross-building? >> >> -- >> Joseph S. Myers >> joseph@codesourcery.com >> > > Any updates on this one yet? > Adding "--disable-decimal-float --disable-libffi > --disable-libquadmath" to configure options gives the same error. I a script based on these instructions which is uptodate and builds eglibc based toolchains https://github.com/kraj/ct-scripts/blob/master/toolchain-eglibc.sh You can try that > > Regards, > Rohit > ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [patches] Re: Cross compiler build instructions - PowerPC 2011-07-08 14:34 ` [patches] " Khem Raj @ 2011-07-18 12:44 ` Rohit Arul Raj 2011-07-18 15:01 ` Khem Raj 2011-07-19 18:33 ` Anthony Foiani 1 sibling, 1 reply; 11+ messages in thread From: Rohit Arul Raj @ 2011-07-18 12:44 UTC (permalink / raw) To: Khem Raj; +Cc: Joseph S. Myers, gcc, patches, maxim On Fri, Jul 8, 2011 at 8:03 PM, Khem Raj <raj.khem@gmail.com> wrote: > On Fri, Jul 8, 2011 at 1:08 AM, Rohit Arul Raj <rohitarulraj@gmail.com> wrote: >> On Wed, Mar 23, 2011 at 5:55 PM, Joseph S. Myers >> <joseph@codesourcery.com> wrote: >>> On Wed, 23 Mar 2011, Rohit Arul Raj wrote: >>> >>>> Hello All, >>>> >>>> I have been trying to build a cross compiler (for PowerPC) on x86_64 >>>> linux host. I followed the build procedure given in the link below: >>>> >>>> http://www.eglibc.org/archives/patches/msg00078.html >>> >>> You should be referring to the current checked-in version of this >>> documentation, not a four-year-old draft. However, it doesn't appear to >>> have relevant changes. Maxim, perhaps we should add >>> --disable-decimal-float --disable-libffi --disable-libquadmath to the >>> configure options for the first GCC in EGLIBC.cross-building? >>> >>> -- >>> Joseph S. Myers >>> joseph@codesourcery.com >>> >> >> Any updates on this one yet? >> Adding "--disable-decimal-float --disable-libffi >> --disable-libquadmath" to configure options gives the same error. > > I a script based on these instructions which is uptodate and builds eglibc > based toolchains > > https://github.com/kraj/ct-scripts/blob/master/toolchain-eglibc.sh > > You can try that > >> >> Regards, >> Rohit >> > Thanks Khem, i was able to build the first stage GCC :) The only difference i can find is: In the eglibc cross-building instructions, for building the first stage GCC we give "$make" command only (which works fine with GCC 4.1.1) And with your script you had given "$make all-gcc" With the following configure options: $src/$gccv/configure --target=$target --prefix=$tools --without-header --with-newlib --disable-shared --disable-threads --disable-libssp --disable-libgomp --disable-libmudflap --disable-libquadmath --enable-languages=c A) The following folders are built with "$make" which leads to the error: make[1]: Entering directory `/usr/rohit/PA/460test/ppc/obj/gcc1' make[2]: Entering directory `/usr/rohit/PA/460test/ppc/obj/gcc1/libiberty' make[3]: Entering directory `/usr/rohit/PA/460test/ppc/obj/gcc1/libiberty/testsuite' make[2]: Entering directory `/usr/rohit/PA/460test/ppc/obj/gcc1/fixincludes' make[2]: Entering directory `/usr/rohit/PA/460test/ppc/obj/gcc1/lto-plugin' make[3]: Entering directory `/usr/rohit/PA/460test/ppc/obj/gcc1/lto-plugin' make[2]: Entering directory `/usr/rohit/PA/460test/ppc/obj/gcc1/intl' make[2]: Entering directory `/usr/rohit/PA/460test/ppc/obj/gcc1/build-x86_64-unknown-linux-gnu/libiberty' make[3]: Entering directory `/usr/rohit/PA/460test/ppc/obj/gcc1/build-x86_64-unknown-linux-gnu/libiberty/testsuite' make[2]: Entering directory `/usr/rohit/PA/460test/ppc/obj/gcc1/build-x86_64-unknown-linux-gnu/fixincludes' make[2]: Entering directory `/usr/rohit/PA/460test/ppc/obj/gcc1/zlib' make[2]: Entering directory `/usr/rohit/PA/460test/ppc/obj/gcc1/libcpp' make[2]: Entering directory `/usr/rohit/PA/460test/ppc/obj/gcc1/libdecnumber' make[2]: Entering directory `/usr/rohit/PA/460test/ppc/obj/gcc1/gcc' make[2]: Entering directory `/usr/rohit/PA/460test/ppc/obj/gcc1/powerpc-none-linux-gnu/libgcc' make[3]: Entering directory `/usr/rohit/PA/460test/ppc/obj/gcc1/powerpc-none-linux-gnu/libgcc' make[4]: Entering directory `/usr/rohit/PA/460test/ppc/obj/gcc1/powerpc-none-linux-gnu/nof/libgcc' B) The following folders are built with "$make all-gcc". make[1]: Entering directory `/usr/rohit/PA/460test/ppc/obj/gcc1/libiberty' make[2]: Entering directory `/usr/rohit/PA/460test/ppc/obj/gcc1/libiberty/testsuite' make[1]: Entering directory `/usr/rohit/PA/460test/ppc/obj/gcc1/lto-plugin' make[2]: Entering directory `/usr/rohit/PA/460test/ppc/obj/gcc1/lto-plugin' make[1]: Entering directory `/usr/rohit/PA/460test/ppc/obj/gcc1/intl' make[1]: Entering directory `/usr/rohit/PA/460test/ppc/obj/gcc1/build-x86_64-unknown-linux-gnu/libiberty' make[2]: Entering directory `/usr/rohit/PA/460test/ppc/obj/gcc1/build-x86_64-unknown-linux-gnu/libiberty/testsuite' make[1]: Entering directory `/usr/rohit/PA/460test/ppc/obj/gcc1/build-x86_64-unknown-linux-gnu/fixincludes' make[1]: Entering directory `/usr/rohit/PA/460test/ppc/obj/gcc1/zlib' make[1]: Entering directory `/usr/rohit/PA/460test/ppc/obj/gcc1/libcpp' make[1]: Entering directory `/usr/rohit/PA/460test/ppc/obj/gcc1/libdecnumber' make[1]: Entering directory `/usr/rohit/PA/460test/ppc/obj/gcc1/fixincludes' make[1]: Entering directory `/usr/rohit/PA/460test/ppc/obj/gcc1/gcc' Is this expected behavior? Regards, Rohit ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [patches] Re: Cross compiler build instructions - PowerPC 2011-07-18 12:44 ` Rohit Arul Raj @ 2011-07-18 15:01 ` Khem Raj 2011-07-19 8:21 ` Rohit Arul Raj 0 siblings, 1 reply; 11+ messages in thread From: Khem Raj @ 2011-07-18 15:01 UTC (permalink / raw) To: Rohit Arul Raj; +Cc: Joseph S. Myers, gcc, patches, maxim On Mon, Jul 18, 2011 at 4:58 AM, Rohit Arul Raj <rohitarulraj@gmail.com> wrote: > > Is this expected behavior? > > yes ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [patches] Re: Cross compiler build instructions - PowerPC 2011-07-18 15:01 ` Khem Raj @ 2011-07-19 8:21 ` Rohit Arul Raj 0 siblings, 0 replies; 11+ messages in thread From: Rohit Arul Raj @ 2011-07-19 8:21 UTC (permalink / raw) To: Khem Raj; +Cc: gcc On Mon, Jul 18, 2011 at 8:10 PM, Khem Raj <raj.khem@gmail.com> wrote: > On Mon, Jul 18, 2011 at 4:58 AM, Rohit Arul Raj <rohitarulraj@gmail.com> wrote: >> >> Is this expected behavior? >> >> > yes > Hello Khem, 1. Got in to another error while doing make [make csu/subdir_lib] of "eglibc default headers".. nux-gnu/tools/lib/gcc/powerpc-linux-gnu/4.6.0/include-fixed -isystem /usr/rohit/PA/460build/ppc/powerpc-linux-gnu/sysroot/usr/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h -DHAVE_INITFINI -DASSEMBLER -I/usr/rohit/PA/460build/ppc/powerpc-linux-gnu/obj/eglibc-headers/csu/. -Wa,--noexecstack -g0 -o /usr/rohit/PA/460build/ppc/powerpc-linux-gnu/obj/eglibc-headers/csu/crti.o /usr/rohit/PA/460build/ppc/powerpc-linux-gnu/obj/eglibc-headers/csu/crti.S: Assembler messages: /usr/rohit/PA/460build/ppc/powerpc-linux-gnu/obj/eglibc-headers/csu/crti.S:22: Error: Unrecognized opcode: `align' /usr/rohit/PA/460build/ppc/powerpc-linux-gnu/obj/eglibc-headers/csu/crti.S:25: Error: Unrecognized opcode: `end_init' /usr/rohit/PA/460build/ppc/powerpc-linux-gnu/obj/eglibc-headers/csu/crti.S:43: Error: Unrecognized opcode: `align' /usr/rohit/PA/460build/ppc/powerpc-linux-gnu/obj/eglibc-headers/csu/crti.S:46: Error: Unrecognized opcode: `end_fini' Any suggestion where i may be going wrong? Is there any issues with the binutils [v2.21] i am using? 2. Before getting that error, i was getting these errors because of make v3.82 http://sourceware.org/ml/crossgcc/2010-11/msg00043.html I had used make 3.81 to get until (1). But in case to use make3.82 itself, you had asked to backport the relevant patch from upstream glibc. Where are these patches located? My build setup: binutilsv=binutils-2.21 linuxv=linux-2.6.39 gccv=gcc-4.6.0 libcv=eglibc-2.13 Regards, Rohit ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [patches] Re: Cross compiler build instructions - PowerPC 2011-07-08 14:34 ` [patches] " Khem Raj 2011-07-18 12:44 ` Rohit Arul Raj @ 2011-07-19 18:33 ` Anthony Foiani 2011-07-19 22:57 ` Anthony Foiani 1 sibling, 1 reply; 11+ messages in thread From: Anthony Foiani @ 2011-07-19 18:33 UTC (permalink / raw) To: Khem Raj; +Cc: Rohit Arul Raj, Joseph S. Myers, gcc, patches, maxim Khem Raj <raj.khem@gmail.com> writes: > I a script based on these instructions which is uptodate and builds eglibc > based toolchains > > https://github.com/kraj/ct-scripts/blob/master/toolchain-eglibc.sh Is there any particular reason that you're not taking advantage of the many person-years of effort that have been put into tools that do exactly this? I'm a very happy user of "crosstool-ng", which is itself an updated version of "crosstool". http://crosstool-ng.org/ I'm currently building for PowerPC on x86-64 linux, and it's working quite well. It has support for multiple gcc versions, multiple libc (glibc, eglibc, ulibc), various debugging packages (both on host and on target), and takes care of build prereqs (cloog, ppl, etc). There's a very active and responsive mailing list (crossgcc). With version 5, the ELDK people have gone with the build system from "Poky Linux" (which is an improvement over the ELDK4 method of "use a virtual machine with FC7 x86-32 installed..."): http://www.denx.de/wiki/ELDK-5/EldkBuilding And there's also OpenEmbedded, which has their own set of tools and patches: http://www.openembedded.org/index.php/Main_Page Finally, if your organization has any development funds at all, CodeSourcery has pre-built toolkits (as well as Eclipse integration etc) that could save you lots of time up front. Given the huge amount of work they do for GCC, supporting them if you can is a great thing. (They also have free downloads of the raw toolchains.) Regards, Tony ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [patches] Re: Cross compiler build instructions - PowerPC 2011-07-19 18:33 ` Anthony Foiani @ 2011-07-19 22:57 ` Anthony Foiani 0 siblings, 0 replies; 11+ messages in thread From: Anthony Foiani @ 2011-07-19 22:57 UTC (permalink / raw) To: Khem Raj; +Cc: Rohit Arul Raj, Joseph S. Myers, gcc, patches, maxim Anthony Foiani <tkil@scrye.com> writes: > Is there any particular reason that you're not taking advantage of the > many person-years of effort that have been put into tools that do > exactly this? It's been pointed out to me that Khem very much knows of crosstool and its ilk, being a committer of some standing. I apologize for not looking back upthread enough to get a full sense of what was being discussed. Sorry for the noise. I would still suggest that tools like ct-ng are still valuable even from a "learning" point of view: it provides a good view into prerequisite and target-side libraries, and (when run) logs the series of operations required to build a useful toolchain. Thanks, Tony. ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2011-07-19 22:44 UTC | newest] Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2011-03-23 4:58 Cross compiler build instructions - PowerPC Rohit Arul Raj 2011-03-23 12:25 ` Joseph S. Myers 2011-07-08 8:08 ` Rohit Arul Raj 2011-07-08 9:12 ` Andreas Schwab 2011-07-08 13:55 ` Joseph S. Myers 2011-07-08 14:34 ` [patches] " Khem Raj 2011-07-18 12:44 ` Rohit Arul Raj 2011-07-18 15:01 ` Khem Raj 2011-07-19 8:21 ` Rohit Arul Raj 2011-07-19 18:33 ` Anthony Foiani 2011-07-19 22:57 ` Anthony Foiani
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).