This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH][AArch64] Fix LINUX_TARGET_LINK_SPEC to be consistent with ARM
- From: Szabolcs Nagy <szabolcs dot nagy at arm dot com>
- To: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Cc: Marcus Shawcroft <marcus dot shawcroft at arm dot com>
- Date: Wed, 22 Jul 2015 18:13:03 +0100
- Subject: [PATCH][AArch64] Fix LINUX_TARGET_LINK_SPEC to be consistent with ARM
- Authentication-results: sourceware.org; auth=none
Same as
https://gcc.gnu.org/ml/gcc-patches/2015-04/msg01387.html
but for AArch64.
-dynamic-linker is only passed to the linker if !static && !shared.
-rdynamic handling is changed too to be consistent with arm:
only pass -export-dynamic if !static.
2015-07-22 Szabolcs Nagy <szabolcs.nagy@arm.com>
PR target/65711
* config/aarch64/aarch64-linux.h (LINUX_TARGET_LINK_SPEC): Move
-dynamic-linker within %{!static %{!shared, and -rdynamic within
%{!static.
diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h
index 1600a32..c51c8b2 100644
--- a/gcc/config/aarch64/aarch64-linux.h
+++ b/gcc/config/aarch64/aarch64-linux.h
@@ -38,8 +38,9 @@
%{static:-Bstatic} \
%{shared:-shared} \
%{symbolic:-Bsymbolic} \
- %{rdynamic:-export-dynamic} \
- -dynamic-linker " GNU_USER_DYNAMIC_LINKER " \
+ %{!static: \
+ %{rdynamic:-export-dynamic} \
+ %{!shared:-dynamic-linker " GNU_USER_DYNAMIC_LINKER "}} \
-X \
%{mbig-endian:-EB} %{mlittle-endian:-EL} \
-maarch64linux%{mabi=ilp32:32}%{mbig-endian:b}"