From: Bernd Edlinger Date: Fri, 28 Apr 2017 20:15:00 +0000 (+0000) Subject: configure.ac (SYSTEM_HEADER_DIR, [...]): Set correctly. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0c90d48b346dfd6d41ceebaa58f2dd67c8fc5993;p=gcc.git configure.ac (SYSTEM_HEADER_DIR, [...]): Set correctly. 2017-04-28 Bernd Edlinger * configure.ac (SYSTEM_HEADER_DIR, BUILD_SYSTEM_HEADER_DIR, target_header_dir): Set correctly. * configure: Regenerated. * Makefile.in (BUILD_SYSTEM_HEADER_DIR): New make variabe. (LIMITS_H_TEST, if_multiarch, stmp-fixinc): Use BUILD_SYSTEM_HEADER_DIR instead of SYSTEM_HEADER_DIR. From-SVN: r247397 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 977517eabd8..9f885b429de 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2017-04-28 Bernd Edlinger + + * configure.ac (SYSTEM_HEADER_DIR, BUILD_SYSTEM_HEADER_DIR, + target_header_dir): Set correctly. + * configure: Regenerated. + * Makefile.in (BUILD_SYSTEM_HEADER_DIR): New make variabe. + (LIMITS_H_TEST, if_multiarch, stmp-fixinc): Use BUILD_SYSTEM_HEADER_DIR + instead of SYSTEM_HEADER_DIR. + 2017-04-28 Jan Hubicka * ipa-cp.c (perform_estimation_of_a_value): Turn time to sreal. diff --git a/gcc/Makefile.in b/gcc/Makefile.in index f675e073ecc..2411671cea3 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -517,11 +517,14 @@ CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@ # macro is also used in a double-quoted context. SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e 's,[^/]*/\.\.\/,,' -e ta` +# Path to the system headers on the build machine. +BUILD_SYSTEM_HEADER_DIR = `echo @BUILD_SYSTEM_HEADER_DIR@ | sed -e :a -e 's,[^/]*/\.\.\/,,' -e ta` + # Control whether to run fixincludes. STMP_FIXINC = @STMP_FIXINC@ # Test to see whether exists in the system header files. -LIMITS_H_TEST = [ -f $(SYSTEM_HEADER_DIR)/limits.h ] +LIMITS_H_TEST = [ -f $(BUILD_SYSTEM_HEADER_DIR)/limits.h ] # Directory for prefix to system directories, for # each of $(system_prefix)/usr/include, $(system_prefix)/usr/lib, etc. @@ -572,7 +575,7 @@ ifeq ($(enable_multiarch),yes) else ifeq ($(enable_multiarch),auto) # SYSTEM_HEADER_DIR is makefile syntax, cannot be evaluated in configure.ac - if_multiarch = $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib/*/crti.o),$(1)) + if_multiarch = $(if $(wildcard $(shell echo $(BUILD_SYSTEM_HEADER_DIR))/../../usr/lib/*/crti.o),$(1)) else if_multiarch = endif @@ -2993,11 +2996,11 @@ stmp-fixinc: gsyslimits.h macro_list fixinc_list \ sysroot_headers_suffix=`echo $${ml} | sed -e 's/;.*$$//'`; \ multi_dir=`echo $${ml} | sed -e 's/^[^;]*;//'`; \ fix_dir=include-fixed$${multi_dir}; \ - if ! $(inhibit_libc) && test ! -d ${SYSTEM_HEADER_DIR}; then \ + if ! $(inhibit_libc) && test ! -d ${BUILD_SYSTEM_HEADER_DIR}; then \ echo The directory that should contain system headers does not exist: >&2 ; \ - echo " ${SYSTEM_HEADER_DIR}" >&2 ; \ + echo " ${BUILD_SYSTEM_HEADER_DIR}" >&2 ; \ tooldir_sysinc=`echo "${gcc_tooldir}/sys-include" | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`; \ - if test "x${SYSTEM_HEADER_DIR}" = "x$${tooldir_sysinc}"; \ + if test "x${BUILD_SYSTEM_HEADER_DIR}" = "x$${tooldir_sysinc}"; \ then sleep 1; else exit 1; fi; \ fi; \ $(mkinstalldirs) $${fix_dir}; \ @@ -3008,7 +3011,7 @@ stmp-fixinc: gsyslimits.h macro_list fixinc_list \ export TARGET_MACHINE srcdir SHELL MACRO_LIST && \ cd $(build_objdir)/fixincludes && \ $(SHELL) ./fixinc.sh "$${gcc_dir}/$${fix_dir}" \ - $(SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS) ); \ + $(BUILD_SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS) ); \ rm -f $${fix_dir}/syslimits.h; \ if [ -f $${fix_dir}/limits.h ]; then \ mv $${fix_dir}/limits.h $${fix_dir}/syslimits.h; \ diff --git a/gcc/configure b/gcc/configure index ea73b151a4e..bde3dd8f77a 100755 --- a/gcc/configure +++ b/gcc/configure @@ -719,6 +719,7 @@ BUILD_CFLAGS CXX_FOR_BUILD CC_FOR_BUILD inhibit_libc +BUILD_SYSTEM_HEADER_DIR SYSTEM_HEADER_DIR ALL CROSS @@ -12214,41 +12215,29 @@ done CROSS= ALL=all.internal SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)' +BUILD_SYSTEM_HEADER_DIR=$SYSTEM_HEADER_DIR -if test "x$with_build_sysroot" != x; then - build_system_header_dir=$with_build_sysroot'$${sysroot_headers_suffix}$(NATIVE_SYSTEM_HEADER_DIR)' -else - # This value is used, even on a native system, because - # CROSS_SYSTEM_HEADER_DIR is just - # $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR). - build_system_header_dir='$(CROSS_SYSTEM_HEADER_DIR)' -fi +if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x || + test x$build != x$host || test "x$with_build_sysroot" != x; then + if test "x$with_build_sysroot" != x; then + BUILD_SYSTEM_HEADER_DIR=$with_build_sysroot'$${sysroot_headers_suffix}$(NATIVE_SYSTEM_HEADER_DIR)' + else + BUILD_SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)' + fi -if test x$host != x$target -then - CROSS="-DCROSS_DIRECTORY_STRUCTURE" - ALL=all.cross - SYSTEM_HEADER_DIR=$build_system_header_dir - case $target in - *-*-mingw*) - if test "x$with_headers" = x; then - with_headers=yes - fi - ;; - *) - ;; - esac -elif test "x$TARGET_SYSTEM_ROOT" != x; then - SYSTEM_HEADER_DIR=$build_system_header_dir -fi + if test x$host != x$target + then + CROSS="-DCROSS_DIRECTORY_STRUCTURE" + ALL=all.cross + SYSTEM_HEADER_DIR=$BUILD_SYSTEM_HEADER_DIR + elif test "x$TARGET_SYSTEM_ROOT" != x; then + SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)' + fi -if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then - if test "x$with_headers" != x && test "x$with_headers" != xyes; then - target_header_dir=$with_headers + if test "x$with_build_sysroot" != "x"; then + target_header_dir="${with_build_sysroot}${native_system_header_dir}" elif test "x$with_sysroot" = x; then target_header_dir="${test_exec_prefix}/${target_noncanonical}/sys-include" - elif test "x$with_build_sysroot" != "x"; then - target_header_dir="${with_build_sysroot}${native_system_header_dir}" elif test "x$with_sysroot" = xyes; then target_header_dir="${test_exec_prefix}/${target_noncanonical}/sys-root${native_system_header_dir}" else @@ -18433,7 +18422,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 18436 "configure" +#line 18425 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -18539,7 +18528,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 18542 "configure" +#line 18531 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/gcc/configure.ac b/gcc/configure.ac index 9d4c792a33f..8b6a2ed3e20 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -1998,41 +1998,29 @@ done CROSS= AC_SUBST(CROSS) ALL=all.internal AC_SUBST(ALL) SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)' AC_SUBST(SYSTEM_HEADER_DIR) +BUILD_SYSTEM_HEADER_DIR=$SYSTEM_HEADER_DIR AC_SUBST(BUILD_SYSTEM_HEADER_DIR) -if test "x$with_build_sysroot" != x; then - build_system_header_dir=$with_build_sysroot'$${sysroot_headers_suffix}$(NATIVE_SYSTEM_HEADER_DIR)' -else - # This value is used, even on a native system, because - # CROSS_SYSTEM_HEADER_DIR is just - # $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR). - build_system_header_dir='$(CROSS_SYSTEM_HEADER_DIR)' -fi +if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x || + test x$build != x$host || test "x$with_build_sysroot" != x; then + if test "x$with_build_sysroot" != x; then + BUILD_SYSTEM_HEADER_DIR=$with_build_sysroot'$${sysroot_headers_suffix}$(NATIVE_SYSTEM_HEADER_DIR)' + else + BUILD_SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)' + fi -if test x$host != x$target -then - CROSS="-DCROSS_DIRECTORY_STRUCTURE" - ALL=all.cross - SYSTEM_HEADER_DIR=$build_system_header_dir - case $target in - *-*-mingw*) - if test "x$with_headers" = x; then - with_headers=yes - fi - ;; - *) - ;; - esac -elif test "x$TARGET_SYSTEM_ROOT" != x; then - SYSTEM_HEADER_DIR=$build_system_header_dir -fi + if test x$host != x$target + then + CROSS="-DCROSS_DIRECTORY_STRUCTURE" + ALL=all.cross + SYSTEM_HEADER_DIR=$BUILD_SYSTEM_HEADER_DIR + elif test "x$TARGET_SYSTEM_ROOT" != x; then + SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)' + fi -if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then - if test "x$with_headers" != x && test "x$with_headers" != xyes; then - target_header_dir=$with_headers + if test "x$with_build_sysroot" != "x"; then + target_header_dir="${with_build_sysroot}${native_system_header_dir}" elif test "x$with_sysroot" = x; then target_header_dir="${test_exec_prefix}/${target_noncanonical}/sys-include" - elif test "x$with_build_sysroot" != "x"; then - target_header_dir="${with_build_sysroot}${native_system_header_dir}" elif test "x$with_sysroot" = xyes; then target_header_dir="${test_exec_prefix}/${target_noncanonical}/sys-root${native_system_header_dir}" else