diff --git a/config/patches/make/deb-make-glob.patch b/config/patches/make/deb-make-glob.patch new file mode 100644 index 000000000..d558c31d7 --- /dev/null +++ b/config/patches/make/deb-make-glob.patch @@ -0,0 +1,31 @@ +--- make-4.2.1/glob/glob.c.ori 2019-10-17 23:06:07.841511314 +1100 ++++ make-4.2.1/glob/glob.c 2019-10-17 23:06:21.249541600 +1100 +@@ -208,28 +208,9 @@ + #endif /* __GNU_LIBRARY__ || __DJGPP__ */ + + +-#if !defined __alloca && !defined __GNU_LIBRARY__ +- +-# ifdef __GNUC__ +-# undef alloca +-# define alloca(n) __builtin_alloca (n) +-# else /* Not GCC. */ +-# ifdef HAVE_ALLOCA_H + # include +-# else /* Not HAVE_ALLOCA_H. */ +-# ifndef _AIX +-# ifdef WINDOWS32 +-# include +-# else +-extern char *alloca (); +-# endif /* WINDOWS32 */ +-# endif /* Not _AIX. */ +-# endif /* sparc or HAVE_ALLOCA_H. */ +-# endif /* GCC. */ +- + # define __alloca alloca + +-#endif + + #ifndef __GNU_LIBRARY__ + # define __stat stat diff --git a/config/software/make.rb b/config/software/make.rb index cbe23a177..7980aa818 100644 --- a/config/software/make.rb +++ b/config/software/make.rb @@ -30,6 +30,12 @@ build do env = with_standard_compiler_flags(with_embedded_path) + # Work around an error caused by Glibc 2.27 + # Thanks to: http://www.linuxfromscratch.org/lfs/view/8.2/chapter05/make.html + if debian_after_or_at_buster? || ubuntu_after_or_at_bionic? || raspbian? + patch source: "deb-make-glob.patch", plevel: 1, env: env + end + command "./configure" \ " --disable-nls" \ " --prefix=#{install_dir}/embedded", env: env