* [PATCH] arm: Support -mfdpic for more targets
@ 2024-02-24 3:33 Fangrui Song
2024-03-06 5:07 ` Fangrui Song
2024-10-25 12:11 ` Richard Earnshaw (lists)
0 siblings, 2 replies; 6+ messages in thread
From: Fangrui Song @ 2024-02-24 3:33 UTC (permalink / raw)
To: gcc-patches
Cc: Christophe Lyon, Szabolcs Nagy, richard.earnshaw, Fangrui Song
From: Fangrui Song <maskray@gcc.gnu.org>
Targets that are not arm*-*-uclinuxfdpiceabi can use -S -mfdpic, but -c
-mfdpic does not pass --fdpic to gas. This is an unnecessary
restriction. Just define the ASM_SPEC in bpabi.h.
Additionally, use armelf[b]_linux_fdpiceabi emulations for -mfdpic in
linux-eabi.h. This will allow a future musl fdpic port to use the
desired BFD emulation.
gcc/ChangeLog:
* config/arm/bpabi.h (TARGET_FDPIC_ASM_SPEC): Transform -mfdpic.
* config/arm/linux-eabi.h (TARGET_FDPIC_LINKER_EMULATION): Define.
(SUBTARGET_EXTRA_LINK_SPEC): Use TARGET_FDPIC_LINKER_EMULATION
if -mfdpic.
---
gcc/config/arm/bpabi.h | 2 +-
gcc/config/arm/linux-eabi.h | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/gcc/config/arm/bpabi.h b/gcc/config/arm/bpabi.h
index 7a279f3ed3c..6778be1a8bf 100644
--- a/gcc/config/arm/bpabi.h
+++ b/gcc/config/arm/bpabi.h
@@ -55,7 +55,7 @@
#define TARGET_FIX_V4BX_SPEC " %{mcpu=arm8|mcpu=arm810|mcpu=strongarm*"\
"|march=armv4|mcpu=fa526|mcpu=fa626:--fix-v4bx}"
-#define TARGET_FDPIC_ASM_SPEC ""
+#define TARGET_FDPIC_ASM_SPEC "%{mfdpic: --fdpic}"
#define BE8_LINK_SPEC \
"%{!r:%{!mbe32:%:be8_linkopt(%{mlittle-endian:little}" \
diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
index eef791f6a02..0c5c58e4928 100644
--- a/gcc/config/arm/linux-eabi.h
+++ b/gcc/config/arm/linux-eabi.h
@@ -46,12 +46,15 @@
#undef TARGET_LINKER_EMULATION
#if TARGET_BIG_ENDIAN_DEFAULT
#define TARGET_LINKER_EMULATION "armelfb_linux_eabi"
+#define TARGET_FDPIC_LINKER_EMULATION "armelfb_linux_fdpiceabi"
#else
#define TARGET_LINKER_EMULATION "armelf_linux_eabi"
+#define TARGET_FDPIC_LINKER_EMULATION "armelf_linux_fdpiceabi"
#endif
#undef SUBTARGET_EXTRA_LINK_SPEC
-#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION
+#define SUBTARGET_EXTRA_LINK_SPEC " -m %{mfdpic: " \
+ TARGET_FDPIC_LINKER_EMULATION ";:" TARGET_LINKER_EMULATION "}"
/* GNU/Linux on ARM currently supports three dynamic linkers:
- ld-linux.so.2 - for the legacy ABI
--
2.44.0.rc1.240.g4c46232300-goog
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] arm: Support -mfdpic for more targets
2024-02-24 3:33 [PATCH] arm: Support -mfdpic for more targets Fangrui Song
@ 2024-03-06 5:07 ` Fangrui Song
2024-03-06 9:54 ` Richard Earnshaw (lists)
2024-10-25 12:11 ` Richard Earnshaw (lists)
1 sibling, 1 reply; 6+ messages in thread
From: Fangrui Song @ 2024-03-06 5:07 UTC (permalink / raw)
To: GCC Patches, Richard Earnshaw
Cc: Christophe Lyon, Szabolcs Nagy, Fangrui Song
On Fri, Feb 23, 2024 at 7:33 PM Fangrui Song <maskray@google.com> wrote:
>
> From: Fangrui Song <maskray@gcc.gnu.org>
>
> Targets that are not arm*-*-uclinuxfdpiceabi can use -S -mfdpic, but -c
> -mfdpic does not pass --fdpic to gas. This is an unnecessary
> restriction. Just define the ASM_SPEC in bpabi.h.
>
> Additionally, use armelf[b]_linux_fdpiceabi emulations for -mfdpic in
> linux-eabi.h. This will allow a future musl fdpic port to use the
> desired BFD emulation.
>
> gcc/ChangeLog:
>
> * config/arm/bpabi.h (TARGET_FDPIC_ASM_SPEC): Transform -mfdpic.
> * config/arm/linux-eabi.h (TARGET_FDPIC_LINKER_EMULATION): Define.
> (SUBTARGET_EXTRA_LINK_SPEC): Use TARGET_FDPIC_LINKER_EMULATION
> if -mfdpic.
> ---
> gcc/config/arm/bpabi.h | 2 +-
> gcc/config/arm/linux-eabi.h | 5 ++++-
> 2 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/gcc/config/arm/bpabi.h b/gcc/config/arm/bpabi.h
> index 7a279f3ed3c..6778be1a8bf 100644
> --- a/gcc/config/arm/bpabi.h
> +++ b/gcc/config/arm/bpabi.h
> @@ -55,7 +55,7 @@
> #define TARGET_FIX_V4BX_SPEC " %{mcpu=arm8|mcpu=arm810|mcpu=strongarm*"\
> "|march=armv4|mcpu=fa526|mcpu=fa626:--fix-v4bx}"
>
> -#define TARGET_FDPIC_ASM_SPEC ""
> +#define TARGET_FDPIC_ASM_SPEC "%{mfdpic: --fdpic}"
>
> #define BE8_LINK_SPEC \
> "%{!r:%{!mbe32:%:be8_linkopt(%{mlittle-endian:little}" \
> diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
> index eef791f6a02..0c5c58e4928 100644
> --- a/gcc/config/arm/linux-eabi.h
> +++ b/gcc/config/arm/linux-eabi.h
> @@ -46,12 +46,15 @@
> #undef TARGET_LINKER_EMULATION
> #if TARGET_BIG_ENDIAN_DEFAULT
> #define TARGET_LINKER_EMULATION "armelfb_linux_eabi"
> +#define TARGET_FDPIC_LINKER_EMULATION "armelfb_linux_fdpiceabi"
> #else
> #define TARGET_LINKER_EMULATION "armelf_linux_eabi"
> +#define TARGET_FDPIC_LINKER_EMULATION "armelf_linux_fdpiceabi"
> #endif
>
> #undef SUBTARGET_EXTRA_LINK_SPEC
> -#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION
> +#define SUBTARGET_EXTRA_LINK_SPEC " -m %{mfdpic: " \
> + TARGET_FDPIC_LINKER_EMULATION ";:" TARGET_LINKER_EMULATION "}"
>
> /* GNU/Linux on ARM currently supports three dynamic linkers:
> - ld-linux.so.2 - for the legacy ABI
> --
> 2.44.0.rc1.240.g4c46232300-goog
>
Ping:)
--
宋方睿
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] arm: Support -mfdpic for more targets
2024-03-06 5:07 ` Fangrui Song
@ 2024-03-06 9:54 ` Richard Earnshaw (lists)
2024-05-06 23:09 ` Fangrui Song
0 siblings, 1 reply; 6+ messages in thread
From: Richard Earnshaw (lists) @ 2024-03-06 9:54 UTC (permalink / raw)
To: Fangrui Song, GCC Patches; +Cc: Christophe Lyon, Szabolcs Nagy, Fangrui Song
On 06/03/2024 05:07, Fangrui Song wrote:
> On Fri, Feb 23, 2024 at 7:33 PM Fangrui Song <maskray@google.com> wrote:
>>
>> From: Fangrui Song <maskray@gcc.gnu.org>
>>
>> Targets that are not arm*-*-uclinuxfdpiceabi can use -S -mfdpic, but -c
>> -mfdpic does not pass --fdpic to gas. This is an unnecessary
>> restriction. Just define the ASM_SPEC in bpabi.h.
>>
>> Additionally, use armelf[b]_linux_fdpiceabi emulations for -mfdpic in
>> linux-eabi.h. This will allow a future musl fdpic port to use the
>> desired BFD emulation.
>>
>> gcc/ChangeLog:
>>
>> * config/arm/bpabi.h (TARGET_FDPIC_ASM_SPEC): Transform -mfdpic.
>> * config/arm/linux-eabi.h (TARGET_FDPIC_LINKER_EMULATION): Define.
>> (SUBTARGET_EXTRA_LINK_SPEC): Use TARGET_FDPIC_LINKER_EMULATION
>> if -mfdpic.
>> ---
>> gcc/config/arm/bpabi.h | 2 +-
>> gcc/config/arm/linux-eabi.h | 5 ++++-
>> 2 files changed, 5 insertions(+), 2 deletions(-)
>>
>> diff --git a/gcc/config/arm/bpabi.h b/gcc/config/arm/bpabi.h
>> index 7a279f3ed3c..6778be1a8bf 100644
>> --- a/gcc/config/arm/bpabi.h
>> +++ b/gcc/config/arm/bpabi.h
>> @@ -55,7 +55,7 @@
>> #define TARGET_FIX_V4BX_SPEC " %{mcpu=arm8|mcpu=arm810|mcpu=strongarm*"\
>> "|march=armv4|mcpu=fa526|mcpu=fa626:--fix-v4bx}"
>>
>> -#define TARGET_FDPIC_ASM_SPEC ""
>> +#define TARGET_FDPIC_ASM_SPEC "%{mfdpic: --fdpic}"
>>
>> #define BE8_LINK_SPEC \
>> "%{!r:%{!mbe32:%:be8_linkopt(%{mlittle-endian:little}" \
>> diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
>> index eef791f6a02..0c5c58e4928 100644
>> --- a/gcc/config/arm/linux-eabi.h
>> +++ b/gcc/config/arm/linux-eabi.h
>> @@ -46,12 +46,15 @@
>> #undef TARGET_LINKER_EMULATION
>> #if TARGET_BIG_ENDIAN_DEFAULT
>> #define TARGET_LINKER_EMULATION "armelfb_linux_eabi"
>> +#define TARGET_FDPIC_LINKER_EMULATION "armelfb_linux_fdpiceabi"
>> #else
>> #define TARGET_LINKER_EMULATION "armelf_linux_eabi"
>> +#define TARGET_FDPIC_LINKER_EMULATION "armelf_linux_fdpiceabi"
>> #endif
>>
>> #undef SUBTARGET_EXTRA_LINK_SPEC
>> -#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION
>> +#define SUBTARGET_EXTRA_LINK_SPEC " -m %{mfdpic: " \
>> + TARGET_FDPIC_LINKER_EMULATION ";:" TARGET_LINKER_EMULATION "}"
>>
>> /* GNU/Linux on ARM currently supports three dynamic linkers:
>> - ld-linux.so.2 - for the legacy ABI
>> --
>> 2.44.0.rc1.240.g4c46232300-goog
>>
>
> Ping:)
>
We're in stage4 at present and this is new material. I'll look at it after the branch has been cut.
R.
>
> --
> 宋方睿
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] arm: Support -mfdpic for more targets
2024-03-06 9:54 ` Richard Earnshaw (lists)
@ 2024-05-06 23:09 ` Fangrui Song
2024-06-05 21:50 ` Fangrui Song
0 siblings, 1 reply; 6+ messages in thread
From: Fangrui Song @ 2024-05-06 23:09 UTC (permalink / raw)
To: Richard Earnshaw (lists)
Cc: GCC Patches, Christophe Lyon, Szabolcs Nagy, Fangrui Song
On Wed, Mar 6, 2024 at 1:54 AM Richard Earnshaw (lists)
<Richard.Earnshaw@arm.com> wrote:
>
> On 06/03/2024 05:07, Fangrui Song wrote:
> > On Fri, Feb 23, 2024 at 7:33 PM Fangrui Song <maskray@google.com> wrote:
> >>
> >> From: Fangrui Song <maskray@gcc.gnu.org>
> >>
> >> Targets that are not arm*-*-uclinuxfdpiceabi can use -S -mfdpic, but -c
> >> -mfdpic does not pass --fdpic to gas. This is an unnecessary
> >> restriction. Just define the ASM_SPEC in bpabi.h.
> >>
> >> Additionally, use armelf[b]_linux_fdpiceabi emulations for -mfdpic in
> >> linux-eabi.h. This will allow a future musl fdpic port to use the
> >> desired BFD emulation.
> >>
> >> gcc/ChangeLog:
> >>
> >> * config/arm/bpabi.h (TARGET_FDPIC_ASM_SPEC): Transform -mfdpic.
> >> * config/arm/linux-eabi.h (TARGET_FDPIC_LINKER_EMULATION): Define.
> >> (SUBTARGET_EXTRA_LINK_SPEC): Use TARGET_FDPIC_LINKER_EMULATION
> >> if -mfdpic.
> >> ---
> >> gcc/config/arm/bpabi.h | 2 +-
> >> gcc/config/arm/linux-eabi.h | 5 ++++-
> >> 2 files changed, 5 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/gcc/config/arm/bpabi.h b/gcc/config/arm/bpabi.h
> >> index 7a279f3ed3c..6778be1a8bf 100644
> >> --- a/gcc/config/arm/bpabi.h
> >> +++ b/gcc/config/arm/bpabi.h
> >> @@ -55,7 +55,7 @@
> >> #define TARGET_FIX_V4BX_SPEC " %{mcpu=arm8|mcpu=arm810|mcpu=strongarm*"\
> >> "|march=armv4|mcpu=fa526|mcpu=fa626:--fix-v4bx}"
> >>
> >> -#define TARGET_FDPIC_ASM_SPEC ""
> >> +#define TARGET_FDPIC_ASM_SPEC "%{mfdpic: --fdpic}"
> >>
> >> #define BE8_LINK_SPEC \
> >> "%{!r:%{!mbe32:%:be8_linkopt(%{mlittle-endian:little}" \
> >> diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
> >> index eef791f6a02..0c5c58e4928 100644
> >> --- a/gcc/config/arm/linux-eabi.h
> >> +++ b/gcc/config/arm/linux-eabi.h
> >> @@ -46,12 +46,15 @@
> >> #undef TARGET_LINKER_EMULATION
> >> #if TARGET_BIG_ENDIAN_DEFAULT
> >> #define TARGET_LINKER_EMULATION "armelfb_linux_eabi"
> >> +#define TARGET_FDPIC_LINKER_EMULATION "armelfb_linux_fdpiceabi"
> >> #else
> >> #define TARGET_LINKER_EMULATION "armelf_linux_eabi"
> >> +#define TARGET_FDPIC_LINKER_EMULATION "armelf_linux_fdpiceabi"
> >> #endif
> >>
> >> #undef SUBTARGET_EXTRA_LINK_SPEC
> >> -#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION
> >> +#define SUBTARGET_EXTRA_LINK_SPEC " -m %{mfdpic: " \
> >> + TARGET_FDPIC_LINKER_EMULATION ";:" TARGET_LINKER_EMULATION "}"
> >>
> >> /* GNU/Linux on ARM currently supports three dynamic linkers:
> >> - ld-linux.so.2 - for the legacy ABI
> >> --
> >> 2.44.0.rc1.240.g4c46232300-goog
> >>
> >
> > Ping:)
> >
>
> We're in stage4 at present and this is new material. I'll look at it after the branch has been cut.
>
> R.
refs/heads/releases/gcc-14 has been cut :)
--
宋方睿
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] arm: Support -mfdpic for more targets
2024-05-06 23:09 ` Fangrui Song
@ 2024-06-05 21:50 ` Fangrui Song
0 siblings, 0 replies; 6+ messages in thread
From: Fangrui Song @ 2024-06-05 21:50 UTC (permalink / raw)
To: Richard Earnshaw (lists)
Cc: GCC Patches, Christophe Lyon, Szabolcs Nagy, Fangrui Song
On Mon, May 6, 2024 at 4:09 PM Fangrui Song <maskray@google.com> wrote:
>
> On Wed, Mar 6, 2024 at 1:54 AM Richard Earnshaw (lists)
> <Richard.Earnshaw@arm.com> wrote:
> >
> > On 06/03/2024 05:07, Fangrui Song wrote:
> > > On Fri, Feb 23, 2024 at 7:33 PM Fangrui Song <maskray@google.com> wrote:
> > >>
> > >> From: Fangrui Song <maskray@gcc.gnu.org>
> > >>
> > >> Targets that are not arm*-*-uclinuxfdpiceabi can use -S -mfdpic, but -c
> > >> -mfdpic does not pass --fdpic to gas. This is an unnecessary
> > >> restriction. Just define the ASM_SPEC in bpabi.h.
> > >>
> > >> Additionally, use armelf[b]_linux_fdpiceabi emulations for -mfdpic in
> > >> linux-eabi.h. This will allow a future musl fdpic port to use the
> > >> desired BFD emulation.
> > >>
> > >> gcc/ChangeLog:
> > >>
> > >> * config/arm/bpabi.h (TARGET_FDPIC_ASM_SPEC): Transform -mfdpic.
> > >> * config/arm/linux-eabi.h (TARGET_FDPIC_LINKER_EMULATION): Define.
> > >> (SUBTARGET_EXTRA_LINK_SPEC): Use TARGET_FDPIC_LINKER_EMULATION
> > >> if -mfdpic.
> > >> ---
> > >> gcc/config/arm/bpabi.h | 2 +-
> > >> gcc/config/arm/linux-eabi.h | 5 ++++-
> > >> 2 files changed, 5 insertions(+), 2 deletions(-)
> > >>
> > >> diff --git a/gcc/config/arm/bpabi.h b/gcc/config/arm/bpabi.h
> > >> index 7a279f3ed3c..6778be1a8bf 100644
> > >> --- a/gcc/config/arm/bpabi.h
> > >> +++ b/gcc/config/arm/bpabi.h
> > >> @@ -55,7 +55,7 @@
> > >> #define TARGET_FIX_V4BX_SPEC " %{mcpu=arm8|mcpu=arm810|mcpu=strongarm*"\
> > >> "|march=armv4|mcpu=fa526|mcpu=fa626:--fix-v4bx}"
> > >>
> > >> -#define TARGET_FDPIC_ASM_SPEC ""
> > >> +#define TARGET_FDPIC_ASM_SPEC "%{mfdpic: --fdpic}"
> > >>
> > >> #define BE8_LINK_SPEC \
> > >> "%{!r:%{!mbe32:%:be8_linkopt(%{mlittle-endian:little}" \
> > >> diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
> > >> index eef791f6a02..0c5c58e4928 100644
> > >> --- a/gcc/config/arm/linux-eabi.h
> > >> +++ b/gcc/config/arm/linux-eabi.h
> > >> @@ -46,12 +46,15 @@
> > >> #undef TARGET_LINKER_EMULATION
> > >> #if TARGET_BIG_ENDIAN_DEFAULT
> > >> #define TARGET_LINKER_EMULATION "armelfb_linux_eabi"
> > >> +#define TARGET_FDPIC_LINKER_EMULATION "armelfb_linux_fdpiceabi"
> > >> #else
> > >> #define TARGET_LINKER_EMULATION "armelf_linux_eabi"
> > >> +#define TARGET_FDPIC_LINKER_EMULATION "armelf_linux_fdpiceabi"
> > >> #endif
> > >>
> > >> #undef SUBTARGET_EXTRA_LINK_SPEC
> > >> -#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION
> > >> +#define SUBTARGET_EXTRA_LINK_SPEC " -m %{mfdpic: " \
> > >> + TARGET_FDPIC_LINKER_EMULATION ";:" TARGET_LINKER_EMULATION "}"
> > >>
> > >> /* GNU/Linux on ARM currently supports three dynamic linkers:
> > >> - ld-linux.so.2 - for the legacy ABI
> > >> --
> > >> 2.44.0.rc1.240.g4c46232300-goog
> > >>
> > >
> > > Ping:)
> > >
> >
> > We're in stage4 at present and this is new material. I'll look at it after the branch has been cut.
> >
> > R.
>
> refs/heads/releases/gcc-14 has been cut :)
>
>
>
> --
> 宋方睿
Ping this patch and
https://gcc.gnu.org/pipermail/gcc-patches/2024-March/647097.html
("arm: Force flag_pic for FDPIC") :)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] arm: Support -mfdpic for more targets
2024-02-24 3:33 [PATCH] arm: Support -mfdpic for more targets Fangrui Song
2024-03-06 5:07 ` Fangrui Song
@ 2024-10-25 12:11 ` Richard Earnshaw (lists)
1 sibling, 0 replies; 6+ messages in thread
From: Richard Earnshaw (lists) @ 2024-10-25 12:11 UTC (permalink / raw)
To: Fangrui Song, gcc-patches; +Cc: Christophe Lyon, Szabolcs Nagy, Fangrui Song
On 24/02/2024 03:33, Fangrui Song wrote:
> From: Fangrui Song <maskray@gcc.gnu.org>
>
> Targets that are not arm*-*-uclinuxfdpiceabi can use -S -mfdpic, but -c
> -mfdpic does not pass --fdpic to gas. This is an unnecessary
> restriction. Just define the ASM_SPEC in bpabi.h.
>
> Additionally, use armelf[b]_linux_fdpiceabi emulations for -mfdpic in
> linux-eabi.h. This will allow a future musl fdpic port to use the
> desired BFD emulation.
>
> gcc/ChangeLog:
>
> * config/arm/bpabi.h (TARGET_FDPIC_ASM_SPEC): Transform -mfdpic.
> * config/arm/linux-eabi.h (TARGET_FDPIC_LINKER_EMULATION): Define.
> (SUBTARGET_EXTRA_LINK_SPEC): Use TARGET_FDPIC_LINKER_EMULATION
> if -mfdpic.
Firstly, my apologies for the delay replying on this patch.
I'm not sure why we'd want a linux target to use fdpic, but this is pretty harmless, so OK.
R.
> ---
> gcc/config/arm/bpabi.h | 2 +-
> gcc/config/arm/linux-eabi.h | 5 ++++-
> 2 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/gcc/config/arm/bpabi.h b/gcc/config/arm/bpabi.h
> index 7a279f3ed3c..6778be1a8bf 100644
> --- a/gcc/config/arm/bpabi.h
> +++ b/gcc/config/arm/bpabi.h
> @@ -55,7 +55,7 @@
> #define TARGET_FIX_V4BX_SPEC " %{mcpu=arm8|mcpu=arm810|mcpu=strongarm*"\
> "|march=armv4|mcpu=fa526|mcpu=fa626:--fix-v4bx}"
>
> -#define TARGET_FDPIC_ASM_SPEC ""
> +#define TARGET_FDPIC_ASM_SPEC "%{mfdpic: --fdpic}"
>
> #define BE8_LINK_SPEC \
> "%{!r:%{!mbe32:%:be8_linkopt(%{mlittle-endian:little}" \
> diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
> index eef791f6a02..0c5c58e4928 100644
> --- a/gcc/config/arm/linux-eabi.h
> +++ b/gcc/config/arm/linux-eabi.h
> @@ -46,12 +46,15 @@
> #undef TARGET_LINKER_EMULATION
> #if TARGET_BIG_ENDIAN_DEFAULT
> #define TARGET_LINKER_EMULATION "armelfb_linux_eabi"
> +#define TARGET_FDPIC_LINKER_EMULATION "armelfb_linux_fdpiceabi"
> #else
> #define TARGET_LINKER_EMULATION "armelf_linux_eabi"
> +#define TARGET_FDPIC_LINKER_EMULATION "armelf_linux_fdpiceabi"
> #endif
>
> #undef SUBTARGET_EXTRA_LINK_SPEC
> -#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION
> +#define SUBTARGET_EXTRA_LINK_SPEC " -m %{mfdpic: " \
> + TARGET_FDPIC_LINKER_EMULATION ";:" TARGET_LINKER_EMULATION "}"
>
> /* GNU/Linux on ARM currently supports three dynamic linkers:
> - ld-linux.so.2 - for the legacy ABI
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-10-25 12:11 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-24 3:33 [PATCH] arm: Support -mfdpic for more targets Fangrui Song
2024-03-06 5:07 ` Fangrui Song
2024-03-06 9:54 ` Richard Earnshaw (lists)
2024-05-06 23:09 ` Fangrui Song
2024-06-05 21:50 ` Fangrui Song
2024-10-25 12:11 ` Richard Earnshaw (lists)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).