Skip to content

Commit

Permalink
chromium: Fix ARM build with recent glibc
Browse files Browse the repository at this point in the history
As discussed in #729.

Signed-off-by: Max Ihlenfeldt <[email protected]>
  • Loading branch information
MaxIhlenfeldt committed Jul 4, 2023
1 parent 94f1a2b commit 1c6f9e9
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
6 changes: 6 additions & 0 deletions meta-chromium/recipes-browser/chromium/chromium-gn.inc
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ SRC_URI:append:libc-musl = "\
file://musl/fix-libc-version-include.patch \
"

# OE defines _TIME_BITS only for 32-bit ARM (ignoring architectures that we
# don't support), see its meta/conf/distro/include/time64.inc.
SRC_URI:append:arm = "\
file://0031-Fix-ARM-build-with-recent-glibc.patch \
"

ANY_OF_DISTRO_FEATURES = "opengl vulkan"

# Append instead of assigning; the gtk-icon-cache class inherited above also
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
From ad900d1ee33daaaa09d4284e2804cd5f9db0c07e Mon Sep 17 00:00:00 2001
From: Max Ihlenfeldt <[email protected]>
Date: Tue, 4 Jul 2023 10:05:09 +0000
Subject: [PATCH] Fix ARM build with recent glibc

For some reason zlib #undefs _FILE_OFFSET_BITS which doesn't play well
with glibc 2.34's bminor/glibc@47f24c2 and the newly-introduced checks
in features-time64.h. See also madler/zlib#447.

Upstream-status: Inappropriate
Signed-off-by: Raphael Kubo da Costa <[email protected]>
---
third_party/zlib/gzguts.h | 1 +
1 file changed, 1 insertion(+)

diff --git a/third_party/zlib/gzguts.h b/third_party/zlib/gzguts.h
index 57faf37165a35..e5d6388190979 100644
--- a/third_party/zlib/gzguts.h
+++ b/third_party/zlib/gzguts.h
@@ -9,6 +9,7 @@
# endif
# ifdef _FILE_OFFSET_BITS
# undef _FILE_OFFSET_BITS
+# undef _TIME_BITS
# endif
#endif

0 comments on commit 1c6f9e9

Please sign in to comment.