diff options
Diffstat (limited to 'meta/recipes-devtools/make')
3 files changed, 111 insertions, 1 deletions
diff --git a/meta/recipes-devtools/make/make.inc b/meta/recipes-devtools/make/make.inc index 849b74299c..b8905bc6d3 100644 --- a/meta/recipes-devtools/make/make.inc +++ b/meta/recipes-devtools/make/make.inc | |||
@@ -5,7 +5,10 @@ called the makefile, which lists each of the non-source files and how to compute | |||
5 | HOMEPAGE = "http://www.gnu.org/software/make/" | 5 | HOMEPAGE = "http://www.gnu.org/software/make/" |
6 | SECTION = "devel" | 6 | SECTION = "devel" |
7 | 7 | ||
8 | SRC_URI = "${GNU_MIRROR}/make/make-${PV}.tar.bz2" | 8 | SRC_URI = "${GNU_MIRROR}/make/make-${PV}.tar.bz2 \ |
9 | file://0001-glob-Do-not-assume-glibc-glob-internals.patch \ | ||
10 | file://0002-glob-Do-not-assume-glibc-glob-internals.patch \ | ||
11 | " | ||
9 | 12 | ||
10 | inherit autotools gettext pkgconfig texinfo | 13 | inherit autotools gettext pkgconfig texinfo |
11 | 14 | ||
diff --git a/meta/recipes-devtools/make/make/0001-glob-Do-not-assume-glibc-glob-internals.patch b/meta/recipes-devtools/make/make/0001-glob-Do-not-assume-glibc-glob-internals.patch new file mode 100644 index 0000000000..5839d2ddd1 --- /dev/null +++ b/meta/recipes-devtools/make/make/0001-glob-Do-not-assume-glibc-glob-internals.patch | |||
@@ -0,0 +1,69 @@ | |||
1 | From c90a7dda6c572f79b8e78da44b6ebf8704edef65 Mon Sep 17 00:00:00 2001 | ||
2 | From: Paul Eggert <eggert@cs.ucla.edu> | ||
3 | Date: Sun, 24 Sep 2017 09:12:58 -0400 | ||
4 | Subject: [PATCH 1/2] glob: Do not assume glibc glob internals. | ||
5 | |||
6 | It has been proposed that glibc glob start using gl_lstat, | ||
7 | which the API allows it to do. GNU 'make' should not get in | ||
8 | the way of this. See: | ||
9 | https://sourceware.org/ml/libc-alpha/2017-09/msg00409.html | ||
10 | |||
11 | * dir.c (local_lstat): New function, like local_stat. | ||
12 | (dir_setup_glob): Use it to initialize gl_lstat too, as the API | ||
13 | requires. | ||
14 | --- | ||
15 | Upstream-Status: Backport | ||
16 | |||
17 | dir.c | 29 +++++++++++++++++++++++++++-- | ||
18 | 1 file changed, 27 insertions(+), 2 deletions(-) | ||
19 | |||
20 | diff --git a/dir.c b/dir.c | ||
21 | index f34bbf5..12eef30 100644 | ||
22 | --- a/dir.c | ||
23 | +++ b/dir.c | ||
24 | @@ -1299,15 +1299,40 @@ local_stat (const char *path, struct stat *buf) | ||
25 | } | ||
26 | #endif | ||
27 | |||
28 | +/* Similarly for lstat. */ | ||
29 | +#if !defined(lstat) && !defined(WINDOWS32) || defined(VMS) | ||
30 | +# ifndef VMS | ||
31 | +# ifndef HAVE_SYS_STAT_H | ||
32 | +int lstat (const char *path, struct stat *sbuf); | ||
33 | +# endif | ||
34 | +# else | ||
35 | + /* We are done with the fake lstat. Go back to the real lstat */ | ||
36 | +# ifdef lstat | ||
37 | +# undef lstat | ||
38 | +# endif | ||
39 | +# endif | ||
40 | +# define local_lstat lstat | ||
41 | +#elif defined(WINDOWS32) | ||
42 | +/* Windows doesn't support lstat(). */ | ||
43 | +# define local_lstat local_stat | ||
44 | +#else | ||
45 | +static int | ||
46 | +local_lstat (const char *path, struct stat *buf) | ||
47 | +{ | ||
48 | + int e; | ||
49 | + EINTRLOOP (e, lstat (path, buf)); | ||
50 | + return e; | ||
51 | +} | ||
52 | +#endif | ||
53 | + | ||
54 | void | ||
55 | dir_setup_glob (glob_t *gl) | ||
56 | { | ||
57 | gl->gl_opendir = open_dirstream; | ||
58 | gl->gl_readdir = read_dirstream; | ||
59 | gl->gl_closedir = free; | ||
60 | + gl->gl_lstat = local_lstat; | ||
61 | gl->gl_stat = local_stat; | ||
62 | - /* We don't bother setting gl_lstat, since glob never calls it. | ||
63 | - The slot is only there for compatibility with 4.4 BSD. */ | ||
64 | } | ||
65 | |||
66 | void | ||
67 | -- | ||
68 | 2.16.1 | ||
69 | |||
diff --git a/meta/recipes-devtools/make/make/0002-glob-Do-not-assume-glibc-glob-internals.patch b/meta/recipes-devtools/make/make/0002-glob-Do-not-assume-glibc-glob-internals.patch new file mode 100644 index 0000000000..d49acd9f6e --- /dev/null +++ b/meta/recipes-devtools/make/make/0002-glob-Do-not-assume-glibc-glob-internals.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | From 9858702dbd1e137262c06765919937660879f63c Mon Sep 17 00:00:00 2001 | ||
2 | From: Paul Eggert <eggert@cs.ucla.edu> | ||
3 | Date: Sun, 24 Sep 2017 09:12:58 -0400 | ||
4 | Subject: [PATCH 2/2] glob: Do not assume glibc glob internals. | ||
5 | |||
6 | It has been proposed that glibc glob start using gl_lstat, | ||
7 | which the API allows it to do. GNU 'make' should not get in | ||
8 | the way of this. See: | ||
9 | https://sourceware.org/ml/libc-alpha/2017-09/msg00409.html | ||
10 | |||
11 | * dir.c (local_lstat): New function, like local_stat. | ||
12 | (dir_setup_glob): Use it to initialize gl_lstat too, as the API | ||
13 | requires. | ||
14 | --- | ||
15 | Upstream-Status: Backport | ||
16 | |||
17 | configure.ac | 3 +-- | ||
18 | 1 file changed, 1 insertion(+), 2 deletions(-) | ||
19 | |||
20 | diff --git a/configure.ac b/configure.ac | ||
21 | index 64ec870..e87901c 100644 | ||
22 | --- a/configure.ac | ||
23 | +++ b/configure.ac | ||
24 | @@ -399,10 +399,9 @@ AC_CACHE_CHECK([if system libc has GNU glob], [make_cv_sys_gnu_glob], | ||
25 | #include <glob.h> | ||
26 | #include <fnmatch.h> | ||
27 | |||
28 | -#define GLOB_INTERFACE_VERSION 1 | ||
29 | #if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1 | ||
30 | # include <gnu-versions.h> | ||
31 | -# if _GNU_GLOB_INTERFACE_VERSION == GLOB_INTERFACE_VERSION | ||
32 | +if _GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2 | ||
33 | gnu glob | ||
34 | # endif | ||
35 | #endif], | ||
36 | -- | ||
37 | 2.16.1 | ||
38 | |||