Skip to content
This repository was archived by the owner on Feb 27, 2023. It is now read-only.

Commit 4617551

Browse files
committed
Update for Ubuntu 20.04 build environment
1 parent 0082207 commit 4617551

31 files changed

+473
-27
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
Subject: Workaround change in glibc
2+
3+
Temporary workaround to compile with glibc 2.28, which
4+
deprecated some constants
5+
6+
Based on the workaround made for the tools/m4 package
7+
8+
--- a/lib/stdio-impl.h
9+
+++ b/lib/stdio-impl.h
10+
@@ -18,6 +18,12 @@
11+
the same implementation of stdio extension API, except that some fields
12+
have different naming conventions, or their access requires some casts. */
13+
14+
+/* Glibc 2.28 made _IO_IN_BACKUP private. For now, work around this
15+
+ problem by defining it ourselves. FIXME: Do not rely on glibc
16+
+ internals. */
17+
+#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN
18+
+# define _IO_IN_BACKUP 0x100
19+
+#endif
20+
21+
/* BSD stdio derived implementations. */
22+
23+
--- a/lib/fseterr.c
24+
+++ b/lib/fseterr.c
25+
@@ -29,7 +29,7 @@
26+
/* Most systems provide FILE as a struct and the necessary bitmask in
27+
<stdio.h>, because they need it for implementing getc() and putc() as
28+
fast macros. */
29+
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
30+
+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
31+
fp->_flags |= _IO_ERR_SEEN;
32+
#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
33+
fp_->_flags |= __SERR;

buildroot/package/cmake/cmake.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
################################################################################
66

7-
CMAKE_VERSION_MAJOR = 3.0
7+
CMAKE_VERSION_MAJOR = 3.1
88
CMAKE_VERSION = $(CMAKE_VERSION_MAJOR).2
99
CMAKE_SITE = http://www.cmake.org/files/v$(CMAKE_VERSION_MAJOR)
1010
CMAKE_LICENSE = BSD-3c
Lines changed: 166 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
From 4af4a4a71827c0bc5e0ec67af23edef4f15cee8e Mon Sep 17 00:00:00 2001
2+
From: Paul Eggert <[email protected]>
3+
Date: Mon, 5 Mar 2018 10:56:29 -0800
4+
Subject: [PATCH] fflush: adjust to glibc 2.28 libio.h removal
5+
MIME-Version: 1.0
6+
Content-Type: text/plain; charset=UTF-8
7+
Content-Transfer-Encoding: 8bit
8+
9+
Problem reported by Daniel P. Berrangé in:
10+
https://lists.gnu.org/r/bug-gnulib/2018-03/msg00000.html
11+
* lib/fbufmode.c (fbufmode):
12+
* lib/fflush.c (clear_ungetc_buffer_preserving_position)
13+
(disable_seek_optimization, rpl_fflush):
14+
* lib/fpending.c (__fpending):
15+
* lib/fpurge.c (fpurge):
16+
* lib/freadable.c (freadable):
17+
* lib/freadahead.c (freadahead):
18+
* lib/freading.c (freading):
19+
* lib/freadptr.c (freadptr):
20+
* lib/freadseek.c (freadptrinc):
21+
* lib/fseeko.c (fseeko):
22+
* lib/fseterr.c (fseterr):
23+
* lib/fwritable.c (fwritable):
24+
* lib/fwriting.c (fwriting):
25+
Check _IO_EOF_SEEN instead of _IO_ftrylockfile.
26+
* lib/stdio-impl.h (_IO_IN_BACKUP) [_IO_EOF_SEEN]:
27+
Define if not already defined.
28+
29+
[[email protected]: partially backport from upstream gnulib]
30+
Signed-off-by: "Yann E. MORIN" <[email protected]>
31+
32+
---
33+
lib/fflush.c | 6 +++---
34+
lib/fpending.c | 2 +-
35+
lib/fpurge.c | 2 +-
36+
lib/freadahead.c | 2 +-
37+
lib/freading.c | 2 +-
38+
lib/fseeko.c | 4 ++--
39+
lib/stdio-impl.h | 6 ++++++
40+
7 files changed, 15 insertions(+), 9 deletions(-)
41+
42+
diff --git a/lib/fflush.c b/build-aux/gnulib/lib/fflush.c
43+
index 983ade0ff..a6edfa105 100644
44+
--- a/lib/fflush.c
45+
+++ b/lib/fflush.c
46+
@@ -33,7 +33,7 @@
47+
#undef fflush
48+
49+
50+
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
51+
+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
52+
53+
/* Clear the stream's ungetc buffer, preserving the value of ftello (fp). */
54+
static void
55+
@@ -72,7 +72,7 @@ clear_ungetc_buffer (FILE *fp)
56+
57+
#endif
58+
59+
-#if ! (defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */)
60+
+#if ! (defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */)
61+
62+
# if (defined __sferror || defined __DragonFly__ || defined __ANDROID__) && defined __SNPT
63+
/* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
64+
@@ -148,7 +148,7 @@ rpl_fflush (FILE *stream)
65+
if (stream == NULL || ! freading (stream))
66+
return fflush (stream);
67+
68+
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
69+
+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
70+
71+
clear_ungetc_buffer_preserving_position (stream);
72+
73+
diff --git a/lib/fpending.c b/build-aux/gnulib/lib/fpending.c
74+
index c84e3a5b4..789f50e4e 100644
75+
--- a/lib/fpending.c
76+
+++ b/lib/fpending.c
77+
@@ -32,7 +32,7 @@ __fpending (FILE *fp)
78+
/* Most systems provide FILE as a struct and the necessary bitmask in
79+
<stdio.h>, because they need it for implementing getc() and putc() as
80+
fast macros. */
81+
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
82+
+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
83+
return fp->_IO_write_ptr - fp->_IO_write_base;
84+
#elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
85+
/* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
86+
diff --git a/lib/fpurge.c b/build-aux/gnulib/lib/fpurge.c
87+
index b1d417c7a..3aedcc373 100644
88+
--- a/lib/fpurge.c
89+
+++ b/lib/fpurge.c
90+
@@ -62,7 +62,7 @@ fpurge (FILE *fp)
91+
/* Most systems provide FILE as a struct and the necessary bitmask in
92+
<stdio.h>, because they need it for implementing getc() and putc() as
93+
fast macros. */
94+
-# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
95+
+# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
96+
fp->_IO_read_end = fp->_IO_read_ptr;
97+
fp->_IO_write_ptr = fp->_IO_write_base;
98+
/* Avoid memory leak when there is an active ungetc buffer. */
99+
diff --git a/lib/freadahead.c b/build-aux/gnulib/lib/freadahead.c
100+
index c2ecb5b28..23ec76ee5 100644
101+
--- a/lib/freadahead.c
102+
+++ b/lib/freadahead.c
103+
@@ -30,7 +30,7 @@ extern size_t __sreadahead (FILE *);
104+
size_t
105+
freadahead (FILE *fp)
106+
{
107+
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
108+
+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
109+
if (fp->_IO_write_ptr > fp->_IO_write_base)
110+
return 0;
111+
return (fp->_IO_read_end - fp->_IO_read_ptr)
112+
diff --git a/lib/freading.c b/build-aux/gnulib/lib/freading.c
113+
index 73c28acdd..c24d0c88a 100644
114+
--- a/lib/freading.c
115+
+++ b/lib/freading.c
116+
@@ -31,7 +31,7 @@ freading (FILE *fp)
117+
/* Most systems provide FILE as a struct and the necessary bitmask in
118+
<stdio.h>, because they need it for implementing getc() and putc() as
119+
fast macros. */
120+
-# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
121+
+# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
122+
return ((fp->_flags & _IO_NO_WRITES) != 0
123+
|| ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) == 0
124+
&& fp->_IO_read_base != NULL));
125+
diff --git a/lib/fseeko.c b/build-aux/gnulib/lib/fseeko.c
126+
index 0101ab55f..193f4e8ce 100644
127+
--- a/lib/fseeko.c
128+
+++ b/lib/fseeko.c
129+
@@ -47,7 +47,7 @@ fseeko (FILE *fp, off_t offset, int whence)
130+
#endif
131+
132+
/* These tests are based on fpurge.c. */
133+
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
134+
+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
135+
if (fp->_IO_read_end == fp->_IO_read_ptr
136+
&& fp->_IO_write_ptr == fp->_IO_write_base
137+
&& fp->_IO_save_base == NULL)
138+
@@ -123,7 +123,7 @@ fseeko (FILE *fp, off_t offset, int whence)
139+
return -1;
140+
}
141+
142+
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
143+
+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
144+
fp->_flags &= ~_IO_EOF_SEEN;
145+
fp->_offset = pos;
146+
#elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
147+
diff --git a/lib/stdio-impl.h b/build-aux/gnulib/lib/stdio-impl.h
148+
index 78d896e9f..05c5752a2 100644
149+
--- a/lib/stdio-impl.h
150+
+++ b/lib/stdio-impl.h
151+
@@ -18,6 +18,12 @@
152+
the same implementation of stdio extension API, except that some fields
153+
have different naming conventions, or their access requires some casts. */
154+
155+
+/* Glibc 2.28 made _IO_IN_BACKUP private. For now, work around this
156+
+ problem by defining it ourselves. FIXME: Do not rely on glibc
157+
+ internals. */
158+
+#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN
159+
+# define _IO_IN_BACKUP 0x100
160+
+#endif
161+
162+
/* BSD stdio derived implementations. */
163+
164+
--
165+
2.14.1
166+
Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
From 74d9d6a293d7462dea8f83e7fc5ac792e956a0ad Mon Sep 17 00:00:00 2001
2+
From: Paul Eggert <[email protected]>
3+
Date: Thu, 8 Mar 2018 16:42:45 -0800
4+
Subject: [PATCH 2/2] fflush: be more paranoid about libio.h change
5+
6+
Suggested by Eli Zaretskii in:
7+
https://lists.gnu.org/r/emacs-devel/2018-03/msg00270.html
8+
* lib/fbufmode.c (fbufmode):
9+
* lib/fflush.c (clear_ungetc_buffer_preserving_position)
10+
(disable_seek_optimization, rpl_fflush):
11+
* lib/fpending.c (__fpending):
12+
* lib/fpurge.c (fpurge):
13+
* lib/freadable.c (freadable):
14+
* lib/freadahead.c (freadahead):
15+
* lib/freading.c (freading):
16+
* lib/freadptr.c (freadptr):
17+
* lib/freadseek.c (freadptrinc):
18+
* lib/fseeko.c (fseeko):
19+
* lib/fseterr.c (fseterr):
20+
* lib/fwritable.c (fwritable):
21+
* lib/fwriting.c (fwriting):
22+
Look at _IO_ftrylockfile as well as at _IO_EOF_SEEN.
23+
---
24+
lib/fflush.c | 9 ++++++---
25+
lib/fpending.c | 3 ++-
26+
lib/fpurge.c | 3 ++-
27+
lib/freadahead.c | 3 ++-
28+
lib/freading.c | 3 ++-
29+
lib/fseeko.c | 6 ++++--
30+
6 files changed, 18 insertions(+), 9 deletions(-)
31+
32+
[[email protected]: partially backport from upstream gnulib]
33+
Signed-off-by: "Yann E. MORIN" <[email protected]>
34+
35+
diff --git a/lib/fflush.c b/build-aux/gnulib/lib/fflush.c
36+
index a6edfa105..a140b7ad9 100644
37+
--- a/lib/fflush.c
38+
+++ b/lib/fflush.c
39+
@@ -33,7 +33,8 @@
40+
#undef fflush
41+
42+
43+
-#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
44+
+#if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1
45+
+/* GNU libc, BeOS, Haiku, Linux libc5 */
46+
47+
/* Clear the stream's ungetc buffer, preserving the value of ftello (fp). */
48+
static void
49+
@@ -72,7 +73,8 @@ clear_ungetc_buffer (FILE *fp)
50+
51+
#endif
52+
53+
-#if ! (defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */)
54+
+#if ! (defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1)
55+
+/* GNU libc, BeOS, Haiku, Linux libc5 */
56+
57+
# if (defined __sferror || defined __DragonFly__ || defined __ANDROID__) && defined __SNPT
58+
/* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
59+
@@ -148,7 +150,8 @@ rpl_fflush (FILE *stream)
60+
if (stream == NULL || ! freading (stream))
61+
return fflush (stream);
62+
63+
-#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
64+
+#if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1
65+
+ /* GNU libc, BeOS, Haiku, Linux libc5 */
66+
67+
clear_ungetc_buffer_preserving_position (stream);
68+
69+
diff --git a/lib/fpending.c b/build-aux/gnulib/lib/fpending.c
70+
index 789f50e4e..7bc235ded 100644
71+
--- a/lib/fpending.c
72+
+++ b/lib/fpending.c
73+
@@ -32,7 +32,8 @@ __fpending (FILE *fp)
74+
/* Most systems provide FILE as a struct and the necessary bitmask in
75+
<stdio.h>, because they need it for implementing getc() and putc() as
76+
fast macros. */
77+
-#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
78+
+#if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1
79+
+ /* GNU libc, BeOS, Haiku, Linux libc5 */
80+
return fp->_IO_write_ptr - fp->_IO_write_base;
81+
#elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
82+
/* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
83+
diff --git a/lib/fpurge.c b/build-aux/gnulib/lib/fpurge.c
84+
index 3aedcc373..554790b56 100644
85+
--- a/lib/fpurge.c
86+
+++ b/lib/fpurge.c
87+
@@ -62,7 +62,8 @@ fpurge (FILE *fp)
88+
/* Most systems provide FILE as a struct and the necessary bitmask in
89+
<stdio.h>, because they need it for implementing getc() and putc() as
90+
fast macros. */
91+
-# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
92+
+# if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1
93+
+ /* GNU libc, BeOS, Haiku, Linux libc5 */
94+
fp->_IO_read_end = fp->_IO_read_ptr;
95+
fp->_IO_write_ptr = fp->_IO_write_base;
96+
/* Avoid memory leak when there is an active ungetc buffer. */
97+
diff --git a/lib/freadahead.c b/build-aux/gnulib/lib/freadahead.c
98+
index 23ec76ee5..ed3dd0ebd 100644
99+
--- a/lib/freadahead.c
100+
+++ b/lib/freadahead.c
101+
@@ -30,7 +30,8 @@ extern size_t __sreadahead (FILE *);
102+
size_t
103+
freadahead (FILE *fp)
104+
{
105+
-#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
106+
+#if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1
107+
+ /* GNU libc, BeOS, Haiku, Linux libc5 */
108+
if (fp->_IO_write_ptr > fp->_IO_write_base)
109+
return 0;
110+
return (fp->_IO_read_end - fp->_IO_read_ptr)
111+
diff --git a/lib/freading.c b/build-aux/gnulib/lib/freading.c
112+
index c24d0c88a..790f92ca3 100644
113+
--- a/lib/freading.c
114+
+++ b/lib/freading.c
115+
@@ -31,7 +31,8 @@ freading (FILE *fp)
116+
/* Most systems provide FILE as a struct and the necessary bitmask in
117+
<stdio.h>, because they need it for implementing getc() and putc() as
118+
fast macros. */
119+
-# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
120+
+# if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1
121+
+ /* GNU libc, BeOS, Haiku, Linux libc5 */
122+
return ((fp->_flags & _IO_NO_WRITES) != 0
123+
|| ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) == 0
124+
&& fp->_IO_read_base != NULL));
125+
diff --git a/lib/fseeko.c b/build-aux/gnulib/lib/fseeko.c
126+
index 193f4e8ce..e5c5172e7 100644
127+
--- a/lib/fseeko.c
128+
+++ b/lib/fseeko.c
129+
@@ -47,7 +47,8 @@ fseeko (FILE *fp, off_t offset, int whence)
130+
#endif
131+
132+
/* These tests are based on fpurge.c. */
133+
-#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
134+
+#if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1
135+
+ /* GNU libc, BeOS, Haiku, Linux libc5 */
136+
if (fp->_IO_read_end == fp->_IO_read_ptr
137+
&& fp->_IO_write_ptr == fp->_IO_write_base
138+
&& fp->_IO_save_base == NULL)
139+
@@ -123,7 +124,8 @@ fseeko (FILE *fp, off_t offset, int whence)
140+
return -1;
141+
}
142+
143+
-#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
144+
+#if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1
145+
+ /* GNU libc, BeOS, Haiku, Linux libc5 */
146+
fp->_flags &= ~_IO_EOF_SEEN;
147+
fp->_offset = pos;
148+
#elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
149+
--
150+
2.14.1
151+

buildroot/package/m4/m4.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
#
55
################################################################################
66

7-
M4_VERSION = 1.4.17
7+
M4_VERSION = 1.4.18
88
M4_SOURCE = m4-$(M4_VERSION).tar.xz
99
M4_SITE = $(BR2_GNU_MIRROR)/m4
10-
M4_LICENSE = GPLv3+
10+
M4_LICENSE = GPL-3.0+
1111
M4_LICENSE_FILES = COPYING
1212
HOST_M4_CONF_OPTS = --disable-static
1313

0 commit comments

Comments
 (0)