darwin.h (LINK_SPEC): Pass -fpie through to the linker.
authorGeoffrey Keating <geoffk@apple.com>
Fri, 1 Jun 2007 22:58:14 +0000 (22:58 +0000)
committerGeoffrey Keating <geoffk@gcc.gnu.org>
Fri, 1 Jun 2007 22:58:14 +0000 (22:58 +0000)
2007-06-01  Geoffrey Keating  <geoffk@apple.com>

* config/darwin.h (LINK_SPEC): Pass -fpie through to the linker.

Index: testsuite/ChangeLog
2007-06-01  Geoffrey Keating  <geoffk@apple.com>

* gcc.dg/pie-link.c: New test.

From-SVN: r125270

gcc/ChangeLog
gcc/config/darwin.h
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pie-link.c [new file with mode: 0644]

index 87d2444..ba77c99 100644 (file)
@@ -1,3 +1,7 @@
+2007-06-01  Geoffrey Keating  <geoffk@apple.com>
+
+       * config/darwin.h (LINK_SPEC): Pass -fpie through to the linker.
+
 2007-06-01  Ian Lance Taylor  <iant@google.com>
 
        * tree-vrp.c (compare_name_with_value): Always set
index 339e53a..9d7fdb1 100644 (file)
@@ -307,6 +307,7 @@ extern GTY(()) int darwin_ms_struct;
      %:version-compare(< 10.5 mmacosx-version-min= -multiply_defined) \
      %:version-compare(< 10.5 mmacosx-version-min= suppress)}} \
    %{Zmultiplydefinedunused*:-multiply_defined_unused %*} \
+   %{fpie:-pie} \
    %{prebind} %{noprebind} %{nofixprebinding} %{prebind_all_twolevel_modules} \
    %{read_only_relocs} \
    %{sectcreate*} %{sectorder*} %{seg1addr*} %{segprot*} \
index 6d42568..759dd3c 100644 (file)
@@ -1,3 +1,7 @@
+2007-06-01  Geoffrey Keating  <geoffk@apple.com>
+
+       * gcc.dg/pie-link.c: New test.
+
 2007-06-01  Ian Lance Taylor  <iant@google.com>
 
        * gcc.dg/Wstrict-overflow-17.c: New test.
diff --git a/gcc/testsuite/gcc.dg/pie-link.c b/gcc/testsuite/gcc.dg/pie-link.c
new file mode 100644 (file)
index 0000000..00ff495
--- /dev/null
@@ -0,0 +1,7 @@
+/* { dg-do link { target *-*-darwin[912]* *-*-linux* } } */
+/* { dg-options "-fpie" } */
+
+int main(void)
+{
+  return 0;
+}