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