aboutsummaryrefslogtreecommitdiff
path: root/package/erlang/0001-build-fix.patch
diff options
context:
space:
mode:
authorGravatar Yann E. MORIN <yann.morin.1998@free.fr>2015-01-04 15:17:14 +0100
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2015-01-04 21:26:07 +0100
commit4a9df2942470241d7a96f326f0e7012aacd36f2e (patch)
tree61be751657e2ff0c280b75a82c0eb17c17e0e2e6 /package/erlang/0001-build-fix.patch
parent4dc54da061b27379adb9728bf337ab07b2daefe2 (diff)
downloadbuildroot-4a9df2942470241d7a96f326f0e7012aacd36f2e.tar.gz
buildroot-4a9df2942470241d7a96f326f0e7012aacd36f2e.tar.bz2
package/erlang: fix detection of libatomic_ops
For some platforms, hardware-assisted compare-and-swap may not be available, so libatomic_ops will not provide it. However, libatomic_ops can provide a purely software CAS emulation, but must be instructed to do so. erlang just forgot to tell libatomic_ops that it does require CAS. Fix that by defining AO_REQUIRE_CAS before including atmoic_ops.h, like is done in libunwind, as pointed out by Thomas. Also, erlang has a convoluted, mind-alterating set on aclocal.m4 macros, that just forgets to link against -latomic_ops when checking CAS is available, so that even if CAS is available, configure chokes. Since I would like to keep the little sanity I still have, just force linking with -latomic_ops. This is useless when the check is natrally sucessful (i.e. on platforms where CAS is available in HW), but we would eventually link with -latomic_ops there, too; it's just redundant. Overall, just consider that erlang requires libatomic_ops, so forcibly depend on it, it is easier than trying to disable it. We can revisit that whenever someone wants to run erlang on a platform for which there is no libatomic_ops support. Fixes a slew of autobuild ARM failures: http://autobuild.buildroot.org/results/e7b/e7bfc4893dea6b133f0794ef44d50ad89bcb6662/ http://autobuild.buildroot.org/results/3e9/3e9c307f1ec6536482641019dcaa94677f7267a3/ http://autobuild.buildroot.org/results/a85/a85ca414e5b67af46510abd7b610eb5ae8661de4/ [...] [Thomas: fix minor typos in commit log, add dependency on BR2_PACKAGE_LIBATOMIC_ARCH_SUPPORTS to the Erlang comment about thread and shared library dependency.] Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Frank Hunleth <fhunleth@troodon-software.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/erlang/0001-build-fix.patch')
-rw-r--r--package/erlang/0001-build-fix.patch13
1 files changed, 13 insertions, 0 deletions
diff --git a/package/erlang/0001-build-fix.patch b/package/erlang/0001-build-fix.patch
new file mode 100644
index 0000000000..ff821c9fc0
--- /dev/null
+++ b/package/erlang/0001-build-fix.patch
@@ -0,0 +1,13 @@
+apply-patches.sh deletes this file from the source directory.
+
+--- erlang-R15B01.old/lib/tools/emacs/Makefile 2012-04-04
++++ erlang-R15B01/lib/tools/emacs/Makefile 2012-04-04 15:55:16.978957307 +0100
+@@ -51,7 +51,7 @@
+
+ ELC_FILES = $(EMACS_FILES:%=%.elc)
+
+-TEST_FILES = test.erl.indented test.erl.orig
++TEST_FILES = test.erl.indented
+
+ # ----------------------------------------------------
+ # Targets