Skip to content

Commit e1910ef

Browse files
richardlauBethGriggs
authored andcommitted
build: fix host_arch_cc() for AIX/IBM i
The AIX/IBM i branch in `host_arch_cc()` that hardcodes the compiler executable to `gcc` precludes picking up either `CC_host` or `CC` environment variables (if set) as is done on other platforms. On an AIX/IBM i platform where the compiler is, e.g. `gcc-10` instead of just `gcc`, the current check will fail to detect the host architecture and incorrectly default to `ia32`. Removing the AIX/IBM i specific branch will follow the same logic as on the other platforms: 1. The value, if set, of the `CC_host` environment variable. 2. Otherwise, if set, the value of the `CC` environment variable. 3. `gcc` (`cc` if on macOS). PR-URL: #39481 Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Ash Cripps <acripps@redhat.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Michael Dawson <midawson@redhat.com>
1 parent 039f64f commit e1910ef

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

configure.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1050,12 +1050,7 @@ def is_arm_hard_float_abi():
10501050
def host_arch_cc():
10511051
"""Host architecture check using the CC command."""
10521052

1053-
if sys.platform.startswith('aix'):
1054-
# we only support gcc at this point and the default on AIX
1055-
# would be xlc so hard code gcc
1056-
k = cc_macros('gcc')
1057-
else:
1058-
k = cc_macros(os.environ.get('CC_host'))
1053+
k = cc_macros(os.environ.get('CC_host'))
10591054

10601055
matchup = {
10611056
'__aarch64__' : 'arm64',

0 commit comments

Comments
 (0)