~ubuntu-branches/debian/sid/gcc-4.8/sid

« back to all changes in this revision

Viewing changes to .svn/pristine/62/62387c702c3d2e8e5e085264bee17736fe0972fc.svn-base

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2014-12-19 19:48:34 UTC
  • Revision ID: package-import@ubuntu.com-20141219194834-4dz1q7rrn5pad823
Tags: 4.8.4-1
* GCC 4.8.4 release.
  - Fix PR target/61407 (darwin), PR middle-end/58624 (ice),
    PR sanitizer/64265 (wrong code).
* Require recent binutils to pass go test failures.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# DP: Use /usr/include/<multiarch>/c++/4.x as the include directory
 
2
# DP: for host dependent c++ header files.
 
3
 
 
4
Index: b/src/libstdc++-v3/include/Makefile.am
 
5
===================================================================
 
6
--- a/src/libstdc++-v3/include/Makefile.am
 
7
+++ b/src/libstdc++-v3/include/Makefile.am
 
8
@@ -828,7 +828,7 @@
 
9
 host_srcdir = ${glibcxx_srcdir}/$(OS_INC_SRCDIR)
 
10
 default_host_alias = @default_host_alias@
 
11
 host_builddir = ./${default_host_alias}/bits
 
12
-host_installdir = ${gxx_include_dir}/${default_host_alias}$(MULTISUBDIR)/bits
 
13
+host_installdir = $(if $(shell $(CC) -print-multiarch),/usr/include/$(shell $(filter-out -m%,$(CC)) -print-multiarch)/c++/$(notdir ${gxx_include_dir})$(MULTISUBDIR)/bits,${gxx_include_dir}/${default_host_alias}$(MULTISUBDIR)/bits)
 
14
 host_headers = \
 
15
        ${host_srcdir}/ctype_base.h \
 
16
        ${host_srcdir}/ctype_inline.h \
 
17
Index: b/src/libstdc++-v3/include/Makefile.in
 
18
===================================================================
 
19
--- a/src/libstdc++-v3/include/Makefile.in
 
20
+++ b/src/libstdc++-v3/include/Makefile.in
 
21
@@ -1105,7 +1105,7 @@
 
22
 host_srcdir = ${glibcxx_srcdir}/$(OS_INC_SRCDIR)
 
23
 default_host_alias = @default_host_alias@
 
24
 host_builddir = ./${default_host_alias}/bits
 
25
-host_installdir = ${gxx_include_dir}/${default_host_alias}$(MULTISUBDIR)/bits
 
26
+host_installdir = $(if $(shell $(CC) -print-multiarch),/usr/include/$(shell $(filter-out -m%,$(CC)) -print-multiarch)/c++/$(notdir ${gxx_include_dir})$(MULTISUBDIR)/bits,${gxx_include_dir}/${default_host_alias}$(MULTISUBDIR)/bits)
 
27
 host_headers = \
 
28
        ${host_srcdir}/ctype_base.h \
 
29
        ${host_srcdir}/ctype_inline.h \
 
30
Index: b/src/gcc/Makefile.in
 
31
===================================================================
 
32
--- a/src/gcc/Makefile.in
 
33
+++ b/src/gcc/Makefile.in
 
34
@@ -1106,6 +1106,7 @@
 
35
        "prefix=$(prefix)" \
 
36
        "local_prefix=$(local_prefix)" \
 
37
        "gxx_include_dir=$(gcc_gxx_include_dir)" \
 
38
+       "gxx_tool_include_dir=$(gcc_gxx_tool_include_dir)" \
 
39
        "build_tooldir=$(build_tooldir)" \
 
40
        "gcc_tooldir=$(gcc_tooldir)" \
 
41
        "bindir=$(bindir)" \
 
42
@@ -1542,6 +1543,14 @@
 
43
 include $(xmake_file)
 
44
 endif
 
45
 
 
46
+# Directory in which the compiler finds target-dependent g++ includes.
 
47
+ifneq ($(call if_multiarch,non-empty),)
 
48
+  gcc_gxx_tool_include_dir = /usr/include/$(MULTIARCH_DIRNAME)/c++/$(BASEVER_c)
 
49
+else
 
50
+  gcc_gxx_tool_include_dir = $(gcc_gxx_include_dir)/$(target_noncanonical)
 
51
+endif
 
52
+
 
53
+
 
54
 # all-tree.def includes all the tree.def files.
 
55
 all-tree.def: s-alltree; @true
 
56
 s-alltree: Makefile
 
57
@@ -1838,7 +1838,7 @@
 
58
            "$(MULTILIB_EXCLUSIONS)" \
 
59
            "$(MULTILIB_OSDIRNAMES)" \
 
60
            "$(MULTILIB_REQUIRED)" \
 
61
-           "$(MULTIARCH_DIRNAME)" \
 
62
+           "$(if $(MULTILIB_OSDIRNAMES),,$(MULTIARCH_DIRNAME))" \
 
63
            "$(MULTILIB_REUSE)" \
 
64
            "@enable_multilib@" \
 
65
            > tmp-mlib.h; \
 
66
@@ -3986,7 +3995,7 @@
 
67
   -DFIXED_INCLUDE_DIR=\"$(libsubdir)/include-fixed\" \
 
68
   -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
 
69
   -DGPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT=$(gcc_gxx_include_dir_add_sysroot) \
 
70
-  -DGPLUSPLUS_TOOL_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/$(target_noncanonical)\" \
 
71
+  -DGPLUSPLUS_TOOL_INCLUDE_DIR=\"$(gcc_gxx_tool_include_dir)\" \
 
72
   -DGPLUSPLUS_BACKWARD_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/backward\" \
 
73
   -DLOCAL_INCLUDE_DIR=\"$(local_includedir)\" \
 
74
   -DCROSS_INCLUDE_DIR=\"$(CROSS_SYSTEM_HEADER_DIR)\" \
 
75
Index: b/src/gcc/cppdefault.c
 
76
===================================================================
 
77
--- a/src/gcc/cppdefault.c
 
78
+++ b/src/gcc/cppdefault.c
 
79
@@ -49,6 +49,8 @@
 
80
     /* Pick up GNU C++ target-dependent include files.  */
 
81
     { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1,
 
82
       GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 },
 
83
+    { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1,
 
84
+      GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 2 },
 
85
 #endif
 
86
 #ifdef GPLUSPLUS_BACKWARD_INCLUDE_DIR
 
87
     /* Pick up GNU C++ backward and deprecated include files.  */
 
88
Index: b/src/gcc/incpath.c
 
89
===================================================================
 
90
--- a/src/gcc/incpath.c
 
91
+++ b/src/gcc/incpath.c
 
92
@@ -160,6 +160,18 @@
 
93
                        }
 
94
                      str = reconcat (str, str, dir_separator_str,
 
95
                                      imultiarch, NULL);
 
96
+                     if (p->cplusplus)
 
97
+                       {
 
98
+                         char *suffix = strstr (str, "/c++/");
 
99
+                         *suffix++ = '\0';
 
100
+                         suffix = xstrdup (suffix);
 
101
+                         str = reconcat (str, str, dir_separator_str,
 
102
+                                         imultiarch,
 
103
+                                         dir_separator_str, suffix, NULL);
 
104
+                       }
 
105
+                     else
 
106
+                       str = reconcat (str, str, dir_separator_str,
 
107
+                                       imultiarch, NULL);
 
108
                    }
 
109
                  add_path (str, SYSTEM, p->cxx_aware, false);
 
110
                }
 
111
@@ -224,7 +236,16 @@
 
112
                  free (str);
 
113
                  continue;
 
114
                }
 
115
-             str = reconcat (str, str, dir_separator_str, imultiarch, NULL);
 
116
+             if (p->cplusplus)
 
117
+               {
 
118
+                 char *suffix = strstr (str, "/c++/");
 
119
+                 *suffix++ = '\0';
 
120
+                 suffix = xstrdup (suffix);
 
121
+                 str = reconcat (str, str, dir_separator_str, imultiarch,
 
122
+                                 dir_separator_str, suffix, NULL);
 
123
+               }
 
124
+             else
 
125
+               str = reconcat (str, str, dir_separator_str, imultiarch, NULL);
 
126
            }
 
127
 
 
128
          add_path (str, SYSTEM, p->cxx_aware, false);