0001-ANDROID-GKI-rework-the-ANDROID_KABI_USE-macro-to-not.patch 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. From f8b361d17da5fa125a9e788d3088599216f33019 Mon Sep 17 00:00:00 2001
  2. From: Greg Kroah-Hartman <gregkh@google.com>
  3. Date: Tue, 28 Sep 2021 14:38:19 +0200
  4. Subject: [PATCH] ANDROID: GKI: rework the ANDROID_KABI_USE() macro to not use
  5. __UNIQUE()
  6. The __UNIQUE_ID() macro causes problems as it turns out to not be
  7. deterministic across different compiler runs as it relies on the
  8. __COUNTER__ macro which could have been used on other .h files previous
  9. to this .h file being included.
  10. This shows up specifically when building with "LTO=thin" vs. "LTO=full"
  11. as different build paths seem to be triggered.
  12. As the structure name isn't really needed at all here, we were just
  13. including it for older compilers that could not handle anonymous
  14. structures in a union, just drop the whole thing which resolves the abi
  15. naming issue.
  16. Bug: 210255585
  17. Reported-by: Giuliano Procida <gprocida@google.com>
  18. Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
  19. Change-Id: I6b9449fa9d26ffc5d66b2f0f3b41e2d5f3003f68
  20. ---
  21. include/linux/android_kabi.h | 2 +-
  22. 1 file changed, 1 insertion(+), 1 deletion(-)
  23. diff --git a/include/linux/android_kabi.h b/include/linux/android_kabi.h
  24. index efa52953fe35..9c7b6c035ad3 100644
  25. --- a/include/linux/android_kabi.h
  26. +++ b/include/linux/android_kabi.h
  27. @@ -63,7 +63,7 @@
  28. _new; \
  29. struct { \
  30. _orig; \
  31. - } __UNIQUE_ID(android_kabi_hide); \
  32. + }; \
  33. __ANDROID_KABI_CHECK_SIZE_ALIGN(_orig, _new); \
  34. }
  35. --
  36. 2.55.0