2024-09-30 15:13:30 +00:00
|
|
|
From 8ce0e2a14ba0743c06b543c0503203a56c905e8c Mon Sep 17 00:00:00 2001
|
2022-09-27 09:50:52 +00:00
|
|
|
From: Konrad Kleine <kkleine@redhat.com>
|
2024-09-30 15:13:30 +00:00
|
|
|
Date: Tue, 4 Jun 2024 14:11:23 +0200
|
|
|
|
Subject: Produce DWARF4 by default
|
2022-09-27 09:50:52 +00:00
|
|
|
|
|
|
|
---
|
2024-03-28 09:52:13 +00:00
|
|
|
clang/lib/Driver/ToolChain.cpp | 4 +---
|
2024-09-30 15:13:30 +00:00
|
|
|
clang/test/CodeGen/dwarf-version.c | 8 ++++----
|
2024-03-28 09:52:13 +00:00
|
|
|
clang/test/Driver/as-options.s | 4 ++--
|
|
|
|
clang/test/Driver/cl-options.c | 2 +-
|
|
|
|
clang/test/Driver/clang-g-opts.c | 2 +-
|
|
|
|
clang/test/Driver/ve-toolchain.c | 2 +-
|
|
|
|
clang/test/Driver/ve-toolchain.cpp | 2 +-
|
2024-09-30 15:13:30 +00:00
|
|
|
7 files changed, 11 insertions(+), 13 deletions(-)
|
2022-09-27 09:50:52 +00:00
|
|
|
|
2024-03-28 09:52:13 +00:00
|
|
|
diff --git a/clang/lib/Driver/ToolChain.cpp b/clang/lib/Driver/ToolChain.cpp
|
2024-09-30 15:13:30 +00:00
|
|
|
index 388030592b48..6542895cf857 100644
|
2024-03-28 09:52:13 +00:00
|
|
|
--- a/clang/lib/Driver/ToolChain.cpp
|
|
|
|
+++ b/clang/lib/Driver/ToolChain.cpp
|
|
|
|
@@ -428,9 +428,7 @@ ToolChain::getDefaultUnwindTableLevel(const ArgList &Args) const {
|
|
|
|
}
|
2023-09-21 18:09:43 +00:00
|
|
|
|
2024-03-28 09:52:13 +00:00
|
|
|
unsigned ToolChain::GetDefaultDwarfVersion() const {
|
|
|
|
- // TODO: Remove the RISC-V special case when R_RISCV_SET_ULEB128 linker
|
|
|
|
- // support becomes more widely available.
|
|
|
|
- return getTriple().isRISCV() ? 4 : 5;
|
|
|
|
+ return 4;
|
|
|
|
}
|
2022-09-27 09:50:52 +00:00
|
|
|
|
2024-03-28 09:52:13 +00:00
|
|
|
Tool *ToolChain::getClang() const {
|
2022-09-27 09:50:52 +00:00
|
|
|
diff --git a/clang/test/CodeGen/dwarf-version.c b/clang/test/CodeGen/dwarf-version.c
|
2024-09-30 15:13:30 +00:00
|
|
|
index e63316ace69c..3d68b06c58ff 100644
|
2022-09-27 09:50:52 +00:00
|
|
|
--- a/clang/test/CodeGen/dwarf-version.c
|
|
|
|
+++ b/clang/test/CodeGen/dwarf-version.c
|
2024-09-30 15:13:30 +00:00
|
|
|
@@ -2,10 +2,10 @@
|
2022-09-27 09:50:52 +00:00
|
|
|
// RUN: %clang -target x86_64-linux-gnu -gdwarf-3 -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER3
|
|
|
|
// RUN: %clang -target x86_64-linux-gnu -gdwarf-4 -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER4
|
|
|
|
// RUN: %clang -target x86_64-linux-gnu -gdwarf-5 -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER5
|
|
|
|
-// RUN: %clang -target x86_64-linux-gnu -g -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER5
|
|
|
|
-// RUN: %clang -target x86_64-linux-gnu -gdwarf -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER5
|
2024-09-30 15:13:30 +00:00
|
|
|
-// RUN: %clang --target=i386-pc-solaris -g -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER5
|
|
|
|
-// RUN: %clang --target=i386-pc-solaris -gdwarf -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER5
|
2022-09-27 09:50:52 +00:00
|
|
|
+// RUN: %clang -target x86_64-linux-gnu -g -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER4
|
|
|
|
+// RUN: %clang -target x86_64-linux-gnu -gdwarf -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER4
|
2024-09-30 15:13:30 +00:00
|
|
|
+// RUN: %clang --target=i386-pc-solaris -g -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER4
|
|
|
|
+// RUN: %clang --target=i386-pc-solaris -gdwarf -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER4
|
2022-09-27 09:50:52 +00:00
|
|
|
|
|
|
|
// The -isysroot is used as a hack to avoid LIT messing with the SDKROOT
|
|
|
|
// environment variable which indirecty overrides the version in the target
|
2023-09-21 18:09:43 +00:00
|
|
|
diff --git a/clang/test/Driver/as-options.s b/clang/test/Driver/as-options.s
|
|
|
|
index 73d002c7ef7e..71d55f7fd537 100644
|
|
|
|
--- a/clang/test/Driver/as-options.s
|
|
|
|
+++ b/clang/test/Driver/as-options.s
|
|
|
|
@@ -122,7 +122,7 @@
|
|
|
|
// RUN: FileCheck --check-prefix=DEBUG %s
|
|
|
|
// RUN: %clang --target=aarch64-linux-gnu -fno-integrated-as -g0 -g %s -### 2>&1 | \
|
|
|
|
// RUN: FileCheck --check-prefix=DEBUG %s
|
|
|
|
-// DEBUG: "-g" "-gdwarf-5"
|
|
|
|
+// DEBUG: "-g" "-gdwarf-4"
|
|
|
|
// RUN: %clang --target=aarch64-linux-gnu -fno-integrated-as -g -g0 %s -### 2>&1 | \
|
|
|
|
// RUN: FileCheck --check-prefix=NODEBUG %s
|
|
|
|
// RUN: %clang --target=aarch64-linux-gnu -fno-integrated-as -gdwarf-5 -g0 %s -### 2>&1 | \
|
|
|
|
@@ -141,7 +141,7 @@
|
|
|
|
// RUN: %clang --target=aarch64-linux-gnu -fno-integrated-as -gdwarf-2 %s -### 2>&1 | \
|
|
|
|
// RUN: FileCheck --check-prefix=GDWARF2 %s
|
|
|
|
// RUN: %clang --target=aarch64-linux-gnu -fno-integrated-as -gdwarf %s -### 2>&1 | \
|
|
|
|
-// RUN: FileCheck --check-prefix=GDWARF5 %s
|
|
|
|
+// RUN: FileCheck --check-prefix=GDWARF4 %s
|
|
|
|
|
|
|
|
// RUN: %clang --target=aarch64-linux-gnu -fno-integrated-as -gdwarf-5 %s -### 2>&1 | \
|
|
|
|
// RUN: FileCheck --check-prefix=GDWARF5 %s
|
2022-09-27 09:50:52 +00:00
|
|
|
diff --git a/clang/test/Driver/cl-options.c b/clang/test/Driver/cl-options.c
|
2024-09-30 15:13:30 +00:00
|
|
|
index 5b6dfe308a76..4da65272a1b0 100644
|
2022-09-27 09:50:52 +00:00
|
|
|
--- a/clang/test/Driver/cl-options.c
|
|
|
|
+++ b/clang/test/Driver/cl-options.c
|
2024-09-30 15:13:30 +00:00
|
|
|
@@ -571,7 +571,7 @@
|
|
|
|
// RUN: %clang_cl -gdwarf /Z7 /c -### -- %s 2>&1 | FileCheck -check-prefix=Z7_gdwarf %s
|
|
|
|
// Z7_gdwarf-NOT: "-gcodeview"
|
2022-09-27 09:50:52 +00:00
|
|
|
// Z7_gdwarf: "-debug-info-kind=constructor"
|
|
|
|
-// Z7_gdwarf: "-dwarf-version=
|
|
|
|
+// Z7_gdwarf: "-dwarf-version=4
|
|
|
|
|
2023-09-21 18:09:43 +00:00
|
|
|
// RUN: %clang_cl /ZH:MD5 /c -### -- %s 2>&1 | FileCheck -check-prefix=ZH_MD5 %s
|
|
|
|
// ZH_MD5: "-gsrc-hash=md5"
|
2023-03-28 09:52:03 +00:00
|
|
|
diff --git a/clang/test/Driver/clang-g-opts.c b/clang/test/Driver/clang-g-opts.c
|
2024-09-30 15:13:30 +00:00
|
|
|
index b73602a155b0..b0cf64674253 100644
|
2023-03-28 09:52:03 +00:00
|
|
|
--- a/clang/test/Driver/clang-g-opts.c
|
|
|
|
+++ b/clang/test/Driver/clang-g-opts.c
|
2024-09-30 15:13:30 +00:00
|
|
|
@@ -36,7 +36,7 @@
|
2023-03-28 09:52:03 +00:00
|
|
|
|
|
|
|
// CHECK-WITHOUT-G-NOT: -debug-info-kind
|
|
|
|
// CHECK-WITH-G: "-debug-info-kind=constructor"
|
|
|
|
-// CHECK-WITH-G: "-dwarf-version=5"
|
|
|
|
+// CHECK-WITH-G: "-dwarf-version=4"
|
2024-09-30 15:13:30 +00:00
|
|
|
// CHECK-WITH-G-DWARF4: "-dwarf-version=4"
|
2023-03-28 09:52:03 +00:00
|
|
|
// CHECK-WITH-G-DWARF2: "-dwarf-version=2"
|
|
|
|
|
2022-09-27 09:50:52 +00:00
|
|
|
diff --git a/clang/test/Driver/ve-toolchain.c b/clang/test/Driver/ve-toolchain.c
|
2024-09-30 15:13:30 +00:00
|
|
|
index 078341eb1202..6ccbef6a0c36 100644
|
2022-09-27 09:50:52 +00:00
|
|
|
--- a/clang/test/Driver/ve-toolchain.c
|
|
|
|
+++ b/clang/test/Driver/ve-toolchain.c
|
|
|
|
@@ -6,7 +6,7 @@
|
|
|
|
/// Checking dwarf-version
|
|
|
|
|
2023-03-28 09:52:03 +00:00
|
|
|
// RUN: %clang -### -g --target=ve %s 2>&1 | FileCheck -check-prefix=DWARF_VER %s
|
2022-09-27 09:50:52 +00:00
|
|
|
-// DWARF_VER: "-dwarf-version=5"
|
|
|
|
+// DWARF_VER: "-dwarf-version=4"
|
|
|
|
|
|
|
|
///-----------------------------------------------------------------------------
|
|
|
|
/// Checking include-path
|
|
|
|
diff --git a/clang/test/Driver/ve-toolchain.cpp b/clang/test/Driver/ve-toolchain.cpp
|
2024-09-30 15:13:30 +00:00
|
|
|
index cd48dd792f85..f77781d4c6fa 100644
|
2022-09-27 09:50:52 +00:00
|
|
|
--- a/clang/test/Driver/ve-toolchain.cpp
|
|
|
|
+++ b/clang/test/Driver/ve-toolchain.cpp
|
|
|
|
@@ -7,7 +7,7 @@
|
|
|
|
|
2023-03-28 09:52:03 +00:00
|
|
|
// RUN: %clangxx -### -g --target=ve-unknown-linux-gnu \
|
2022-09-27 09:50:52 +00:00
|
|
|
// RUN: %s 2>&1 | FileCheck -check-prefix=DWARF_VER %s
|
|
|
|
-// DWARF_VER: "-dwarf-version=5"
|
|
|
|
+// DWARF_VER: "-dwarf-version=4"
|
|
|
|
|
|
|
|
///-----------------------------------------------------------------------------
|
|
|
|
/// Checking include-path
|
|
|
|
--
|
2024-09-30 15:13:30 +00:00
|
|
|
2.45.1
|
2022-09-27 09:50:52 +00:00
|
|
|
|