diff options
author | Andrew Waterman <andrew@sifive.com> | 2021-07-29 17:42:34 -0700 |
---|---|---|
committer | Andrew Waterman <andrew@sifive.com> | 2021-07-29 17:54:30 -0700 |
commit | 13ce3cb1eedb337eee3f45ffdf2e32332a22d50d (patch) | |
tree | 4d80456ae228f9d8934b312148972d5b75a9f2e4 /configure | |
parent | 74d3e4d771049884c9d7fd414777efacaddf68f5 (diff) | |
download | riscv-isa-sim-13ce3cb1eedb337eee3f45ffdf2e32332a22d50d.zip riscv-isa-sim-13ce3cb1eedb337eee3f45ffdf2e32332a22d50d.tar.gz riscv-isa-sim-13ce3cb1eedb337eee3f45ffdf2e32332a22d50d.tar.bz2 |
Enable precompiled headers when using clangtest
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 77 |
1 files changed, 77 insertions, 0 deletions
@@ -627,6 +627,7 @@ LIBOBJS subprojects_enabled subprojects HAVE_DLOPEN +HAVE_CLANG_PCH HAVE_INT128 INSTALL_DATA INSTALL_SCRIPT @@ -2334,6 +2335,45 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac # =========================================================================== +# https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT]) +# +# DESCRIPTION +# +# Check whether the given FLAG works with the current language's compiler +# or gives an error. (Warnings, however, are ignored) +# +# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on +# success/failure. +# +# If EXTRA-FLAGS is defined, it is added to the current language's default +# flags (e.g. CFLAGS) when the check is done. The check is thus made with +# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to +# force the compiler to issue an error when a bad flag is given. +# +# INPUT gives an alternative input source to AC_COMPILE_IFELSE. +# +# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this +# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG. +# +# LICENSE +# +# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de> +# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com> +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 6 + + +# =========================================================================== # https://www.gnu.org/software/autoconf-archive/ax_check_link_flag.html # =========================================================================== # @@ -4647,6 +4687,43 @@ fi done +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts -relocatable-pch" >&5 +$as_echo_n "checking whether C++ compiler accepts -relocatable-pch... " >&6; } +if ${ax_cv_check_cxxflags___relocatable_pch+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -relocatable-pch" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ax_cv_check_cxxflags___relocatable_pch=yes +else + ax_cv_check_cxxflags___relocatable_pch=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cxxflags___relocatable_pch" >&5 +$as_echo "$ax_cv_check_cxxflags___relocatable_pch" >&6; } +if test "x$ax_cv_check_cxxflags___relocatable_pch" = xyes; then : + HAVE_CLANG_PCH=yes + +else + : +fi + + #------------------------------------------------------------------------- # MCPPBS subproject list #------------------------------------------------------------------------- |