Opened 11 years ago
Closed 11 years ago
#5508 closed Bugs (fixed)
shared libs with PIC not correctly build on MIPS
Reported by: | Owned by: | Vladimir Prus | |
---|---|---|---|
Milestone: | To Be Determined | Component: | build |
Version: | Boost 1.47.0 | Severity: | Showstopper |
Keywords: | MIPS PIC | Cc: | oliver.kowalke@… |
Description
shared libraries build with bjam/boost.build on MIPS using position-independed code do not work correctly/generating segmentation fault. Compiling the library 'by hand' doesn't issue an error.
build libboost_fn with bjam: bjam toolset=gcc link=shared variant=debug cxxflags="-fPIC" --with-fn stage
build test app: g++ -g ./test.cpp -I./ -L./stage/lib -lboost_fn -Wl,-rpath=./stage/lib -lrt
./a.out with segementation fault at fn1.S: 'lw $t9, %call16(exit)($gp)'
build libbost_fn by hand: g++ -fPIC -g -I./ -c -Wall fn1.S g++ -shared -Wl,-soname,libboost_fn, -o libboost_fn fn1.o -lc
build test app: g++ -g ./test.cpp -I./ -L./ -lboost_fn -Wl,-rpath=./ -lrt
./a.out works and returns with exit code 2.
It seams to be a bug in bjam/boost.build.
Attachments (4)
Change History (8)
by , 11 years ago
comment:1 by , 11 years ago
correct command line for building libboost_fn:
g++ -shared -Wl,-soname,libboost_fn.so -o libboost_fn.so ./fn1.o -lc
comment:2 by , 11 years ago
Cc: | added |
---|
comment:3 by , 11 years ago
I guess that the object file for fn1.S is not compiled with -fPIC if build with bjam/boost.build
comment:4 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
header of test library