From 8bd34175fc5e13150483a99aac7e44590f4bcbb8 Mon Sep 17 00:00:00 2001 From: John Stebbins Date: Mon, 15 Apr 2019 15:50:16 -0600 Subject: [PATCH] configure: move init of HostTuple after parsing cross --- make/configure.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/make/configure.py b/make/configure.py index 0c92f04e4..d771b89c3 100644 --- a/make/configure.py +++ b/make/configure.py @@ -546,10 +546,10 @@ class BuildTupleProbe( ShellProbe, list ): ############################################################################### class HostTupleAction( Action, list ): - def __init__( self ): + def __init__( self, cross=None ): super( HostTupleAction, self ).__init__( 'compute', 'host tuple', abort=True ) # Initialize, but allow to be reset by options - self.setHost(None) + self.setHost(cross) def setHost( self, cross ): ## check if --cross spec was used; must maintain 5-tuple compatibility with regex @@ -673,6 +673,8 @@ class ArchAction( Action ): ## some match on system should be made here; otherwise we signal a warning. if host_tuple.match( '*-*-cygwin*' ): pass + elif host_tuple.match( '*-*-mingw*' ): + pass elif host_tuple.match( '*-*-darwin11.*' ): self.mode['i386'] = 'i386-apple-darwin%s' % (host_tuple.release) self.mode['x86_64'] = 'x86_64-apple-darwin%s' % (host_tuple.release) @@ -1547,9 +1549,6 @@ try: if build_tuple.match( '*-*-darwin*' ): cfg.xcode_prefix_dir = '/Applications' - host_tuple = HostTupleAction() - arch = ArchAction(); arch.run() - ## create remaining main objects core = CoreProbe() repo = RepoProbe() @@ -1562,8 +1561,8 @@ try: gcc_tools = ['GCC.gcc', os.environ.get('CC', None), 'gcc', - IfHost( 'clang', '*-*-freebsd*' ), - IfHost( 'gcc-4', '*-*-cygwin*' )] + IfBuild( 'clang', '*-*-freebsd*' ), + IfBuild( 'gcc-4', '*-*-cygwin*' )] gcc = ToolProbe(*filter(None, gcc_tools)) if build_tuple.match( '*-*-darwin*' ): @@ -1633,7 +1632,9 @@ try: tool.run() # create CLI and parse - host_tuple.setHost(cross) + host_tuple = HostTupleAction(cross) + arch = ArchAction(); arch.run() + cli = createCLI( cross ) options, args = cli.parse_known_args() -- 2.40.0