summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/eglibc/eglibc-2.14/shorten-build-commands.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/eglibc/eglibc-2.14/shorten-build-commands.patch')
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.14/shorten-build-commands.patch83
1 files changed, 83 insertions, 0 deletions
diff --git a/meta/recipes-core/eglibc/eglibc-2.14/shorten-build-commands.patch b/meta/recipes-core/eglibc/eglibc-2.14/shorten-build-commands.patch
new file mode 100644
index 0000000000..c17d58b28b
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.14/shorten-build-commands.patch
@@ -0,0 +1,83 @@
1Upstream-Status: Pending
2
3Source: http://sourceware.org/ml/libc-alpha/2010-03/msg00064.html
4
5This patch scratches an itch. Each individual gcc command in the
6glibc build is over 1K, which means it takes up a good chunk of my
7terminal. Most of that is include paths. Any version of GCC new
8enough to build glibc supports response files, which were added in
92005. So use a response file for the static list of include paths.
10Now the build commands are a lot shorter, and easier to use when
11developing glibc.
12
13Tested on x86_64-linux-gnu. Please apply if acceptable.
14
15--
16Daniel Jacobowitz
17CodeSourcery
18
192010-03-30 Daniel Jacobowitz <dan@codesourcery.com>
20
21 * Makeconfig (+common-includes): Define.
22 (+includes): Use @$(common-objpfx)includes.
23 * Makefile (postclean): Remove includes and includes.mk.
24 * Makerules ($(common-objpfx)includes.mk): Include and create
25 includes.mk. Create includes.
26
27Upstream-Status: Pending
28
29Index: libc/Makeconfig
30===================================================================
31--- libc.orig/Makeconfig 2009-10-13 22:55:12.000000000 -0700
32+++ libc/Makeconfig 2010-03-31 16:02:37.120489733 -0700
33@@ -678,9 +678,10 @@ endif # $(+cflags) == ""
34 # library source directory, in the include directory, and in the
35 # current directory.
36 +sysdep-includes = $(addprefix -I,$(+sysdep_dirs))
37++common-includes = $(+sysdep-includes) $(includes) $(sysincludes)
38 +includes = -I$(..)include $(if $(subdir),$(objpfx:%/=-I%)) \
39- $(+sysdep-includes) $(includes) \
40- $(patsubst %/,-I%,$(..)) $(libio-include) -I. $(sysincludes)
41+ @$(common-objpfx)includes \
42+ $(patsubst %/,-I%,$(..)) $(libio-include) -I.
43
44 # Since libio has several internal header files, we use a -I instead
45 # of many little headers in the include directory.
46Index: libc/Makefile
47===================================================================
48--- libc.orig/Makefile 2009-12-09 12:06:28.000000000 -0800
49+++ libc/Makefile 2010-03-31 16:02:37.132481508 -0700
50@@ -247,7 +247,7 @@ parent-mostlyclean: common-mostlyclean #
51 parent-clean: parent-mostlyclean common-clean
52
53 postclean = $(addprefix $(common-objpfx),$(postclean-generated)) \
54- $(addprefix $(objpfx),sysd-dirs sysd-rules) \
55+ $(addprefix $(objpfx),sysd-dirs sysd-rules includes includes.mk) \
56 $(addprefix $(objpfx),sysd-sorted soversions.mk soversions.i)
57
58 clean: parent-clean
59Index: libc/Makerules
60===================================================================
61--- libc.orig/Makerules 2009-12-09 12:06:28.000000000 -0800
62+++ libc/Makerules 2010-03-31 16:02:37.140481645 -0700
63@@ -254,6 +254,20 @@ ifndef sysd-rules-done
64 no_deps=t
65 endif
66
67+-include $(common-objpfx)includes.mk
68+ifneq ($(+common-includes),$(saved-includes))
69+# Recreate includes.mk (and includes).
70+includes-force = FORCE
71+FORCE:
72+endif
73+$(common-objpfx)includes.mk: $(includes-force)
74+ -@rm -f $@T $(common-objpfx)includesT
75+ for inc in $(+common-includes); do echo "$$inc"; done \
76+ > $(common-objpfx)includesT
77+ mv -f $(common-objpfx)includesT $(common-objpfx)includes
78+ echo 'saved-includes := $(+common-includes)' > $@T
79+ mv -f $@T $@
80+
81 define o-iterator-doit
82 $(objpfx)%$o: %.S $(before-compile); $$(compile-command.S)
83 endef