|
 |
ea4b8c |
From: Peter Lemenkov <lemenkov@gmail.com>
|
|
 |
ea4b8c |
Date: Tue, 16 Apr 2019 16:58:58 +0300
|
|
 |
ea4b8c |
Subject: [PATCH] Don't check for endianness when starting
|
|
 |
ea4b8c |
|
|
 |
ea4b8c |
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
|
|
 |
ea4b8c |
|
|
 |
ea4b8c |
diff --git a/lib/elixir/src/elixir.erl b/lib/elixir/src/elixir.erl
|
|
 |
ea4b8c |
index e0cc49b09..ea68e8ba7 100644
|
|
 |
ea4b8c |
--- a/lib/elixir/src/elixir.erl
|
|
 |
ea4b8c |
+++ b/lib/elixir/src/elixir.erl
|
|
 |
ea4b8c |
@@ -31,7 +31,6 @@ start(_Type, _Args) ->
|
|
 |
ea4b8c |
preload_common_modules(),
|
|
 |
ea4b8c |
set_stdio_and_stderr_to_binary_and_maybe_utf8(),
|
|
 |
ea4b8c |
check_file_encoding(Encoding),
|
|
 |
ea4b8c |
- check_endianness(),
|
|
 |
ea4b8c |
|
|
 |
ea4b8c |
Tokenizer = case code:ensure_loaded('Elixir.String.Tokenizer') of
|
|
 |
ea4b8c |
{module, Mod} -> Mod;
|
|
 |
ea4b8c |
@@ -114,23 +113,6 @@ parse_otp_release() ->
|
|
 |
ea4b8c |
erlang:halt(1)
|
|
 |
ea4b8c |
end.
|
|
 |
ea4b8c |
|
|
 |
ea4b8c |
-check_endianness() ->
|
|
 |
ea4b8c |
- case code:ensure_loaded(?system) of
|
|
 |
ea4b8c |
- {module, ?system} ->
|
|
 |
ea4b8c |
- Endianness = ?system:endianness(),
|
|
 |
ea4b8c |
- case ?system:compiled_endianness() of
|
|
 |
ea4b8c |
- Endianness ->
|
|
 |
ea4b8c |
- ok;
|
|
 |
ea4b8c |
- _ ->
|
|
 |
ea4b8c |
- io:format(standard_error,
|
|
 |
ea4b8c |
- "warning: Elixir is running in a system with a different endianness than the one its "
|
|
 |
ea4b8c |
- "source code was compiled in. Please make sure Elixir and all source files were compiled "
|
|
 |
ea4b8c |
- "in a machine with the same endianness as the current one: ~ts~n", [Endianness])
|
|
 |
ea4b8c |
- end;
|
|
 |
ea4b8c |
- {error, _} ->
|
|
 |
ea4b8c |
- ok
|
|
 |
ea4b8c |
- end.
|
|
 |
ea4b8c |
-
|
|
 |
ea4b8c |
check_file_encoding(Encoding) ->
|
|
 |
ea4b8c |
case Encoding of
|
|
 |
ea4b8c |
latin1 ->
|