From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/9845 Path: news.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH 2/2] add powerpc64 port Date: Mon, 4 Apr 2016 12:41:08 +0200 Message-ID: <20160404104108.GY9862@port70.net> References: <1459113619-24090-1-git-send-email-koorogi@koorogi.info> <1459113619-24090-3-git-send-email-koorogi@koorogi.info> <20160327233709.GE21636@brightrain.aerifal.cx> <20160328003220.GA24176@dora.lan> <20160328021856.GG21636@brightrain.aerifal.cx> <20160404040353.GA12493@dora.lan> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1459766487 14992 80.91.229.3 (4 Apr 2016 10:41:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 4 Apr 2016 10:41:27 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-9858-gllmg-musl=m.gmane.org@lists.openwall.com Mon Apr 04 12:41:26 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1an1wj-0001Cw-Le for gllmg-musl@m.gmane.org; Mon, 04 Apr 2016 12:41:25 +0200 Original-Received: (qmail 13507 invoked by uid 550); 4 Apr 2016 10:41:21 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 13486 invoked from network); 4 Apr 2016 10:41:20 -0000 Mail-Followup-To: musl@lists.openwall.com Content-Disposition: inline In-Reply-To: <20160404040353.GA12493@dora.lan> User-Agent: Mutt/1.5.24 (2015-08-30) Xref: news.gmane.org gmane.linux.lib.musl.general:9845 Archived-At: * Bobby Bingham [2016-04-03 23:03:54 -0500]: > On Sun, Mar 27, 2016 at 10:18:56PM -0400, Rich Felker wrote: > > > > > diff --git a/arch/powerpc64/reloc.h b/arch/powerpc64/reloc.h > > > > > new file mode 100644 > > > > > index 0000000..8e60b31 > > > > > --- /dev/null > > > > > +++ b/arch/powerpc64/reloc.h > > > > > @@ -0,0 +1,32 @@ > > > > > +#include > > > > > + > > > > > +#if __BYTE_ORDER == __LITTLE_ENDIAN > > > > > +#define ENDIAN_SUFFIX "le" > > > > > +#else > > > > > +#define ENDIAN_SUFFIX "" > > > > > +#endif > > > > > + > > > > > +#define LDSO_ARCH "powerpc64" ENDIAN_SUFFIX > > > > > > > > Is it intentional that the "default" subarch variant be suffixed with > > > > "le" and a non-default/unused one be the bare "powerpc64"? I don't > > > > object to that but it's contrary to usual conventions that the bare > > > > arch be the canonical ABI, and it might be contrary to what GCC is > > > > doing now (haven't checked) for the dynamic linker name. > > > > > > I'll double check, but I skimmed the gcc code here, and it looked like > > > it uses an "le" suffix. Admittedly, I didn't read it closely enough to > > > be absolutely sure yet. > > > > OK, sounds good. Also note that CRTJMP here needs fixing. > > I checked again, and gcc does indeed use the "le" suffix. > > gcc/config/rs6000/linux64.h has: > > #define MUSL_DYNAMIC_LINKER64 \ > "/lib/ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" > > > The two places that define MUSL_DYNAMIC_LINKER_E define it like so: > > gcc/config/rs6000/sysv4.h: > > #define MUSL_DYNAMIC_LINKER_E ENDIAN_SELECT("", "le", "") > > gcc/config/rs6000/sysv4le.h: > > #define MUSL_DYNAMIC_LINKER_E ENDIAN_SELECT("", "le", "le") > i think i just followed the 32bit logic because 32bit and 64bit use a lot of common code in gcc i dont know what's the convention. i hope this works.