third_party/efistub: update to use PE entry point

The old efistub used the EFI handover mechanism, which only exists for
x86_64. Since Linux 5.8 x86_64 also supports the standard PE entry point
which works the same for all supported architectures. That also has the
benefit of no longer needing a weird hack to switch to SysV ABI to call
into the kernel.

Change-Id: Icd75599758e09d888a31c31f07967dfc78356fca
Reviewed-on: https://review.monogon.dev/c/monogon/+/4213
Tested-by: Jenkins CI
Reviewed-by: Tim Windelschmidt <tim@monogon.tech>
diff --git a/third_party/efistub/efistub.bzl b/third_party/efistub/efistub.bzl
index d0e2a2f..5dc9696 100644
--- a/third_party/efistub/efistub.bzl
+++ b/third_party/efistub/efistub.bzl
@@ -8,16 +8,22 @@
         "cpio.c",
         "disk.c",
         "graphics.c",
+        "console.c",
+        "devicetree.c",
         "linux.c",
+        "linux_x86.c",
+        "initrd.c",
         "measure.c",
+        "ticks.c",
         "pe.c",
         "secure-boot.c",
         "splash.c",
         "stub.c",
+        "efi-string.c",
         "util.c",
     ]] + glob(["src/boot/efi/*.h", "src/fundamental/*.c", "src/fundamental/*.h"]),
-    includes = ["src/fundamental"],
-    copts = ["-std=gnu99", "-DSD_BOOT", "-DGIT_VERSION=\\\"0.0.0-mngn\\\""],
+    includes = ["src/fundamental", "src/boot/efi"],
+    copts = ["-std=gnu11", "-O2", "-DSD_BOOT", "-DGIT_VERSION=\\\"0.0.0-mngn\\\""],
     deps = ["@gnuefi//:gnuefi"],
     target_compatible_with = [
         "@platforms//os:uefi",