From 2962528b4accdf1d0c2b219568c4ef115f78a503 Mon Sep 17 00:00:00 2001 From: Kai Luo Date: Wed, 13 Sep 2023 15:04:34 +0800 Subject: [PATCH 1/4] Make AIX known by bootstrap --- src/bootstrap/bootstrap.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index e4c7622645402..bc8b5326d8d07 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -312,6 +312,8 @@ def default_build_triple(verbose): # non-standard string (e.g. gnuwin32 tools returns `windows32`). In # these cases, fall back to using sys.platform. return 'x86_64-pc-windows-msvc' + elif kernel == 'AIX': + return 'powerpc64-ibm-aix' else: err = "unknown OS type: {}".format(kernel) sys.exit(err) From fc17e09029a4f01fb59778e8575faa99a08f289a Mon Sep 17 00:00:00 2001 From: Kai Luo Date: Wed, 13 Sep 2023 16:05:50 +0800 Subject: [PATCH 2/4] Add comment to elaborate --- src/bootstrap/bootstrap.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index bc8b5326d8d07..eca3a522f80b5 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -313,6 +313,12 @@ def default_build_triple(verbose): # these cases, fall back to using sys.platform. return 'x86_64-pc-windows-msvc' elif kernel == 'AIX': + # `uname -m` returns the machine ID rather than machine hardware on AIX, + # so we are unable to use cputype to form triple. Since AIX 7.2 and + # above supports 32-bit and 64-bit mode simultaneously and `uname -p` + # returns `powerpc`. Currently we only supports `powerpc64-ibm-aix` in + # rust. For above reasons, kerneltype_mapper and cputype_mapper are not + # used to infer AIX's triple. return 'powerpc64-ibm-aix' else: err = "unknown OS type: {}".format(kernel) From 5049a7167ca51be7f9bfbcf2f75eb9061722860b Mon Sep 17 00:00:00 2001 From: Kai Luo Date: Wed, 13 Sep 2023 16:08:23 +0800 Subject: [PATCH 3/4] Adjust comment --- src/bootstrap/bootstrap.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index eca3a522f80b5..6e0326a7d10c2 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -317,8 +317,8 @@ def default_build_triple(verbose): # so we are unable to use cputype to form triple. Since AIX 7.2 and # above supports 32-bit and 64-bit mode simultaneously and `uname -p` # returns `powerpc`. Currently we only supports `powerpc64-ibm-aix` in - # rust. For above reasons, kerneltype_mapper and cputype_mapper are not - # used to infer AIX's triple. + # rust on AIX. For above reasons, kerneltype_mapper and cputype_mapper + # are not used to infer AIX's triple. return 'powerpc64-ibm-aix' else: err = "unknown OS type: {}".format(kernel) From 122d1cc8c332b4dd176e1475a063688e73d95168 Mon Sep 17 00:00:00 2001 From: Kai Luo Date: Wed, 13 Sep 2023 16:10:26 +0800 Subject: [PATCH 4/4] Adjust comment --- src/bootstrap/bootstrap.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index 6e0326a7d10c2..a9aa7524e8bc7 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -314,9 +314,9 @@ def default_build_triple(verbose): return 'x86_64-pc-windows-msvc' elif kernel == 'AIX': # `uname -m` returns the machine ID rather than machine hardware on AIX, - # so we are unable to use cputype to form triple. Since AIX 7.2 and + # so we are unable to use cputype to form triple. AIX 7.2 and # above supports 32-bit and 64-bit mode simultaneously and `uname -p` - # returns `powerpc`. Currently we only supports `powerpc64-ibm-aix` in + # returns `powerpc`, however we only supports `powerpc64-ibm-aix` in # rust on AIX. For above reasons, kerneltype_mapper and cputype_mapper # are not used to infer AIX's triple. return 'powerpc64-ibm-aix'