- define _REENTRANT, not _POSIX_THREADS for -pthread

- enable thread model posix; bump estdc++ major
- fix manpages: install cpp.1 and gcov.1 with an 'e' prefix, and install
  another copy of gcc.1 as eg++.1 instead of an effectively empty page.

feedback and ok kurt@
This commit is contained in:
pascal 2012-04-23 14:06:42 +00:00
parent 094095fd22
commit 83058afc05
8 changed files with 106 additions and 41 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.55 2012/01/13 00:55:14 naddy Exp $
# $OpenBSD: Makefile,v 1.56 2012/04/23 14:06:42 pascal Exp $
ONLY_FOR_ARCHS = alpha amd64 i386 m68k sparc sparc64 powerpc vax
@ -15,7 +15,7 @@ PKGNAME-g77 = g77-${FULL_PKGVERSION}
PKGNAME-java = gcj-${FULL_PKGVERSION}
PKGNAME-objc = gobjc-${FULL_PKGVERSION}
PKGNAME-ada = gnat-${FULL_PKGVERSION}
SHARED_LIBS = estdc++ 6.0 \
SHARED_LIBS = estdc++ 7.0 \
g2c 1.0 \
-org-w3c-dom 1.0 \
-org-xml-sax 1.0 \
@ -23,13 +23,13 @@ SHARED_LIBS = estdc++ 6.0 \
objc 2.0 \
objc_gc 2.0
REVISION-main = 1
REVISION-c++ = 2
REVISION-main = 2
REVISION-c++ = 3
#REVISION-estdc =
REVISION-g77 = 2
REVISION-java = 2
REVISION-objc = 2
REVISION-ada = 2
REVISION-g77 = 3
REVISION-java = 3
REVISION-objc = 3
REVISION-ada = 3
EPOCH = 0
MAINTAINER = Marc Espie <espie@openbsd.org>
@ -140,10 +140,7 @@ CONFIGURE_ARGS += --enable-sjlj-exceptions
BUILD_DEPENDS += devel/bison
.endif
# if you wish to try your luck
#CONFIGURE_ARGS += --enable-threads=posix
CONFIGURE_ARGS += --enable-threads=posix
CONFIGURE_ARGS += --with-gnu-as
CONFIGURE_ARGS += --with-gnu-ld
CONFIGURE_ARGS += ${CONFIGURE_SHARED}

View File

@ -1,4 +1,4 @@
# $OpenBSD: gcc3.port.mk,v 1.8 2011/11/17 18:03:43 sthen Exp $
# $OpenBSD: gcc3.port.mk,v 1.9 2012/04/23 14:06:42 pascal Exp $
MODGCC3_ARCHS?=
# Supported languages for now
@ -20,7 +20,7 @@ MODGCC3_post-patch+= ln -s ${LOCALBASE}/bin/eg${_MODGCC3CC} ${WRKDIR}/bin/${_MOD
. if !empty(_MODGCC3CXX:L:M${_j})
BUILD_DEPENDS+= g++->=3.3,<3.4|g++->=3.3v0,<3.4v0:lang/gcc/3.3,-c++
LIB_DEPENDS+= libstdc++->=3.3,<3.4|libstdc++->=3.3v0,<3.4v0:lang/gcc/3.3,-estdc
WANTLIB += estdc++=6
WANTLIB += estdc++=7
MODGCC3_post-patch+= ln -s ${LOCALBASE}/bin/e${_MODGCC3CXX} ${WRKDIR}/bin/g++;
MODGCC3_post-patch+= ln -s ${LOCALBASE}/bin/e${_MODGCC3CXX} ${WRKDIR}/bin/${_MODGCC3CXX};
. endif

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-gcc_Makefile_in,v 1.2 2008/07/25 20:50:26 martynas Exp $
--- gcc/Makefile.in.orig Thu Apr 1 19:55:23 2004
+++ gcc/Makefile.in Fri Jul 25 12:34:56 2008
$OpenBSD: patch-gcc_Makefile_in,v 1.3 2012/04/23 14:06:42 pascal Exp $
--- gcc/Makefile.in.orig Thu Apr 1 18:55:23 2004
+++ gcc/Makefile.in Thu Apr 12 18:39:54 2012
@@ -742,7 +742,8 @@ CXX_TARGET_OBJS=@cxx_target_objs@
# Language-specific object files for C and Objective C.
@ -11,13 +11,32 @@ $OpenBSD: patch-gcc_Makefile_in,v 1.2 2008/07/25 20:50:26 martynas Exp $
c-objc-common.o c-dump.o libcpp.a $(C_TARGET_OBJS)
# Language-specific object files for C.
@@ -1269,6 +1270,9 @@ attribs.o : attribs.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H
builtin-types.def $(TARGET_H) langhooks.h
@@ -1271,6 +1272,9 @@ attribs.o : attribs.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H
c-format.o : c-format.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) langhooks.h \
+ $(C_COMMON_H) flags.h toplev.h intl.h diagnostic.h
+
+c-bounded.o : c-bounded.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) langhooks.h \
$(C_COMMON_H) flags.h toplev.h intl.h diagnostic.h
+c-bounded.o : c-bounded.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) langhooks.h \
+ $(C_COMMON_H) flags.h toplev.h intl.h diagnostic.h
+
c-semantics.o : c-semantics.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(C_TREE_H) \
flags.h toplev.h output.h c-pragma.h $(RTL_H) $(GGC_H) \
$(EXPR_H) $(PREDICT_H)
@@ -2903,12 +2907,12 @@ install-man: installdirs $(GENERATED_MANPAGES) lang.in
$(INSTALL_DATA) $(docdir)/gcc.1 $(DESTDIR)$(man1dir)/$(GCC_INSTALL_NAME)$(man1ext); \
chmod a-x $(DESTDIR)$(man1dir)/$(GCC_INSTALL_NAME)$(man1ext); \
fi
- -rm -f $(DESTDIR)$(man1dir)/cpp$(man1ext)
- -$(INSTALL_DATA) $(docdir)/cpp.1 $(DESTDIR)$(man1dir)/cpp$(man1ext)
- -chmod a-x $(DESTDIR)$(man1dir)/cpp$(man1ext)
- -rm -f $(DESTDIR)$(man1dir)/gcov$(man1ext)
- -$(INSTALL_DATA) $(docdir)/gcov.1 $(DESTDIR)$(man1dir)/gcov$(man1ext)
- -chmod a-x $(DESTDIR)$(man1dir)/gcov$(man1ext)
+ -rm -f $(DESTDIR)$(man1dir)/$(CPP_INSTALL_NAME)$(man1ext)
+ -$(INSTALL_DATA) $(docdir)/cpp.1 $(DESTDIR)$(man1dir)/$(CPP_INSTALL_NAME)$(man1ext)
+ -chmod a-x $(DESTDIR)$(man1dir)/$(CPP_INSTALL_NAME)$(man1ext)
+ -rm -f $(DESTDIR)$(man1dir)/$(GCOV_INSTALL_NAME)$(man1ext)
+ -$(INSTALL_DATA) $(docdir)/gcov.1 $(DESTDIR)$(man1dir)/$(GCOV_INSTALL_NAME)$(man1ext)
+ -chmod a-x $(DESTDIR)$(man1dir)/$(GCOV_INSTALL_NAME)$(man1ext)
-rm -f $(DESTDIR)$(man7dir)/fsf-funding$(man7ext)
-$(INSTALL_DATA) $(docdir)/fsf-funding.7 $(DESTDIR)$(man7dir)/fsf-funding$(man7ext)
-chmod a-x $(DESTDIR)$(man7dir)/fsf-funding$(man7ext)

View File

@ -1,6 +1,15 @@
$OpenBSD: patch-gcc_config_m68k_openbsd_h,v 1.1 2006/01/13 20:07:53 espie Exp $
--- gcc/config/m68k/openbsd.h.orig Fri Jan 13 20:44:48 2006
+++ gcc/config/m68k/openbsd.h Fri Jan 13 20:44:58 2006
$OpenBSD: patch-gcc_config_m68k_openbsd_h,v 1.2 2012/04/23 14:06:42 pascal Exp $
--- gcc/config/m68k/openbsd.h.orig Mon Oct 21 00:37:11 2002
+++ gcc/config/m68k/openbsd.h Thu Apr 12 14:44:33 2012
@@ -31,7 +31,7 @@ Boston, MA 02111-1307, USA. */
/* Define __HAVE_68881__ in preprocessor, unless -msoft-float is specified.
This will control the use of inline 68881 insns in certain macros. */
#undef CPP_SPEC
-#define CPP_SPEC "%{!msoft-float:-D__HAVE_68881__ -D__HAVE_FPU__} %{posix:-D_POSIX_SOURCE} %{pthread:-D_POSIX_THREADS}"
+#define CPP_SPEC "%{!msoft-float:-D__HAVE_68881__ -D__HAVE_FPU__} %{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
/* Run-time target specifications. */
#define CPP_PREDEFINES "-D__unix__ -D__m68k__ -D__mc68000__ -D__mc68020__ -D__OpenBSD__ -Asystem=unix -Asystem=OpenBSD -Acpu=m68k -Amachine=m68k"
@@ -42,12 +42,12 @@ Boston, MA 02111-1307, USA. */
/* Layout of source language data types. */

View File

@ -1,7 +1,12 @@
$OpenBSD: patch-gcc_config_m88k_openbsd_h,v 1.1 2006/01/13 20:07:53 espie Exp $
--- gcc/config/m88k/openbsd.h.orig Fri Jan 13 20:45:07 2006
+++ gcc/config/m88k/openbsd.h Fri Jan 13 20:45:21 2006
@@ -39,12 +39,12 @@ Boston, MA 02111-1307, USA. */
$OpenBSD: patch-gcc_config_m88k_openbsd_h,v 1.2 2012/04/23 14:06:42 pascal Exp $
--- gcc/config/m88k/openbsd.h.orig Wed Feb 27 19:47:38 2002
+++ gcc/config/m88k/openbsd.h Thu Apr 12 14:44:55 2012
@@ -35,16 +35,16 @@ Boston, MA 02111-1307, USA. */
%{!m88000:%{!m88100:%{m88110:-D__mc88110__}}} \
%{!m88000:%{!m88110:-D__mc88100__ -D__mc88100}} \
%{posix:-D_POSIX_SOURCE} \
- %{pthread:-D_POSIX_THREADS}"
+ %{pthread:-D_REENTRANT}"
/* Layout of source language data types. */

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-gcc_config_openbsd_h,v 1.1.1.1 2005/01/03 15:21:26 espie Exp $
$OpenBSD: patch-gcc_config_openbsd_h,v 1.2 2012/04/23 14:06:42 pascal Exp $
--- gcc/config/openbsd.h.orig Tue Nov 26 05:54:46 2002
+++ gcc/config/openbsd.h Mon Jan 3 10:17:43 2005
+++ gcc/config/openbsd.h Thu Apr 12 17:42:38 2012
@@ -52,20 +52,20 @@ Boston, MA 02111-1307, USA. */
#ifdef OPENBSD_NATIVE
@ -26,7 +26,7 @@ $OpenBSD: patch-gcc_config_openbsd_h,v 1.1.1.1 2005/01/03 15:21:26 espie Exp $
#define STANDARD_STARTFILE_PREFIX "/usr/lib/"
#endif
@@ -73,8 +73,39 @@ Boston, MA 02111-1307, USA. */
@@ -73,22 +73,48 @@ Boston, MA 02111-1307, USA. */
/* Controlling the compilation driver. */
@ -67,8 +67,12 @@ $OpenBSD: patch-gcc_config_openbsd_h,v 1.1.1.1 2005/01/03 15:21:26 espie Exp $
since all code must be compiled with -pthread to work.
This two-stage defines makes it easy to pick that for targets that
have subspecs. */
@@ -84,11 +115,6 @@ Boston, MA 02111-1307, USA. */
#define OBSD_CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_POSIX_THREADS}"
#ifdef CPP_CPU_SPEC
-#define OBSD_CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} %{pthread:-D_POSIX_THREADS}"
+#define OBSD_CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
#else
-#define OBSD_CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_POSIX_THREADS}"
+#define OBSD_CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
#endif
-/* LIB_SPEC appropriate for OpenBSD. Select the appropriate libc,
@ -90,7 +94,17 @@ $OpenBSD: patch-gcc_config_openbsd_h,v 1.1.1.1 2005/01/03 15:21:26 espie Exp $
#undef LIB_SPEC
#define LIB_SPEC OBSD_LIB_SPEC
#endif
@@ -289,3 +319,11 @@ do { \
@@ -279,13 +309,17 @@ do { \
/* Storage layout. */
-/* Otherwise, since we support weak, gthr.h erroneously tries to use
- #pragma weak. */
-#define GTHREAD_USE_WEAK 0
-
/* bug work around: we don't want to support #pragma weak, but the current
code layout needs HANDLE_PRAGMA_WEAK asserted for __attribute((weak)) to
work. On the other hand, we don't define HANDLE_PRAGMA_WEAK directly,
as this depends on a few other details as well... */
#define HANDLE_SYSV_PRAGMA 1

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-gcc_cp_Make-lang_in,v 1.1.1.1 2005/01/03 15:21:26 espie Exp $
$OpenBSD: patch-gcc_cp_Make-lang_in,v 1.2 2012/04/23 14:06:42 pascal Exp $
--- gcc/cp/Make-lang.in.orig Sat May 8 23:52:43 2004
+++ gcc/cp/Make-lang.in Mon Jan 3 10:17:44 2005
+++ gcc/cp/Make-lang.in Thu Apr 12 19:11:22 2012
@@ -78,8 +78,8 @@ g++-cross$(exeext): g++$(exeext)
# The compiler itself.
@ -12,3 +12,24 @@ $OpenBSD: patch-gcc_cp_Make-lang_in,v 1.1.1.1 2005/01/03 15:21:26 espie Exp $
# Language-specific object files.
CXX_OBJS = cp/call.o cp/decl.o cp/expr.o cp/pt.o cp/typeck2.o \
@@ -173,15 +173,17 @@ c++.install-common: installdirs
c++.install-info:
-c++.install-man: installdirs $(srcdir)/cp/g++.1
+docdir = $(srcdir)/doc
+
+c++.install-man: installdirs $(docdir)/gcc.1
-if [ -f cc1plus$(exeext) ] ; then \
if [ -f g++-cross$(exeext) ] ; then \
rm -f $(DESTDIR)$(man1dir)/$(GXX_CROSS_NAME)$(man1ext); \
- $(INSTALL_DATA) $(srcdir)/cp/g++.1 $(DESTDIR)$(man1dir)/$(GXX_CROSS_NAME)$(man1ext); \
+ $(INSTALL_DATA) $(docdir)/gcc.1 $(DESTDIR)$(man1dir)/$(GXX_CROSS_NAME)$(man1ext); \
chmod a-x $(DESTDIR)$(man1dir)/$(GXX_CROSS_NAME)$(man1ext); \
else \
rm -f $(DESTDIR)$(man1dir)/$(GXX_INSTALL_NAME)$(man1ext); \
- $(INSTALL_DATA) $(srcdir)/cp/g++.1 $(DESTDIR)$(man1dir)/$(GXX_INSTALL_NAME)$(man1ext); \
+ $(INSTALL_DATA) $(docdir)/gcc.1 $(DESTDIR)$(man1dir)/$(GXX_INSTALL_NAME)$(man1ext); \
chmod a-x $(DESTDIR)$(man1dir)/$(GXX_INSTALL_NAME)$(man1ext); \
fi; \
else true; fi

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST-main,v 1.2 2008/09/11 19:22:05 martynas Exp $
@comment $OpenBSD: PLIST-main,v 1.3 2012/04/23 14:06:42 pascal Exp $
@conflict egcs-*-core
@pkgpath lang/gcc/3.3
@pkgpath lang/egcs/stable
@ -33,9 +33,9 @@ lib/gcc-lib/${CONFIG}/${V}/install-tools/mkheaders.conf
lib/gcc-lib/${CONFIG}/${V}/libgcc.a
lib/gcc-lib/${CONFIG}/${V}/specs
@comment lib/libiberty.a
@man man/man1/cpp.1
@man man/man1/ecpp.1
@man man/man1/egcc.1
@man man/man1/gcov.1
@man man/man1/egcov.1
%%PIC%%
%%PPC%%
@comment @man man/man7/fsf-funding.7