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

Bug#438641: Acknowledgement (/usr/bin/ld: cannot find -lgcc_s)



severity 438641 wishlist
retitle 438641 gcc does not permit mixing -shared and -static objects when linking (or: please pass -static-libgcc automatically)
stop

 Aurélien Jarno kindly explained me that this is a limitation of gcc: it
 does not permit "mixing" -static and -shared stuff on the command line.
 There's a workaround with "-static-libgcc":
    cc -shared -static-libgcc -Wl,-z,defs -o libfoo.so foo.o -Wl,-static

 (Please note that while "cc -shared -Wl,-z,defs -o libfoo.so foo.o
 -static" *seems* to work, it produces shared lib deps instead of
 linking the libs statically.)

-- 
Loïc Minier



Reply to: