This is the mail archive of the
crossgcc@sourceware.org
mailing list for the crossgcc project.
See the CrossGCC FAQ for lots
more information.
-fpic, -fpic -mpcrel, -fPIC, ... what to use for m68000?
- From: Simon Ferber <simon dot ferber at tu-dortmund dot de>
- To: crossgcc at sourceware dot org
- Date: Fri, 30 Sep 2011 11:53:01 +0200
- Subject: -fpic, -fpic -mpcrel, -fPIC, ... what to use for m68000?
Hi,
I am trying to build a cross toolchain for a plain Motorola m68000.
Packages used are:
binutils 2.21.1 with ./configure --target=m68k-elf --prefix=/usr/local/m68k/
gcc 4.6.1 with configure --target=m68k-elf --prefix=/usr/local/m68k/
--enable-languages=c,c++ --with-newlib --disable-libmudflap
--disable-libssp --disable-libgomp --disable-libstdcxx-pch
--disable-threads --with-gnu-as --with-gnu-ld --disable-nls
--with-headers=yes --disable-checking --with-headers --disable-shared
I have tried to build everything with "-fPIC" as well as with "-fpic"
and "-fpic -mpcrel". I never seem to get a toolchain, which is able to
produce pic code above 64k of size.
Later compiling with -fPIC gives me many of these errors:
crtstuff.c:(.text+0xa): relocation truncated to fit: R_68K_GOT16 against
symbol `_GLOBAL_OFFSET_TABLE_' defined in .got.plt section in
/usr/local/m68k/lib/gcc/m68k-elf/4.6.1/../../../../m68k-elf/lib/m68000/crt0.o
Same source tried to compile with "-fpic -mpcrel" gives me these errors
instead:
/tmp/ccvI64qp.s: Assembler messages:
/tmp/ccvI64qp.s:1839: Error: syntax error -- statement `cmp.b
#0,(_fs:w,%pc).l' ignored
/tmp/ccvI64qp.s: Assembler messages:
/tmp/ccvI64qp.s:38: Error: syntax error -- statement `cmp.l
(_cluster_size_table:w,%pc).l,%d2' ignored
Shouldn't be the -fPIC the right option? As I understand, -fpic produces
code for 16-bit wide entries in the _GLOBAL_OFFSET_TABLE_, which is not
enough for bigger programs. That's why one should use -fPIC. What why
does this option fail as well?
Best regards
Simon
--
For unsubscribe information see http://sourceware.org/lists.html#faq