custom board libc.a - how to link in?

OP #1914573
Rate this post
• ▲ useful
▼ not useful
Hello,

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:
1
...
2
.../CodeSourcery/Sourcery_G++_Lite/bin/../lib/gcc/arm-none-eabi/4.4.1
3
/../../../../arm-none-eabi/lib/libc.a(lib_a-isattyr.o):
4
In function `_isatty_r': 
5
isattyr.c:(.text+0x18): undefined reference to `_isatty'
6
...
7
 (_write, _fstat, _exit etc)
8
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!

-- 
sledge

Reply

Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.

Formatting
  • [c]C-Code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.