ct-ng 1.6.0 problem with libstdc++
theHog
lists@t3i.nl
Wed Feb 24 00:47:00 GMT 2010
Hi,
I've built a 'arm-unknown-linux-uclibcgnueabi' toolchain with ct-ng 1.6.0
using the sample profile that comes with ct-ng. However, when running a
program that links to the libstdc++.so.6 shared library, the following errors
occurs:
"Can't modify /lib/libstdc++.so.6's text section. Use GCC option -fPIC for
shared objects, please."
I got this error with a small test program (see below). I inspected the
Makefile that was used to build libstdc++ in the ct-ng workspace. It contains
the following (which should be OK I presume?):
LIBSUPCXX_PICFLAGS = -prefer-pic
Any idea what I can do to solve this problem?
Thanks, Richard.
Test program:
#include <iostream>
#include <vector>
using namespace std;
int main()
{
vector<int> coll; // vector container for integer elements
// append elements with values 1 to 6
for (int i=1; i<=6; ++i) {
coll.push_back(i);
}
// print all elements followed by a space
for (int i=0; i<coll.size(); ++i) {
cout << coll[i] << ' ';
}
cout << endl;
}
--
For unsubscribe information see http://sourceware.org/lists.html#faq
More information about the crossgcc
mailing list