http://bugzilla.novell.com/show_bug.cgi?id=621880 http://bugzilla.novell.com/show_bug.cgi?id=621880#c0 Summary: glibc: Support -lpthread static linking by building pthread.a with "ld -r" Classification: openSUSE Product: openSUSE 11.3 Version: Final Platform: Other OS/Version: Other Status: NEW Severity: Enhancement Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: burnus@gmx.de QAContact: qa@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6 Currently, on can get all kind of segfaults, if one simply links a program statically with the POSIX thread library, e.g. via $(COMPILER) -static $(SOURCEFILES) -fopenmp one way is to link via $(COMPILER) -static $(SOURCEFILES) -lgomp -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -lrt However, one can do the same as Red Hat does: * Wed Feb 18 2009 Jakub Jelinek <jakub@redhat.com> 2.9.90-7 [...] - ld -r the whole libpthread.a together to avoid endless issues with -static ... -lpthread Red Hat's patch can be found at: http://cvs.fedoraproject.org/viewvc/rpms/glibc/F-13/glibc.spec?r1=1.380&r2=1.376 But unless I misread the .spec, Jakub just added after the normal build a: pushd $RPM_BUILD_ROOT/usr/%{_lib}/ $GCC -Wl,-r -nostdlib -o libpthread.o -Wl,--whole-archive ./libpthread.a rm libpthread.a ar rcs libpthread.a libpthread.o rm libpthread.o popd Example for static pthread related bugreports in GCC: http://tinyurl.com/35wctls Reproducible: Always -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.