From 025ae1ed8997063b0011a9fe9c16c4d0632ddddd Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Wed, 22 Jan 2020 13:33:15 -0800 Subject: Replace Ubuntu 19.04 with 19.10. Signed-off-by: Alexey Neyman diff --git a/testing/docker/ubuntu19.04/Dockerfile b/testing/docker/ubuntu19.04/Dockerfile deleted file mode 100644 index 110bf42..0000000 --- a/testing/docker/ubuntu19.04/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -FROM ubuntu:19.04 -ARG CTNG_UID -ARG CTNG_GID -RUN groupadd -g $CTNG_GID ctng -RUN useradd -d /home/ctng -m -g $CTNG_GID -u $CTNG_UID -s /bin/bash ctng -RUN apt-get update -RUN apt-get install -y gcc g++ gperf bison flex texinfo help2man make libncurses5-dev \ - python3-dev autoconf automake libtool libtool-bin gawk wget bzip2 xz-utils unzip \ - patch libstdc++6 rsync -RUN wget -O /sbin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.1/dumb-init_1.2.1_amd64 -RUN chmod a+x /sbin/dumb-init -RUN echo 'export PATH=/opt/ctng/bin:$PATH' >> /etc/profile -ENTRYPOINT [ "/sbin/dumb-init", "--" ] - diff --git a/testing/docker/ubuntu19.10/Dockerfile b/testing/docker/ubuntu19.10/Dockerfile new file mode 100644 index 0000000..453d97c --- /dev/null +++ b/testing/docker/ubuntu19.10/Dockerfile @@ -0,0 +1,14 @@ +FROM ubuntu:19.10 +ARG CTNG_UID +ARG CTNG_GID +RUN groupadd -g $CTNG_GID ctng +RUN useradd -d /home/ctng -m -g $CTNG_GID -u $CTNG_UID -s /bin/bash ctng +RUN apt-get update +RUN apt-get install -y gcc g++ gperf bison flex texinfo help2man make libncurses5-dev \ + python3-dev autoconf automake libtool libtool-bin gawk wget bzip2 xz-utils unzip \ + patch libstdc++6 rsync git +RUN wget -O /sbin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.1/dumb-init_1.2.1_amd64 +RUN chmod a+x /sbin/dumb-init +RUN echo 'export PATH=/opt/ctng/bin:$PATH' >> /etc/profile +ENTRYPOINT [ "/sbin/dumb-init", "--" ] + -- cgit v0.10.2-6-g49f6 From e503877f8a3cbbb56eeae3ba121aedd227bd67fc Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Wed, 22 Jan 2020 13:34:04 -0800 Subject: Pick up gettext patch for pthread_sigmask build on mingw32 Fixes #1272. Signed-off-by: Alexey Neyman diff --git a/packages/gettext/0.20.1/0001-pthread_sigmask.c-mingw.patch b/packages/gettext/0.20.1/0001-pthread_sigmask.c-mingw.patch new file mode 100644 index 0000000..c3879d5 --- /dev/null +++ b/packages/gettext/0.20.1/0001-pthread_sigmask.c-mingw.patch @@ -0,0 +1,356 @@ +commit 64e905db05c32792c3f0e77ce271f65e77980a92 +Author: Bruno Haible +Date: Sat May 18 14:36:33 2019 +0200 + + pthread_sigmask: Fix compilation error with --enable-threads=windows. + + Reported by Tim Rühsen in + + and Michele Locati in + . + + * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Revert change from + 2015-06-01. Test whether pthread_sigmask is a macro, regardless of + $LIBMULTITHREAD. Consider it regardless whether module 'threadlib' is + in use and regardless which threads API is chosen. + +[Dropped ChangeLog; adjusted the paths to apply to gettext; regenerate.] + +--- + gettext-tools/configure | 105 ++++++++++----------- + gettext-tools/gnulib-m4/pthread_sigmask.m4 | 140 ++++++++++++++--------------- + 2 files changed, 118 insertions(+), 127 deletions(-) + +--- a/gettext-tools/gnulib-m4/pthread_sigmask.m4 ++++ b/gettext-tools/gnulib-m4/pthread_sigmask.m4 +@@ -1,4 +1,4 @@ +-# pthread_sigmask.m4 serial 16 ++# pthread_sigmask.m4 serial 17 + dnl Copyright (C) 2011-2019 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation + dnl gives unlimited permission to copy and/or distribute it, +@@ -9,103 +9,101 @@ + AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) + + AC_CHECK_FUNCS_ONCE([pthread_sigmask]) ++ ++ dnl On MinGW pthread_sigmask is just a macro which always returns 0. ++ dnl It does not exist as a real function, which is required by POSIX. ++ AC_CACHE_CHECK([whether pthread_sigmask is a macro], ++ [gl_cv_func_pthread_sigmask_macro], ++ [AC_EGREP_CPP([headers_define_pthread_sigmask], [ ++#include ++#include ++#ifdef pthread_sigmask ++ headers_define_pthread_sigmask ++#endif], ++ [gl_cv_func_pthread_sigmask_macro=yes], ++ [gl_cv_func_pthread_sigmask_macro=no]) ++ ]) ++ + LIB_PTHREAD_SIGMASK= + +- dnl Test whether the gnulib module 'threadlib' is in use. +- dnl Some packages like Emacs use --avoid=threadlib. +- dnl Write the symbol in such a way that it does not cause 'aclocal' to pick +- dnl the threadlib.m4 file that is installed in $PREFIX/share/aclocal/. +- m4_ifdef([gl_][THREADLIB], [ +- AC_REQUIRE([gl_][THREADLIB]) ++ if test $gl_cv_func_pthread_sigmask_macro = yes; then ++ dnl pthread_sigmask is a dummy macro. ++ HAVE_PTHREAD_SIGMASK=0 ++ dnl Make sure to '#undef pthread_sigmask' before defining it. ++ REPLACE_PTHREAD_SIGMASK=1 ++ else ++ dnl Test whether the gnulib module 'threadlib' is in use. ++ dnl Some packages like Emacs use --avoid=threadlib. ++ dnl Write the symbol in such a way that it does not cause 'aclocal' to pick ++ dnl the threadlib.m4 file that is installed in $PREFIX/share/aclocal/. ++ m4_ifdef([gl_][THREADLIB], [ ++ AC_REQUIRE([gl_][THREADLIB]) + +- if test "$gl_threads_api" = posix; then +- if test $ac_cv_func_pthread_sigmask = yes; then +- dnl pthread_sigmask is available without -lpthread. +- : +- else +- if test -n "$LIBMULTITHREAD"; then +- AC_CACHE_CHECK([for pthread_sigmask in $LIBMULTITHREAD], +- [gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD], +- [gl_save_LIBS="$LIBS" +- LIBS="$LIBS $LIBMULTITHREAD" +- AC_LINK_IFELSE( +- [AC_LANG_PROGRAM( +- [[#include +- #include +- ]], +- [[return pthread_sigmask (0, (sigset_t *) 0, (sigset_t *) 0);]]) +- ], +- [gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=yes], +- [gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=no]) +- LIBS="$gl_save_LIBS" +- ]) +- if test $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD = yes; then +- AC_CACHE_CHECK([whether pthread_sigmask is only a macro], +- [gl_cv_func_pthread_sigmask_is_macro], ++ if test "$gl_threads_api" = posix; then ++ if test $ac_cv_func_pthread_sigmask = yes; then ++ dnl pthread_sigmask is available without -lpthread. ++ : ++ else ++ if test -n "$LIBMULTITHREAD"; then ++ AC_CACHE_CHECK([for pthread_sigmask in $LIBMULTITHREAD], ++ [gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD], + [gl_save_LIBS="$LIBS" + LIBS="$LIBS $LIBMULTITHREAD" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include + #include +- #undef pthread_sigmask + ]], + [[return pthread_sigmask (0, (sigset_t *) 0, (sigset_t *) 0);]]) + ], +- [gl_cv_func_pthread_sigmask_is_macro=no], +- [gl_cv_func_pthread_sigmask_is_macro=yes]) ++ [gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=yes], ++ [gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=no]) + LIBS="$gl_save_LIBS" + ]) +- if test $gl_cv_func_pthread_sigmask_is_macro = yes; then +- dnl On MinGW pthread_sigmask is just a macro which always returns 0. +- dnl It does not exist as a real function, which is required by POSIX. +- REPLACE_PTHREAD_SIGMASK=1 +- gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=no ++ if test $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD = yes; then ++ dnl pthread_sigmask is available with -pthread or -lpthread. ++ LIB_PTHREAD_SIGMASK="$LIBMULTITHREAD" ++ else ++ dnl pthread_sigmask is not available at all. ++ HAVE_PTHREAD_SIGMASK=0 + fi +- fi +- if test $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD = yes; then +- dnl pthread_sigmask is available with -pthread or -lpthread. +- LIB_PTHREAD_SIGMASK="$LIBMULTITHREAD" + else + dnl pthread_sigmask is not available at all. + HAVE_PTHREAD_SIGMASK=0 + fi ++ fi ++ else ++ dnl pthread_sigmask may exist but does not interoperate with the chosen ++ dnl multithreading facility. ++ dnl If "$gl_threads_api" = pth, we could use the function pth_sigmask, ++ dnl but it is equivalent to sigprocmask, so we choose to emulate ++ dnl pthread_sigmask with sigprocmask also in this case. This yields ++ dnl fewer link dependencies. ++ if test $ac_cv_func_pthread_sigmask = yes; then ++ REPLACE_PTHREAD_SIGMASK=1 + else +- dnl pthread_sigmask is not available at all. + HAVE_PTHREAD_SIGMASK=0 + fi + fi +- else +- dnl pthread_sigmask may exist but does not interoperate with the chosen +- dnl multithreading facility. +- dnl If "$gl_threads_api" = pth, we could use the function pth_sigmask, +- dnl but it is equivalent to sigprocmask, so we choose to emulate +- dnl pthread_sigmask with sigprocmask also in this case. This yields fewer +- dnl link dependencies. ++ ], [ ++ dnl The module 'threadlib' is not in use, due to --avoid=threadlib being ++ dnl specified. ++ dnl The package either has prepared CPPFLAGS and LIBS for use of ++ dnl POSIX:2008 threads, or wants to build single-threaded programs. + if test $ac_cv_func_pthread_sigmask = yes; then +- REPLACE_PTHREAD_SIGMASK=1 ++ dnl pthread_sigmask exists and does not require extra libraries. ++ dnl Assume that it is declared. ++ : + else ++ dnl pthread_sigmask either does not exist or needs extra libraries. + HAVE_PTHREAD_SIGMASK=0 ++ dnl Define the symbol rpl_pthread_sigmask, not pthread_sigmask, ++ dnl so as to not accidentally override the system's pthread_sigmask ++ dnl symbol from libpthread. This is necessary on IRIX 6.5. ++ REPLACE_PTHREAD_SIGMASK=1 + fi +- fi +- ], [ +- dnl The module 'threadlib' is not in use, due to --avoid=threadlib being +- dnl specified. +- dnl The package either has prepared CPPFLAGS and LIBS for use of POSIX:2008 +- dnl threads, or wants to build single-threaded programs. +- if test $ac_cv_func_pthread_sigmask = yes; then +- dnl pthread_sigmask exists and does not require extra libraries. +- dnl Assume that it is declared. +- : +- else +- dnl pthread_sigmask either does not exist or needs extra libraries. +- HAVE_PTHREAD_SIGMASK=0 +- dnl Define the symbol rpl_pthread_sigmask, not pthread_sigmask, +- dnl so as to not accidentally override the system's pthread_sigmask +- dnl symbol from libpthread. This is necessary on IRIX 6.5. +- REPLACE_PTHREAD_SIGMASK=1 +- fi +- ]) ++ ]) ++ fi + + AC_SUBST([LIB_PTHREAD_SIGMASK]) + dnl We don't need a variable LTLIB_PTHREAD_SIGMASK, because when +--- a/gettext-tools/configure ++++ b/gettext-tools/configure +@@ -61291,53 +61291,51 @@ + + + +- LIB_PTHREAD_SIGMASK= +- +- + +- +- if test "$gl_threads_api" = posix; then +- if test $ac_cv_func_pthread_sigmask = yes; then +- : +- else +- if test -n "$LIBMULTITHREAD"; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_sigmask in $LIBMULTITHREAD" >&5 +-$as_echo_n "checking for pthread_sigmask in $LIBMULTITHREAD... " >&6; } +-if ${gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD+:} false; then : ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask is a macro" >&5 ++$as_echo_n "checking whether pthread_sigmask is a macro... " >&6; } ++if ${gl_cv_func_pthread_sigmask_macro+:} false; then : + $as_echo_n "(cached) " >&6 + else +- gl_save_LIBS="$LIBS" +- LIBS="$LIBS $LIBMULTITHREAD" +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include +- #include +- +-int +-main () +-{ +-return pthread_sigmask (0, (sigset_t *) 0, (sigset_t *) 0); +- ; +- return 0; +-} + ++#include ++#include ++#ifdef pthread_sigmask ++ headers_define_pthread_sigmask ++#endif + _ACEOF +-if ac_fn_c_try_link "$LINENO"; then : +- gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=yes ++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ++ $EGREP "headers_define_pthread_sigmask" >/dev/null 2>&1; then : ++ gl_cv_func_pthread_sigmask_macro=yes + else +- gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=no ++ gl_cv_func_pthread_sigmask_macro=no + fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +- LIBS="$gl_save_LIBS" ++rm -f conftest* ++ + + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&5 +-$as_echo "$gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&6; } +- if test $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD = yes; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask is only a macro" >&5 +-$as_echo_n "checking whether pthread_sigmask is only a macro... " >&6; } +-if ${gl_cv_func_pthread_sigmask_is_macro+:} false; then : ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_macro" >&5 ++$as_echo "$gl_cv_func_pthread_sigmask_macro" >&6; } ++ ++ LIB_PTHREAD_SIGMASK= ++ ++ if test $gl_cv_func_pthread_sigmask_macro = yes; then ++ HAVE_PTHREAD_SIGMASK=0 ++ REPLACE_PTHREAD_SIGMASK=1 ++ else ++ ++ ++ ++ if test "$gl_threads_api" = posix; then ++ if test $ac_cv_func_pthread_sigmask = yes; then ++ : ++ else ++ if test -n "$LIBMULTITHREAD"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_sigmask in $LIBMULTITHREAD" >&5 ++$as_echo_n "checking for pthread_sigmask in $LIBMULTITHREAD... " >&6; } ++if ${gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD+:} false; then : + $as_echo_n "(cached) " >&6 + else + gl_save_LIBS="$LIBS" +@@ -61346,7 +61344,6 @@ + /* end confdefs.h. */ + #include + #include +- #undef pthread_sigmask + + int + main () +@@ -61358,39 +61355,35 @@ + + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : +- gl_cv_func_pthread_sigmask_is_macro=no ++ gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=yes + else +- gl_cv_func_pthread_sigmask_is_macro=yes ++ gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=no + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gl_save_LIBS" + + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_is_macro" >&5 +-$as_echo "$gl_cv_func_pthread_sigmask_is_macro" >&6; } +- if test $gl_cv_func_pthread_sigmask_is_macro = yes; then +- REPLACE_PTHREAD_SIGMASK=1 +- gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=no ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&5 ++$as_echo "$gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&6; } ++ if test $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD = yes; then ++ LIB_PTHREAD_SIGMASK="$LIBMULTITHREAD" ++ else ++ HAVE_PTHREAD_SIGMASK=0 + fi +- fi +- if test $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD = yes; then +- LIB_PTHREAD_SIGMASK="$LIBMULTITHREAD" + else + HAVE_PTHREAD_SIGMASK=0 + fi +- else +- HAVE_PTHREAD_SIGMASK=0 + fi +- fi +- else +- if test $ac_cv_func_pthread_sigmask = yes; then +- REPLACE_PTHREAD_SIGMASK=1 + else +- HAVE_PTHREAD_SIGMASK=0 ++ if test $ac_cv_func_pthread_sigmask = yes; then ++ REPLACE_PTHREAD_SIGMASK=1 ++ else ++ HAVE_PTHREAD_SIGMASK=0 ++ fi + fi +- fi + ++ fi + + + -- cgit v0.10.2-6-g49f6 From d35d2672782e682e8ef56e0e3a8f2bd5d9728fa5 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Fri, 31 Jan 2020 00:57:45 -0800 Subject: Upstrean fix for CET-enabled compiler with no --enable-cet Signed-off-by: Alexey Neyman diff --git a/packages/glibc/2.28/0001-x86-Assume-enable-cet-if-GCC-defaults-to-CET-BZ-2522.patch b/packages/glibc/2.28/0001-x86-Assume-enable-cet-if-GCC-defaults-to-CET-BZ-2522.patch new file mode 100644 index 0000000..b3c82e1 --- /dev/null +++ b/packages/glibc/2.28/0001-x86-Assume-enable-cet-if-GCC-defaults-to-CET-BZ-2522.patch @@ -0,0 +1,82 @@ +From 9f917f7b411c307c34eb1bae85d72ffe26167523 Mon Sep 17 00:00:00 2001 +From: Florian Weimer +Date: Tue, 3 Dec 2019 21:11:32 +0100 +Subject: [PATCH] x86: Assume --enable-cet if GCC defaults to CET [BZ #25225] + +This links in CET support if GCC defaults to CET. Otherwise, __CET__ +is defined, yet CET functionality is not compiled and linked into the +dynamic loader, resulting in a linker failure due to undefined +references to _dl_cet_check and _dl_open_check. + +(cherry picked from commit 9fb8139079ef0bb1aa33a4ae418cbb113b9b9da7) +--- + NEWS | 1 + + configure | 23 ++++++++++++++++++++++- + configure.ac | 9 ++++++++- + 3 files changed, 31 insertions(+), 2 deletions(-) + +diff --git a/configure b/configure +index fde57d63fe..c02753c0fe 100755 +--- a/configure ++++ b/configure +@@ -3762,11 +3762,32 @@ else + fi + + ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++int ++main () ++{ ++ ++#ifndef __CET__ ++#error no CET compiler support ++#endif ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ libc_cv_compiler_default_cet=yes ++else ++ libc_cv_compiler_default_cet=no ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ + # Check whether --enable-cet was given. + if test "${enable_cet+set}" = set; then : + enableval=$enable_cet; enable_cet=$enableval + else +- enable_cet=no ++ enable_cet=$libc_cv_compiler_default_cet + fi + + +diff --git a/configure.ac b/configure.ac +index 014e09a5d5..139554b94a 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -464,11 +464,18 @@ AC_ARG_ENABLE([mathvec], + [build_mathvec=$enableval], + [build_mathvec=notset]) + ++AC_TRY_COMPILE([], [ ++#ifndef __CET__ ++# error no CET compiler support ++#endif], ++ [libc_cv_compiler_default_cet=yes], ++ [libc_cv_compiler_default_cet=no]) ++ + AC_ARG_ENABLE([cet], + AC_HELP_STRING([--enable-cet], + [enable Intel Control-flow Enforcement Technology (CET), x86 only]), + [enable_cet=$enableval], +- [enable_cet=no]) ++ [enable_cet=$libc_cv_compiler_default_cet]) + + # We keep the original values in `$config_*' and never modify them, so we + # can write them unchanged into config.make. Everything else uses +-- +2.20.1 + diff --git a/packages/glibc/2.29/0002-x86-Assume-enable-cet-if-GCC-defaults-to-CET-BZ-2522.patch b/packages/glibc/2.29/0002-x86-Assume-enable-cet-if-GCC-defaults-to-CET-BZ-2522.patch new file mode 100644 index 0000000..e188dd0 --- /dev/null +++ b/packages/glibc/2.29/0002-x86-Assume-enable-cet-if-GCC-defaults-to-CET-BZ-2522.patch @@ -0,0 +1,82 @@ +From 0b4c3e1e0b8656149d4556d2f81a2958426ebc94 Mon Sep 17 00:00:00 2001 +From: Florian Weimer +Date: Tue, 3 Dec 2019 21:08:49 +0100 +Subject: [PATCH] x86: Assume --enable-cet if GCC defaults to CET [BZ #25225] + +This links in CET support if GCC defaults to CET. Otherwise, __CET__ +is defined, yet CET functionality is not compiled and linked into the +dynamic loader, resulting in a linker failure due to undefined +references to _dl_cet_check and _dl_open_check. + +(cherry picked from commit 9fb8139079ef0bb1aa33a4ae418cbb113b9b9da7) +--- + NEWS | 1 + + configure | 23 ++++++++++++++++++++++- + configure.ac | 9 ++++++++- + 3 files changed, 31 insertions(+), 2 deletions(-) + +diff --git a/configure b/configure +index 101dfddf37..6a2df7c2be 100755 +--- a/configure ++++ b/configure +@@ -3777,11 +3777,32 @@ else + fi + + ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++int ++main () ++{ ++ ++#ifndef __CET__ ++#error no CET compiler support ++#endif ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ libc_cv_compiler_default_cet=yes ++else ++ libc_cv_compiler_default_cet=no ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ + # Check whether --enable-cet was given. + if test "${enable_cet+set}" = set; then : + enableval=$enable_cet; enable_cet=$enableval + else +- enable_cet=no ++ enable_cet=$libc_cv_compiler_default_cet + fi + + +diff --git a/configure.ac b/configure.ac +index 46a74687a6..f483afdc2e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -472,11 +472,18 @@ AC_ARG_ENABLE([mathvec], + [build_mathvec=$enableval], + [build_mathvec=notset]) + ++AC_TRY_COMPILE([], [ ++#ifndef __CET__ ++# error no CET compiler support ++#endif], ++ [libc_cv_compiler_default_cet=yes], ++ [libc_cv_compiler_default_cet=no]) ++ + AC_ARG_ENABLE([cet], + AC_HELP_STRING([--enable-cet], + [enable Intel Control-flow Enforcement Technology (CET), x86 only]), + [enable_cet=$enableval], +- [enable_cet=no]) ++ [enable_cet=$libc_cv_compiler_default_cet]) + + # We keep the original values in `$config_*' and never modify them, so we + # can write them unchanged into config.make. Everything else uses +-- +2.20.1 + diff --git a/packages/glibc/2.30/0002-x86-Assume-enable-cet-if-GCC-defaults-to-CET-BZ-2522.patch b/packages/glibc/2.30/0002-x86-Assume-enable-cet-if-GCC-defaults-to-CET-BZ-2522.patch new file mode 100644 index 0000000..6f5dbc3 --- /dev/null +++ b/packages/glibc/2.30/0002-x86-Assume-enable-cet-if-GCC-defaults-to-CET-BZ-2522.patch @@ -0,0 +1,80 @@ +From 761452f12781f2d15a50f2dcd9f40c53bc0ff040 Mon Sep 17 00:00:00 2001 +From: Florian Weimer +Date: Tue, 3 Dec 2019 20:26:28 +0100 +Subject: [PATCH] x86: Assume --enable-cet if GCC defaults to CET [BZ #25225] + +This links in CET support if GCC defaults to CET. Otherwise, __CET__ +is defined, yet CET functionality is not compiled and linked into the +dynamic loader, resulting in a linker failure due to undefined +references to _dl_cet_check and _dl_open_check. +--- + NEWS | 1 + + configure | 23 ++++++++++++++++++++++- + configure.ac | 9 ++++++++- + 3 files changed, 31 insertions(+), 2 deletions(-) + +diff --git a/configure b/configure +index c773c487b5..6d26b8246f 100755 +--- a/configure ++++ b/configure +@@ -3777,11 +3777,32 @@ else + fi + + ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++int ++main () ++{ ++ ++#ifndef __CET__ ++#error no CET compiler support ++#endif ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ libc_cv_compiler_default_cet=yes ++else ++ libc_cv_compiler_default_cet=no ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ + # Check whether --enable-cet was given. + if test "${enable_cet+set}" = set; then : + enableval=$enable_cet; enable_cet=$enableval + else +- enable_cet=no ++ enable_cet=$libc_cv_compiler_default_cet + fi + + +diff --git a/configure.ac b/configure.ac +index 598ba6c4ae..7436485419 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -472,11 +472,18 @@ AC_ARG_ENABLE([mathvec], + [build_mathvec=$enableval], + [build_mathvec=notset]) + ++AC_TRY_COMPILE([], [ ++#ifndef __CET__ ++# error no CET compiler support ++#endif], ++ [libc_cv_compiler_default_cet=yes], ++ [libc_cv_compiler_default_cet=no]) ++ + AC_ARG_ENABLE([cet], + AC_HELP_STRING([--enable-cet], + [enable Intel Control-flow Enforcement Technology (CET), x86 only]), + [enable_cet=$enableval], +- [enable_cet=no]) ++ [enable_cet=$libc_cv_compiler_default_cet]) + + # We keep the original values in `$config_*' and never modify them, so we + # can write them unchanged into config.make. Everything else uses +-- +2.20.1 + -- cgit v0.10.2-6-g49f6 From c317f57b405779588064f6a4ff292df0c5021f83 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Mon, 3 Feb 2020 16:10:59 -0800 Subject: Suppress YAML support in DTC ... which fails to build if pkg-config is not installed. Signed-off-by: Alexey Neyman diff --git a/scripts/build/companion_tools/500-dtc.sh b/scripts/build/companion_tools/500-dtc.sh index ce0b303..a16ff62 100644 --- a/scripts/build/companion_tools/500-dtc.sh +++ b/scripts/build/companion_tools/500-dtc.sh @@ -48,11 +48,17 @@ do_dtc_backend() eval "${arg// /\\ }" done + # Override PKG_CONFIG: if pkg-config is not installed, DTC's makefile + # misinterprets the error code and tries to enable YAML support while + # not linking against libyaml. NO_YAML=1 is sufficient to make the build + # pass; PKG_CONFIG=/bin/true just suppresses some scary error messages. extra_opts=( \ CC="${host}-gcc" \ AR="${host}-ar" \ PREFIX="${prefix}" \ + PKG_CONFIG=/bin/true \ NO_PYTHON=1 \ + NO_YAML=1 \ BIN=dtc \ ) if [ -n "${CT_DTC_VERBOSE}" ]; then -- cgit v0.10.2-6-g49f6 From b7a87769b934c7dec0f22f8743c3ed397a3a6d51 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Mon, 3 Feb 2020 16:11:33 -0800 Subject: Ignore trailing / in container name ... so that it is possible to use tab completion when selecting the container to use. Signed-off-by: Alexey Neyman diff --git a/testing/docker/dmgr.sh b/testing/docker/dmgr.sh index 825362a..e6a93e7 100755 --- a/testing/docker/dmgr.sh +++ b/testing/docker/dmgr.sh @@ -170,7 +170,7 @@ fi case "${action}" in build|install|sample|enter|root|clean|distclean) for c in ${selected_containers}; do - eval "action_${action} ${c} \"$@\"" + eval "action_${action} ${c%/} \"$@\"" done ;; "") -- cgit v0.10.2-6-g49f6 From 13511cfbc0c8253bdf7d6529e521e34a8754e6b7 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Sun, 9 Feb 2020 00:36:18 -0800 Subject: Upstream patch to disable FORTIFY_SOURCE on mingw32 Signed-off-by: Alexey Neyman diff --git a/packages/gdb/8.3.1/0005-no-fortify-mingw32.patch b/packages/gdb/8.3.1/0005-no-fortify-mingw32.patch new file mode 100644 index 0000000..54fe9e2 --- /dev/null +++ b/packages/gdb/8.3.1/0005-no-fortify-mingw32.patch @@ -0,0 +1,43 @@ +commit 5f23a08201ed01570b34f5cff99a95fc7b9e2fdb +Author: Christian Biesinger +Date: Wed Dec 18 12:06:43 2019 -0600 + + Don't define _FORTIFY_SOURCE on MinGW + + Recent MinGW versions require -lssp when using _FORTIFY_SOURCE, which + gdb does (in common-defs.h) + https://github.com/msys2/MINGW-packages/issues/5868#issuecomment-544107564 + + To avoid all the complications with checking for -lssp and making sure it's + linked statically, just don't define it. + + gdb/ChangeLog: + + 2020-01-09 Christian Biesinger + + * gdbsupport/common-defs.h: Don't define _FORTIFY_SOURCE on MinGW. + + Change-Id: Ide6870ab57198219a2ef78bc675768a789ca2b1d + +--- + gdb/common/common-defs.h | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +--- a/gdb/common/common-defs.h ++++ b/gdb/common/common-defs.h +@@ -66,9 +66,13 @@ + plus this seems like a reasonable safety measure. The check for + optimization is required because _FORTIFY_SOURCE only works when + optimization is enabled. If _FORTIFY_SOURCE is already defined, +- then we don't do anything. */ ++ then we don't do anything. Also, on MinGW, fortify requires ++ linking to -lssp, and to avoid the hassle of checking for ++ that and linking to it statically, we just don't define ++ _FORTIFY_SOURCE there. */ + +-#if !defined _FORTIFY_SOURCE && defined __OPTIMIZE__ && __OPTIMIZE__ > 0 ++#if (!defined _FORTIFY_SOURCE && defined __OPTIMIZE__ && __OPTIMIZE__ > 0 \ ++ && !defined(__MINGW32__)) + #define _FORTIFY_SOURCE 2 + #endif + -- cgit v0.10.2-6-g49f6