Skip to contentSkip to conversation

erlang: set ERL_TOP to avoid using user's version

PATCH New Frank Hunleth 2 participants 2 messages Feb 18, 2017 – Feb 19, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 erlang: set ERL_TOP to avoid using user's version

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.

---
 package/erlang/erlang.mk | 6 ++++++
 1 file changed, 6 insertions(+)
package/erlang/erlang.mk +6 -0
index 3200c38..364085c 100644
@@ -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
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/1 erlang: set ERL_TOP to avoid using user's version

Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Frank" == Frank Hunleth <[email protected]> writes:

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.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard