LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 06-17-2009, 04:09 AM   #1
panger123
LQ Newbie
 
Registered: Aug 2008
Posts: 3

Rep: Reputation: 0
cross-compile the SSH of mipsel-linux platform


hi, everyone.
I make a cross compiler of mipsel-linux , and my applications are
all compiled statically to link the libraries. In this way, I found that some functions (getwuid(), getpwnam(), gethostbyname, and so on) are at runtime the shared libraries from the glibc version used for linking. So that these functions are unusefull when I run the application(SSH) which application uses these functions a lot more! Now, I only have two ways to solve this question:
one: I turnoff these functions, and set the relational value of these functions.
second: I must rebuild a static cross compiler .

But I don't think it is a good idea.

Do you have a problem the same as mime? Or do you have a better way to solve this problem? Please share it with me . Thank you!
 
Old 06-17-2009, 12:02 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,625

Rep: Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528
I think, you will have to rebuild the "mipsel-gcc" with headers
from the libc used on your target. And if some kernel
headers are required, when building gcc, then include
headers from the target kernel source.

Ref.: http://www.gnuarm.com/ Please look for the word
' here ' , which is a link.

cd [gcc-build]
[gcc-source]/configure --target=<mipsel..> --prefix=[toolchain-prefix] \
--enable-interwork --enable-multilib --enable-languages="c,c++" \
--with-headers=[libc-source]/libc/include
( .. .. and : --with-headers=[kernel-source]/linux-2.x.xx.x/include/ )

The option '--with-headers= ' excludes the system path,
no headers from /usr/include/, etc. will be used.
.....

Last edited by knudfl; 06-17-2009 at 12:06 PM.
 
Old 06-20-2009, 03:18 PM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,625

Rep: Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528
And please have a look at post # 4 here

http://www.linuxquestions.org/questi...onment-732675/

... About crosstool-ng
http://ymorin.is-a-geek.org/dokuwiki/projects/crosstool
.....
 
  


Reply

Tags
cross, crosscompile


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
No floating-point when cross-compiling Python for Mipsel Sytse Linux - Newbie 0 12-05-2008 11:56 AM
[SOLVED] Looking for Linux-Windows cross-platform PIM eldiener Linux - Software 6 12-07-2006 10:51 AM
Cross-platform, the road to Linux applications wyo Linux - Software 9 12-27-2005 09:10 AM
cross platform C or C++ API for linux and Win32 tcma Linux - Software 1 12-09-2004 11:05 PM
Cross platform program on linux & XP karfei00 Linux - Software 2 05-14-2004 09:06 AM


All times are GMT -5. The time now is 09:05 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration