summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glibc/glibc/eglibc-header-bootstrap.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/glibc/glibc/eglibc-header-bootstrap.patch')
-rw-r--r--meta/recipes-core/glibc/glibc/eglibc-header-bootstrap.patch85
1 files changed, 85 insertions, 0 deletions
diff --git a/meta/recipes-core/glibc/glibc/eglibc-header-bootstrap.patch b/meta/recipes-core/glibc/glibc/eglibc-header-bootstrap.patch
new file mode 100644
index 0000000000..e1aa13926a
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/eglibc-header-bootstrap.patch
@@ -0,0 +1,85 @@
1Taken from EGLIBC, r1484 + r1525
2
3 2007-02-20 Jim Blandy <jimb@codesourcery.com>
4
5 * Makefile (install-headers): Preserve old behavior: depend on
6 $(inst_includedir)/gnu/stubs.h only if install-bootstrap-headers
7 is set; otherwise, place gnu/stubs.h on the 'install-others' list.
8
9 2007-02-16 Jim Blandy <jimb@codesourcery.com>
10
11 * Makefile: Amend make install-headers to install everything
12 necessary for building a cross-compiler. Install gnu/stubs.h as
13 part of 'install-headers', not 'install-others'.
14 If install-bootstrap-headers is 'yes', install a dummy copy of
15 gnu/stubs.h, instead of computing the real thing.
16 * include/stubs-bootstrap.h: New file.
17
18Upstream-Status: Pending
19
20Index: git/Makefile
21===================================================================
22--- git.orig/Makefile 2014-08-27 18:35:18.908070587 +0000
23+++ git/Makefile 2014-08-27 18:35:19.340070587 +0000
24@@ -69,9 +69,18 @@
25 vpath %.h $(subdir-dirs)
26
27 # What to install.
28-install-others = $(inst_includedir)/gnu/stubs.h
29 install-bin-script =
30
31+# If we're bootstrapping, install a dummy gnu/stubs.h along with the
32+# other headers, so 'make install-headers' produces a useable include
33+# tree. Otherwise, install gnu/stubs.h later, after the rest of the
34+# build is done.
35+ifeq ($(install-bootstrap-headers),yes)
36+install-headers: $(inst_includedir)/gnu/stubs.h
37+else
38+install-others = $(inst_includedir)/gnu/stubs.h
39+endif
40+
41 ifeq (yes,$(build-shared))
42 headers += gnu/lib-names.h
43 endif
44@@ -151,6 +160,16 @@
45
46 subdir-stubs := $(foreach dir,$(subdirs),$(common-objpfx)$(dir)/stubs)
47
48+# gnu/stubs.h depends (via the subdir 'stubs' targets) on all the .o
49+# files in EGLIBC. For bootstrapping a GCC/EGLIBC pair, an empty
50+# gnu/stubs.h is good enough.
51+ifeq ($(install-bootstrap-headers),yes)
52+$(inst_includedir)/gnu/stubs.h: include/stubs-bootstrap.h $(+force)
53+ $(make-target-directory)
54+ $(INSTALL_DATA) $< $@
55+
56+installed-stubs =
57+else
58 ifndef abi-variants
59 installed-stubs = $(inst_includedir)/gnu/stubs.h
60 else
61@@ -177,6 +196,7 @@
62
63 install-others-nosubdir: $(installed-stubs)
64 endif
65+endif
66
67
68 # Since stubs.h is never needed when building the library, we simplify the
69Index: git/include/stubs-bootstrap.h
70===================================================================
71--- /dev/null 1970-01-01 00:00:00.000000000 +0000
72+++ git/include/stubs-bootstrap.h 2014-08-27 18:35:19.340070587 +0000
73@@ -0,0 +1,12 @@
74+/* Placeholder stubs.h file for bootstrapping.
75+
76+ When bootstrapping a GCC/EGLIBC pair, GCC requires that the EGLIBC
77+ headers be installed, but we can't fully build EGLIBC without that
78+ GCC. So we run the command:
79+
80+ make install-headers install-bootstrap-headers=yes
81+
82+ to install the headers GCC needs, but avoid building certain
83+ difficult headers. The <gnu/stubs.h> header depends, via the
84+ EGLIBC subdir 'stubs' make targets, on every .o file in EGLIBC, but
85+ an empty stubs.h like this will do fine for GCC. */