[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Powerpc: overflowing GOT table: -fpic acceptable?



Hi,

I already asked on the powerpc mailing list, but looks like
broader developer participation is necessary to get an opinion
at all. ;-)

While porting to powerpc(spe) I encountered some packages FTBFS
because of powerpc specific compile errors similar to this one
(here, in package quickfix):

On 03/11/2013 01:22 PM, Roland Stigge wrote:
> make[4]: Entering directory `/build/buildd-quickfix_1.13.3+dfsg-4-powerpc-X8NgWA/quickfix-1.13.3+dfsg/src/python'
> /bin/bash ../../libtool --tag=CXX   --mode=compile /usr/bin/g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I.. -I../..    -O3 -Wall -ansi -Wpointer-arith -Wwrite-strings -I/usr/include/boost  -I/usr/include/mysql -I/usr/mysql/include -I/usr/include -I/usr/include/postgresql -I/usr/include/libxml2  -I/usr/include/python2.7 -I/usr/lib/ruby/1.8/powerpc-linux -MT QuickfixPython.lo -MD -MP -MF .deps/QuickfixPython.Tpo -c -o QuickfixPython.lo QuickfixPython.cpp
> libtool: compile:  /usr/bin/g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I.. -I../.. -O3 -Wall -ansi -Wpointer-arith -Wwrite-strings -I/usr/include/boost -I/usr/include/mysql -I/usr/mysql/include -I/usr/include -I/usr/include/postgresql -I/usr/include/libxml2 -I/usr/include/python2.7 -I/usr/lib/ruby/1.8/powerpc-linux -MT QuickfixPython.lo -MD -MP -MF .deps/QuickfixPython.Tpo -c QuickfixPython.cpp  -fPIC -DPIC -o .libs/QuickfixPython.o
> QuickfixPython.cpp: In function 'PyObject* _wrap_DataDictionary_getGroup(PyObject*, PyObject*)':
> QuickfixPython.cpp:306005:9: warning: unused variable 'res' [-Wunused-variable]
> QuickfixPython.cpp: In function 'PyObject* _wrap_DataDictionary_getFieldTag(PyObject*, PyObject*)':
> QuickfixPython.cpp:304789:96: warning: 'temp3' may be used uninitialized in this function [-Wuninitialized]
> QuickfixPython.cpp: In function 'PyObject* _wrap_DataDictionary_getGroup(PyObject*, PyObject*)':
> QuickfixPython.cpp:305978:18: warning: 'temp5' may be used uninitialized in this function [-Wuninitialized]
> QuickfixPython.cpp:305999:96: warning: 'temp4' may be used uninitialized in this function [-Wuninitialized]
> /tmp/ccj2yRZf.s: Assembler messages:
> /tmp/ccj2yRZf.s:1756016: Error: operand out of range (0x0000000000008000 is not between 0xffffffffffff8000 and 0x0000000000007fff)
> /tmp/ccj2yRZf.s:1756588: Error: operand out of range (0x0000000000008018 is not between 0xffffffffffff8000 and 0x0000000000007fff)
> /tmp/ccj2yRZf.s:1756627: Error: operand out of range (0x0000000000008004 is not between 0xffffffffffff8000 and 0x0000000000007fff)
> [...]

This happens on powerpc and powerpcspe. It is due to GOT limited to 16k
entries on powerpc*.

In the above case, -fpic instead of -fPIC fixes the issue. The other
GOT related options like -fsection-anchors, -mno-toc, -mminimal-toc
etc. don't help, unfortunately.

Is -fpic instead of -fPIC acceptable in Debian for shared libs
in cases like this?

Thanks in advance,

Roland


PS: The closest report from the GCC perspective is at
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28904
but was closed since the reporter found a workaround (but which doesn't
solve the general case, or above case, unfortunately.)


Reply to: