[clang] [Hexagon][Driver] Tell llvm-mc about PIC under -fno-integrated-as (PR #213821)

Alexey Karyakin via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 24 13:49:22 PDT 2026


================
@@ -0,0 +1,36 @@
+/// Hexagon selects the .eh_frame FDE pointer encoding from whether the code is
+/// position independent (DW_EH_PE_pcrel vs DW_EH_PE_absptr, see
+/// MCObjectFileInfo::initELFMCObjectFileInfo).  llvm-mc defaults to non-PIC, so
+/// the driver has to tell it, or -fno-integrated-as produces unwind tables that
+/// disagree with the ones the integrated assembler produces for the same input
+/// (R_HEX_32 instead of R_HEX_32_PCREL).
+
+/// hexagon-unknown-linux-musl defaults to PIC.
+// RUN: %clang --target=hexagon-unknown-linux-musl -fno-integrated-as \
----------------
quic-akaryaki wrote:

Some of the checks test if linux/musl uses PIC by default, which probably just duplicates some other tests. I think -fPIC -fno-pic should be sufficient?

https://github.com/llvm/llvm-project/pull/213821


More information about the cfe-commits mailing list