public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] LoongArch: fix MUSL_DYNAMIC_LINKER
@ 2023-04-17  2:39 Peng Fan
  2023-04-17  6:36 ` Xi Ruoyao
  0 siblings, 1 reply; 4+ messages in thread
From: Peng Fan @ 2023-04-17  2:39 UTC (permalink / raw)
  To: gcc-patches; +Cc: chenglulu

The system based on musl has no '/lib64', so change it.

gcc/
	* config/loongarch/gnu-user.h (MUSL_DYNAMIC_LINKER): Redefine.

Signed-off-by: Peng Fan <fanpeng@loongson.cn>
---
 gcc/config/loongarch/gnu-user.h | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/gcc/config/loongarch/gnu-user.h b/gcc/config/loongarch/gnu-user.h
index aecaa02a199..fa1a5211419 100644
--- a/gcc/config/loongarch/gnu-user.h
+++ b/gcc/config/loongarch/gnu-user.h
@@ -33,9 +33,14 @@ along with GCC; see the file COPYING3.  If not see
 #define GLIBC_DYNAMIC_LINKER \
   "/lib" ABI_GRLEN_SPEC "/ld-linux-loongarch-" ABI_SPEC ".so.1"
 
+#define MUSL_ABI_SPEC \
+  "%{mabi=lp64d:-lp64d}" \
+  "%{mabi=lp64f:-lp64f}" \
+  "%{mabi=lp64s:-lp64s}"
+
 #undef MUSL_DYNAMIC_LINKER
 #define MUSL_DYNAMIC_LINKER \
-  "/lib" ABI_GRLEN_SPEC "/ld-musl-loongarch-" ABI_SPEC ".so.1"
+  "/lib/ld-musl-loongarch" ABI_GRLEN_SPEC MUSL_ABI_SPEC ".so.1"
 
 #undef GNU_USER_TARGET_LINK_SPEC
 #define GNU_USER_TARGET_LINK_SPEC \
-- 
2.38.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] LoongArch: fix MUSL_DYNAMIC_LINKER
  2023-04-17  2:39 [PATCH] LoongArch: fix MUSL_DYNAMIC_LINKER Peng Fan
@ 2023-04-17  6:36 ` Xi Ruoyao
  2023-04-17  6:51   ` 樊鹏
  0 siblings, 1 reply; 4+ messages in thread
From: Xi Ruoyao @ 2023-04-17  6:36 UTC (permalink / raw)
  To: Peng Fan, gcc-patches; +Cc: chenglulu

On Mon, 2023-04-17 at 10:39 +0800, Peng Fan wrote:
> The system based on musl has no '/lib64', so change it.

I like the change.  IMO Glibc-based systems should avoid /lib64 as well
but it's too late to change it now.

Could you provide a link to the Musl doc as a reference?  I'd like to
include the link in the commit message.

> gcc/
>         * config/loongarch/gnu-user.h (MUSL_DYNAMIC_LINKER): Redefine.
> 
> Signed-off-by: Peng Fan <fanpeng@loongson.cn>
> ---
>  gcc/config/loongarch/gnu-user.h | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/gcc/config/loongarch/gnu-user.h
> b/gcc/config/loongarch/gnu-user.h
> index aecaa02a199..fa1a5211419 100644
> --- a/gcc/config/loongarch/gnu-user.h
> +++ b/gcc/config/loongarch/gnu-user.h
> @@ -33,9 +33,14 @@ along with GCC; see the file COPYING3.  If not see
>  #define GLIBC_DYNAMIC_LINKER \
>    "/lib" ABI_GRLEN_SPEC "/ld-linux-loongarch-" ABI_SPEC ".so.1"
>  
> +#define MUSL_ABI_SPEC \
> +  "%{mabi=lp64d:-lp64d}" \
> +  "%{mabi=lp64f:-lp64f}" \
> +  "%{mabi=lp64s:-lp64s}"
> +
>  #undef MUSL_DYNAMIC_LINKER
>  #define MUSL_DYNAMIC_LINKER \
> -  "/lib" ABI_GRLEN_SPEC "/ld-musl-loongarch-" ABI_SPEC ".so.1"
> +  "/lib/ld-musl-loongarch" ABI_GRLEN_SPEC MUSL_ABI_SPEC ".so.1"
>  
>  #undef GNU_USER_TARGET_LINK_SPEC
>  #define GNU_USER_TARGET_LINK_SPEC \

-- 
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Re: [PATCH] LoongArch: fix MUSL_DYNAMIC_LINKER
  2023-04-17  6:36 ` Xi Ruoyao
@ 2023-04-17  6:51   ` 樊鹏
  2023-04-19  7:19     ` Lulu Cheng
  0 siblings, 1 reply; 4+ messages in thread
From: 樊鹏 @ 2023-04-17  6:51 UTC (permalink / raw)
  To: Xi Ruoyao; +Cc: gcc-patches, chenglulu

Yes, https://wiki.musl-libc.org/guidelines-for-distributions.html, "Multilib/multi-arch" section of this
introduces it.


> -----Original Messages-----
> From: "Xi Ruoyao" <xry111@xry111.site>
> Sent Time:2023-04-17 14:36:52 (星期一)
> To: "Peng Fan" <fanpeng@loongson.cn>, gcc-patches@gcc.gnu.org
> Cc: chenglulu@loongson.cn
> Subject: Re: [PATCH] LoongArch: fix MUSL_DYNAMIC_LINKER
> 
> On Mon, 2023-04-17 at 10:39 +0800, Peng Fan wrote:
> > The system based on musl has no '/lib64', so change it.
> 
> I like the change.  IMO Glibc-based systems should avoid /lib64 as well
> but it's too late to change it now.
> 
> Could you provide a link to the Musl doc as a reference?  I'd like to
> include the link in the commit message.
> 
> > gcc/
> >         * config/loongarch/gnu-user.h (MUSL_DYNAMIC_LINKER): Redefine.
> > 
> > Signed-off-by: Peng Fan <fanpeng@loongson.cn>
> > ---
> >  gcc/config/loongarch/gnu-user.h | 7 ++++++-
> >  1 file changed, 6 insertions(+), 1 deletion(-)
> > 
> > diff --git a/gcc/config/loongarch/gnu-user.h
> > b/gcc/config/loongarch/gnu-user.h
> > index aecaa02a199..fa1a5211419 100644
> > --- a/gcc/config/loongarch/gnu-user.h
> > +++ b/gcc/config/loongarch/gnu-user.h
> > @@ -33,9 +33,14 @@ along with GCC; see the file COPYING3.  If not see
> >  #define GLIBC_DYNAMIC_LINKER \
> >    "/lib" ABI_GRLEN_SPEC "/ld-linux-loongarch-" ABI_SPEC ".so.1"
> >  
> > +#define MUSL_ABI_SPEC \
> > +  "%{mabi=lp64d:-lp64d}" \
> > +  "%{mabi=lp64f:-lp64f}" \
> > +  "%{mabi=lp64s:-lp64s}"
> > +
> >  #undef MUSL_DYNAMIC_LINKER
> >  #define MUSL_DYNAMIC_LINKER \
> > -  "/lib" ABI_GRLEN_SPEC "/ld-musl-loongarch-" ABI_SPEC ".so.1"
> > +  "/lib/ld-musl-loongarch" ABI_GRLEN_SPEC MUSL_ABI_SPEC ".so.1"
> >  
> >  #undef GNU_USER_TARGET_LINK_SPEC
> >  #define GNU_USER_TARGET_LINK_SPEC \
> 
> -- 
> Xi Ruoyao <xry111@xry111.site>
> School of Aerospace Science and Technology, Xidian University


本邮件及其附件含有龙芯中科的商业秘密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制或散发)本邮件及其附件中的信息。如果您错收本邮件,请您立即电话或邮件通知发件人并删除本邮件。 
This email and its attachments contain confidential information from Loongson Technology , which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this email in error, please notify the sender by phone or email immediately and delete it. 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] LoongArch: fix MUSL_DYNAMIC_LINKER
  2023-04-17  6:51   ` 樊鹏
@ 2023-04-19  7:19     ` Lulu Cheng
  0 siblings, 0 replies; 4+ messages in thread
From: Lulu Cheng @ 2023-04-19  7:19 UTC (permalink / raw)
  To: 樊鹏, gcc-patches; +Cc: Xi Ruoyao, yangyujie


在 2023/4/17 下午2:51, 樊鹏 写道:
> Yes, https://wiki.musl-libc.org/guidelines-for-distributions.html, "Multilib/multi-arch" section of this
> introduces it.
>
Hi,  fanpeng:

I agree with ruoyao, add this link to the commit message.

I have no problem with other.

Thanks!


>> -----Original Messages-----
>> From: "Xi Ruoyao" <xry111@xry111.site>
>> Sent Time:2023-04-17 14:36:52 (星期一)
>> To: "Peng Fan" <fanpeng@loongson.cn>, gcc-patches@gcc.gnu.org
>> Cc: chenglulu@loongson.cn
>> Subject: Re: [PATCH] LoongArch: fix MUSL_DYNAMIC_LINKER
>>
>> On Mon, 2023-04-17 at 10:39 +0800, Peng Fan wrote:
>>> The system based on musl has no '/lib64', so change it.
>> I like the change.  IMO Glibc-based systems should avoid /lib64 as well
>> but it's too late to change it now.
>>
>> Could you provide a link to the Musl doc as a reference?  I'd like to
>> include the link in the commit message.
>>
>>> gcc/
>>>          * config/loongarch/gnu-user.h (MUSL_DYNAMIC_LINKER): Redefine.
>>>
>>> Signed-off-by: Peng Fan <fanpeng@loongson.cn>
>>> ---
>>>   gcc/config/loongarch/gnu-user.h | 7 ++++++-
>>>   1 file changed, 6 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/gcc/config/loongarch/gnu-user.h
>>> b/gcc/config/loongarch/gnu-user.h
>>> index aecaa02a199..fa1a5211419 100644
>>> --- a/gcc/config/loongarch/gnu-user.h
>>> +++ b/gcc/config/loongarch/gnu-user.h
>>> @@ -33,9 +33,14 @@ along with GCC; see the file COPYING3.  If not see
>>>   #define GLIBC_DYNAMIC_LINKER \
>>>     "/lib" ABI_GRLEN_SPEC "/ld-linux-loongarch-" ABI_SPEC ".so.1"
>>>   
>>> +#define MUSL_ABI_SPEC \
>>> +  "%{mabi=lp64d:-lp64d}" \
>>> +  "%{mabi=lp64f:-lp64f}" \
>>> +  "%{mabi=lp64s:-lp64s}"
>>> +
>>>   #undef MUSL_DYNAMIC_LINKER
>>>   #define MUSL_DYNAMIC_LINKER \
>>> -  "/lib" ABI_GRLEN_SPEC "/ld-musl-loongarch-" ABI_SPEC ".so.1"
>>> +  "/lib/ld-musl-loongarch" ABI_GRLEN_SPEC MUSL_ABI_SPEC ".so.1"
>>>   
>>>   #undef GNU_USER_TARGET_LINK_SPEC
>>>   #define GNU_USER_TARGET_LINK_SPEC \
>> -- 
>> Xi Ruoyao <xry111@xry111.site>
>> School of Aerospace Science and Technology, Xidian University
>
> 本邮件及其附件含有龙芯中科的商业秘密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制或散发)本邮件及其附件中的信息。如果您错收本邮件,请您立即电话或邮件通知发件人并删除本邮件。
> This email and its attachments contain confidential information from Loongson Technology , which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this email in error, please notify the sender by phone or email immediately and delete it.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-04-19  7:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-17  2:39 [PATCH] LoongArch: fix MUSL_DYNAMIC_LINKER Peng Fan
2023-04-17  6:36 ` Xi Ruoyao
2023-04-17  6:51   ` 樊鹏
2023-04-19  7:19     ` Lulu Cheng

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).