This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH][AArch64] Fix LINUX_TARGET_LINK_SPEC to be consistent with ARM


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}"

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]