From e932f36c65e02632d8ffe916a44d444e6087abb5 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Sun, 16 Jun 2024 16:46:56 -0500 Subject: user/llvm18: New package Functional, but not ready yet because of upstream bustage with M68k[1]. [1]: https://github.com/llvm/llvm-project/issues/94726 --- user/llvm18/dwarf-info.patch | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 user/llvm18/dwarf-info.patch (limited to 'user/llvm18/dwarf-info.patch') diff --git a/user/llvm18/dwarf-info.patch b/user/llvm18/dwarf-info.patch new file mode 100644 index 000000000..9357c6519 --- /dev/null +++ b/user/llvm18/dwarf-info.patch @@ -0,0 +1,28 @@ +Author: A. Wilcox + +This isn't the proper fix, but debugging the LLVM formatter is a bit +above my paygrade at the moment. + +The issue shows up in the DWARF X86 test on ppc and armv7: + +error: Simplified template DW_AT_name could not be reconstituted: + original: f3 + reconstituted: f3 + +With this patch, this error does not occur. Debugging shows that the +llvm::format overload called in the error case is , so I +think it is having an issue converting a 64-bit value on platforms +where char is default-unsigned. + +(pmmx does not show this issue, and has signed char.) +--- llvm-14.0.6.src/lib/DebugInfo/DWARF/DWARFDie.cpp.old 2022-06-22 16:46:24.000000000 +0000 ++++ llvm-14.0.6.src/lib/DebugInfo/DWARF/DWARFDie.cpp 2022-11-28 10:32:05.573627744 +0000 +@@ -506,7 +506,7 @@ + OS << (char)Val; + OS << "'"; + } else if (Val < 256) +- OS << to_string(llvm::format("'\\x%02x'", Val)); ++ OS << to_string(llvm::format("'\\x%02x'", (unsigned char)Val)); + else if (Val <= 0xFFFF) + OS << to_string(llvm::format("'\\u%04x'", Val)); + else -- cgit v1.2.3-60-g2f50