]> rtime.felk.cvut.cz Git - coffee/buildroot.git/commitdiff
erlang: set ERL_TOP to avoid using user's version
authorFrank Hunleth <fhunleth@troodon-software.com>
Sat, 18 Feb 2017 21:01:11 +0000 (16:01 -0500)
committerPeter Korsgaard <peter@korsgaard.com>
Sun, 19 Feb 2017 22:20:43 +0000 (23:20 +0100)
Explicitly set the ERL_TOP environment variable to override values set
on a user's system. This prevents Erlang's configure scripts from
using source files outside of the ones that Buildroot downloaded.

Signed-off-by: Frank Hunleth <fhunleth@troodon-software.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/erlang/erlang.mk

index 3200c388fdece1935f41133fb23e7f9a1eb96447..364085c4dd5c5f1d66d7fd5c646f9afe8acda5b3 100644 (file)
@@ -30,6 +30,12 @@ ERLANG_CONF_ENV += erl_xcomp_sysroot=$(STAGING_DIR)
 
 ERLANG_CONF_OPTS = --without-javac
 
+# Force ERL_TOP to the downloaded source directory. This prevents
+# Erlang's configure script from inadvertantly using files from
+# a version of Erlang installed on the host.
+ERLANG_CONF_ENV += ERL_TOP=$(@D)
+HOST_ERLANG_CONF_ENV += ERL_TOP=$(@D)
+
 # erlang uses openssl for all things crypto. Since the host tools (such as
 # rebar) uses crypto, we need to build host-erlang with support for openssl.
 HOST_ERLANG_DEPENDENCIES = host-openssl