Forum: ARM programming with GCC/GNU tools custom board libc.a - how to link in?

von Sledge H. (sledge)

Rate this post
0 useful
not useful

I have got here an ARM custom board, with only rootfs available (no 
source code..)

Trying to cross-compile vncviewer for it with CodeSourcery's G++ Lite.

libc.a in G++Lite shouts errors such as:
In function `_isatty_r': 
isattyr.c:(.text+0x18): undefined reference to `_isatty'
 (_write, _fstat, _exit etc)
collect2: ld returned 1 exit status

The answer I got from this link 
(http://www.embeddedrelated.com/groups/lpc2000/show/48415.php) says:
You would normally provide application specific versions of these
functions yourself. If you don't need the functions then they can be
stubbed out.

vnc obviously needs those functions, and I found their implementations 
in that custom board's /usr/lib/libc.a

Is there a way to merge nicely the implemented functions in 
.../custom-board/rootfs/usr/lib/libc.a and CodeSourcery's libc.a ?

Since I am a noob in autoconf -- how to modify vnc's autoconf config 
files to enable this?

What I tried so far:

1.Overwriting custom libc.a over the G++Lite's one, then I would get 
errors about unresolved _impure_ptr exports (means those residing only 
in the CodeSourcery..)
2.Then I renamed the custom libc.a into libcustomc.a and manually 
performed collect2 (ld) on a skeleton project - it worked! But how to 
integrate this into autoconf (settings LIBS = -lcustomc in configure.in 
did not help)?
And this "rename named conflicts" is by far not elegant anyhow...

So, there must be the way to gently compile complementary functions (and 
./configure with CROSS_COMPILE kernel's-working approach, too, but 
that's another topic) for us embedded folks out there..

Thanks heaps!



Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]

Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.