This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

ct-ng 1.6.0 problem with libstdc++


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]