Bug 23162

Summary: threaded perl incorrectly suggests -lc when using embedded perl
Product: Base System Reporter: Jonathan Chen <jon>
Component: miscAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description Jonathan Chen freebsd_committer freebsd_triage 2000-11-28 21:30:01 UTC
When perl with thread support is enabled, using "perl -MExtUtils::Embed
-e ldopts" outputs a suggestion for linker options with -lc as one of
the libraries. This is incorrect.  Linking stuff with both -pthreads and
-lc results in the program segfaulting when dup2() (and I'm sure other
functions as well) is invoked.

Fix: 

remove the -lc from the libs= line in the files
src/gnu/usr.bin/perl/libperl/config.SH-threads*
Or, alternatively, change -lc to -lc_r

(Also, note that the "Target system" comment is slightly out of date for
many config files in that directory on both current and stable.  Perhaps
it'll be easy to just say FreeBSD?)
How-To-Repeat: 
make world with PERL_THREADED enabled, then make the news/inn
port.  innd when started will segfault while doing a dup2().
Comment 1 dd freebsd_committer freebsd_triage 2001-06-01 03:49:54 UTC
State Changed
From-To: open->closed

Threaded perl is no longer supported.