fix gcc8 alignof issue on i686

This commit is contained in:
Tom Callaway 2018-05-15 15:05:11 -04:00
parent 16a75be12e
commit f953b3f37b
2 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,18 @@
diff -up chromium-66.0.3359.170/mojo/public/c/system/macros.h.gcc8-alignof chromium-66.0.3359.170/mojo/public/c/system/macros.h
--- chromium-66.0.3359.170/mojo/public/c/system/macros.h.gcc8-alignof 2018-05-15 14:58:46.448912634 -0400
+++ chromium-66.0.3359.170/mojo/public/c/system/macros.h 2018-05-15 14:58:52.041784613 -0400
@@ -18,7 +18,13 @@
#endif
// Like the C++11 |alignof| operator.
-#if __cplusplus >= 201103L
+#if defined(__GNUC__) && __GNUC__ >= 8
+// GCC 8 has changed the alignof operator to return the minimal alignment
+// required by the target ABI, instead of the preferred alignment.
+// This means that on 32-bit x86, it will return 4 instead of 8.
+// Use __alignof__ instead to avoid this.
+#define MOJO_ALIGNOF(type) __alignof__(type)
+#elif __cplusplus >= 201103L
#define MOJO_ALIGNOF(type) alignof(type)
#elif defined(__GNUC__)
#define MOJO_ALIGNOF(type) __alignof__(type)

View File

@ -244,6 +244,10 @@ Patch95: chromium-65.0.3325.146-GCC-IDB-methods-String-renamed-to-GetString.patc
Patch96: chromium-66.0.3359.117-GCC-do-not-use-initializer-list-for-NoDestructor-of-.patch
# https://chromium.googlesource.com/chromium/src/+/b84682f31dc99b9c90f5a04947075815697c68d9%5E%21/#F0
Patch97: chromium-66.0.3359.139-arm-init-fix.patch
# GCC8 has changed the alignof operator to return the minimal alignment required by the target ABI
# instead of the preferred alignment. This means int64_t is now 4 on i686 (instead of 8).
# Use __alignof__ to get the value we expect (and chromium checks for).
Patch98: chromium-66.0.3359.170-gcc8-alignof.patch
# Use chromium-latest.py to generate clean tarball from released build tarballs, found here:
@ -727,6 +731,7 @@ udev.
%patch95 -p1 -b .gcc-getstring
%patch96 -p1 -b .flatsetfix
%patch97 -p1 -b .arm-init-fix
%patch98 -p1 -b .gcc8-alignof
# Change shebang in all relevant files in this directory and all subdirectories
# See `man find` for how the `-exec command {} +` syntax works
@ -1625,6 +1630,7 @@ getent group chrome-remote-desktop >/dev/null || groupadd -r chrome-remote-deskt
%changelog
* Tue May 15 2018 Tom Callaway <spot@fedoraproject.org> 66.0.3359.170-2
- only x86_64 i686 have swiftshader
- fix gcc8 alignof issue on i686
* Mon May 14 2018 Tom Callaway <spot@fedoraproject.org> 66.0.3359.170-1
- update to 66.0.3359.170