revert: Makefile.in (PREPROCESSOR_DEFINES): Add a level of indirection for several...
authorJeff Law <law@redhat.com>
Mon, 16 Jan 2017 23:51:57 +0000 (16:51 -0700)
committerJeff Law <law@gcc.gnu.org>
Mon, 16 Jan 2017 23:51:57 +0000 (16:51 -0700)
Revert:
2016-12-02  Tadek Kijkowski  <tkijkowski@gmail.com>
        * Makefile.in (PREPROCESSOR_DEFINES): Add a level of indirection
        for several include directories that may be relative to sysroot.
        * config/i386/x-mingw32 (gplus_includedir): Define.
        (gplus_tool_includedir, gplus_backward_include_dir): Likewise.
        (native_system_includedir): Likewise.
        * config/i386/mingw32.h (STANDARD_STARTFILE_PREFIX_1): Do not
        override if TARGET_SYSTEM_ROOT is defined.
        (NATIVE_SYSTEM_HEADER_DIR): Likewise.

From-SVN: r244510

gcc/ChangeLog
gcc/Makefile.in
gcc/config/i386/mingw32.h
gcc/config/i386/x-mingw32

index 850752829e61baaa757d9c9a7d022b34bc6a6a07..3ef73ce180e3b87d1c1942fdcab8d9b29160618e 100644 (file)
@@ -1,5 +1,16 @@
 2017-01-16  Jeff Law  <law@redhat.com>
 
+       Revert:
+       2016-12-02  Tadek Kijkowski  <tkijkowski@gmail.com>
+        * Makefile.in (PREPROCESSOR_DEFINES): Add a level of indirection
+        for several include directories that may be relative to sysroot.
+        * config/i386/x-mingw32 (gplus_includedir): Define.
+        (gplus_tool_includedir, gplus_backward_include_dir): Likewise.
+        (native_system_includedir): Likewise.
+        * config/i386/mingw32.h (STANDARD_STARTFILE_PREFIX_1): Do not
+        override if TARGET_SYSTEM_ROOT is defined.
+        (NATIVE_SYSTEM_HEADER_DIR): Likewise.
+
        PR tree-optimization/79090
        PR tree-optimization/33562
        PR tree-optimization/61912
index c53c78a2f03f73ebe5ca4b96ed4f2254e9f5fcc7..59fe4aa28364981339373252c01f81e509175c9d 100644 (file)
@@ -675,15 +675,6 @@ objext = .o
 exeext = @host_exeext@
 build_exeext = @build_exeext@
 
-
-# This allows overriding include paths in host specific Makefile
-# (config/i386/x-mingw32 overrides those variables and local_includedir).
-gplusplus_includedir = $(gcc_gxx_include_dir)
-gplusplus_tool_includedir = $(gcc_gxx_include_dir)/$(target_noncanonical)
-gplusplus_backward_includedir = $(gcc_gxx_include_dir)/backward
-native_system_includedir = $(NATIVE_SYSTEM_HEADER_DIR)
-
-
 # Directory in which to put man pages.
 mandir = @mandir@
 man1dir = $(mandir)/man1
@@ -2793,14 +2784,14 @@ CFLAGS-intl.o += -DLOCALEDIR=\"$(localedir)\"
 PREPROCESSOR_DEFINES = \
   -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
   -DFIXED_INCLUDE_DIR=\"$(libsubdir)/include-fixed\" \
-  -DGPLUSPLUS_INCLUDE_DIR=\"$(gplusplus_includedir)\" \
+  -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
   -DGPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT=$(gcc_gxx_include_dir_add_sysroot) \
-  -DGPLUSPLUS_TOOL_INCLUDE_DIR=\"$(gplusplus_tool_includedir)\" \
-  -DGPLUSPLUS_BACKWARD_INCLUDE_DIR=\"$(gplusplus_backward_includedir)\" \
+  -DGPLUSPLUS_TOOL_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/$(target_noncanonical)\" \
+  -DGPLUSPLUS_BACKWARD_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/backward\" \
   -DLOCAL_INCLUDE_DIR=\"$(local_includedir)\" \
   -DCROSS_INCLUDE_DIR=\"$(CROSS_SYSTEM_HEADER_DIR)\" \
   -DTOOL_INCLUDE_DIR=\"$(gcc_tooldir)/include\" \
-  -DNATIVE_SYSTEM_HEADER_DIR=\"$(native_system_includedir)\" \
+  -DNATIVE_SYSTEM_HEADER_DIR=\"$(NATIVE_SYSTEM_HEADER_DIR)\" \
   -DPREFIX=\"$(prefix)/\" \
   -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc/\" \
   @TARGET_SYSTEM_ROOT_DEFINE@
index 1d988ca44221b10d9060ddd99789724fb3a4b4cf..543d851f5388b4fd9cf7659d87dc05c0b74d20c8 100644 (file)
@@ -161,8 +161,6 @@ along with GCC; see the file COPYING3.  If not see
     fvtable-verify=std:vtv_end.o%s} \
   crtend.o%s"
 
-#if !defined(TARGET_SYSTEM_ROOT)
-
 /* Override startfile prefix defaults.  */
 #ifndef STANDARD_STARTFILE_PREFIX_1
 #define STANDARD_STARTFILE_PREFIX_1 "/mingw/lib/"
@@ -176,8 +174,6 @@ along with GCC; see the file COPYING3.  If not see
 #undef NATIVE_SYSTEM_HEADER_DIR
 #define NATIVE_SYSTEM_HEADER_DIR "/mingw/include"
 
-#endif /* !defined(TARGET_SYSTEM_ROOT) */
-
 /* Output STRING, a string representing a filename, to FILE.
    We canonicalize it to be in Unix format (backslashes are replaced
    forward slashes.  */
index b5cef97512032a223605fb4db592fab05b1bb521..6a2d5a5069461b93884fa68ffbcbb13585d24c37 100644 (file)
 # along with GCC; see the file COPYING3.  If not see
 # <http://www.gnu.org/licenses/>.
 #
-
-# MSYS will zealously translate all paths to Windows form, so /usr/include becomes c:/msysX/usr/include.
-# This is undesirable when TARGET_SYSTEM_ROOT is specified, so this function converts /usr/include to //usr\include,
-# which will become /usr/include again when passed to gcc.
-
-# This function takes two parameters: first parameter is include directory path, second parameter tells
-# if the path is relative to TARGET_SYSTEM_ROOT.
-# If TARGET_SYSTEM_ROOT is not configured, or
-#   this function always expands to the unmodified first parameter
-# if TARGET_SYSTEM_ROOT is configured, but second parameter is not 1,
-#   this function again expands to the unmodified first parameter
-# otherwise,
-#  it expands to a shell expression which will transform the first parameter as described above.
-ifneq ($(TARGET_SYSTEM_ROOT),)
-sysroot_relative_path = $(if $(filter 1,$(2)),`echo "$(1)" | tr '/' '\\\\' | sed 's|^\\\\|//|'`,$(1))
-else
-sysroot_relative_path = $(1)
-endif
-
-ifneq ($(TARGET_SYSTEM_ROOT),)
-#
-# Make sure that relative the path is not converted to absolute DOS style path
-#
-local_includedir = $(call sysroot_relative_path,$(local_prefix)/include,1)
-else
 #
 # Make local_includedir relative to EXEC_PREFIX 
 #
 local_includedir=$(libsubdir)/$(unlibsubdir)/..`echo $(exec_prefix) | sed -e 's|^$(prefix)||' -e 's|/[^/]*|/..|g'`/include
-endif
-
-#
-# Make sure that relative path are not converted to absolute DOS style paths
-#
-gplusplus_includedir = $(call sysroot_relative_path,$(gcc_gxx_include_dir),$(gcc_gxx_include_dir_add_sysroot))
-gplusplus_tool_includedir = $(call sysroot_relative_path,$(gcc_gxx_include_dir)/$(target_noncanonical),$(gcc_gxx_include_dir_add_sysroot))
-gplusplus_backward_includedir = $(call sysroot_relative_path,$(gcc_gxx_include_dir)/backward,$(gcc_gxx_include_dir_add_sysroot))
-native_system_includedir = $(call sysroot_relative_path,$(NATIVE_SYSTEM_HEADER_DIR),1)
 
 # On MinGW, we use "%IA64d" to print 64-bit integers, and the format-checking
 # code does not handle that, so we have to disable checking here.