pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/lang/erlang From https://github.com/erlang/otp/pull/46...
details: https://anonhg.NetBSD.org/pkgsrc/rev/7fd4386fc561
branches: trunk
changeset: 627955:7fd4386fc561
user: is <is%pkgsrc.org@localhost>
date: Tue Dec 24 15:00:44 2013 +0000
description:
>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:
lang/erlang/Makefile | 22 +++++++++++++++++++---
1 files changed, 19 insertions(+), 3 deletions(-)
diffs (43 lines):
diff -r 6f7233d35daa -r 7fd4386fc561 lang/erlang/Makefile
--- a/lang/erlang/Makefile Tue Dec 24 11:22:42 2013 +0000
+++ b/lang/erlang/Makefile Tue Dec 24 15:00:44 2013 +0000
@@ -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 @@
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 @@
PLIST_SRC= PLIST
-.include "../../mk/bsd.prefs.mk"
-
.if exists(${.CURDIR}/PLIST.${OPSYS})
PLIST_SRC+= ${.CURDIR}/PLIST.${OPSYS}
.endif
Home |
Main Index |
Thread Index |
Old Index