Skip to content

Commit e22a60b

Browse files
committed
Revert "Reland "[Driver] Default CLANG_DEFAULT_PIE_ON_LINUX to ON"""
This reverts commit 2aca33b. Broke tests on several bots, see comments on https://reviews.llvm.org/D120305
1 parent 1f6aa90 commit e22a60b

File tree

7 files changed

+8
-13
lines changed

7 files changed

+8
-13
lines changed

clang/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ set(PPC_LINUX_DEFAULT_IEEELONGDOUBLE OFF CACHE BOOL
245245
set(CLANG_SPAWN_CC1 OFF CACHE BOOL
246246
"Whether clang should use a new process for the CC1 invocation")
247247

248-
option(CLANG_DEFAULT_PIE_ON_LINUX "Default to -fPIE and -pie on linux-gnu" ON)
248+
option(CLANG_DEFAULT_PIE_ON_LINUX "Default to -fPIE and -pie on Linux" OFF)
249249

250250
# Manually handle default so we can change the meaning of a cached default.
251251
set(CLANG_ENABLE_OPAQUE_POINTERS "DEFAULT" CACHE STRING

clang/docs/ReleaseNotes.rst

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -279,12 +279,6 @@ Internal API Changes
279279
Build System Changes
280280
--------------------
281281

282-
* CMake ``-DCLANG_DEFAULT_PIE_ON_LINUX=ON`` is now the default. This is used by
283-
linux-gnu systems to decide whether ``-fPIE -pie`` is the default (instead of
284-
``-fno-pic -no-pie``). This matches GCC installations on many Linux distros.
285-
Note: linux-android and linux-musl always default to ``-fPIE -pie``, ignoring
286-
this variable. ``-DCLANG_DEFAULT_PIE_ON_LINUX`` may be removed in the future.
287-
288282
AST Matchers
289283
------------
290284

clang/test/Driver/hip-fpie-option.hip

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
// REQUIRES: clang-driver, amdgpu-registered-target, default-pie-on-linux
1+
// REQUIRES: clang-driver, amdgpu-registered-target
22

33
// -fPIC and -fPIE only affects host relocation model.
44
// device compilation always uses PIC.
55

66
// RUN: %clang -### -target x86_64-unknown-linux-gnu \
77
// RUN: --offload-arch=gfx906 %s -nogpulib -nogpuinc \
8-
// RUN: 2>&1 | FileCheck -check-prefixes=DEV,HOST-PIE %s
8+
// RUN: 2>&1 | FileCheck -check-prefixes=DEV,HOST-STATIC %s
99

1010
// RUN: %clang -### -target x86_64-unknown-linux-gnu \
1111
// RUN: -fgpu-rdc --offload-arch=gfx906 %s -nogpulib -nogpuinc \
12-
// RUN: 2>&1 | FileCheck -check-prefixes=DEV,HOST-PIE %s
12+
// RUN: 2>&1 | FileCheck -check-prefixes=DEV,HOST-STATIC %s
1313

1414
// RUN: %clang -### -target x86_64-unknown-linux-gnu \
1515
// RUN: --offload-arch=gfx906 %s -nogpulib -nogpuinc \
@@ -32,6 +32,7 @@
3232
// RUN: 2>&1 | FileCheck -check-prefixes=DEV,HOST-PIE %s
3333

3434
// DEV-DAG: {{".*clang.*".* "-triple" "amdgcn-amd-amdhsa".* "-mrelocation-model" "pic" "-pic-level" "[1|2]".* "-mframe-pointer=all"}}
35+
// HOST-STATIC-DAG: {{".*clang.*".* "-triple" "x86_64-unknown-linux-gnu".* "-mrelocation-model" "static"}}
3536
// HOST-PIC-DAG: {{".*clang.*".* "-triple" "x86_64-unknown-linux-gnu".* "-mrelocation-model" "pic" "-pic-level" "2"}}
3637
// HOST-PIC-NOT: "-pic-is-pie"
3738
// HOST-PIE-DAG: {{".*clang.*".* "-triple" "x86_64-unknown-linux-gnu".* "-mrelocation-model" "pic" "-pic-level" "2" "-pic-is-pie"}}

lldb/test/API/functionalities/tail_call_frames/unambiguous_sequence/TestUnambiguousTailCalls.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
from lldbsuite.test import decorators
33

44
decor = [decorators.skipUnlessHasCallSiteInfo,
5-
decorators.skipIf(archs=['arm'],oslist=["linux"]),
65
decorators.skipIf(dwarf_version=['<', '4']),
76
decorators.skipIf(compiler="clang", compiler_version=['<', '11.0'])]
87
lldbinline.MakeInlineTest(__file__, globals(), name="UnambiguousTailCalls_V5",

lldb/test/Shell/ObjectFile/ELF/minidebuginfo-set-and-hit-breakpoint.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# XFAIL: target-arm && linux-gnu
12
# REQUIRES: system-linux, lzma, xz
23

34
# We want to keep the symbol "multiplyByThree" in the .dynamic section and not

llvm/utils/gn/secondary/clang/include/clang/Config/BUILD.gn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ write_cmake_config("Config") {
99
output = "$target_gen_dir/config.h"
1010
values = [
1111
"BUG_REPORT_URL=https://github.com/llvm/llvm-project/issues/",
12-
"CLANG_DEFAULT_PIE_ON_LINUX=1",
12+
"CLANG_DEFAULT_PIE_ON_LINUX=",
1313
"CLANG_DEFAULT_LINKER=",
1414
"CLANG_DEFAULT_STD_C=",
1515
"CLANG_DEFAULT_STD_CXX=",

utils/bazel/llvm-project-overlay/clang/include/clang/Config/config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#define BUG_REPORT_URL "https://github.com/llvm/llvm-project/issues/"
2424

2525
/* Default to -fPIE and -pie on Linux. */
26-
#define CLANG_DEFAULT_PIE_ON_LINUX 1
26+
#define CLANG_DEFAULT_PIE_ON_LINUX 0
2727

2828
/* Default linker to use. */
2929
#define CLANG_DEFAULT_LINKER ""

0 commit comments

Comments
 (0)