Re: [PATCH v7.1 07/13] ARC: Linux Syscall Interface

2020-07-07 Thread Joseph Myers
On Tue, 7 Jul 2020, Vineet Gupta via Libc-alpha wrote: > > Each implementation has it ows requirements so I can't really say if > > a helper function does make sense for all of them. For pause > > specifically we can even simplify to since all architectures have > > either ppoll or ppoll_time64:

Re: [PATCH 1/3] y2038: linux: Provide __futimes64 implementation

2020-07-07 Thread Joseph Myers
On Tue, 7 Jul 2020, Vineet Gupta via Libc-alpha wrote: > The issue is generic/utimes.c > > Is that the right file to build. If yes then it needs fixing as it expects > __NR_utimensat (and thus require the aliasing hack in ARC sysdep.h) It was the right file to build, back when

Re: [PATCH v7 00/13] glibc port to ARC processors

2020-07-02 Thread Joseph Myers
On Tue, 30 Jun 2020, Adhemerval Zanella via Libc-alpha wrote: > >>> | FAIL: stdio-common/bug22# Needs more RAM: 2 GB memory > > We might try to enhance this test to avoid require too much memory. Note this is bug 14231 (covering test-vfprintf as well, which also requires a

Re: ARC math test regressions (was Re: [PATCH v7 00/13] glibc port to ARC processors)

2020-07-02 Thread Joseph Myers
On Thu, 2 Jul 2020, Vineet Gupta via Libc-alpha wrote: > Now acos can come from 2 places depending on LIBM_SVID_COMPAT > - math/w_acos_template.c <-- sets errno only This wrapper, unlike the compat one, always calls __ieee754_acos (appropriately suffixed), relying on it to raise

Re: [PATCH v2] ieee754/dbl-64: Reduce the scope of temporary storage variables

2020-06-15 Thread Joseph Myers
On Mon, 15 Jun 2020, Adhemerval Zanella wrote: > >> Is this sufficient for comparison ? > > > > ping ! > > > > This analysis looks good me, although I can't voucher for Joseph. This patch is OK. -- Joseph S. Myers jos...@codesourcery.com ___

Re: [PATCH v2] ieee754/dbl-64: Reduce the scope of temporary storage variables

2020-06-02 Thread Joseph Myers
On Mon, 1 Jun 2020, Vineet Gupta via Libc-alpha wrote: > Also as suggested by Joseph [1] used --strip and compared the libs with > and w/o patch and their sizes are exactly same (with gcc 9). My suggestion was to compare the *contents* of the libraries, not just their sizes. Either they should

Re: static inline math functions (was Re: [PATCH v6 06/13] ARC: hardware floating point support)

2020-06-02 Thread Joseph Myers
On Tue, 2 Jun 2020, Vineet Gupta via Libc-alpha wrote: > Thi s approach seems to trip math/check-installed-headers.out > > > -std=c89 > In file included from ../include/fpu_control.h:2, > from /tmp/cih_test_Nknxdp.c:8: > ../sysdeps/arc/fpu_control.h:82:14: error: expected ';' before

Re: [PATCH 4/5] aarch/fpu: use generic sqrt, fma functions

2020-06-02 Thread Joseph Myers
On Mon, 1 Jun 2020, Vineet Gupta via Libc-alpha wrote: > Also I don't understand one thing. Both the generic and aarch64 code have this > > float > __rintf (float x) > ... > libm_alias_float (__rint, rint) > > The alias arg 1 __rint seems to lack suffix 'f' ? Please see the comments in

Re: [PATCH v6 06/13] ARC: hardware floating point support

2020-06-02 Thread Joseph Myers
On Fri, 29 May 2020, Vineet Gupta via Libc-alpha wrote: > Something like below ? > > +# define _FPU_FPSR_FWE 0x8000 > + > -# define _FPU_GETCW(cw) __asm__ volatile ("lr %0, [0x300]" : "=r" (cw)) > -# define _FPU_SETCW(cw) __asm__ volatile ("sr %0, [0x300]" : : "r" (cw)) >

Re: [PATCH v6 06/13] ARC: hardware floating point support

2020-06-02 Thread Joseph Myers
On Fri, 29 May 2020, Vineet Gupta via Libc-alpha wrote: > Side question: what do s_ / e_ prefixes mean? > The suffix is clear s_roundf (float), s_round (double), s_roundl (128). I don't know what they stand for (the naming convention probably originates from fdlibm, or at least much of the code

Re: [PATCH v5 11/14] ARC: Update syscall-names.list for ARC specific syscalls

2020-04-20 Thread Joseph Myers
On Fri, 17 Apr 2020, Vineet Gupta via Libc-alpha wrote: > On 4/17/20 4:05 PM, Joseph Myers wrote: > > This patch is OK. > > So when the rest of port is ready, this will be part of main commit ? I think it's reasonable to commit this patch before then, much like the relocatio

Re: [PATCH v5 06/14] ARC: hardware floating point support

2020-04-20 Thread Joseph Myers
On Fri, 17 Apr 2020, Vineet Gupta via Libc-alpha wrote: > > My suggestion would be to define the > > macro (using do { ... } while (0)) to copy the argument to a temporary > > variable, and do the bit-set operation in C code on that temporary > > variable rather than as part of the asm. > >

Re: [PATCH v2] provide y2038 safe socket constants for default/asm-generic ABI

2020-04-17 Thread Joseph Myers
This patch is OK. -- Joseph S. Myers jos...@codesourcery.com ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc

Re: [PATCH v5 14/14] Documentation for ARC port

2020-04-17 Thread Joseph Myers
On Wed, 8 Apr 2020, Vineet Gupta via Libc-alpha wrote: > +* Support for Synpsys ARC HS cores (ARCv2 ISA) running Linux. I think there's a missing 'o' there in Synopsys. > + Port requires atleast And a missing space in 'at least'. -- Joseph S. Myers jos...@codesourcery.com

Re: [PATCH v5 13/14] build-many-glibcs.py: Enable ARC builds

2020-04-17 Thread Joseph Myers
On Wed, 8 Apr 2020, Vineet Gupta via Libc-alpha wrote: > diff --git a/scripts/build-many-glibcs.py b/scripts/build-many-glibcs.py > index 64a836c52ea9..77b686d34cea 100755 > --- a/scripts/build-many-glibcs.py > +++ b/scripts/build-many-glibcs.py > @@ -1248,6 +1248,7 @@ def

Re: [PATCH v5 12/14] ARC: Build Infrastructure

2020-04-17 Thread Joseph Myers
On Wed, 8 Apr 2020, Vineet Gupta via Libc-alpha wrote: > + GLIBC_PRIVATE { > +# A copy of sigaction lives in libpthread, and needs these. > +__default_rt_sa_restorer; > + } Not a requirement for this port, given that this is GLIBC_PRIVATE so can always be changed later, but does

Re: [PATCH v5 11/14] ARC: Update syscall-names.list for ARC specific syscalls

2020-04-17 Thread Joseph Myers
This patch is OK. -- Joseph S. Myers jos...@codesourcery.com ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc

Re: [PATCH v5 08/14] ARC: Linux ABI

2020-04-17 Thread Joseph Myers
On Wed, 8 Apr 2020, Vineet Gupta via Libc-alpha wrote: > + for (i = 0; i < stack_args; i++) > +*r++ = va_arg(vl, unsigned long int); Missing space before '(' in call to va_arg. -- Joseph S. Myers jos...@codesourcery.com ___

Re: [PATCH v5 06/14] ARC: hardware floating point support

2020-04-17 Thread Joseph Myers
On Wed, 8 Apr 2020, Vineet Gupta via Libc-alpha wrote: > +# define _FPU_SETS(cw) __asm__ volatile ("bset %0, %0, 31 \r\n" \ > + "sr %0, [0x301] \r\n" \ > + : : "r" (cw)) This asm doesn't look safe; it's

Re: [PATCH v5 03/14] ARC: Thread Local Storage support

2020-04-17 Thread Joseph Myers
On Wed, 8 Apr 2020, Vineet Gupta via Libc-alpha wrote: > +/* Code to initially initialize the thread pointer. */ > +# define TLS_INIT_TP(tcbp) \ > + ({ \ > + long result_var;

Re: [PATCH v5 02/14] ARC: startup and dynamic linking code

2020-04-17 Thread Joseph Myers
On Wed, 8 Apr 2020, Vineet Gupta via Libc-alpha wrote: > +/* What this code does: > +-ldso starts execution here when kernel returns from execve() > +-calls into generic ldso entry point _dl_start( ) Avoid use of parentheses to indicate that a name is a function. > +auto inline void >

Re: [PATCH v5 01/14] ARC: ABI Implementation

2020-04-17 Thread Joseph Myers
On Wed, 8 Apr 2020, Vineet Gupta via Libc-alpha wrote: > +#define reloc_index \ > +({ \ > + unsigned long int plt0 = D_PTR (l, l_info[DT_PLTGOT]); \ > + unsigned long int pltn = reloc_arg;

Re: __syscall_error (was Re: [PATCH v4 13/15] ARC: Build Infrastructure)

2020-04-01 Thread Joseph Myers
On Wed, 1 Apr 2020, Vineet Gupta via Libc-alpha wrote: > > If there's an inline function referring to this in an installed header, we > > can consider whether that inline function *should* be referring to it. > > Similarly if there's a reference in crt*.o / lib*_nonshared.a / GCC static > >

Re: [PATCH v4 13/15] ARC: Build Infrastructure

2020-03-31 Thread Joseph Myers
On Tue, 31 Mar 2020, Vineet Gupta via Libc-alpha wrote: > On 3/27/20 11:42 PM, Vineet Gupta via Libc-alpha wrote: > >>> +++ b/sysdeps/arc/Versions > >>> @@ -0,0 +1,6 @@ > >>> +libc { > >>> + GLIBC_2.32 { > >>> +__syscall_error; > >> > >> Why does __syscall_error need a public symbol version?

Re: Big Endian support as multi-ABI (was Re: [PATCH v4 02/15] ARC: ABI Implementation)

2020-03-31 Thread Joseph Myers
On Tue, 31 Mar 2020, Vineet Gupta via Libc-alpha wrote: > But a BE system can't possibly be mixed with a LE, its not really a > multilib case Indeed. The Linux kernel does not support running BE processes on an LE kernel or vice versa, even when the underlying architecture does support

Re: [PATCH] provide y2038 safe socket constants

2020-03-31 Thread Joseph Myers
On Tue, 31 Mar 2020, Vineet Gupta via Libc-alpha wrote: > On 3/31/20 1:45 PM, Joseph Myers wrote: > > I'm concerned the present patch is wrong for x32, however; that has > > __TIMESIZE == 64 && __WORDSIZE == 32 but should use the old values; the > > patch should be

Re: [PATCH] provide y2038 safe socket constants

2020-03-31 Thread Joseph Myers
On Tue, 31 Mar 2020, Florian Weimer wrote: > What about the parallel changes to the sysdeps overrides? I would > expect changes for hppa, mips, powerpc. (Not sure about the alpha > situation.) This fix is only about the case where the *default* ABI in glibc requires these different values.

Re: [PATCH v4 15/15] Documentation for ARC port

2020-03-27 Thread Joseph Myers
On Fri, 27 Mar 2020, Vineet Gupta via Libc-alpha wrote: > On 3/27/20 3:49 PM, Joseph Myers wrote: > > On Thu, 12 Mar 2020, Vineet Gupta via Libc-alpha wrote: > > > >> +* Support for ARC HS cores running Linux has been contributed by Synopsys. > >>

Re: [PATCH v4 02/15] ARC: ABI Implementation

2020-03-27 Thread Joseph Myers
On Fri, 27 Mar 2020, Vineet Gupta via Libc-alpha wrote: > I added bits in sysdeps/arc/configure.ac and corresponding conditional in > shlib-version. But I have to ask (embarrassingly). how to I regenerate > sysdeps/arc/configure. I tried all possibe autoconf cmds with toggles (both > at > top

Re: [PATCH v4 15/15] Documentation for ARC port

2020-03-27 Thread Joseph Myers
On Thu, 12 Mar 2020, Vineet Gupta via Libc-alpha wrote: > +* Support for ARC HS cores running Linux has been contributed by Synopsys. > + > + Port requires atleast > +- binutils-2.32 (binutils-2_31-branch: commit 6ce881c15fc4, 2018-10-04) > +- gcc 8.3 (gcc-8-stable: commit 0d5ba57508c5,

Re: [PATCH v4 13/15] ARC: Build Infrastructure

2020-03-27 Thread Joseph Myers
On Thu, 12 Mar 2020, Vineet Gupta via Libc-alpha wrote: > +ifeq ($(subdir),debug) > +CFLAGS-backtrace.c += -funwind-tables > +endif debug/Makefile already has CFLAGS-backtrace.c += -fno-omit-frame-pointer -funwind-tables so you shouldn't need this. > +++ b/sysdeps/arc/Versions > @@ -0,0 +1,6

Re: [PATCH v4 11/15] ARC: ABI lists

2020-03-27 Thread Joseph Myers
On Fri, 27 Mar 2020, Vineet Gupta via Libc-alpha wrote: > Done now. FWIW regen-ulps simply barfs so these need to be hand edited. What exactly is the regen-ulps problem? It ought to be working for all ports. -- Joseph S. Myers jos...@codesourcery.com

Re: [PATCH v4 08/15] ARC: Linux Syscall Interface

2020-03-27 Thread Joseph Myers
On Fri, 27 Mar 2020, Vineet Gupta via Libc-alpha wrote: > But in grep'ing I see a weird thing: SO_RCVTIMEO in user exposed > socket.h has a totally different value from socket-constants.h - how is > that supposed to work. The top-level bits/socket.h is only for OSes without their own

Re: [PATCH v4 07/15] ARC: hardware floating point support

2020-03-27 Thread Joseph Myers
On Fri, 27 Mar 2020, Vineet Gupta via Libc-alpha wrote: > > The bits to enable exception traps look like dynamic control mode bits to > > me. In general fegetmode should only need to mask off bits on > > architectures where the same register has both control and status bits, > > not on

Re: [PATCH v4 11/15] ARC: ABI lists

2020-03-26 Thread Joseph Myers
On Thu, 12 Mar 2020, Vineet Gupta via Libc-alpha wrote: > diff --git a/sysdeps/arc/nofpu/libm-test-ulps > b/sysdeps/arc/nofpu/libm-test-ulps > new file mode 100644 > index ..0e8ef313fa94 > --- /dev/null > +++ b/sysdeps/arc/nofpu/libm-test-ulps > @@ -0,0 +1,390 @@ > +# Begin of

Re: [PATCH v4 09/15] ARC: Linux ABI

2020-03-26 Thread Joseph Myers
On Thu, 12 Mar 2020, Vineet Gupta via Libc-alpha wrote: > +/* And the whole bunch of them. We could have used `struct > + user_regs' directly in the typedef, but tradition says that > + the register set is an array, which does have some peculiar > + semantics, so leave it that way. */ >

Re: [PATCH v4 08/15] ARC: Linux Syscall Interface

2020-03-26 Thread Joseph Myers
On Thu, 12 Mar 2020, Vineet Gupta via Libc-alpha wrote: > diff --git a/sysdeps/unix/sysv/linux/arc/bits/socket-constants.h > b/sysdeps/unix/sysv/linux/arc/bits/socket-constants.h > new file mode 100644 > index ..74b0c06edb36 > --- /dev/null > +++

Re: [PATCH v4 07/15] ARC: hardware floating point support

2020-03-26 Thread Joseph Myers
On Thu, 12 Mar 2020, Vineet Gupta via Libc-alpha wrote: > +int > +fegetmode (femode_t *modep) > +{ > + unsigned int fpcr; > + > + _FPU_GETCW (fpcr); > + *modep = fpcr >> __FPU_RND_SHIFT; The bits to enable exception traps look like dynamic control mode bits to me. In general fegetmode

Re: [PATCH v4 02/15] ARC: ABI Implementation

2020-03-26 Thread Joseph Myers
On Wed, 25 Mar 2020, Vineet Gupta via Libc-alpha wrote: > Hardware-wise, ARC can be configured to be LE or BE and software supports that > (cfr Linux or uClibc). The initial glibc port was only aiming LE but we ended > up > with BE as well due to a customer engagement. And given much of ARC port

Re: [PATCH v4 07/15] ARC: hardware floating point support

2020-03-25 Thread Joseph Myers
On Thu, 12 Mar 2020, Vineet Gupta via Libc-alpha wrote: > diff --git a/sysdeps/arc/bits/fenv.h b/sysdeps/arc/bits/fenv.h This is another example of one patch fixing up another. You're using the same ABI for both hard and soft float, so the first patch adding a bits/fenv.h header should be

Re: [PATCH v4 06/15] ARC: math soft float support

2020-03-25 Thread Joseph Myers
On Thu, 12 Mar 2020, Vineet Gupta via Libc-alpha wrote: > +/* Soft-float doesnot support exceptions. */ Missing space, should be "does not". -- Joseph S. Myers jos...@codesourcery.com ___ linux-snps-arc mailing list

Re: [PATCH v4 04/15] ARC: Thread Local Storage support

2020-03-25 Thread Joseph Myers
On Thu, 12 Mar 2020, Vineet Gupta via Libc-alpha wrote: > +-- Derive offsets relative to the thread register. > +#define thread_offsetof(mem) (long)(offsetof(struct pthread, mem) - > sizeof(struct pthread)) Missing spaces before '(' in calls to offsetof and sizeof. > +TLS_TCB_SIZE

Re: [PATCH v4 03/15] ARC: startup and dynamic linking code

2020-03-25 Thread Joseph Myers
On Thu, 12 Mar 2020, Vineet Gupta via Libc-alpha wrote: > +case R_ARC_TLS_DTPOFF: > + if (sym != NULL) > +/* Offset set by the linker in the GOT entry would be overwritten > + by dynamic loader instead of added to the symbol location. > +

Re: [PATCH v4 02/15] ARC: ABI Implementation

2020-03-25 Thread Joseph Myers
On Thu, 12 Mar 2020, Vineet Gupta via Libc-alpha wrote: > diff --git a/sysdeps/arc/bits/endianness.h b/sysdeps/arc/bits/endianness.h > new file mode 100644 > index ..8f17ca84b485 > --- /dev/null > +++ b/sysdeps/arc/bits/endianness.h > @@ -0,0 +1,15 @@ > +#ifndef _BITS_ENDIANNESS_H >

Re: [PATCH v4 01/15] ARC: add definitions to elf/elf.h

2020-03-25 Thread Joseph Myers
This patch is OK (it can be committed without waiting for the rest of the port to be ready). -- Joseph S. Myers jos...@codesourcery.com ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org

Re: [PATCH v3 00/17] glibc port to ARC processors

2020-03-12 Thread Joseph Myers
On Thu, 12 Mar 2020, Vineet Gupta wrote: > Hi Joseph, > > On 3/6/20 5:10 PM, Joseph Myers wrote: > > On Sat, 7 Mar 2020, Vineet Gupta wrote: > > > >> On 3/6/20 4:21 PM, Joseph Myers wrote: > >>> Please give details of what the entries would be for

Re: [PATCH v3 16/17] NEWS: mention ARC port

2020-03-06 Thread Joseph Myers
On Sat, 7 Mar 2020, Vineet Gupta wrote: > On 3/6/20 5:08 PM, Joseph Myers wrote: > > > "normal" means "the versions documented in install.texi, node Tools for > > Compilation, as the minimum for building glibc on most architectures". > > > &g

Re: [PATCH v3 00/17] glibc port to ARC processors

2020-03-06 Thread Joseph Myers
On Sat, 7 Mar 2020, Vineet Gupta wrote: > On 3/6/20 4:21 PM, Joseph Myers wrote: > > Please give details of what the entries would be for > > <https://sourceware.org/glibc/wiki/ABIList> and > > ARC >* 32-bit, hard-float, LE: /lib/ld-linux-arc.so.2 >

Re: [PATCH v3 16/17] NEWS: mention ARC port

2020-03-06 Thread Joseph Myers
On Sat, 7 Mar 2020, Vineet Gupta wrote: > On 3/6/20 4:14 PM, Joseph Myers wrote: > > On Fri, 6 Mar 2020, Vineet Gupta wrote: > > > >> +* Support for ARC HS cores running Linux has been contributed by Synopsys. > >> + Port requires atleast > >> +- b

Re: [PATCH v3 00/17] glibc port to ARC processors

2020-03-06 Thread Joseph Myers
Please give details of what the entries would be for and for this port that you intend to add once the port is in. -- Joseph S. Myers jos...@codesourcery.com

Re: [PATCH v3 17/17] ARC: changes to enable 64-bit time_t, off_t, ino_t etc

2020-03-06 Thread Joseph Myers
On Fri, 6 Mar 2020, Vineet Gupta wrote: > Signed-off-by: Vineet Gupta > --- > .../sysv/linux/arc/bits/socket-constants.h| 4 +-- There is a general principle for patch series: you should not have later patches fixing up things that were wrong with earlier patches. Each patch should add

Re: [PATCH v3 14/17] ARC: Build Infrastructure

2020-03-06 Thread Joseph Myers
On Fri, 6 Mar 2020, Vineet Gupta wrote: > diff --git a/sysdeps/unix/sysv/linux/arc/configure.ac > b/sysdeps/unix/sysv/linux/arc/configure.ac > new file mode 100644 > index ..a9528032d32a > --- /dev/null > +++ b/sysdeps/unix/sysv/linux/arc/configure.ac > @@ -0,0 +1,4 @@ >

Re: [PATCH v3 16/17] NEWS: mention ARC port

2020-03-06 Thread Joseph Myers
On Fri, 6 Mar 2020, Vineet Gupta wrote: > +* Support for ARC HS cores running Linux has been contributed by Synopsys. > + Port requires atleast > +- binutils-2.31 (binutils-2_31-branch: commit 6ce881c15fc4, 2018-10-04) > +- gcc 8.2 (gcc-8-stable: commit 0d5ba57508c5, 2019-01-29) > +-

Re: [PATCH v3 01/17] gcc PR 88409: miscompilation due to missing cc clobber in longlong.h macros

2020-03-06 Thread Joseph Myers
If this gets longlong.h back in sync with changes made in the GCC version, then please commit. -- Joseph S. Myers jos...@codesourcery.com ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org

Re: switching ARC to 64-bit time_t (Re: [RFC v6 07/23] RISC-V: Use 64-bit time_t and off_t for RV32 and RV64)

2020-02-26 Thread Joseph Myers
On Wed, 26 Feb 2020, Lukasz Majewski wrote: > > > hidden_def (__mq_timedsend) > > > weak_alias (__mq_timedsend, mq_timedsend) [**] > > > hidden_weak (mq_timedsend) > > > > If you have lib_hidden_weak note you also need a corresponding > > lib_hidden_proto, for the name of the weak alias. But

Re: [PATCH v3] asm-generic ABI: Allow statx syscall despite fstatat64, fstat64

2020-02-25 Thread Joseph Myers
On Mon, 24 Feb 2020, Vineet Gupta wrote: > Oh wait. Can we avoid this churn by simply undef __NR_fstat64 and > __NR_fstatat64 > from ARC sysdep.h ? And it will then automatically fallback to statx code ! If all files needing this information include sysdep.h, that might well work. -- Joseph

Re: switching ARC to 64-bit time_t (Re: [RFC v6 07/23] RISC-V: Use 64-bit time_t and off_t for RV32 and RV64)

2020-02-25 Thread Joseph Myers
On Tue, 25 Feb 2020, Lukasz Majewski wrote: > Lets consider for example __mq_timedsend_time64. > > With lib_hidden_def/proto kept (NOT removed as in [1]): > GDB: > __GI___mq_timedsend_time64 [*] > > (No build errors, linking with test setup works as expected). What is the actual testcase,

Re: [PATCH v2] asm-generic ABI: Allow statx syscall despite fstatat64,fstat64

2020-02-24 Thread Joseph Myers
On Mon, 24 Feb 2020, Vineet Gupta wrote: > diff --git a/sysdeps/unix/sysv/linux/fxstat64.c > b/sysdeps/unix/sysv/linux/fxstat64.c > index 9133a0a29b8e..93394c450f1c 100644 > --- a/sysdeps/unix/sysv/linux/fxstat64.c > +++ b/sysdeps/unix/sysv/linux/fxstat64.c > @@ -33,15 +33,15 @@ int >

Re: switching ARC to 64-bit time_t (Re: [RFC v6 07/23] RISC-V: Use 64-bit time_t and off_t for RV32 and RV64)

2020-02-24 Thread Joseph Myers
On Mon, 24 Feb 2020, Lukasz Majewski wrote: > I'm probably not aware of something - but as done in the following > patch: > > https://github.com/lmajewski/y2038_glibc/commit/c96eeb73175961c4ac80fdd3b6adc132805387c9 > > I do need to remove librt_hidden_proto / librt_hidden_def to have > proper

Re: [RFC v6 07/23] RISC-V: Use 64-bit time_t and off_t for RV32 and RV64

2020-02-20 Thread Joseph Myers
On Thu, 20 Feb 2020, Arnd Bergmann wrote: > But surely that structure layout would be the same on ARM and ARC > as well as all other 32-bit architectures with _TIME_BITS=64, right? Yes. > What's wrong with having a single implementation for the most > recent set of stat syscalls, with the older

Re: [RFC v6 07/23] RISC-V: Use 64-bit time_t and off_t for RV32 and RV64

2020-02-19 Thread Joseph Myers
On Thu, 20 Feb 2020, Vineet Gupta wrote: > The first 4 will need more work as sym aliasing like > strong_alias (__xstat64, __xstat) > > will be needed in those ARM files (which in turn use i386). The situation for Arm is fundamentally different from that for ARC. For ARC, you only need a

Re: switching ARC to 64-bit time_t (Re: [RFC v6 07/23] RISC-V: Use 64-bit time_t and off_t for RV32 and RV64)

2020-02-18 Thread Joseph Myers
On Tue, 18 Feb 2020, Vineet Gupta wrote: > An the reason this all works on RISCV is that your kernel doesn't define > __ARCH_WANT_STAT64 -> lacks __NR_statat64 and instead uses the statx call > which > does itemized copy and would work fine when copying from 32-bits time (in > kernel) > to

Re: ARCv2 Public PRM (was Re: [PATCH v2 00/15] glibc port to ARC processors)

2020-02-06 Thread Joseph Myers
On Thu, 6 Feb 2020, Vineet Gupta wrote: > > If > > you require Linux 5.1 or later for the port then all or nearly all the > > architecture-independent pieces required for a 32-bit port supporting only > > 64-bit times should be covered by the RV32 patches, which I think are > > quite close

Re: ARCv2 Public PRM (was Re: [PATCH v2 00/15] glibc port to ARC processors)

2020-01-17 Thread Joseph Myers
On Fri, 17 Jan 2020, Vineet Gupta wrote: > The public PRM is now available and I would like you to try and access > it so that any bureaucracy is out of the way before I re-post ARC port > for 2.32 ! Thanks! There was one technical point regarding the glibc port I raised briefly in a

Re: [PATCH] ieee754/dbl-64: Reduce the scope of temporary storage variables

2019-11-11 Thread Joseph Myers
On Mon, 11 Nov 2019, Vineet Gupta wrote: > Functionally it should not result in code gen changes and if at all > those would be better since the scope of those temporaries is greatly > reduced now This feels like the sort of thing where "should not result in code gen changes" should be tested

RE: Pass config-time variable to LIBC_SLIBDIR_RTLDDIR

2019-06-03 Thread Joseph Myers
On Mon, 3 Jun 2019, Alexey Brodkin wrote: > Well I'm trying to solve a little bit different problem - to build > a universal multilib cross-toolchain which will be usable for building > binaries optimized for different ARC cores. Different I mean: > - Binary-incompatible architecture

Re: Pass config-time variable to LIBC_SLIBDIR_RTLDDIR

2019-06-03 Thread Joseph Myers
On Fri, 31 May 2019, Alexey Brodkin wrote: > Hi Andreas, > > I'm trying to implement multilib support for ARC port of Glibc > and for that we seem to need to have unique slibdir/rtlddir pair per > each machine flavor. In our case these are at least: > - ARC700 (legacy ARCompact architecture) >

Re: [PATCH v2 05/15] ARC: Atomics and Locking primitives

2019-01-30 Thread Joseph Myers
On Wed, 30 Jan 2019, Vineet Gupta wrote: > On 1/30/19 1:50 PM, Joseph Myers wrote: > >>> This seems like something that could be a common issue for new ports, so > >>> worth a mention at <https://sourceware.org/glibc/wiki/NewPorts> alongside >

Re: [PATCH v2 05/15] ARC: Atomics and Locking primitives

2019-01-30 Thread Joseph Myers
On Wed, 30 Jan 2019, Vineet Gupta wrote: > On 1/30/19 1:04 PM, Joseph Myers wrote: > >>> +#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 1 > >>> +#define __PTHREAD_MUTEX_USE_UNION 1 > >> New ports should use the preferred values for these macros. >

Re: [PATCH v2 00/15] glibc port to ARC processors

2019-01-30 Thread Joseph Myers
On Wed, 30 Jan 2019, Vineet Gupta wrote: > Having said that, wheels were already set in motion after your initial > request in > December. The ARCv2 ABI spec was opened up quickly (and mea culpa for not > referencing it v2 submission). It is now publicly accessibly at [1] Thanks. To be clear,

Re: [PATCH v2 05/15] ARC: Atomics and Locking primitives

2019-01-30 Thread Joseph Myers
On Wed, 30 Jan 2019, Andreas Schwab wrote: > On Jan 29 2019, Vineet Gupta wrote: > > > +#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 1 > > +#define __PTHREAD_MUTEX_USE_UNION 1 > > New ports should use the preferred values for these macros. This seems like something that could be a

Re: [PATCH v2 00/15] glibc port to ARC processors

2019-01-29 Thread Joseph Myers
In the absence of clear consensus regarding consideration of new ports to undocumented architectures (which would need to result in consensus on suitable rules on the subject to go in ), and in the absence of suitable public architecture and ABI

Re: [PATCH v2 15/15] make-syscalls.sh: fix comment referencing syscall-template

2019-01-29 Thread Joseph Myers
This particular patch is OK after 2.29 has been released and master has opened for 2.30 development, but such architecture-independent fixes ought not be considered part of the port submission (see ). -- Joseph S. Myers jos...@codesourcery.com

Re: ARC binutils init/fini (was Re: [PATCH 03/21] ARC: ABI Implementation)

2019-01-28 Thread Joseph Myers
On Mon, 28 Jan 2019, Vineet Gupta wrote: > In the failing case, the dsos are NOT getting the DT_INIT/DT_FINI > dynamic tags And they shouldn't be (they should have DT_INIT_ARRAY / DT_FINI_ARRAY instead). > (1). gcc config test failing (false alaram) > > |

Re: [PATCH 01/21] longlong.h: sync from gcc to fix ARC inline asm constraints

2018-12-21 Thread Joseph Myers
en updated in both places), so this patch makes it identical to the version in GCC again. Tested for x86_64 and x86. Also tested with build-many-glibcs.py for its RISC-V configurations, as the glibc architecture with the most substantial changes in longlong.h in this patch. 2018-12-21 Joseph Myers

Re: [PATCH 00/21] glibc port to ARC processors

2018-12-21 Thread Joseph Myers
On Fri, 21 Dec 2018, Vineet Gupta wrote: > is due to linkage of a generic libgcc routine fp-bit.c I'd suggest moving from fp-bit to soft-fp in libgcc (soft-fp is a lot faster, see the 2006 GCC Summit proceedings, though of course you may wish to do your own benchmarking on ARC), which would

Re: [PATCH 07/21] ARC: math soft float support

2018-12-20 Thread Joseph Myers
On Thu, 20 Dec 2018, Vineet Gupta wrote: > I'm still ramping up on hard-float, so pardon some of my naivety. It seems the > function calling convention is no different for soft-float vs. hard-float. We > have > a single register file (hard FP instructions inherently use an additional >

Re: [PATCH 13/21] ARC: Build Infrastructure

2018-12-20 Thread Joseph Myers
On Thu, 20 Dec 2018, Vineet Gupta wrote: > On 12/19/18 2:17 PM, Joseph Myers wrote: > > I should note a separate issue to consider: that of *static* PIE support. > > That doesn't need to be working, but if it's not working, > > Aren't there directed test cases for that alr

Re: test related questions (was Re: [PATCH 00/21] glibc port to ARC processors)

2018-12-20 Thread Joseph Myers
On Thu, 20 Dec 2018, Vineet Gupta wrote: > On 12/18/18 1:04 PM, Vineet Gupta wrote: > > (a) build-many-glibcs.py check results are clean > > > > | Summary of test results: > > | 1173 PASS > > | 15 XFAIL > > | > > | PASS: glibcs-arc-linux-gnu check > > One of the issues in running

Re: [PATCH 00/21] glibc port to ARC processors

2018-12-19 Thread Joseph Myers
On Wed, 19 Dec 2018, Vineet Gupta wrote: > On 12/18/18 3:11 PM, Joseph Myers wrote: > > Another general point: when posting a new port, could you include pointers > > to architecture and ABI reference manuals in case those are of relevance > > to the review? (URLs g

Re: [PATCH 13/21] ARC: Build Infrastructure

2018-12-19 Thread Joseph Myers
On Wed, 19 Dec 2018, Vineet Gupta wrote: > Indeed with current glibc port, we do build/test/run a bunch of packages > relying on PIE (dumpcap, openssh come to mind) successfully. So yes PIE > should work in general for ARC now. FWIW this could also explain the > following current results. I

Re: [PATCH 03/21] ARC: ABI Implementation

2018-12-19 Thread Joseph Myers
On Wed, 19 Dec 2018, Vineet Gupta wrote: > On 12/19/18 9:40 AM, Joseph Myers wrote: > > Architecture maintainers need wiki accounts in any case (to post test > > results for their architectures during every release freeze period), so > > you should create an account and pos

Re: [PATCH 09/21] ARC: Linux ABI

2018-12-19 Thread Joseph Myers
On Wed, 19 Dec 2018, Vineet Gupta wrote: > So perhaps we keep the ARC header above, with matching layout, while > switching to generic sigaction() still. OK ? If the different userspace layout is better, it should be better for all future ports as well. Duplicating all the SA_* constants in

Re: ARC vs. generic sigaction (was Re: [PATCH 08/21] ARC: Linux Syscall Interface)

2018-12-19 Thread Joseph Myers
On Wed, 19 Dec 2018, Vineet Gupta wrote: > I took a stab at this but not really happy with taking this approach. > > (1). Common code assumes disparate kernel and userland sigaction struct even > though there's no reason for a *new* port to be: its not like all glibc code > is > shared/common

Re: [PATCH 03/21] ARC: ABI Implementation

2018-12-19 Thread Joseph Myers
On Tue, 18 Dec 2018, Vineet Gupta wrote: > P.S. Is there a lint file or are these style guidelines in wiki > somewhere. If not I can volunteer to capture them in a wiki/readme for > future port submissions. In addition to the GNU Coding Standards (which cover many things such as comment

Re: [PATCH 07/21] ARC: math soft float support

2018-12-18 Thread Joseph Myers
On Tue, 18 Dec 2018, Joseph Myers wrote: > On Tue, 18 Dec 2018, Vineet Gupta wrote: > > > +#if defined(__ARC_FPU_SP__) || defined(__ARC_FPU_DP__) > > Missing spaces before '(' (should have such spaces in most cases between > an identifier or keyword and '(' - call

Re: [PATCH 21/21] NEWS: mention ARC port

2018-12-18 Thread Joseph Myers
On Tue, 18 Dec 2018, Vineet Gupta wrote: > @@ -1078,6 +1078,8 @@ Version 2.26 > > Major new features: > > +* Port to ARC HS cores has been contributed by Synopsys. > + Obviously this belongs under 2.29, or whatever version gets the port, not 2.26. -- Joseph S. Myers

Re: [PATCH 13/21] ARC: Build Infrastructure

2018-12-18 Thread Joseph Myers
On Tue, 18 Dec 2018, Vineet Gupta wrote: > +libc { > + GLIBC_2.29 { > +__adddf3; __addsf3; __divdf3; __divsf3; __eqdf2; __eqsf2; __extendsfdf2; > +__fixdfdi; __fixdfsi; __fixsfdi; __fixsfsi; > +__fixunsdfdi; __fixunsdfsi; __fixunssfdi; __fixunssfsi; > +__floatdidf; __floatdisf;

Re: [PATCH 09/21] ARC: Linux ABI

2018-12-18 Thread Joseph Myers
On Tue, 18 Dec 2018, Vineet Gupta wrote: > +typedef unsigned short int __pr_uid_t; > +typedef unsigned short int __pr_gid_t; Are you sure? I don't see an ARC-specific definition of __kernel_uid_t or __kernel_gid_t in the Linux kernel at all (which would mean unsigned int is actually used and

Re: [PATCH 08/21] ARC: Linux Syscall Interface

2018-12-18 Thread Joseph Myers
On Tue, 18 Dec 2018, Vineet Gupta wrote: > +/* Flush cache(s). */ > +int > +_flush_cache (char *addr, const int nbytes, const int op) > +{ > + return INLINE_SYSCALL (cacheflush, 3, addr, nbytes, op); > +} > +weak_alias (_flush_cache, cacheflush) Can't this use a syscalls.list entry instead of

Re: [PATCH 04/21] ARC: startup and dynamic linking code

2018-12-18 Thread Joseph Myers
On Tue, 18 Dec 2018, Vineet Gupta wrote: > +/* > + * Dynamic Linking ABI for ARCv2 ISA > + * glibc does not use leading '*' on each line of a comment (needs fixing throughout this file). -- Joseph S. Myers jos...@codesourcery.com ___ linux-snps-arc

Re: [PATCH 07/21] ARC: math soft float support

2018-12-18 Thread Joseph Myers
On Tue, 18 Dec 2018, Vineet Gupta wrote: > +#if defined(__ARC_FPU_SP__) || defined(__ARC_FPU_DP__) Missing spaces before '(' (should have such spaces in most cases between an identifier or keyword and '(' - calls to "defined", calls to functions, calls to macros, __attribute__, etc. - except

Re: [PATCH 06/21] ARC: Atomics and Locking primitives

2018-12-18 Thread Joseph Myers
On Tue, 18 Dec 2018, Vineet Gupta wrote: > +#define USE_ATOMIC_COMPILER_BUILTINS 0 There is a strong preference for new ports to use 1 for this rather than 0 (and not to have any asms in their atomic-machine.h unless there's some reason use of built-in functions is unsuitable) - see the

Re: [PATCH 00/21] glibc port to ARC processors

2018-12-18 Thread Joseph Myers
Another general point: when posting a new port, could you include pointers to architecture and ABI reference manuals in case those are of relevance to the review? (URLs going directly to PDFs of those manuals are preferred.) -- Joseph S. Myers jos...@codesourcery.com

Re: [PATCH 03/21] ARC: ABI Implementation

2018-12-18 Thread Joseph Myers
On Tue, 18 Dec 2018, Vineet Gupta wrote: > +/* FLAG 1 is privilege mode only instruction, hence will crash any program */ Generally, throughout the port, make sure comments end ". " (full stop, two spaces, end of comment). I won't remark on other places with this formatting issue. > diff

Re: [PATCH 14/21] ARC: Enable __start as entry point vs. canonical _start

2018-12-18 Thread Joseph Myers
On Tue, 18 Dec 2018, Vineet Gupta wrote: > On 12/18/18 1:28 PM, Florian Weimer wrote: > >> ARC linker scripts have defined __start as entry point so to not break > >> ABI for uClibc et al we allow __start for glibc as well > > I think this change and the test suite fixes should be folded into the

Re: [PATCH 01/21] longlong.h: sync from gcc to fix ARC inline asm constraints

2018-12-18 Thread Joseph Myers
On Tue, 18 Dec 2018, Vineet Gupta wrote: > diff --git a/ChangeLog b/ChangeLog > index 027b23493ed8..456e4b670c23 100644 > --- a/ChangeLog > +++ b/ChangeLog > @@ -2,6 +2,7 @@ > > * sysdeps/unix/make-syscalls.sh: Fix comment referencing > syscall-template file. > + *

Re: [PATCH 00/21] glibc port to ARC processors

2018-12-18 Thread Joseph Myers
On Tue, 18 Dec 2018, Vineet Gupta wrote: > | FAIL: elf/check-localplt# passes for build-many-glibcs.py > # buildroot builds with slightly > different toggles (-Os) > # such that gcc generates an extra >

Re: [PATCH] testsuite fix: timezone: failing due to permissions in cross testing

2018-12-18 Thread Joseph Myers
On Tue, 18 Dec 2018, Florian Weimer wrote: > There are also some xtests that require root privileges, such as > nptl/tst-setuid1. Building and testing as root is supported (but That looks like it ought to become a test using user namespaces (and so not an xtest). > obviously not recommended

Re: [PATCH] testsuite fix: timezone: failing due to permissions in cross testing

2018-12-17 Thread Joseph Myers
On Mon, 17 Dec 2018, Vineet Gupta wrote: > The setup is obviously is cross test, built using buildroot. The system is > minimal > with root allowed w/o password to enable tests to run quickly. > > On host I do the following which certainly involves root. > > | make

  1   2   >