diff options
author | Florian Weimer <fweimer@redhat.com> | 2016-09-21 10:45:32 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2016-09-21 10:45:32 +0200 |
commit | fc3e1337be1c6935ab58bd13520f97a535cf70cc (patch) | |
tree | 05a5860b2b10ad95a4ae6b23012a3019d8830f84 /configure | |
parent | 612148c6608fb2df34a8d01ccb3b552cd63eb263 (diff) | |
download | glibc-fc3e1337be1c6935ab58bd13520f97a535cf70cc.zip glibc-fc3e1337be1c6935ab58bd13520f97a535cf70cc.tar.gz glibc-fc3e1337be1c6935ab58bd13520f97a535cf70cc.tar.bz2 |
Avoid running $(CXX) during build to obtain header file paths
This reduces the build time somewhat and is particularly noticeable
during rebuilds with few code changes.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -635,6 +635,8 @@ BISON INSTALL_INFO PERL BASH_SHELL +CXX_CMATH_HEADER +CXX_CSTDLIB_HEADER CXX_SYSINCLUDES SYSINCLUDES AUTOCONF @@ -5054,6 +5056,18 @@ fi +# Obtain some C++ header file paths. This is used to make a local +# copy of those headers in Makerules. +if test -n "$CXX"; then + find_cxx_header () { + echo "#include <$1>" | $CXX -M -MP -x c++ - | sed -n "/$1:/{s/:\$//;p}" + } + CXX_CSTDLIB_HEADER="$(find_cxx_header cstdlib)" + CXX_CMATH_HEADER="$(find_cxx_header cmath)" +fi + + + # Test if LD_LIBRARY_PATH contains the notation for the current directory # since this would lead to problems installing/building glibc. # LD_LIBRARY_PATH contains the current directory if one of the following |