summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-4.6/GPLUSPLUS_INCLUDE_DIR_with_sysroot.patch
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2012-06-21 16:05:16 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-06-25 16:35:52 +0100
commit2ef14dff79230a67258995c27b49aaab1aae92ca (patch)
tree64649c848a1241ba2cdfa5909e9ff282a2348e0c /meta/recipes-devtools/gcc/gcc-4.6/GPLUSPLUS_INCLUDE_DIR_with_sysroot.patch
parentaecbfbc0abd584aa1a08cd655eae6e1f99b2a60c (diff)
downloadpoky-2ef14dff79230a67258995c27b49aaab1aae92ca.tar.gz
gcc-4.6: Retire into toochain-layer
If anyone wants it add toolchain-layer from meta-openembedded repo to your setup (From OE-Core rev: a78260d8d041e606ce4d10c0bb52f196dd27832e) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.6/GPLUSPLUS_INCLUDE_DIR_with_sysroot.patch')
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.6/GPLUSPLUS_INCLUDE_DIR_with_sysroot.patch186
1 files changed, 0 insertions, 186 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.6/GPLUSPLUS_INCLUDE_DIR_with_sysroot.patch b/meta/recipes-devtools/gcc/gcc-4.6/GPLUSPLUS_INCLUDE_DIR_with_sysroot.patch
deleted file mode 100644
index 575e0e4b41..0000000000
--- a/meta/recipes-devtools/gcc/gcc-4.6/GPLUSPLUS_INCLUDE_DIR_with_sysroot.patch
+++ /dev/null
@@ -1,186 +0,0 @@
1source: http://patchwork.ozlabs.org/patch/129800/
2Upstream-Status: Submitted
3
4ChangeLog
5 * Makefile.in (gcc_gxx_include_dir_add_sysroot): New.
6 (PREPROCESSOR_DEFINES): Define GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT.
7
8 * cppdefault.c (cpp_include_defaults): replace hard coded "1" with
9 GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT for "add_sysroot" field.
10
11 * configure.ac (AC_SUBST): Add gcc_gxx_include_dir_add_sysroot to
12 control whether sysroot should be prepended to gxx include dir.
13
14 * configure: Regenerate.
15
16Hi, this is a follow up for issue "http://codereview.appspot.com/4641076".
17
18The rationale for the patch copied from previous thread:
19=======================================
20The setup:
21
22Configuring a toolchain targeting x86-64 GNU Linux (Ubuntu Lucid), as a
23cross-compiler. Using a sysroot to provide the Lucid headers+libraries,
24with the sysroot path being within the GCC install tree. Want to use the
25Lucid system libstdc++ and headers, which means that I'm not
26building/installing libstdc++-v3.
27
28So, configuring with:
29 --with-sysroot="$SYSROOT"
30 --disable-libstdc++-v3 \
31 --with-gxx-include-dir="$SYSROOT/usr/include/c++/4.4" \
32(among other options).
33
34Hoping to support two usage models with this configuration, w.r.t. use of
35the sysroot:
36
37(1) somebody installs the sysroot in the normal location relative to the
38GCC install, and relocates the whole bundle (sysroot+GCC). This works
39great AFAICT, GCC finds its includes (including the C++ includes) thanks
40to the add_standard_paths iprefix handling.
41
42(2) somebody installs the sysroot in a non-standard location, and uses
43--sysroot to try to access it. This works fine for the C headers, but
44doesn't work.
45
46For the C headers, add_standard_paths prepends the sysroot location to
47the /usr/include path (since that's what's specified in cppdefault.c for
48that path). It doesn't do the same for the C++ include path, though
49(again, as specified in cppdefault.c).
50
51add_standard_paths doesn't attempt to relocate built-in include paths that
52start with the compiled-in sysroot location (e.g., the g++ include dir, in
53this case). This isn't surprising really: normally you either prepend the
54sysroot location or you don't (as specified by cppdefault.c); none of the
55built-in paths normally *start* with the sysroot location and need to be
56relocated. However, in this odd-ball case of trying to use the C++ headers
57from the sysroot, one of the paths *does* need to be relocated in this way.
58===========================
59Index: gcc-4_6-branch/gcc/Makefile.in
60===================================================================
61--- gcc-4_6-branch.orig/gcc/Makefile.in 2012-03-04 09:33:36.000000000 -0800
62+++ gcc-4_6-branch/gcc/Makefile.in 2012-03-04 09:41:06.858672113 -0800
63@@ -587,6 +587,7 @@
64 build_tooldir = $(exec_prefix)/$(target_noncanonical)
65 # Directory in which the compiler finds target-independent g++ includes.
66 gcc_gxx_include_dir = @gcc_gxx_include_dir@
67+gcc_gxx_include_dir_add_sysroot = @gcc_gxx_include_dir_add_sysroot@
68 # Directory to search for site-specific includes.
69 local_includedir = $(local_prefix)/include
70 includedir = $(prefix)/include
71@@ -3964,6 +3965,7 @@
72 -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
73 -DFIXED_INCLUDE_DIR=\"$(libsubdir)/include-fixed\" \
74 -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
75+ -DGPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT=$(gcc_gxx_include_dir_add_sysroot) \
76 -DGPLUSPLUS_TOOL_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/$(target_noncanonical)\" \
77 -DGPLUSPLUS_BACKWARD_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/backward\" \
78 -DLOCAL_INCLUDE_DIR=\"$(local_includedir)\" \
79Index: gcc-4_6-branch/gcc/configure.ac
80===================================================================
81--- gcc-4_6-branch.orig/gcc/configure.ac 2012-03-04 09:33:36.000000000 -0800
82+++ gcc-4_6-branch/gcc/configure.ac 2012-03-04 09:41:06.862671939 -0800
83@@ -144,6 +144,15 @@
84 fi
85 fi
86
87+gcc_gxx_include_dir_add_sysroot=0
88+if test "${with_sysroot+set}" = set; then :
89+ gcc_gxx_without_sysroot=`expr "${gcc_gxx_include_dir}" : "${with_sysroot}"'\(.*\)'`
90+ if test "${gcc_gxx_without_sysroot}"; then :
91+ gcc_gxx_include_dir="${gcc_gxx_without_sysroot}"
92+ gcc_gxx_include_dir_add_sysroot=1
93+ fi
94+fi
95+
96 AC_ARG_WITH(cpp_install_dir,
97 [ --with-cpp-install-dir=DIR
98 install the user visible C preprocessor in DIR
99@@ -4727,6 +4736,7 @@
100 AC_SUBST(float_h_file)
101 AC_SUBST(gcc_config_arguments)
102 AC_SUBST(gcc_gxx_include_dir)
103+AC_SUBST(gcc_gxx_include_dir_add_sysroot)
104 AC_SUBST(host_exeext)
105 AC_SUBST(host_xm_file_list)
106 AC_SUBST(host_xm_include_list)
107Index: gcc-4_6-branch/gcc/cppdefault.c
108===================================================================
109--- gcc-4_6-branch.orig/gcc/cppdefault.c 2012-03-03 01:03:17.000000000 -0800
110+++ gcc-4_6-branch/gcc/cppdefault.c 2012-03-04 09:41:06.862671939 -0800
111@@ -48,15 +48,18 @@
112 = {
113 #ifdef GPLUSPLUS_INCLUDE_DIR
114 /* Pick up GNU C++ generic include files. */
115- { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, 0, 0 },
116+ { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1,
117+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },
118 #endif
119 #ifdef GPLUSPLUS_TOOL_INCLUDE_DIR
120 /* Pick up GNU C++ target-dependent include files. */
121- { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, 0, 1 },
122+ { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1,
123+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 },
124 #endif
125 #ifdef GPLUSPLUS_BACKWARD_INCLUDE_DIR
126 /* Pick up GNU C++ backward and deprecated include files. */
127- { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, 0, 0 },
128+ { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1,
129+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },
130 #endif
131 #ifdef GCC_INCLUDE_DIR
132 /* This is the dir for gcc's private headers. */
133Index: gcc-4_6-branch/gcc/configure
134===================================================================
135--- gcc-4_6-branch.orig/gcc/configure 2012-03-04 09:33:36.000000000 -0800
136+++ gcc-4_6-branch/gcc/configure 2012-03-04 09:41:12.462671816 -0800
137@@ -636,6 +636,7 @@
138 host_xm_include_list
139 host_xm_file_list
140 host_exeext
141+gcc_gxx_include_dir_add_sysroot
142 gcc_gxx_include_dir
143 gcc_config_arguments
144 float_h_file
145@@ -3313,6 +3314,15 @@
146 fi
147 fi
148
149+gcc_gxx_include_dir_add_sysroot=0
150+if test "${with_sysroot+set}" = set; then :
151+ gcc_gxx_without_sysroot=`expr "${gcc_gxx_include_dir}" : "${with_sysroot}"'\(.*\)'`
152+ if test "${gcc_gxx_without_sysroot}"; then :
153+ gcc_gxx_include_dir="${gcc_gxx_without_sysroot}"
154+ gcc_gxx_include_dir_add_sysroot=1
155+ fi
156+fi
157+
158
159 # Check whether --with-cpp_install_dir was given.
160 if test "${with_cpp_install_dir+set}" = set; then :
161@@ -17504,7 +17514,7 @@
162 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
163 lt_status=$lt_dlunknown
164 cat > conftest.$ac_ext <<_LT_EOF
165-#line 17507 "configure"
166+#line 17517 "configure"
167 #include "confdefs.h"
168
169 #if HAVE_DLFCN_H
170@@ -17610,7 +17620,7 @@
171 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
172 lt_status=$lt_dlunknown
173 cat > conftest.$ac_ext <<_LT_EOF
174-#line 17613 "configure"
175+#line 17623 "configure"
176 #include "confdefs.h"
177
178 #if HAVE_DLFCN_H
179@@ -26141,6 +26151,7 @@
180
181
182
183+
184
185
186