Adjust spec to make -pthread and gcj link to -lpthread on recent

FreeBSD 5.
This commit is contained in:
Michael Nottebrock 2004-11-07 18:20:57 +00:00
parent 373b2bbb8b
commit 7a1c4f0d45
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=121046
3 changed files with 34 additions and 1 deletions

View file

@ -8,7 +8,7 @@
PORTNAME= gcc
PORTVERSION= 3.2.3
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= lang java
MASTER_SITES= ${MASTER_SITE_GCC} \
http://web.inter.NL.net/hcc/Haj.Ten.Brugge/:bc
@ -35,6 +35,10 @@ NOMANCOMPRESS= yes # too hard to deal with differences on 5-cur and releng4
.include <bsd.port.pre.mk>
.if ${OSVERSION} > 502101
EXTRA_PATCHES= ${FILESDIR}/extrapatch-gcc__config__freebsd-spec.h \
${FILESDIR}/extrapatch-libjava__configure
.endif
.if ${ARCH} == "sparc64" || ${ARCH} == "ia64" || ${ARCH} == "amd64"
# libgcj is built on all platforms except sparc64 and ia64 and amd64

View file

@ -0,0 +1,13 @@
--- gcc/config/freebsd-spec.h.orig Sat Nov 6 23:39:36 2004
+++ gcc/config/freebsd-spec.h Sat Nov 6 23:39:59 2004
@@ -132,8 +132,8 @@
#if FBSD_MAJOR >= 5
#define FBSD_LIB_SPEC " \
%{!shared: \
- %{!pg: %{pthread:-lc_r} -lc} \
- %{pg: %{pthread:-lc_r_p} -lc_p} \
+ %{!pg: %{pthread:-lpthread} -lc} \
+ %{pg: %{pthread:-lpthread_p} -lc_p} \
}"
#else
#define FBSD_LIB_SPEC " \

View file

@ -0,0 +1,16 @@
--- libjava/configure.orig Sun Nov 7 17:50:53 2004
+++ libjava/configure Sun Nov 7 17:51:38 2004
@@ -3221,13 +3221,6 @@
# support for weak references to pthread_* functions ala gthr.h API.
THREADSPEC='%{!pthread: %eUnder this configuration, the user must provide -pthread when linking.}'
;;
- *-*-freebsd*)
- # FreeBSD 5 implements a model much closer to other modern UNIX
- # which support threads. However, it still does not support
- # -lpthread.
- THREADLDFLAGS=-pthread
- THREADSPEC=-lc_r
- ;;
*)
THREADLIBS=-lpthread
THREADSPEC=-lpthread