0003-sandbox-linux-pass-fPIE-to-compiler.patch 870 B

12345678910111213141516171819202122232425262728293031323334
  1. From 8f7c059991efa63ee7037a91427aab1235ec627f Mon Sep 17 00:00:00 2001
  2. From: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
  3. Date: Thu, 13 Jan 2022 03:50:24 +0000
  4. Subject: [PATCH 03/22] sandbox: linux: pass -fPIE to compiler
  5. Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
  6. ---
  7. sandbox/linux/BUILD.gn | 5 +++++
  8. 1 file changed, 5 insertions(+)
  9. diff --git a/sandbox/linux/BUILD.gn b/sandbox/linux/BUILD.gn
  10. index ec24cd81e2748..60c60d741bf6d 100644
  11. --- a/sandbox/linux/BUILD.gn
  12. +++ b/sandbox/linux/BUILD.gn
  13. @@ -292,11 +292,16 @@ if (is_linux || is_chromeos) {
  14. cflags = [
  15. # For ULLONG_MAX
  16. "-std=gnu99",
  17. + "-fPIE",
  18. # These files have a suspicious comparison.
  19. # TODO fix this and re-enable this warning.
  20. "-Wno-sign-compare",
  21. ]
  22. +
  23. + ldflags = [
  24. + "-pie",
  25. + ]
  26. }
  27. }
  28. --
  29. 2.25.1