sylvestre.ledru created this revision.
For example, this option is expected by ghc (haskell compiler). Currently,
building with ghc will fail with:
clang: error: unknown argument: '-no-pie'
`gcc' failed in phase `Linker'. (Exit code: 1)
. /usr/share/haskell-devscripts/Dh_Haskell.sh && \
configure_recipe
This won't do anything (but won't fail with an error)
https://reviews.llvm.org/D35462
Files:
docs/ClangCommandLineReference.rst
include/clang/Driver/Options.td
test/Driver/pic.c
Index: test/Driver/pic.c
===
--- test/Driver/pic.c
+++ test/Driver/pic.c
@@ -30,6 +30,7 @@
// CHECK-PIE-LD: "crtendS.o" "crtn.o"
//
// CHECK-NOPIE-LD: "-nopie"
+// CHECK-NOPIE-LD: "-no-pie"
//
// CHECK-DYNAMIC-NO-PIC-32: "-mrelocation-model" "dynamic-no-pic"
// CHECK-DYNAMIC-NO-PIC-32-NOT: "-pic-level"
Index: include/clang/Driver/Options.td
===
--- include/clang/Driver/Options.td
+++ include/clang/Driver/Options.td
@@ -2119,6 +2119,7 @@
def nolibc : Flag<["-"], "nolibc">;
def nomultidefs : Flag<["-"], "nomultidefs">;
def nopie : Flag<["-"], "nopie">;
+def no_pie : Flag<["-"], "no-pie">;
def noprebind : Flag<["-"], "noprebind">;
def noseglinkedit : Flag<["-"], "noseglinkedit">;
def nostartfiles : Flag<["-"], "nostartfiles">;
Index: docs/ClangCommandLineReference.rst
===
--- docs/ClangCommandLineReference.rst
+++ docs/ClangCommandLineReference.rst
@@ -294,6 +294,8 @@
.. option:: -nopie
+.. option:: -no-pie
+
.. option:: -noprebind
.. option:: -noseglinkedit
Index: test/Driver/pic.c
===
--- test/Driver/pic.c
+++ test/Driver/pic.c
@@ -30,6 +30,7 @@
// CHECK-PIE-LD: "crtendS.o" "crtn.o"
//
// CHECK-NOPIE-LD: "-nopie"
+// CHECK-NOPIE-LD: "-no-pie"
//
// CHECK-DYNAMIC-NO-PIC-32: "-mrelocation-model" "dynamic-no-pic"
// CHECK-DYNAMIC-NO-PIC-32-NOT: "-pic-level"
Index: include/clang/Driver/Options.td
===
--- include/clang/Driver/Options.td
+++ include/clang/Driver/Options.td
@@ -2119,6 +2119,7 @@
def nolibc : Flag<["-"], "nolibc">;
def nomultidefs : Flag<["-"], "nomultidefs">;
def nopie : Flag<["-"], "nopie">;
+def no_pie : Flag<["-"], "no-pie">;
def noprebind : Flag<["-"], "noprebind">;
def noseglinkedit : Flag<["-"], "noseglinkedit">;
def nostartfiles : Flag<["-"], "nostartfiles">;
Index: docs/ClangCommandLineReference.rst
===
--- docs/ClangCommandLineReference.rst
+++ docs/ClangCommandLineReference.rst
@@ -294,6 +294,8 @@
.. option:: -nopie
+.. option:: -no-pie
+
.. option:: -noprebind
.. option:: -noseglinkedit
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits