Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 234205

Summary: sys-fs/e2fsprogs: undefined reference to `__ffssi2' on sparc
Product: Gentoo Linux Reporter: Friedrich Oslage (RETIRED) <bluebird>
Component: New packagesAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED WONTFIX    
Severity: normal CC: sparc
Priority: High    
Version: 2008.0   
Hardware: Sparc   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Friedrich Oslage (RETIRED) gentoo-dev 2008-08-07 19:41:51 UTC
If e2fsprogs has been compiled with gcc 4.3 and you try to compile sys-boot/silo you'll get this:

ld -m elf32_sparc -N -Ttext 0x280000 -Bstatic -o second crt0.o decomp.o ../common/console.o ../common/printf.o malloc.o ../common/jmp.o ../common/prom.o ../common/tree.o ../common/urem.o ../common/udiv.o ../common/stringops1.o ../common/ffs.o ../common/divdi3.o ../common/udivdi3.o bmark.o main.o cmdline.o disk.o file.o misc.o cfg.o strtol.o ranges.o timer.o memory.o fs/libfs.a mul.o ../common/rem.o ../common/sdiv.o umul.o ../common/stringops2.o ls.o muldi3.o -lext2fs mark.o
/usr/lib/libext2fs.a(inline.o): In function `ext2fs_find_next_bit_set':
(.text+0xb2c): undefined reference to `__ffssi2'
/usr/lib/libext2fs.a(inline.o): In function `ext2fs_find_next_bit_set':
(.text+0xb4c): undefined reference to `__ffssi2'
/usr/lib/libext2fs.a(inline.o): In function `ext2fs_find_next_bit_set':
(.text+0xb7c): undefined reference to `__ffssi2'
/usr/lib/libext2fs.a(inline.o): In function `ext2fs_find_first_bit_set':
(.text+0xbe0): undefined reference to `__ffssi2'
/usr/lib/libext2fs.a(inline.o): In function `ext2fs_find_first_bit_set':
(.text+0xc08): undefined reference to `__ffssi2'
make[1]: *** [second] Error 1

For now we patched silo(sys-boot/silo/files/gcc-4.3-compile.patch) to include libgcc and it works but other applications that use ext2fs_find_first_bit_set will also experience this error, therefore e2fsprogs should be patched to include libgcc.a when creating libext2fs.a.
Comment 1 SpanKY gentoo-dev 2008-08-16 04:55:02 UTC
umm, no.  we're not going to break apart libgcc.a and throw it into random static archives to appease random applications.

if you invoke ld directly, you get to pick up the pieces.