On 06/02/15 16:27, Pascal Stumpf wrote: > On Tue, 02 Jun 2015 16:20:06 +0200, Guenther Niess wrote: > Thanks; this was on my to-do list. I'll test and commit as time > permits. > Meanwhile: Have you verified that this really only works on amd64 > and i386? In any case, omp.h should move to PFRAG.GOMP-main, and the > library version should start at 0.
I followed your advice and updated the patch. So far on my amd64 I haven't noticed any regression (on port building or OpenMP itself) and my small program needs now with multiple threads only half of the time. Regards Index: lang/gcc/4.9/Makefile =================================================================== RCS file: /cvs/ports/lang/gcc/4.9/Makefile,v retrieving revision 1.13 diff -u -p -r1.13 Makefile --- lang/gcc/4.9/Makefile 22 May 2015 11:31:16 -0000 1.13 +++ lang/gcc/4.9/Makefile 5 Jun 2015 06:39:39 -0000 @@ -53,7 +53,8 @@ SHARED_LIBS = estdc++ 17.0 \ itm 2.0 \ atomic 1.0 \ quadmath 1.0 \ - cilkrts 0.0 + cilkrts 0.0 \ + gomp 0.0 PSEUDO_FLAVORS = no_c++ no_f95 no_objc no_java no_ada no_go full @@ -146,7 +147,6 @@ CONFIGURE_ARGS += \ --disable-nls \ --with-system-zlib \ --disable-libmudflap \ - --disable-libgomp \ --disable-tls \ --with-as=/usr/bin/as \ --with-ld=/usr/bin/ld \ @@ -189,6 +189,12 @@ PKG_ARGS += -D${MACHINE_ARCH}=1 PKG_ARGS += -DX86=1 .else PKG_ARGS += -DX86=0 +.endif + +.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" +PKG_ARGS += -DGOMP=1 +.else +PKG_ARGS += -DGOMP=0 .endif .if ${MACHINE_ARCH} == "alpha" || ${MACHINE_ARCH} == "arm" || \ Index: lang/gcc/4.9/pkg/PLIST-libs =================================================================== RCS file: /cvs/ports/lang/gcc/4.9/pkg/PLIST-libs,v retrieving revision 1.2 diff -u -p -r1.2 PLIST-libs --- lang/gcc/4.9/pkg/PLIST-libs 3 Feb 2015 20:32:12 -0000 1.2 +++ lang/gcc/4.9/pkg/PLIST-libs 5 Jun 2015 06:39:39 -0000 @@ -6,5 +6,6 @@ @lib lib/libgfortran.so.${LIBgfortran_VERSION} @lib lib/libobjc.so.${LIBobjc_VERSION} %%CILKRTS%% +%%GOMP%% %%ITM%% %%QUADMATH%% Index: lang/gcc/4.9/pkg/PLIST-main =================================================================== RCS file: /cvs/ports/lang/gcc/4.9/pkg/PLIST-main,v retrieving revision 1.5 diff -u -p -r1.5 PLIST-main --- lang/gcc/4.9/pkg/PLIST-main 10 Feb 2015 22:04:54 -0000 1.5 +++ lang/gcc/4.9/pkg/PLIST-main 5 Jun 2015 06:39:39 -0000 @@ -255,6 +255,7 @@ lib/libssp_nonshared.la %%sparc64%% %%CILKRTS%% %%X86%% +%%GOMP%% %%ITM%% %%QUADMATH%% libexec/gcc/ --- /dev/null Fri Jun 5 08:39:44 2015 +++ lang/gcc/4.9/patches/patch-libgomp_Makefile_in Wed Jun 3 12:30:24 2015 @@ -0,0 +1,22 @@ +$OpenBSD$ +--- libgomp/Makefile.in.orig Wed Jun 3 12:14:58 2015 ++++ libgomp/Makefile.in Wed Jun 3 12:21:30 2015 +@@ -287,6 +287,9 @@ toolexeclibdir = @toolexeclibdir@ + top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ ++ ++include $(top_srcdir)/../libversions ++ + ACLOCAL_AMFLAGS = -I .. -I ../config + SUBDIRS = testsuite + gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER) +@@ -308,7 +311,7 @@ nodist_toolexeclib_HEADERS = libgomp.spec + @LIBGOMP_BUILD_VERSIONED_SHLIB_FALSE@libgomp_version_dep = + @LIBGOMP_BUILD_VERSIONED_SHLIB_GNU_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@libgomp_version_dep = libgomp.ver + @LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@libgomp_version_dep = libgomp.ver-sun +-libgomp_version_info = -version-info $(libtool_VERSION) ++libgomp_version_info = $(LIBgomp_LTVERSION) + libgomp_la_LDFLAGS = $(libgomp_version_info) $(libgomp_version_script) \ + $(lt_host_flags) + --- /dev/null Fri Jun 5 08:39:48 2015 +++ lang/gcc/4.9/pkg/PFRAG.GOMP-libs Tue Jun 2 11:31:25 2015 @@ -0,0 +1,2 @@ +@comment $OpenBSD$ +@lib lib/libgomp.so.${LIBgomp_VERSION} --- /dev/null Fri Jun 5 08:39:51 2015 +++ lang/gcc/4.9/pkg/PFRAG.GOMP-main Wed Jun 3 12:35:05 2015 @@ -0,0 +1,6 @@ +@comment $OpenBSD$ +@info info/libgomp.info +lib/gcc/${CONFIG}/${V}/include/omp.h +lib/libgomp.a +lib/libgomp.la +lib/libgomp.spec