public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Joseph Myers <joseph@codesourcery.com>
To: Mao Han <han_mao@c-sky.com>
Cc: <libc-alpha@sourceware.org>, <c-sky_gcc_upstream@c-sky.com>,
	<gnu-csky@mentor.com>
Subject: Re: [RFC PATCH v3 07/12] C-SKY: Linux ABI
Date: Fri, 29 Jun 2018 16:54:00 -0000	[thread overview]
Message-ID: <alpine.DEB.2.20.1806291647280.24607@digraph.polyomino.org.uk> (raw)
In-Reply-To: <5f52e63cb70aa5a57e5073be7ef3b76e1392caba.1530246557.git.han_mao@c-sky.com>

On Fri, 29 Jun 2018, Mao Han wrote:

> +/* ipcs ctl commands */
> +# define SHM_STAT 	13
> +# define SHM_INFO 	14

This is out of date (missing SHM_STAT_ANY).  You need to watch out for 
global changes to many or all ports (any such changes since the glibc 
version with which you started your port) and make sure you keep 
architecture-specific headers up to date with such changes.

> diff --git a/sysdeps/unix/sysv/linux/csky/shlib-versions b/sysdeps/unix/sysv/linux/csky/shlib-versions
> new file mode 100644
> index 0000000..15d5d7e
> --- /dev/null
> +++ b/sysdeps/unix/sysv/linux/csky/shlib-versions
> @@ -0,0 +1,9 @@
> +DEFAULT			GLIBC_2.28
> +
> +%if CSKYABI == 2 && CSKY_HARD_FLOAT == 0
> +ld=ld-linux-cskyv2-sfp-le.so.1
> +%elif CSKYABI == 2 && CSKY_HARD_FLOAT == 1
> +ld=ld-linux-cskyv2-hfp-le.so.1
> +%else
> +%error cannot determine ABI
> +%endif

Since you support both BE and LE (conditionals elsewhere providing 
substantive support for both rather than just errors for BE), I'd expect 
BE dynamic linker names as well.

> diff --git a/sysdeps/unix/sysv/linux/csky/sigcontextinfo.h b/sysdeps/unix/sysv/linux/csky/sigcontextinfo.h
> new file mode 100644
> index 0000000..a9f55f6
> --- /dev/null
> +++ b/sysdeps/unix/sysv/linux/csky/sigcontextinfo.h

See my commit a44061398c3b531b37e134a6a97accb2251fa28a.  There are macros 
in this header I'd expect to be removed (again, review many-ports changes 
since you started the port to make sure you are up to date with such 
changes).

> +typedef struct
> +  {
> +    unsigned long __ctx(tls);
> +    unsigned long __ctx(lr);
> +    unsigned long __ctx(pc);
> +    unsigned long __ctx(sr);
> +    unsigned long __ctx(usp);

As a new port I'd like to suggest you name all your ucontext fields with 
leading __ unconditionally, so you don't need __ctx to make the names 
depend on __USE_MISC.

> +struct user_regs {
> +#if defined(__ck807__) || defined(__ck810__) || defined(__ck860__)
> +  unsigned long int uregs[34];	/* CSKY V2 has 32 general rgister */
> +#else
> +  unsigned long int uregs[18];	/* CSKY V1 has 16 general rgister */

"register", missing "." (and second space) at end of comment.  Is V1 
something different from ABIv1 which isn't being supported initially?

-- 
Joseph S. Myers
joseph@codesourcery.com

  reply	other threads:[~2018-06-29 16:54 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-29  7:59 [RFC PATCH v3 00/12] port C-SKY to glibc Mao Han
2018-06-29  7:59 ` [RFC PATCH v3 04/12] C-SKY: Hard Float Support Mao Han
2018-06-29  7:59 ` [RFC PATCH v3 02/12] C-SKY: TLS support Mao Han
2018-06-29  7:59 ` [RFC PATCH v3 05/12] C-SKY: Atomic and Locking Routines Mao Han
2018-06-29 16:36   ` Joseph Myers
2018-07-03  7:57     ` Mao Han
2018-07-17 20:03       ` Joseph Myers
2018-06-29  7:59 ` [RFC PATCH v3 01/12] C-SKY: ABI related code Mao Han
2018-06-29 16:40   ` Joseph Myers
2018-07-03  8:04     ` Mao Han
2018-06-29  8:00 ` [RFC PATCH v3 11/12] C-SKY: Add build-many-glibcs.py support Mao Han
2018-06-29 16:44   ` Joseph Myers
2018-06-29  8:01 ` [RFC PATCH v3 09/12] C-SKY: Linux Startup and Dynamic Loading Code Mao Han
2018-06-29  8:01 ` [RFC PATCH v3 10/12] C-SKY: Build Infastructure Mao Han
2018-06-29 16:46   ` Joseph Myers
2018-06-29  8:01 ` [RFC PATCH v3 12/12] C-SKY: Skeleton documentation Mao Han
2018-06-29  8:12 ` [RFC PATCH v3 08/12] C-SKY: ABI Lists Mao Han
2018-06-29  8:12 ` [RFC PATCH v3 06/12] C-SKY: Linux Syscall Interface Mao Han
2018-06-29  8:12 ` [RFC PATCH v3 03/12] C-SKY: Generic math Routines Mao Han
2018-06-29  8:12 ` [RFC PATCH v3 07/12] C-SKY: Linux ABI Mao Han
2018-06-29 16:54   ` Joseph Myers [this message]
2018-07-03  8:01     ` Mao Han

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.20.1806291647280.24607@digraph.polyomino.org.uk \
    --to=joseph@codesourcery.com \
    --cc=c-sky_gcc_upstream@c-sky.com \
    --cc=gnu-csky@mentor.com \
    --cc=han_mao@c-sky.com \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).