Skip to content

Commit

Permalink
Merge branch 'lukas/ct/fix-ts-cross-guess' into maint
Browse files Browse the repository at this point in the history
* lukas/ct/fix-ts-cross-guess:
  ts: Read configure_flags from xcomp file
  ts: Trim new-line from config.guess
  • Loading branch information
garazdawi committed Nov 4, 2024
2 parents 9529063 + 2c7f82d commit 6307ce2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/common_test/test_server/ts_install.erl
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,17 @@ unix_autoconf(XConf) ->
Env = proplists:get_value(crossenv,XConf,[]),
Host = get_xcomp_flag("host", Flags),
Build = get_xcomp_flag("build", Flags),
ConfigFlags = string:trim(proplists:get_value("configure_flags", Flags, ""),both,"\"")
++ " " ++ os:getenv("CONFIG_FLAGS", ""),
Threads = [" --enable-shlib-thread-safety" ||
erlang:system_info(threads) /= false],
Debug = [" --enable-debug-mode" ||
string:find(erlang:system_info(system_version),"debug") =/= nomatch],
MXX_Build = [[$\s | Y] || Y <- string:lexemes(os:getenv("CONFIG_FLAGS", ""), " \t\n"),
MXX_Build = [[$\s | Y] || Y <- string:lexemes(ConfigFlags, " \t\n"),
Y == "--enable-m64-build"
orelse Y == "--enable-m32-build"
orelse Y == "--disable-year2038"],
Args = Host ++ Build ++ Threads ++ Debug ++ " " ++ MXX_Build,
Args = Host ++ Build ++ Threads ++ Debug ++ MXX_Build,
case filelib:is_file(Configure) of
true ->
OSXEnv = macosx_cflags(),
Expand Down Expand Up @@ -184,7 +186,7 @@ get_xcomp_flag(Flag, Flags) ->
get_xcomp_flag(Flag, Tag, Flags) ->
case proplists:get_value(Flag,Flags) of
undefined -> "";
"guess" -> [" --",Tag,"=",os:cmd("$ERL_TOP/make/autoconf/config.guess")];
"guess" -> [" --",Tag,"=",string:trim(os:cmd("$ERL_TOP/make/autoconf/config.guess"))];
HostVal -> [" --",Tag,"=",HostVal]
end.

Expand Down

0 comments on commit 6307ce2

Please sign in to comment.