Bug 62300 - gcc/config/freebsd-spec.h 1.6 is incomplete
Summary: gcc/config/freebsd-spec.h 1.6 is incomplete
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-03 06:50 UTC by marka
Modified: 2006-06-03 06:12 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description marka 2004-02-03 06:50:14 UTC
	
	The change to src/contrib/gcc/config/freebsd-spec.h 1.16
	is not complete.  gcc built against 1.16 will not link
	code in 5.2 if -pthread is specified as -lpthread does not
	exist.

Fix: 

Add an additional __FreeBSD_version test

	#if __FreeBSD_version > 502000
	#define FBSD_LIB_SPEC "				\
	  %{!shared:					\
	    %{!pg: %{pthread:-lpthread} -lc}		\
	    %{pg:  %{pthread:-lpthread_p} -lc_p}	\
	  }"
	#elif __FreeBSD_version >= 500016
	#define FBSD_LIB_SPEC "				\
	  %{!shared:					\
	    %{!pg: %{pthread:-lc_r} -lc}		\
	    %{pg:  %{pthread:-lc_r_p} -lc_p}		\
	  }"
	#else
How-To-Repeat: 	
	by inspection
Comment 1 Craig Rodrigues freebsd_committer freebsd_triage 2006-06-03 06:06:14 UTC
State Changed
From-To: open->closed

libpthread exists in FreeBSD 5.x where x > 2, so this bug is not relevant 
anymore.