From: Luke Kenneth Casson Leighton Date: Thu, 2 Sep 2021 20:47:37 +0000 (+0100) Subject: detect native ppc64le X-Git-Tag: xlen-bcd~31 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5af715b161e8fe50e7bb26ce74244090a48628a8;p=openpower-isa.git detect native ppc64le --- diff --git a/src/openpower/simulator/envcmds.py b/src/openpower/simulator/envcmds.py index e6525c08..dd0e6039 100644 --- a/src/openpower/simulator/envcmds.py +++ b/src/openpower/simulator/envcmds.py @@ -1,9 +1,15 @@ import os +import platform # set up environment variable overrides, can use for different versions -# as well as native (TALOS-II POWER9) builds. +# as well as native (TALOS-II POWER9) builds. detects ppc64le and +# assumes "native" cmds = {} for cmd in ['objcopy', 'as', 'ld', 'gcc', 'ar', 'gdb']: - cmds[cmd] = os.environ.get(cmd.upper(), "powerpc64-linux-gnu-%s" % cmd) + if platform.machine() == 'ppc64le': + default = cmd + else: + default = "powerpc64-linux-gnu-%s" % cmd + cmds[cmd] = os.environ.get(cmd.upper(), actual)