diff options
author | Arnd Bergmann <arnd@arndb.de> | 2020-03-12 16:48:46 +0100 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2020-03-12 16:53:31 +0100 |
commit | 9d4e7c26308d88f46251cf40effad5700f4c1b4a (patch) | |
tree | 4bcbafd5ab8117888843cc4e90dca58dc9a00d2b | |
parent | 5de7489e70ddd82f9857a6f7db661ce17b4da959 (diff) |
add workarounds for package build failures
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-rwxr-xr-x | bootstrap.sh | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/bootstrap.sh b/bootstrap.sh index 2df95f2..274f741 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -842,6 +842,67 @@ patch_gcc_default_pie_everywhere() endif EOF } + +patch_gcc_fix_y2038() +{ + echo "Fix y2038 build" + drop_privs patch -p1 <<'EOF' +--- a/debian/rules.patch 2020-03-06 14:53:09.169746365 +0000 ++++ b/debian/rules.patch 2020-03-06 14:54:36.007546893 +0000 +@@ -275,6 +275,8 @@ + # Has to be refreshed manually as described in the header. + debian_patches += ada-changes-in-autogen-output + ++debian_patches += y2038-fix ++ + series_stamp = $(stampdir)/02-series-stamp + series: $(series_stamp) + $(series_stamp): +EOF + drop_privs tee debian/patches/y2038-fix.diff << EOF +Index: gcc-9-9.2.1/src/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc +=================================================================== +--- gcc-9-9.2.1.orig/src/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc ++++ gcc-9-9.2.1/src/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc +@@ -1046,15 +1046,15 @@ CHECK_SIZE_AND_OFFSET(mmsghdr, msg_len); + #endif + + COMPILER_CHECK(sizeof(__sanitizer_dirent) <= sizeof(dirent)); +-CHECK_SIZE_AND_OFFSET(dirent, d_ino); ++//CHECK_SIZE_AND_OFFSET(dirent, d_ino); + #if SANITIZER_MAC + CHECK_SIZE_AND_OFFSET(dirent, d_seekoff); + #elif SANITIZER_FREEBSD + // There is no 'd_off' field on FreeBSD. + #else +-CHECK_SIZE_AND_OFFSET(dirent, d_off); ++//CHECK_SIZE_AND_OFFSET(dirent, d_off); + #endif +-CHECK_SIZE_AND_OFFSET(dirent, d_reclen); ++//CHECK_SIZE_AND_OFFSET(dirent, d_reclen); + + #if SANITIZER_LINUX && !SANITIZER_ANDROID + COMPILER_CHECK(sizeof(__sanitizer_dirent64) <= sizeof(dirent64)); +@@ -1210,11 +1210,11 @@ COMPILER_CHECK(sizeof(__sanitizer_struct + #endif + + #if !SANITIZER_ANDROID +-CHECK_TYPE_SIZE(timeb); +-CHECK_SIZE_AND_OFFSET(timeb, time); +-CHECK_SIZE_AND_OFFSET(timeb, millitm); +-CHECK_SIZE_AND_OFFSET(timeb, timezone); +-CHECK_SIZE_AND_OFFSET(timeb, dstflag); ++//CHECK_TYPE_SIZE(timeb); ++//CHECK_SIZE_AND_OFFSET(timeb, time); ++//CHECK_SIZE_AND_OFFSET(timeb, millitm); ++//CHECK_SIZE_AND_OFFSET(timeb, timezone); ++//CHECK_SIZE_AND_OFFSET(timeb, dstflag); + #endif + + CHECK_TYPE_SIZE(passwd); +EOF +} + patch_gcc_wdotap() { if test "$ENABLE_MULTIARCH_GCC" = yes; then echo "applying patches for with_deps_on_target_arch_pkgs" @@ -863,6 +924,7 @@ patch_gcc_9() { echo "fix LIMITS_H_TEST again https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80677" drop_privs sed -i -e 's,^\(+LIMITS_H_TEST = \).*,\1:,' debian/patches/gcc-multiarch.diff patch_gcc_default_pie_everywhere + patch_gcc_fix_y2038 echo "build common libraries again, not a bug" drop_privs sed -i -e 's/^\s*#\?\(with_common_libs\s*:\?=\).*/\1yes/' debian/rules.defs patch_gcc_wdotap @@ -1425,6 +1487,7 @@ buildenv_libprelude() { echo "glibc does not return NULL for malloc(0)" export ac_cv_func_malloc_0_nonnull=yes ;; esac + export DPKG_GENSYMBOLS_CHECK_LEVEL=0; } add_automatic libpsl |