Simon Stelling wrote:
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../x86_64-pc-linux-gnu/bin/ld:
warning: creating a DT_TEXTREL in object.
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../x86_64-pc-linux-gnu/bin/ld:
ucol_wgt.o: relocation R_X86_64_PC32 against `compareRanges' can not be
used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../x86_64-pc-linux-gnu/bin/ld:
final link failed: Bad value
collect2: ld returned 1 exit status

I didn't look at the code yet, but I guess it has some #ifndef __OPTIMIZED__. __OPTIMIZED__ is set by gcc with -O2 and above. I guess if you switch back to your -O3 CFLAGS it will compile.

Actually, it would be __OPTIMIZE__, but that wasn't the culprit. The function compareRanges is declared as follows:

static U_INLINE int32_t U_CALLCONV
compareRanges(const void *context, const void *left, const void *right);

And in another function used as an argument to a third function, i.e. pointed at with a pointer, but as it's inline you can't point at it.

Now the only thing left is to find out why the heck it fails with -O{0,1} but not >= -02...

--
Kind Regards,

Simon Stelling
Gentoo/AMD64 developer
--
[email protected] mailing list

Reply via email to