Re: [uclibc-ng-devel] cleanup patch PTR_MANGLE/PTR_DEMANGLE

2016-07-10 Thread Max Filippov
Hi Waldemar, On Sun, Jul 10, 2016 at 9:25 AM, Waldemar Brodkorb wrote: > I want to add following cleanup patch. > No regressions found. > > Okay? Comments? The following looks either broken or unused in the current code, given there's no matching PTR_MANGLE: diff --git a/libc/sysdeps/linux/x86_

Re: [uclibc-ng-devel] cleanup patch PTR_MANGLE/PTR_DEMANGLE

2016-07-11 Thread Max Filippov
On Mon, Jul 11, 2016 at 9:13 AM, Waldemar Brodkorb wrote: > Max Filippov wrote, >> On Sun, Jul 10, 2016 at 9:25 AM, Waldemar Brodkorb >> wrote: >> > I want to add following cleanup patch. >> > No regressions found. >> > >> > Okay? Comments? &

Re: [uclibc-ng-devel] arch maintainer

2016-07-29 Thread Max Filippov
Hi Waldemar, On Thu, Jul 28, 2016 at 10:30 PM, Waldemar Brodkorb wrote: > How would you like to handle global reorganization patches touching > arch specific parts. Do you would like to be in Cc? Yes, please. > How long should I wait for a comment or veto? I would respond in a couple of days.

Re: [uclibc-ng-devel] [PATCH] deduplicate jmpbuf-unwind.h

2016-07-29 Thread Max Filippov
On Thu, Jul 28, 2016 at 10:26 PM, Waldemar Brodkorb wrote: > There are two copies of jmpbuf-unwind.h in the tree, > the NPTL one isn't really used. No regressions found > by embedded-test run. > > Signed-off-by: Waldemar Brodkorb Reviewed-by: Max Filippov

Re: [uclibc-ng-devel] [PATCH] test: reorganize tls macros in separate architecture files

2016-07-29 Thread Max Filippov
On Mon, Jul 25, 2016 at 8:48 PM, Waldemar Brodkorb wrote: > To be more consistent separate all TLS macros in separate files and > remove obsolete macros for not supported architectures. > > Signed-off-by: Waldemar Brodkorb Reviewed-by: Max Filippov -- Th

[uclibc-ng-devel] undefined reference to `dl_iterate_phdr'

2016-11-16 Thread Max Filippov
Hi Waldemar, I see a number of buildroot build issues with the post-unification uclibc-ng versions (1.0.18 and 1.0.19) related to dl_iterate_phdr used in static builds. E.g.: > xtensa | autossh-1.4e | > http://autobuild.buildroot.net/results/96807eda8a4b5a25225a82d7dd2b35

[uclibc-ng-devel] [PATCH] utils: add -static to CFLAGS when HAVE_SHARED is not set

2016-12-09 Thread Max Filippov
Signed-off-by: Max Filippov --- utils/Makefile.in | 4 1 file changed, 4 insertions(+) diff --git a/utils/Makefile.in b/utils/Makefile.in index 8666f89..5378973 100644 --- a/utils/Makefile.in +++ b/utils/Makefile.in @@ -25,6 +25,10 @@ else CFLAGS-utils-shared := endif +ifneq

Re: [uclibc-ng-devel] okay to commit?

2016-12-09 Thread Max Filippov
Waldemar, Alexey, On Wed, Dec 7, 2016 at 6:48 PM, Waldemar Brodkorb wrote: > following patch was developed by crosstool-ng developer. > Okay to commit? I've got a couple questions: > diff --git a/libpthread/nptl/sysdeps/Makefile.commonarch > b/libpthread/nptl/sysdeps/Makefile.commonarch > inde

Re: [uclibc-ng-devel] okay to commit?

2016-12-09 Thread Max Filippov
On Fri, Dec 9, 2016 at 3:52 PM, Alexey Neyman wrote: > On 12/09/2016 01:10 PM, Max Filippov wrote: >> On Wed, Dec 7, 2016 at 6:48 PM, Waldemar Brodkorb >> wrote: >>> >>> following patch was developed by crosstool-ng developer. >>> Okay to commit? >

Re: [uclibc-ng-devel] [PATCH] remove PID caching - preview

2017-01-25 Thread Max Filippov
Hi Waldemar, On Wed, Jan 25, 2017 at 07:02:53AM +0100, Waldemar Brodkorb wrote: > I would like to suggest following changeset, any opinions? > > Follow GNU C Library from c579f48edba88380635ab98cb612030e3ed8691e > and remove the PID caching. These simplifies the architecture specific > assembly c

Re: [uclibc-ng-devel] ld.so cleanup

2017-06-28 Thread Max Filippov
Hi Waldemar, On Mon, Jun 26, 2017 at 11:36 AM, Waldemar Brodkorb wrote: > I would suggest following patch, which removes the special > communication between ld.so and gdb. > While debugging a ld.so issue with gdb 8.0 on alpha, I recognized > that the debugger stalled when trying to execute this c

Re: [uclibc-ng-devel] syscall cancel simplification patches

2017-07-27 Thread Max Filippov
Hi Waldemar, On Fri, Jul 21, 2017 at 12:31 PM, Waldemar Brodkorb wrote: > I would like to get some feedback for following three patches. > The test suite runs over all architectures showed no regressions. > > The goal is to simplify the addition of new architectures and > remove the need to add a

Re: [uclibc-ng-devel] [PATCH] towlower and locales

2017-08-02 Thread Max Filippov
Hello, On Wed, Aug 2, 2017 at 2:50 PM, Eugene Yudin wrote: > I cannot say anything without verbose build. > Unfortunately we can see fatal errors only in that mode. > I attached patch to make errors visible. > > Do you know linux distro which is used at this build machine? > It would be very help

Re: [uclibc-ng-devel] [Buildroot] buildroot uClibc-ng build failure

2017-08-08 Thread Max Filippov
On Tue, Aug 8, 2017 at 12:07 PM, Eugene Yudin wrote: > Yes. Please install the locale "en_US.UTF-8". > It's used in buildroot by default: > package/uclibc/uclibc.mk:46:UCLIBC_LOCALES = en_US Just curious: why not defaulting to C (or C.UTF-8) locale? -- Thanks. -- Max ___

Re: [uclibc-ng-devel] lowlevellock.h patch

2018-01-07 Thread Max Filippov
Hi Waldemar, On Sun, Jan 7, 2018 at 4:20 AM, Waldemar Brodkorb wrote: > I would like to push attached patch. > No regressions found. > > Any comments? Nice cleanup, LGTM. -- Thanks. -- Max ___ devel mailing list devel@uclibc-ng.org https://mailman.uc

[uclibc-ng-devel] [PATCH] xtensa: fix strcmp

2018-01-09 Thread Max Filippov
b[514 * 4 + 1] = 0; return !(strcmp(a, b) != 0); } Use 0 as a loop counter to make 2^32 - 1 iterations which is enough to cover all addressable memory. While at it drop useless nop at the end of the first loop and use a11 for all loop counters. Signed-off-by: Max Filippo

[uclibc-ng-devel] [PATCH v2] xtensa: fix strcmp

2018-01-09 Thread Max Filippov
b[514 * 6 + 1] = 0; return !(strcmp(a, b) != 0); } Use 0 as a loop counter to make 2^32 - 1 iterations which is enough to cover all addressable memory. While at it drop useless nop at the end of the first loop and use a11 for all loop counters. Signed-off-by: Max Filipp

[uclibc-ng-devel] [PATCH] xtensa: fix _dl_tlsdesc_dynamic

2018-01-16 Thread Max Filippov
hat was intended; - both fast and slow paths should not subtract __builtin_thread_pointer from the result. Signed-off-by: Max Filippov --- ldso/ldso/xtensa/dl-tlsdesc.S | 21 + 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/ldso/ldso/xtensa/dl-tlsdesc.S b/l

[uclibc-ng-devel] [PATCH] xtensa: fix R_XTENSA_TLSDESC_ARG handling in _dl_do_reloc

2018-01-17 Thread Max Filippov
R_XTENSA_TLSDESC_ARG is a true RELA relocation, the addend is in the relocation record itself, not in place. Signed-off-by: Max Filippov --- ldso/ldso/xtensa/elfinterp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ldso/ldso/xtensa/elfinterp.c b/ldso/ldso/xtensa

Re: [uclibc-ng-devel] [PATCH] xtensa: fix R_XTENSA_TLSDESC_ARG handling in _dl_do_reloc

2018-01-17 Thread Max Filippov
Hi Waldemar, On Wed, Jan 17, 2018 at 11:19 AM, Waldemar Brodkorb wrote: >> R_XTENSA_TLSDESC_ARG is a true RELA relocation, the addend is in the >> relocation record itself, not in place. > > Just curious, are you find these bugfixes via a general code review > or some bugs reported to you? Are th

[uclibc-ng-devel] [PATCH] xtensa: add custom bits/poll.h

2018-12-12 Thread Max Filippov
0x0800), "POLLREMOVE != 0x0800"); ^~~~~ Signed-off-by: Max Filippov --- libc/sysdeps/linux/xtensa/bits/poll.h | 49 +++ 1 file changed, 49 insertions(+) create mode 100644 libc/sysdeps/linux/xtensa/bits/poll.h diff --git a/libc/sysdeps/linux/xtensa/bits/poll.h

Re: [uclibc-ng-devel] uclibc-ng built with wrong _FILE_OFFSET_BITS

2019-05-09 Thread Max Filippov
On Thu, May 9, 2019 at 11:34 AM Max Filippov wrote: > I've tried to run uclibc-ng tests on xtensa in a buildroot-built rootfs > and found misc/tst-preadvwritev failing with the following message: > > first buffer from first preadv different than expected > > Digging de

Re: [uclibc-ng-devel] uclibc-ng built with wrong _FILE_OFFSET_BITS

2019-05-10 Thread Max Filippov
On Fri, May 10, 2019 at 6:32 AM Yann Sionneau wrote: > > If that can be of any help, this test seems to PASS on armv7 arch: > https://uclibc-ng-ci.sionneau.net:8443/job/uclibc-ng-multiarch/arch=armv7/19/console > > However this bugs reproduces for mips32r6 : > https://uclibc-ng-ci.sionneau.net:844

[uclibc-ng-devel] [PATCH] preadv/pwritev: fix offset argument type

2019-05-10 Thread Max Filippov
c/tst-preadvwritev on xtensa. Signed-off-by: Max Filippov --- include/sys/uio.h | 4 ++-- libc/sysdeps/linux/common/preadv.c | 2 +- libc/sysdeps/linux/common/pwritev.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/sys/uio.h b/include/sys/uio.h

[uclibc-ng-devel] [PATCH] xtensa: don't use l32r opcode explicitly

2019-05-10 Thread Max Filippov
xtensa assembler is capable of representing register loads with either movi + addmi, l32r or const16, depending on the core configuration. Don't use '.literal' and 'l32r' directly in the code, use 'movi' and let the assembler relax them. Signed-off-by: Ma

[uclibc-ng-devel] [PATCH] dics/defines.txt: clarify LFS-related macros

2019-05-10 Thread Max Filippov
Add description for _LARGEFILE_SOURCE, _LARGEFILE64_SOURCE, _FILE_OFFSET_BITS and __USE_LARGEFILE, __USE_LARGEFILE64 and __USE_FILE_OFFSET64 macros. Signed-off-by: Max Filippov --- docs/defines.txt | 23 --- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/docs

[uclibc-ng-devel] [PATCH v2] docs/defines.txt: clarify LFS-related macros

2019-05-10 Thread Max Filippov
Add description for _LARGEFILE_SOURCE, _LARGEFILE64_SOURCE, _FILE_OFFSET_BITS and __USE_LARGEFILE, __USE_LARGEFILE64 and __USE_FILE_OFFSET64 macros. Signed-off-by: Max Filippov --- Changes v1->v2: - fix subject line docs/defines.txt | 23 --- 1 file changed, 20 inserti

Re: [uclibc-ng-devel] [PATCH] preadv/pwritev: fix offset argument type

2019-05-13 Thread Max Filippov
Hi Yann, On Mon, May 13, 2019 at 8:55 AM Yann Sionneau wrote: > It has been merged, it trigged continuous integration on my side. > > It seems tst-preadvwritev still passes on the following arches: armv7, > aarch64 > > But this test was failing before your commit and still fails for > mips32r6: >

Re: [uclibc-ng-devel] xtensa failures in buildroot

2019-10-12 Thread Max Filippov
Hi Waldemar, On Sat, Oct 12, 2019 at 3:45 AM Waldemar Brodkorb wrote: > is attached patch okay for you? > Fixes the recent br errors for uClibc-ng. There's a fix for this issue in the linux mainline, which I also posted to the buildroot ML: http://lists.busybox.net/pipermail/buildroot/2019-Septe

[uclibc-ng-devel] isalnum_l and friends

2020-02-03 Thread Max Filippov
Hi Waldemar, there's an example of buildroot package that fails to build when using isalnum_l: http://autobuild.buildroot.net/results/b7ba1210d5aa184b133f0171da621d2b0083ec39/build-end.log AFAICS include/ctype.h defines the following chain of macros for it: isalnum_l -> __isalnum_l -> __isctype_l

[uclibc-ng-devel] [PATCH] include/ctype.h: drop is*_l macro definitions

2020-02-03 Thread Max Filippov
://autobuild.buildroot.net/results/b7ba1210d5aa184b133f0171da621d2b0083ec39/build-end.log Signed-off-by: Max Filippov --- include/ctype.h | 32 1 file changed, 32 deletions(-) diff --git a/include/ctype.h b/include/ctype.h index ecd5e730886a..05f21c553e5a 100644 --- a

[uclibc-ng-devel] [PATCH v2] include/ctype.h: drop is*_l macro definitions

2020-02-03 Thread Max Filippov
://autobuild.buildroot.net/results/b7ba1210d5aa184b133f0171da621d2b0083ec39/build-end.log Signed-off-by: Max Filippov --- Changes v1->v2: - also drop __isctype_l macro. include/ctype.h | 33 - 1 file changed, 33 deletions(-) diff --git a/include/ctype.h b/include/ctyp

[uclibc-ng-devel] [PATCH] include/ctype.h: restore __isctype_l definition

2020-02-09 Thread Max Filippov
Recent is*_l fix broke uclibc build because removed __isctype_l definition was used in libc/misc/ctype/ctype.c. Restore it. Fixes: d1a3ca7ca566 ("include/ctype.h: drop is*_l macro definitions") Signed-off-by: Max Filippov --- include/ctype.h | 1 + 1 file changed, 1 insertion(+) di

[uclibc-ng-devel] [PATCH] xtensa: relax memory constraint in atomic assembly

2020-08-08 Thread Max Filippov
Replace "a" constraints with "+m" to avoid forcing atomic variable address into a register and let the compiler use non-zero offset in load/store opcodes. Signed-off-by: Max Filippov --- libc/sysdeps/linux/xtensa/bits/atomic.h | 49 +-- .../linuxthrea

[uclibc-ng-devel] [PATCH] xtensa: add exclusive access support

2020-08-08 Thread Max Filippov
Add XCHAL definitions for S32C1I and EXCLUSIVE options to xtensa-config.h, include it in places that implement atomic operations and add implementations with exclusive access option opcodes. Signed-off-by: Max Filippov --- libc/sysdeps/linux/xtensa/bits/atomic.h | 128

[uclibc-ng-devel] [PATCH] extra/locale: fix gen_wc8bit diagnostic output

2021-01-07 Thread Max Filippov
Diagnostic for missing UTF locale is printed to stdout instead of stderr, fix that. Signed-off-by: Max Filippov --- extra/locale/gen_wc8bit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extra/locale/gen_wc8bit.c b/extra/locale/gen_wc8bit.c index 8031df1cf4a5

[uclibc-ng-devel] [PATCH] xtensa: implement user context manipulation functions

2022-06-16 Thread Max Filippov
Implement getcontext, makecontext, setcontext and swapcontext. Signed-off-by: Max Filippov --- extra/Configs/Config.xtensa | 3 +- libc/sysdeps/linux/xtensa/Makefile.arch | 3 + libc/sysdeps/linux/xtensa/__start_context.S | 103 +++ libc/sysdeps/linux/xtensa

[uclibc-ng-devel] [PATCH v2] xtensa: implement user context manipulation functions

2022-06-17 Thread Max Filippov
Implement getcontext, makecontext, setcontext and swapcontext. Signed-off-by: Max Filippov --- Changes v1->v2: - drop wrong comment from __start_context extra/Configs/Config.xtensa | 3 +- libc/sysdeps/linux/xtensa/Makefile.arch | 3 + libc/sysdeps/linux/xte

[uclibc-ng-devel] [PATCH v3] xtensa: implement user context manipulation functions

2022-06-17 Thread Max Filippov
Implement getcontext, makecontext, setcontext and swapcontext. Signed-off-by: Max Filippov --- Changes v2->v3: - use explicit SIG_BLOCK in getcontext instead of 0 Changes v1->v2: - drop wrong comment from __start_context extra/Configs/Config.xtensa | 3 +- libc/sysdeps

[uclibc-ng-devel] [PATCH] static pie: fix building static PDE

2022-09-01 Thread Max Filippov
test ...ld: ...usr/lib/libc.a(reloc_static_pie.os):(.text+0x0): undefined reference to `_DYNAMIC' Move _dl_load_base definition to libc-tls.c to resolve this dependency and fix static PDE build. Signed-off-by: Max Filippov --- libc/misc/internals/reloc_static_pie.c

[uclibc-ng-devel] Re: [PATCH] static pie: fix building static PDE

2022-09-02 Thread Max Filippov
Hi linted, thanks for your review. On Thu, Sep 1, 2022 at 11:12 PM linted wrote: > the original decision of placing it in reloc_static_pie.c was to ensure > that when reloc_static_pie() accessed _dl_load_base it would do so > without relying on relocations. I don't see how placing the variable

[uclibc-ng-devel] [PATCH v2] static pie: fix building static PDE

2022-09-02 Thread Max Filippov
test ...ld: ...usr/lib/libc.a(reloc_static_pie.os):(.text+0x0): undefined reference to `_DYNAMIC' Move _dl_load_base definition to libc-tls.c to resolve this dependency and fix static PDE build. Signed-off-by: Max Filippov --- Changes v1->v2: - make _dl_load_base definition con

[uclibc-ng-devel] [PATCH] nptl: use mmap to allocate initial TLS data for static PIE on noMMU

2022-09-06 Thread Max Filippov
Static PIE ELFs may be loaded on noMMU linux platforms with FDPIC support, but they don't have adjustable brk, and thus cannot allocate memory for the TLS. Use mmap instead of sbrk to allocate initial TLS memory when building with static PIE support for noMMU. Signed-off-by: Max Fil

[uclibc-ng-devel] [PATCH v2] nptl: use mmap to allocate initial TLS data for static PIE on noMMU

2022-09-06 Thread Max Filippov
Static PIE ELFs may be loaded on noMMU linux platforms with FDPIC support, but they don't have adjustable brk, and thus cannot allocate memory for the TLS. Use mmap instead of sbrk to allocate initial TLS memory when building with static PIE support for noMMU. Signed-off-by: Max Fil

[uclibc-ng-devel] [PATCH 0/5] add static PIE support for xtensa

2022-09-09 Thread Max Filippov
Hello, this series does a couple cleanups in the static PIE code and xtensa code and enables static PIE support for the xtensa architecture. Max Filippov (5): static pie: fix building static PDE static pie: replicate PERFORM_BOOTSTRAP_GOT conditions from dl-startup.c xtensa: make GOT

[uclibc-ng-devel] [PATCH 1/5] static pie: fix building static PDE

2022-09-09 Thread Max Filippov
test ...ld: ...usr/lib/libc.a(reloc_static_pie.os):(.text+0x0): undefined reference to `_DYNAMIC' Move _dl_load_base definition to libc-tls.c to resolve this dependency and fix static PDE build. Signed-off-by: Max Filippov --- libc/misc/internals/reloc_static_pie.c

[uclibc-ng-devel] [PATCH 2/5] static pie: replicate PERFORM_BOOTSTRAP_GOT conditions from dl-startup.c

2022-09-09 Thread Max Filippov
twice. Replicate PERFORM_BOOTSTRAP_GOT conditions from dl-startup.c in reloc_static_pie.c to allow using PERFORM_BOOTSTRAP_GOT macro as is. Signed-off-by: Max Filippov --- libc/misc/internals/reloc_static_pie.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libc/misc/internals/reloc_static_pie

[uclibc-ng-devel] [PATCH 3/5] xtensa: make GOT protection adjustment conditional

2022-09-09 Thread Max Filippov
, memory corruption or protection violations. Split GOT protection update from PERFORM_BOOTSTRAP_GOT and only do it when building configuration with MMU support. Signed-off-by: Max Filippov --- ldso/ldso/xtensa/dl-startup.h | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions

[uclibc-ng-devel] [PATCH 4/5] xtensa: drop ARCH_NEEDS_BOOTSTRAP_RELOCS

2022-09-09 Thread Max Filippov
Xtensa does not define PERFORM_BOOTSTRAP_RELOC so it doesn't need ARCH_NEEDS_BOOTSTRAP_RELOCS definition. Remove it. Signed-off-by: Max Filippov --- ldso/ldso/xtensa/dl-sysdep.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/ldso/ldso/xtensa/dl-sysdep.h b/ldso/ldso/xtensa/dl-sys

[uclibc-ng-devel] [PATCH 5/5] xtensa: add static pie support

2022-09-09 Thread Max Filippov
Signed-off-by: Max Filippov --- extra/Configs/Config.in| 4 +++- ldso/ldso/xtensa/dl-startup.h | 2 ++ libc/misc/internals/reloc_static_pie.c | 2 +- libc/sysdeps/linux/xtensa/crt1.S | 27 ++ 4 files changed, 33 insertions(+), 2 deletions

[uclibc-ng-devel] Re: [PATCH 5/5] xtensa: add static pie support

2022-09-14 Thread Max Filippov
Hi linted, thank you for taking a look. On Wed, Sep 14, 2022 at 12:23 PM linted wrote: > [Patch 1/5] > I thought this was already submitted and merged in? It looks identical to > "[PATCH v2] static pie: building static PDE", or am I mistaken? Yes, it's the exact same patch. I'm looking at this

[uclibc-ng-devel] [PATCH v2 0/5] add static PIE support for xtensa

2022-09-15 Thread Max Filippov
Hello, this series does a couple cleanups in the ldso, static PIE code and xtensa code and enables static PIE support for the xtensa architecture. Changes v1->v2: - clean up PERFORM_BOOTSTRAP_GOT condition in the ldso - drop patch that adds PERFORM_BOOTSTRAP_GOT to reloc_static_pie Max Filip

[uclibc-ng-devel] [PATCH v2 1/5] static pie: fix building static PDE

2022-09-15 Thread Max Filippov
test ...ld: ...usr/lib/libc.a(reloc_static_pie.os):(.text+0x0): undefined reference to `_DYNAMIC' Move _dl_load_base definition to libc-tls.c to resolve this dependency and fix static PDE build. Signed-off-by: Max Filippov --- libc/misc/internals/reloc_static_pie.c

[uclibc-ng-devel] [PATCH v2 2/5] ldso: clean up PERFORM_BOOTSTRAP_GOT ifdeferry

2022-09-15 Thread Max Filippov
ed by removing the call to elf_machine_relative from the xtensa PERFORM_BOOTSTRAP_GOT and always using common code. Signed-off-by: Max Filippov --- Changes v1->v2: - new patch ldso/ldso/dl-startup.c| 3 --- ldso/ldso/xtensa/dl-startup.h | 11 --- 2 files changed, 14 deletions(-) di

[uclibc-ng-devel] [PATCH v2 3/5] xtensa: ldso: make GOT protection adjustment conditional

2022-09-15 Thread Max Filippov
, memory corruption or protection violations. Only define PERFORM_BOOTSTRAP_GOT when building xtensa configuration with MMU support. Signed-off-by: Max Filippov --- Changes v1->v2: - now that PERFORM_BOOTSTRAP_GOT only does mprotect calls make its whole definition conditional instead

[uclibc-ng-devel] [PATCH v2 4/5] xtensa: drop ARCH_NEEDS_BOOTSTRAP_RELOCS

2022-09-15 Thread Max Filippov
Xtensa does not define PERFORM_BOOTSTRAP_RELOC so it doesn't need ARCH_NEEDS_BOOTSTRAP_RELOCS definition. Remove it. Signed-off-by: Max Filippov --- ldso/ldso/xtensa/dl-sysdep.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/ldso/ldso/xtensa/dl-sysdep.h b/ldso/ldso/xtensa/dl-sys

[uclibc-ng-devel] [PATCH v2 5/5] xtensa: add static pie support

2022-09-15 Thread Max Filippov
Signed-off-by: Max Filippov --- extra/Configs/Config.in| 4 +++- ldso/ldso/xtensa/dl-startup.h | 2 ++ libc/misc/internals/reloc_static_pie.c | 2 +- libc/sysdeps/linux/xtensa/crt1.S | 27 ++ 4 files changed, 33 insertions(+), 2 deletions

[uclibc-ng-devel] [PATCH] linuxthreads/signal: improve sigaction behavior

2023-07-31 Thread Max Filippov
and new signal pointers pointing to the same structure instance, as a result act->sa_handler after the sigaction syscall is not what the user requested, but the previous handler. Signed-off-by: Max Filippov --- libpthread/linuxthreads/signals.c | 17 +++-- 1 file changed, 11 insertio

[uclibc-ng-devel] [PATCH v2] linuxthreads/signal: improve sigaction behavior

2023-08-02 Thread Max Filippov
and new signal pointers pointing to the same structure instance, as a result act->sa_handler after the sigaction syscall is not what the user requested, but the previous handler. Signed-off-by: Max Filippov --- Changes v1 -> v2: - initialize 'save' with NULL to avoid compiler

[uclibc-ng-devel] [PATCH] daemon.c: make _fork_parent static inline again

2023-09-05 Thread Max Filippov
t a part of the libc interface. Make it static inline again. Signed-off-by: Max Filippov --- libc/unistd/daemon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libc/unistd/daemon.c b/libc/unistd/daemon.c index 53fd902bfd72..599c3c8e6cd4 100644 --- a/libc/unistd/daemon.c +++ b/

[uclibc-ng-devel] Re: [PATCH] xtensa: Add time64 support.

2024-02-22 Thread Max Filippov
; 2 files changed, 23 insertions(+), 1 deletion(-) Reviewed-by: Max Filippov -- Thanks. -- Max ___ devel mailing list -- devel@uclibc-ng.org To unsubscribe send an email to devel-le...@uclibc-ng.org

[uclibc-ng-devel] Re: [PATCH] Add time64 support for PowerPC.

2024-02-24 Thread Max Filippov
On Sat, Feb 24, 2024 at 7:01 AM Dmitry Chestnykh wrote: > > PowerPC is big-endian architecture, so there are some > significant differences in comparison with time64 support > for little-endian architectures like ARM and xtensa. JFYI xtensa supports both little and big endianness. Which suggests

[uclibc-ng-devel] Re: [PATCH 1/2] Add support for using time64 on big-endian machines.

2024-02-24 Thread Max Filippov
On Sat, Feb 24, 2024 at 10:22 AM Dmitry Chestnykh wrote: > > For BE architectures there is one significant difference > in comparison with time64 support for little-endian > architectures like ARMv7. > The difference is that we strictly need to pass two 64bit > values to system calls because Linux

[uclibc-ng-devel] Re: [PATCH] Add time64 support for PowerPC.

2024-02-24 Thread Max Filippov
On Sat, Feb 24, 2024 at 10:29 AM Dmitriy Chestnykh wrote: > > Patch is splitted, intermediate pointers removed. Something isn't right with the submission, I can see multiple copies of the patch 1/2, but no 2/2. Also please add version tag to the subject line, i.e. 'PATCH v3' for the next submissi

[uclibc-ng-devel] Re: [PATCH 1/2] Add support for using time64 on big-endian machines.

2024-02-24 Thread Max Filippov
On Sat, Feb 24, 2024 at 11:25 AM Dmitriy Chestnykh wrote: > What name should we use instead of __ts? I suggest uclibc_ts_internal, it > starts with four underscores, so it seems to be okay. As another option we > can put these macroses inside some private header. __ts looks good to me, it's

[uclibc-ng-devel] Re: [PATCH 1/2] Add support for using time64 on big-endian machines.

2024-02-24 Thread Max Filippov
On Sat, Feb 24, 2024 at 11:43 AM Dmitriy Chestnykh wrote: > Okay, I will move these marcoses to some internal header If you find such place then I guess struct __ts64_struct and struct __its64_struct can go there as well as they're only used internally. -- Thanks. -- Max ___

[uclibc-ng-devel] Re: [PATCH v3 1/2] Add support for using time64 on big-endian machines.

2024-02-25 Thread Max Filippov
On Sat, Feb 24, 2024 at 9:59 PM Dmitry Chestnykh wrote: > > For BE architectures there is one significant difference > in comparison with time64 support for little-endian > architectures like ARMv7. > The difference is that we strictly need to pass two 64bit > values to system calls because Linux

[uclibc-ng-devel] Re: [PATCH v4] Add support for using time64 on big-endian machines.

2024-02-25 Thread Max Filippov
| 9 -- > librt/timer_settime.c | 11 +-- > 24 files changed, 193 insertions(+), 36 deletions(-) > create mode 100644 include/internal/time64_helpers.h This version looks good to me. Reviewed-by: Max Filippov -- Thanks. -- Max ___ devel mailing list -- devel@uclibc-ng.org To unsubscribe send an email to devel-le...@uclibc-ng.org

[uclibc-ng-devel] [PATCH] fix out-of-tree build with UCLIBC_HAS_CONTEXT_FUNCS

2024-04-24 Thread Max Filippov
. Signed-off-by: Max Filippov --- Rules.mak | 1 + 1 file changed, 1 insertion(+) diff --git a/Rules.mak b/Rules.mak index f2e5791e3d89..27c80f924505 100644 --- a/Rules.mak +++ b/Rules.mak @@ -606,6 +606,7 @@ CFLAGS := $(XWARNINGS) $(CPU_CFLAGS) $(SSP_CFLAGS) \ -nostdinc -I$(top_builddir

[uclibc-ng-devel] [PATCH] Makerules: fix out-of-tree build error "Argument list too long"

2024-04-24 Thread Max Filippov
as $(AR) argument instead. Signed-off-by: Max Filippov --- Makerules | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makerules b/Makerules index fe8a7916e657..96f2a71ec49a 100644 --- a/Makerules +++ b/Makerules @@ -276,7 +276,7 @@ cmd_compile.mi= $(cmd_compile.m:-c=-E -dD

[uclibc-ng-devel] [PATCH 0/3] fixes for build with gcc-14

2024-05-01 Thread Max Filippov
Hello, this series fixes a few type mismatches that have become errors when building with gcc-14. Max Filippov (3): iconv: fix type mismatches ldso: FDPIC: fix type mismatches ldso: arm: fix build with gcc-14 ldso/ldso/arm/elfinterp.c| 6 +++--- ldso/ldso/fdpic/dl-inlines.h | 4

[uclibc-ng-devel] [PATCH 1/3] iconv: fix type mismatches

2024-05-01 Thread Max Filippov
With gcc-14 warnings caused by type mismatches turn to errors: - iconv_t is not a pointer type, convert the result directly to iconv_t in combine_to_from() - unsigned int is not the same as wchar_t, use temporary wchar_t wc as an argument for utf8dec_wchar() Signed-off-by: Max Filippov

[uclibc-ng-devel] [PATCH 2/3] ldso: FDPIC: fix type mismatches

2024-05-01 Thread Max Filippov
With gcc-14 warnings caused by type mismatches turn to errors: - (void **) needs explicit conversion operator to become struct funcdesc_value **entry - both subexpressions of the ternary operator must be pointers - %p should be used instead of %x to print a pointer Signed-off-by: Max Filippov

[uclibc-ng-devel] [PATCH 3/3] ldso: arm: fix build with gcc-14

2024-05-01 Thread Max Filippov
: Max Filippov --- ldso/ldso/arm/elfinterp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ldso/ldso/arm/elfinterp.c b/ldso/ldso/arm/elfinterp.c index 4c268356fb37..9c9a3e8ca7f7 100644 --- a/ldso/ldso/arm/elfinterp.c +++ b/ldso/ldso/arm/elfinterp.c @@ -92,7 +92,7

[uclibc-ng-devel] [PATCH] linuxthreads: enable unwinding over signal frames

2024-05-01 Thread Max Filippov
linuxthreads use a helper function to invoke signal handlers, this function needs stack unwinding information to enable stack unwinding from signal handlers over signal frames. Signed-off-by: Max Filippov --- libpthread/linuxthreads/Makefile.in | 2 ++ 1 file changed, 2 insertions(+) diff

[uclibc-ng-devel] [PATCH] xtensa: use compiler-provided XCHAL macros

2024-05-01 Thread Max Filippov
Starting with gcc-13 the compiler provides configuration-specific macro definitions for the target xtensa core. Use them when available instead of the configuration overlay file xtensa-config.h Signed-off-by: Max Filippov --- .../sysdeps/linux/xtensa/bits/xtensa-config.h | 20

[uclibc-ng-devel] [PATCH] xtensa: make _init and _fini hidden

2024-05-01 Thread Max Filippov
Make _init and _fini hidden so that references to these symbols bind locally in the shared objects. glibc does the same. Signed-off-by: Max Filippov --- libc/sysdeps/linux/xtensa/crti.S | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libc/sysdeps/linux/xtensa/crti.S b/libc/sysdeps/linux

[uclibc-ng-devel] [RFC 0/2] xtensa: add FDPIC ABI support

2024-05-01 Thread Max Filippov
required to keep the ARM FDPIC port functional. Max Filippov (2): xtensa: add FDPIC support Revert "Allow to generate PIE 'static' binary" Rules.mak | 4 + extra/Configs/Config.in | 2 +- extra/Co

[uclibc-ng-devel] [RFC 1/2] xtensa: add FDPIC support

2024-05-01 Thread Max Filippov
This change implements Xtensa FDPIC ABI as specified in the first version of the following document: https://github.com/jcmvbkbc/xtensa-abi/blob/master/fdpic-xtensa.txt Signed-off-by: Max Filippov --- The toolchain components matching the libc are available in the following repositories with

[uclibc-ng-devel] [RFC 2/2] Revert "Allow to generate PIE 'static' binary"

2024-05-01 Thread Max Filippov
This change generates function descriptors for .preinit_array, .init_array and .fini_array that are not generated by the gcc after commit 11189793b6ef60645d5d1126d0bd9d0dd83e6583. This doesn't make sense, the change in gcc is reverted, so this change is reverted as well. This reverts commit 99dfb1

[uclibc-ng-devel] [PATCH] iconv/tst-iconv5: fix ic variable type

2024-05-01 Thread Max Filippov
Signed-off-by: Max Filippov --- test/iconv/tst-iconv5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/iconv/tst-iconv5.c b/test/iconv/tst-iconv5.c index ff3fde5eb180..f8f4fb57c86b 100644 --- a/test/iconv/tst-iconv5.c +++ b/test/iconv/tst-iconv5.c @@ -59,7 +59,7

[uclibc-ng-devel] [PATCH] xtensa: add FDPIC-specific TLS macro variants

2024-05-01 Thread Max Filippov
Signed-off-by: Max Filippov --- test/tls/tls-macros-xtensa.h | 78 +++- 1 file changed, 76 insertions(+), 2 deletions(-) diff --git a/test/tls/tls-macros-xtensa.h b/test/tls/tls-macros-xtensa.h index 90fc726f6f6b..6b2621c221cb 100644 --- a/test/tls/tls-macros

[uclibc-ng-devel] Re: [RFC 0/2] xtensa: add FDPIC ABI support

2024-05-02 Thread Max Filippov
Hi Waldemar, On Thu, May 2, 2024 at 7:13 AM Waldemar Brodkorb wrote: > I am trying your patch series in OpenADK, but it fails with following > error: [...] > ldso/ldso/dl-tls.c: Assembler messages: > ldso/ldso/dl-tls.c:197: Error: invalid register 'threadptr' for 'rur' > instruction > ldso/ldso/

[uclibc-ng-devel] Re: [RFC 0/2] xtensa: add FDPIC ABI support

2024-05-03 Thread Max Filippov
On Fri, May 3, 2024 at 5:55 AM Waldemar Brodkorb wrote: > Now I am booting up the system in Qemu with > following command: > qemu-system-xtensa -nographic -M lx60 -cpu dc233c -kernel > qemu-xtensa-initramfspiggyback-kernel > > Now every command f.e. ls or ps works but gives a Illegal > Instructi

[uclibc-ng-devel] Re: [RFC 0/2] xtensa: add FDPIC ABI support

2024-05-04 Thread Max Filippov
On Fri, May 3, 2024 at 8:15 PM Waldemar Brodkorb wrote: > > Hi Max, > Max Filippov wrote, > > > On Fri, May 3, 2024 at 5:55 AM Waldemar Brodkorb wrote: > > > Now I am booting up the system in Qemu with > > > following command: > > > qemu-system-

[uclibc-ng-devel] Re: [RFC 0/2] xtensa: add FDPIC ABI support

2024-05-04 Thread Max Filippov
On Sat, May 4, 2024 at 12:14 AM Max Filippov wrote: > On Fri, May 3, 2024 at 8:15 PM Waldemar Brodkorb wrote: > > How did you test NPTL/TLS? ...and for TLS I've posted a patch for the testsuite that adds FDPIC-specific implementations of the test TLS macros. The whole tls s

[uclibc-ng-devel] Re: [RFC 0/2] xtensa: add FDPIC ABI support

2024-05-04 Thread Max Filippov
On Sat, May 4, 2024 at 12:14 AM Max Filippov wrote: > On Fri, May 3, 2024 at 8:15 PM Waldemar Brodkorb wrote: > > How did you test NPTL/TLS? > > I grepped for the tests explicitly using fork and added them to the > TESTS_DISABLED in the test/nptl/Makefile.in, and also added

[uclibc-ng-devel] Re: [RFC 0/2] xtensa: add FDPIC ABI support

2024-05-06 Thread Max Filippov
Hi Waldemar, On Sun, May 5, 2024 at 2:51 AM Waldemar Brodkorb wrote: > > On Sat, May 4, 2024 at 12:14 AM Max Filippov wrote: > > > On Fri, May 3, 2024 at 8:15 PM Waldemar Brodkorb wrote: > > > > How did you test NPTL/TLS? > > > > > > I grepped for t

[uclibc-ng-devel] Re: [RFC 0/2] xtensa: add FDPIC ABI support

2024-05-10 Thread Max Filippov
Hi Waldemar, On Mon, May 6, 2024 at 11:17 AM Max Filippov wrote: > On Sun, May 5, 2024 at 2:51 AM Waldemar Brodkorb wrote: > > > On Sat, May 4, 2024 at 12:14 AM Max Filippov wrote: > > > also the following tests either hang or cause problems, > > > so I disabled

[uclibc-ng-devel] [PATCH] test-skeleton: don't force -d on noMMU

2024-05-10 Thread Max Filippov
U and noMMU targets. Signed-off-by: Max Filippov --- test/test-skeleton.c | 65 ++-- 1 file changed, 50 insertions(+), 15 deletions(-) diff --git a/test/test-skeleton.c b/test/test-skeleton.c index 557996d714cd..323a9c645df3 100644 --- a/test/test-skeleton.c

[uclibc-ng-devel] [PATCH] malloc/memalign: avoid integer overflow

2024-05-12 Thread Max Filippov
Check that the size passed to memalign() is not greater than PTRDIFF_MAX before adjusting it, otherwise it may wrap around in the adjustment. This fixes gcc testsuite test gcc.dg/torture/pr60092.c Signed-off-by: Max Filippov --- libc/stdlib/malloc/memalign.c | 5 + 1 file changed, 5

[uclibc-ng-devel] Re: uClibc-ng build failure with GCC14 for arc

2024-05-14 Thread Max Filippov
t that was so until the commit 74ca8d6f5d2e ("remove UCLIBC_HAS_LFS") removed that definition. It seems to me that that commit removed the wrong leg of the condition, and that the attached change (completely untested) should fix it. -- Thanks. -- Max >From c73701dae0ca5a679e67945a6da4d1c395c2e2aa Mon Sep 1

[uclibc-ng-devel] Re: [RFC 0/2] xtensa: add FDPIC ABI support

2024-05-21 Thread Max Filippov
Hi Waldemar, On Mon, May 20, 2024 at 9:12 PM Waldemar Brodkorb wrote: > Is the uClibc-ng port ready to commit or do you have any changes > open? There's one fix for the xtensa port, I will resend the fixed version in a couple days, along with the new tags for the binutils and gcc. And then there

[uclibc-ng-devel] [PATCH v2] xtensa: add FDPIC support

2024-06-01 Thread Max Filippov
This change implements Xtensa FDPIC ABI as specified in the first version of the following document: https://github.com/jcmvbkbc/xtensa-abi/blob/master/fdpic-xtensa.txt Signed-off-by: Max Filippov --- The toolchain components matching the libc are available in the following repositories with

[uclibc-ng-devel] Re: [RFC 0/2] xtensa: add FDPIC ABI support

2024-06-01 Thread Max Filippov
On Tue, May 21, 2024 at 12:01 AM Max Filippov wrote: > On Mon, May 20, 2024 at 9:12 PM Waldemar Brodkorb wrote: > > Is the uClibc-ng port ready to commit or do you have any changes > > open? > > There's one fix for the xtensa port, I will resend the fixed version > i

[uclibc-ng-devel] Re: [PATCH] NFC: Don't put function def inside function def

2024-09-08 Thread Max Filippov
On Sun, Sep 8, 2024 at 9:57 PM Dmitry Chestnykh wrote: > > clang rejects the code where function body is placed > inside body of another function > > Signed-off-by: Dmitry Chestnykh > --- > libc/sysdeps/linux/common/rename.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff