login about faq

Hi,

I wanted to have Eglibc support in my Linaro tool chain..

I went through http://ask.linaro.org/questions/674/cross-compilation-of-eglibcuclibc-with-linaro.

With reference to the link, decided to cross compile the linaro tool chain from the scratch.. With refernce to https://wiki.linaro.org/WorkingGroups/ToolChain/Using/CrosstoolNg, i am using crosstool-ng for building the linaro tool chain..

But i am not getting the linaro-gcc-4.5 option in my case..Am i making any mistake?

And another basic question..It may be very silly.But as i am new to this, i am asking this.. While building, how Crosstool-NG will get the location source code of linaro tool chain? Should i manually download the linaro source code or Crosstool-NG will on the fly get the source code even while building?

Please make me clear in this..

thanks and regards

sid

asked 18 Feb, 12:36

sid's gravatar image

sid
111
accept rate: 0%

edited 04 Apr, 05:40

Michael%20Opdenacker's gravatar image

Michael Opde... ♦♦
440139


Hi Sid,

It seems I found a way to get Crosstool-ng to produce an eglibc toolchain with Linaro gcc 4.6.

wget http://crosstool-ng.org/download/crosstool-ng/crosstool-ng-1.13.4.tar.bz2 tar jxvf crosstool-ng-1.13.4.tar.bz2 cd crosstool-ng-1.13.4/ ./configure --local make ./ct-ng list-samples | grep gnueabi

Running "grep -ri linaro ." showed me that the cortexa15 configuration had support for the Linaro gcc versions.

./ct-ng arm-cortex_a15-linux-gnueabi ./ct-ng menuconfig

Then choose 'eglibc' as C library and 'linaro-4.6-2011.10' as gcc version.

In 'Target options', you can replace the cortex a15settings under 'Architecture level' by the corresponding settings for your cpu (cortex-a8) for example.

It should produce the toolchain that you need. (after running './ct-ng build')

Note that you could also run ct-ng on regular gcc sources, and then replace the gcc source tarball downloaded by ct-ng in ~/src/ by the corresponding Linaro gcc sources (make them have the same name). Linaro gcc sources are supposed to replace standard gcc sources, so that should work.

Hope this helps,

Michael.

link

answered 20 Feb, 11:49

Michael%20Opdenacker's gravatar image

Michael Opde... ♦♦
440139
accept rate: 5%

Hi,

I have successfully built the Linaro tool-chain with Eglibc support using the Crosstool-NG.Thanks for helping in that.

I have one more query.I compiled uClibc using the above said tool-chain.When i tried to build the application it got linked with the eglibc's libc.so.6.So,i can't have the uClibc's support also in the same tool-chain with Eglibc. If i wish to have uClibc's support, i need to build another tool-chain.Is this understanding of mine correct?

thanks and regards

sid

link

answered 06 Mar, 02:34

sid's gravatar image

sid
111
accept rate: 0%

Hi Sid,

Yes, this is correct. To compile applications under different C libraries, you need to have different toolchains, at least by default.

With gcc, it's now possible to support multiple libraries in the same toolchain (like uClibc and eglibc), or different configuration options (like soft float and hard float). That's called 'multilib', but this feature is probably a bit more complex to use.

Here's what I usually recommend:

  • List item Build most of your apps with shared libraries with your default toolchain
  • List item If a few binaries need to be compiled against a different C library, use the other toolchain, and compile the executables statically.

That's the easiest solution.

Michael.

link

answered 07 Mar, 04:48

Michael%20Opdenacker's gravatar image

Michael Opde... ♦♦
440139
accept rate: 5%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×31
×3
×2

Asked: 18 Feb, 12:36

Seen: 215 times

Last updated: 04 Apr, 05:40