diff options
author | is <is@pkgsrc.org> | 2013-12-24 15:00:44 +0000 |
---|---|---|
committer | is <is@pkgsrc.org> | 2013-12-24 15:00:44 +0000 |
commit | 4178d694867442ee2db92393c8d6dd9e594f4809 (patch) | |
tree | 7068f21ca2a2b645bde6c605ee0bb82058e43d76 /lang/erlang | |
parent | 79ee0d03cac3e6c54026342a75b70dbb5849182a (diff) | |
download | pkgsrc-4178d694867442ee2db92393c8d6dd9e594f4809.tar.gz |
From https://github.com/erlang/otp/pull/46#issuecomment-21719585
"Since b29ecbd (OTP-10418, R15B03) Erlang does not compile anymore with
old versions of GCC that do not have atomic ops builtins on platforms
where there is no native ethread implementation (e.g. ARM): (...)
Please note however that I will be merging this branch as well,
which will mean that you have to explicitly tell configure that
you intend to use the fallback atomic operations though
--disable-native-ethr-impls or --disable-smp-require-native-atomics."
Translated: On NetBSD-5.1 (with gcc-4.1.3) the erlang package
didn't compile because of
> ../include/internal/gcc/ethr_membar.h:49:4: error:
> #error "No __sync_val_compare_and_swap"
Adding the abovementioned option --disable-native-ethr-impls make the
Erlang runtime system use the original (now fallback) code. This should
maybe be an pkg option, but for now this has to do.
Diffstat (limited to 'lang/erlang')
-rw-r--r-- | lang/erlang/Makefile | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/lang/erlang/Makefile b/lang/erlang/Makefile index a43f5fe70aa..35449a03b43 100644 --- a/lang/erlang/Makefile +++ b/lang/erlang/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.58 2013/10/18 15:47:49 roy Exp $ +# $NetBSD: Makefile,v 1.59 2013/12/24 15:00:44 is Exp $ DISTNAME= otp_src_${DIST_VERSION_MAJOR}${DIST_VERSION_MINOR:D-${DIST_VERSION_MINOR}} PKGREVISION= 1 @@ -26,6 +26,24 @@ CONFIGURE_ARGS+= --with-ssl=${BUILDLINK_PREFIX.openssl} PTHREAD_OPTS+= require native CONFIGURE_ARGS+= --enable-threads +.include "../../mk/bsd.prefs.mk" + +# have gcc without the necessary atomic ops? +.if !empty(MACHINE_PLATFORM:MNetBSD-5.*) + +# a machine without native ethread implementation? +.if empty(MACHINE_PLATFORM:M*i386) &&\ + empty(MACHINE_PLATFORM:M*sparc) &&\ + empty(MACHINE_PLATFORM:M*sparc64) &&\ + empty(MACHINE_PLATFORM:M*powerpc) &&\ + empty(MACHINE_PLATFORM:M*x86_64) + +CONFIGURE_ARGS+= --disable-native-ethr-impls\ + --disable-smp-require-native-atomics + +.endif +.endif + MAKE_ENV+= DESTDIR=${DESTDIR} REPLACE_INTERPRETER+= escript @@ -52,8 +70,6 @@ REPLACE_PERL+= make/make_emakefile PLIST_SRC= PLIST -.include "../../mk/bsd.prefs.mk" - .if exists(${.CURDIR}/PLIST.${OPSYS}) PLIST_SRC+= ${.CURDIR}/PLIST.${OPSYS} .endif |