This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC PATCH v3 07/12] C-SKY: Linux ABI
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