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