# HG changeset patch # User Mike Hommey # Date 1548771449 0 # Node ID 3b0293ddc8eaeb4646c817f148dc9fd3ff1ed8b7 # Parent 9e3d72ea822448e4ea5bce2ad185a5105a90bfdb Bug 1520232 - Preset some of the autoconf config.cache values from python configure. r=froydnj Differential Revision: https://phabricator.services.mozilla.com/D17914 diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolchain.configure --- a/build/moz.configure/toolchain.configure +++ b/build/moz.configure/toolchain.configure @@ -1167,16 +1167,30 @@ def compiler(language, host_or_target, c return compiler # Set CC/CXX/HOST_CC/HOST_CXX for old-configure, which needs the wrapper # and the flags that were part of the user input for those variables to # be provided. add_old_configure_assignment(var, depends_if(valid_compiler)( lambda x: list(x.wrapper) + [x.compiler] + list(x.flags))) + if host_or_target is target: + add_old_configure_assignment('ac_cv_prog_%s' % var, depends_if(valid_compiler)( + lambda x: list(x.wrapper) + [x.compiler] + list(x.flags))) + # We check that it works in python configure already. + add_old_configure_assignment('ac_cv_prog_%s_works' % var.lower(), 'yes') + gcc_like = depends(valid_compiler.type)(lambda x: 'yes' if x in ('gcc', 'clang') else 'no') + add_old_configure_assignment('ac_cv_prog_%s_g' % var.lower(), gcc_like) + if language == 'C': + add_old_configure_assignment('ac_cv_prog_gcc', gcc_like) + add_old_configure_assignment('ac_cv_prog_gcc_traditional', 'no') + if language == 'C++': + add_old_configure_assignment('ac_cv_prog_gxx', gcc_like) + + # Set CC_TYPE/CC_VERSION/HOST_CC_TYPE/HOST_CC_VERSION to allow # old-configure to do some of its still existing checks. if language == 'C': set_config( '%s_TYPE' % var, valid_compiler.type) add_old_configure_assignment( '%s_TYPE' % var, valid_compiler.type) set_config( @@ -1973,16 +1987,17 @@ def as_with_flags(as_info, assembler, pr assert as_info.type == 'gcc' # Need to add compiler wrappers and flags as appropriate. return c_compiler.wrapper + [assembler] + c_compiler.flags add_old_configure_assignment('AS', as_with_flags) +add_old_configure_assignment('ac_cv_prog_AS', as_with_flags) @depends(assembler, c_compiler, extra_toolchain_flags) @imports('subprocess') @imports(_from='os', _import='devnull') def gnu_as(assembler, c_compiler, toolchain_flags): # clang uses a compatible GNU assembler. if c_compiler.type == 'clang':