niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » *nix » Linux » embedded
Building gcc for powerpc
Post new topic   Reply to topic Page 1 of 1 [3 Posts] View previous topic :: View next topic
Author Message
LinuxNovice
*nix forums beginner


Joined: 04 Jun 2005
Posts: 5

PostPosted: Tue Feb 08, 2005 9:02 am    Post subject: Building gcc for powerpc Reply with quote

Hi All,

# As I am building cross toolchain for ppc 8xx CPU.
# The following steps were performed

1. Built binutils
2. Configured the linux kernel (menuconfig)(ofcourse with make clean
etc.)
3. Building gcc (pass 1)

* Step 3 expanded:
i. extracted the code from gcc-2.95.3.tar.gz
ii. Applied libchack solution
iii. ran configure
as:
.../gcc-2.95.3/configure --targrt=powerpc --prefix=/usr
--with-headers=/usr/src/linux/include --enable-languages=c
--disable-threads

4. make

* Here I get errors that says: stdlib.h not found and unistd.h not
found.

# Error file shows the following:

**----------------------------------------------**

.../libiberty/libiberty.a(choose-temp.o): In function
`choose_temp_base':
/usr/cross/builds/powerpc-linux-gcc/libiberty/../../gcc-2.95.3/libiberty/choose-temp.c:138:
the use of `mktemp' is dangerous, better use `mkstemp'
.../libiberty/libiberty.a(choose-temp.o): In function
`choose_temp_base':
/usr/cross/builds/powerpc-linux-gcc/libiberty/../../gcc-2.95.3/libiberty/choose-temp.c:138:
the use of `mktemp' is dangerous, better use `mkstemp'
.../libiberty/libiberty.a(choose-temp.o): In function
`choose_temp_base':
/usr/cross/builds/powerpc-linux-gcc/libiberty/../../gcc-2.95.3/libiberty/choose-temp.c:138:
the use of `mktemp' is dangerous, better use `mkstemp'
.../libiberty/libiberty.a(choose-temp.o): In function
`choose_temp_base':
/usr/cross/builds/powerpc-linux-gcc/libiberty/../../gcc-2.95.3/libiberty/choose-temp.c:138:
the use of `mktemp' is dangerous, better use `mkstemp'
.../../gcc-2.95.3/gcc/libgcc2.c:41: stdlib.h: No such file or directory
.../../gcc-2.95.3/gcc/libgcc2.c:42: unistd.h: No such file or directory
make[3]: *** [libgcc2.a] Error 1
make[2]: *** [stmp-multilib-sub] Error 2
make[1]: *** [stmp-multilib] Error 1
make: *** [all-gcc] Error 2

**--------------------------------------------------------**
Back to top
Amit Limaye
*nix forums beginner


Joined: 17 Mar 2005
Posts: 25

PostPosted: Thu Feb 10, 2005 10:12 pm    Post subject: Re: Building gcc for powerpc Reply with quote

try changing the source path to /usr/include or wherver the glibc
headers are included think tht path you have given is the linux kenel
include files u dont expect to find stdlib.h
Back to top
Edwin Bland
*nix forums beginner


Joined: 19 Feb 2005
Posts: 2

PostPosted: Thu Feb 17, 2005 8:59 pm    Post subject: Re: Building gcc for powerpc Reply with quote

It could be that the configure portion of the build failed.

"--targrt" must be spelled "--target"

You could also try looking at Karim's Yaghmour's site:
http://www.embeddedtux.org & buy the book Building Embedded Linux Systems by
the same author.


Edwin

"LinuxNovice" <vishal.parikh@gmail.com> wrote in message
news:1107856957.208198.325570@c13g2000cwb.googlegroups.com...
Quote:
Hi All,

# As I am building cross toolchain for ppc 8xx CPU.
# The following steps were performed

1. Built binutils
2. Configured the linux kernel (menuconfig)(ofcourse with make clean
etc.)
3. Building gcc (pass 1)

* Step 3 expanded:
i. extracted the code from gcc-2.95.3.tar.gz
ii. Applied libchack solution
iii. ran configure
as:
../gcc-2.95.3/configure --targrt=powerpc --prefix=/usr
--with-headers=/usr/src/linux/include --enable-languages=c
--disable-threads

4. make

* Here I get errors that says: stdlib.h not found and unistd.h not
found.

# Error file shows the following:

**----------------------------------------------**

../libiberty/libiberty.a(choose-temp.o): In function
`choose_temp_base':
/usr/cross/builds/powerpc-linux-gcc/libiberty/../../gcc-2.95.3/libiberty/choose-temp.c:138:
the use of `mktemp' is dangerous, better use `mkstemp'
../libiberty/libiberty.a(choose-temp.o): In function
`choose_temp_base':
/usr/cross/builds/powerpc-linux-gcc/libiberty/../../gcc-2.95.3/libiberty/choose-temp.c:138:
the use of `mktemp' is dangerous, better use `mkstemp'
../libiberty/libiberty.a(choose-temp.o): In function
`choose_temp_base':
/usr/cross/builds/powerpc-linux-gcc/libiberty/../../gcc-2.95.3/libiberty/choose-temp.c:138:
the use of `mktemp' is dangerous, better use `mkstemp'
../libiberty/libiberty.a(choose-temp.o): In function
`choose_temp_base':
/usr/cross/builds/powerpc-linux-gcc/libiberty/../../gcc-2.95.3/libiberty/choose-temp.c:138:
the use of `mktemp' is dangerous, better use `mkstemp'
../../gcc-2.95.3/gcc/libgcc2.c:41: stdlib.h: No such file or directory
../../gcc-2.95.3/gcc/libgcc2.c:42: unistd.h: No such file or directory
make[3]: *** [libgcc2.a] Error 1
make[2]: *** [stmp-multilib-sub] Error 2
make[1]: *** [stmp-multilib] Error 1
make: *** [all-gcc] Error 2

**--------------------------------------------------------**
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [3 Posts] View previous topic :: View next topic
The time now is Fri Jan 09, 2009 8:22 am | All times are GMT
navigation Forum index » *nix » Linux » embedded
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts Minor Annoyance Building mod_jk on Mac OS X Immanuel Tranz-Mischen Apache 1 Mon Aug 13, 2007 2:21 pm
No new posts Trouble building bison++/flex++ in Linux John S apps 0 Sun Jul 16, 2006 5:04 am
No new posts Building package from port, building package repository dutch disCo FreeBSD 2 Sat Jul 15, 2006 1:59 pm
No new posts Help needed on building read-only FreeBSD boot system Keve Nagy FreeBSD 0 Tue Jul 04, 2006 1:57 pm
No new posts building toolchain i386 - ld can't find crti.o Luki embedded 0 Mon Jul 03, 2006 9:00 am

Guitar Books | Bad Credit Mortgages | Credit Cards | Problem Mortgage | Mortgage
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1724s ][ Queries: 16 (0.0948s) ][ GZIP on - Debug on ]