[PATCH] D154396: [clang] Add support for SerenityOS

Andrew Kaster via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Nov 5 16:46:55 PST 2023


ADKaster added inline comments.


================
Comment at: clang/lib/Driver/ToolChains/Serenity.cpp:76
+  if (!IsStatic || IsStaticPIE)
+    CmdArgs.push_back("--eh-frame-hdr");
+
----------------
MaskRay wrote:
> ADKaster wrote:
> > MaskRay wrote:
> > > This is not tested
> > Hm. this also seems like incorrect logic. In my next push I will remove this condition around --eh-frame-hdr to match the other ToolChains.
> https://maskray.me/blog/2020-11-08-stack-unwinding I have some notes on ".eh_frame_hdr and PT_GNU_EH_FRAME". 
> 
> > Clang and GCC usually pass --eh-frame-hdr to ld, with the exception that gcc -static does not pass --eh-frame-hdr. The difference is a historical choice related to `__register_frame_info`.
Ah, this explains where @BertalanD got the original logic from, as we had a gcc port first. It was probably copied from our patched gcc spec files.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D154396/new/

https://reviews.llvm.org/D154396



More information about the cfe-commits mailing list