From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from xry111.site (xry111.site [89.208.246.23]) by sourceware.org (Postfix) with ESMTPS id 321333858CDB for ; Mon, 17 Apr 2023 06:36:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 321333858CDB Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=xry111.site Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=xry111.site DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1681713414; bh=+vtS+afn4W/ehl7BXtOybSZLulYi1V2E+sWsKM+C1M4=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=MqDpo1nVH1bYhpI/5zLeJ+wsvwu1Bdplt/gHdE8MBKo6lJoFRSnPZfEETbHQHDjsA KToWQtBG3g4GPCt90eL8P//Ab3/bazb4MWb3gSVb8xtAaVYQL95nCM5V9R4xdRfC/O PUg0ai0Ix7kOMNTtppDVst9KVDWANvrJip4K2cSs= Received: from localhost.localdomain (xry111.site [IPv6:2001:470:683e::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id 45EE965BFE; Mon, 17 Apr 2023 02:36:54 -0400 (EDT) Message-ID: Subject: Re: [PATCH] LoongArch: fix MUSL_DYNAMIC_LINKER From: Xi Ruoyao To: Peng Fan , gcc-patches@gcc.gnu.org Cc: chenglulu@loongson.cn Date: Mon, 17 Apr 2023 14:36:52 +0800 In-Reply-To: <20230417023919.7015-1-fanpeng@loongson.cn> References: <20230417023919.7015-1-fanpeng@loongson.cn> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.0 MIME-Version: 1.0 X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,LIKELY_SPAM_FROM,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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/ > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0* config/loongarch/gnu-us= er.h (MUSL_DYNAMIC_LINKER): Redefine. >=20 > Signed-off-by: Peng Fan > --- > =C2=A0gcc/config/loongarch/gnu-user.h | 7 ++++++- > =C2=A01 file changed, 6 insertions(+), 1 deletion(-) >=20 > 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.=C2=A0 If not se= e > =C2=A0#define GLIBC_DYNAMIC_LINKER \ > =C2=A0=C2=A0 "/lib" ABI_GRLEN_SPEC "/ld-linux-loongarch-" ABI_SPEC ".so.1= " > =C2=A0 > +#define MUSL_ABI_SPEC \ > +=C2=A0 "%{mabi=3Dlp64d:-lp64d}" \ > +=C2=A0 "%{mabi=3Dlp64f:-lp64f}" \ > +=C2=A0 "%{mabi=3Dlp64s:-lp64s}" > + > =C2=A0#undef MUSL_DYNAMIC_LINKER > =C2=A0#define MUSL_DYNAMIC_LINKER \ > -=C2=A0 "/lib" ABI_GRLEN_SPEC "/ld-musl-loongarch-" ABI_SPEC ".so.1" > +=C2=A0 "/lib/ld-musl-loongarch" ABI_GRLEN_SPEC MUSL_ABI_SPEC ".so.1" > =C2=A0 > =C2=A0#undef GNU_USER_TARGET_LINK_SPEC > =C2=A0#define GNU_USER_TARGET_LINK_SPEC \ --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University