Hi,
Ata, John (US) wrote,
> Hi all,
>
>
>
> In using ftw/nftw, I’ve discovered a bug when using FTW_CHDIR and FTW_DEPTH.
> After changing the working directory to a subdirectory, nftw would process the
> contents fine. However, it would then try and process the directory itself
> while still in that directory and then switch back to the parent. This would
> result in an error (ENOENT). This patch will change working directories to the
> parent before processing the directory itself.
Thanks, test case and patch applied,
best regards
Waldemar
This is because some old ARC750 cores lack these instructions.
We now rely on the default for the toolchain driver:
-mcpu=A7 won't enable those, while -mcpu=archs will as these
instructions are baseline (and thus is not impacted with this change).
If some arc700 based cpu does have them, it can override the driver
defaults in it's one level up build system.
Signed-off-by: Vineet Gupta <vgupta(a)synopsys.com>
---
Rules.mak | 1 -
1 file changed, 1 deletion(-)
diff --git a/Rules.mak b/Rules.mak
index 8d0e66a49b72..cc1545c81f40 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -507,7 +507,6 @@ ifeq ($(TARGET_ARCH),c6x)
endif
ifeq ($(TARGET_ARCH),arc)
- CPU_CFLAGS-y += -mlock -mswape
CPU_CFLAGS-$(CONFIG_ARC_CPU_700) += -mA7
CPU_CFLAGS-$(CONFIG_ARC_CPU_HS) += -mcpu=archs
CPU_LDFLAGS-y += $(CPU_CFLAGS) -marclinux
--
2.7.4
Hi John,
Ata, John (US) wrote,
> Hi all,
>
>
>
> In using ftw/nftw, I’ve discovered a bug when using FTW_CHDIR and FTW_DEPTH.
> After changing the working directory to a subdirectory, nftw would process the
> contents fine. However, it would then try and process the directory itself
> while still in that directory and then switch back to the parent. This would
> result in an error (ENOENT). This patch will change working directories to the
> parent before processing the directory itself.
Thanks for the report.
Are you able to provide a small test-case showing the issue?
best regards
Waldemar
Hi all,
In using ftw/nftw, I've discovered a bug when using FTW_CHDIR and FTW_DEPTH. After changing the working directory to a subdirectory, nftw would process the contents fine. However, it would then try and process the directory itself while still in that directory and then switch back to the parent. This would result in an error (ENOENT). This patch will change working directories to the parent before processing the directory itself.
Take care,
----
John Ata, CISSP
Senior Principal Software Engineer
Electronics Systems
STOP Operating System<http://www.baesystems.com/en-us/our-company/inc-businesses/intelligence-and…> Software Development
T 703-563-8115 | F 703-668-4359 | john.ata(a)baesystems.com<mailto:john.ata@baesystems.com>
http://www.baesystems.com/csp
[cid:image001.png@01D138BC.8E54E330][cid:image003.png@01D138BC.8E54E330]<http://www.twitter.com/baesystemsinc>[cid:image004.png@01D138BC.8E54E330]<http://www.youtube.com/baesystemsinc>[cid:image006.png@01D138BC.8E54E330]<http://www.flickr.com/photos/baesystemsinc/>
Hi Hackers,
I had a nice talk about uClibc-ng with Alexey on ELCE2016.
One of the points where the separation of the test suite included in
uClibc-ng source tree.
Recently Max and I discovered a problem regarding
libgcc/pthread_cancel, because the code was _not_ compiled with
the normal full shared gcc toolchain.
Every application gets compiled and linked with full toolchain, only
the test suite not.
I think this is wrong and I would like to remove the test-suite from
uClibc-ng source and want to create a separate project out of it.
Like musl hackers are doing it with their libc-test.
Furthermore I would like to synchronize the tests with GNU libc and
take a look that no internal uClibc stuff is used or only when
requested by the developer. So test suite could be run on GNU libc,
musl and uClibc-ng based system.
I would use libc-test, but they depend on GNU make and I want to be
able to run the test suite on noMMU targets.
@Szabolcs: Or are you interested in some joined efforts?
And furthermore I like the small summary to get a fast feedback
about any regressions before a release.
Recently Ignacy discovered the same issue while trying to rework
the internal unwind functions in uClibc-ng.
Any opinions? Any suggestions for the name of the test suite?
Plan is to do a release in the next days and afterwards separate the
test suite code before the next release.
Thanks,
Waldemar
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "uClibc-ng - small C library for embedded systems".
The branch, master has been updated
via 6630ac965279ed2a76394fbad8fd861f275ed24c (commit)
from a3e5bfd20712f71790ea9bae9e9be250f07e8c21 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 6630ac965279ed2a76394fbad8fd861f275ed24c
Author: Waldemar Brodkorb <wbx(a)uclibc-ng.org>
Date: Thu Oct 13 21:25:04 2016 +0200
linuxthreads: allow to choose on all supported architectures
To analyze or debug any linuxthreads problems it is useful to
have the ability to have a full gdb on the target available.
At the moment you could only debug stuff on microblaze.
Now we can verify that linuxthreads are working fine for
every supported architecture.
-----------------------------------------------------------------------
Summary of changes:
extra/Configs/Config.in | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/extra/Configs/Config.in b/extra/Configs/Config.in
index c8a7497..b259464 100644
--- a/extra/Configs/Config.in
+++ b/extra/Configs/Config.in
@@ -500,16 +500,7 @@ config UCLIBC_HAS_LINUXTHREADS
bool "Linuxthreads"
# linuxthreads need nanosleep()
select UCLIBC_HAS_REALTIME
- depends on !TARGET_arc && \
- !TARGET_arm && \
- !TARGET_i386 && \
- !TARGET_metag && \
- !TARGET_mips && \
- !TARGET_powerpc && \
- !TARGET_sparc && \
- !TARGET_x86_64 && \
- !TARGET_xtensa || \
- !ARCH_USE_MMU
+ depends on !TARGET_metag
help
If you want to compile uClibc with Linuxthreads support, then answer Y.
hooks/post-receive
--
uClibc-ng - small C library for embedded systems
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "uClibc-ng - small C library for embedded systems".
The branch, master has been updated
via a3e5bfd20712f71790ea9bae9e9be250f07e8c21 (commit)
via 48442540e4c481474c4493192cbd9cb58c5016ad (commit)
via d388c3e67f78b414a24550a61b1bab49d7c01883 (commit)
from 24ca498fc322936281b0c69c271dd64979c313eb (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit a3e5bfd20712f71790ea9bae9e9be250f07e8c21
Author: Waldemar Brodkorb <wbx(a)uclibc-ng.org>
Date: Sun Oct 9 10:08:08 2016 +0200
cleanup and fix static linking issues
There was a deadlock hanging in a sycall to futex,
which should be solved now.
Signed-off-by: Waldemar Brodkorb <wbx(a)uclibc-ng.org>
commit 48442540e4c481474c4493192cbd9cb58c5016ad
Author: Vineet Gupta <Vineet.Gupta1(a)synopsys.com>
Date: Fri Oct 7 14:11:17 2016 -0700
ARC: nptl: cancellable wrappers were broken #2
Despite the prev fix, tst-mqueue3 was still segfaulting.
The issue was BLINK register not restored properly for return
00002690 <mq_timedsend>:
2690: sub r9,r25,0x448
2698: ld r10,[r9]
269c: cmp r10,0
26a0: beq -36
26a4: st.aw blink,[sp,-4]
26a8: st.aw r0,[sp,-4]
26ac: st.aw r1,[sp,-4]
26b0: st.aw r2,[sp,-4]
26b4: st.aw r3,[sp,-4]
26b8: st.aw r4,[sp,-4]
26bc: bl 1e28 <__librt_enable_asynccancel>
26c0: mov r9,r0
26c4: ld.ab r4,[sp,4]
26c8: ld.ab r3,[sp,4]
26cc: ld.ab r2,[sp,4]
26d0: ld.ab r1,[sp,4]
26d4: ld.ab r0,[sp,4]
26d8: ld.ab blink,[sp, 4] <---- function return BLINK
26dc: mov r8,182
26e0: trap_s 0
26e2: cmp r0,-1024
26e6: st.aw r0,[sp,-4]
26ea: mov r0,r9
26ee: bl 1e90 <__librt_disable_asynccancel> <-- BLINK clobbered
to next PC
26f2: ld.ab r0,[sp,4] <----| loops here until sp is out of bound
26fa: cmp r0,-1024 |
26fe: jls [blink] -----|
2702: b 15d8
2706: nop_s
So the fix was to retain BLINK on stack before function call, and pop it
later
- 26d8: ld.ab blink,[sp, 4]
+ 26d8: ld blink,[sp] <--- restore BLINK, but retain on stack
26dc: mov r8,182
26e0: trap_s 0
26e2: cmp r0,-1024
26e6: st.aw r0,[sp,-4]
26ea: mov r0,r9
26ee: bl 1e90 <__librt_disable_asynccancel>
26f2: ld.ab r0,[sp,4]
+ 26f6: ld.ab blink,[sp,4] <--- finally pop BLINK
26fa: cmp r0,-1024
26fe: jls [blink]
Reported-by: Eugeniy Paltsev <paltsev(a)synopsys.com>
Cc: Alexey Brodkin <abrodkin(a)synopsys.com>
Signed-off-by: Vineet Gupta <vgupta(a)synopsys.com>
commit d388c3e67f78b414a24550a61b1bab49d7c01883
Author: Vineet Gupta <Vineet.Gupta1(a)synopsys.com>
Date: Fri Oct 7 14:11:16 2016 -0700
ARC: nptl: cancellable wrappers were broken
This was reported as uClibc test suite failures of tst-mqueue3 and
tst-mqueue5.
The syscall args were getting clobbered, so use scratch regs which are
not used for syscall args
00002690 <mq_timedsend>:
; SINGLE_THREAD_P
2690: sub r1,r25,0x448 <--- clobers r1, r2
2698: ld r2,[r1]
269c: cmp r2,0
26a0: bz mq_timedsend_nocancel
; DOCARGS (saves syscall args but r1, r2 clobbered already)
26a4: st.aw blink,[sp,-4]
26a8: st.aw r0,[sp,-4]
26ac: st.aw r1,[sp,-4]
26b0: st.aw r2,[sp,-4]
26b4: st.aw r3,[sp,-4]
26b8: st.aw r4,[sp,-4]
26bc: bl 1e28 <__librt_enable_asynccancel>
Reported-by: Eugeniy Paltsev <paltsev(a)synopsys.com>
Cc: Alexey Brodkin <abrodkin(a)synopsys.com>
Signed-off-by: Vineet Gupta <vgupta(a)synopsys.com>
-----------------------------------------------------------------------
Summary of changes:
libpthread/nptl/sysdeps/pthread/Makefile.in | 1 -
libpthread/nptl/sysdeps/pthread/pt-longjmp.c | 30 ----------------------
.../sysdeps/unix/sysv/linux/Makefile.commonarch | 2 +-
.../sysdeps/unix/sysv/linux/arc/sysdep-cancel.h | 11 +++++---
.../nptl/sysdeps/unix/sysv/linux/jmp-unwind.c | 1 +
.../sysdeps/unix/sysv/linux/libc-lowlevellock.c | 20 ---------------
.../nptl/sysdeps/unix/sysv/linux/lowlevellock.c | 3 ---
7 files changed, 9 insertions(+), 59 deletions(-)
delete mode 100644 libpthread/nptl/sysdeps/pthread/pt-longjmp.c
delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c
diff --git a/libpthread/nptl/sysdeps/pthread/Makefile.in b/libpthread/nptl/sysdeps/pthread/Makefile.in
index a501b64..6c09e7b 100644
--- a/libpthread/nptl/sysdeps/pthread/Makefile.in
+++ b/libpthread/nptl/sysdeps/pthread/Makefile.in
@@ -32,7 +32,6 @@ libpthread_pthread_CSRC = \
pthread_spin_destroy.c \
pthread_spin_init.c \
pthread_spin_unlock.c \
- pt-longjmp.c \
pt-sigaction.c \
tpp.c
diff --git a/libpthread/nptl/sysdeps/pthread/pt-longjmp.c b/libpthread/nptl/sysdeps/pthread/pt-longjmp.c
deleted file mode 100644
index 9fcea04..0000000
--- a/libpthread/nptl/sysdeps/pthread/pt-longjmp.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper(a)redhat.com>, 2002.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#include <setjmp.h>
-#include <stdlib.h>
-#include "pthreadP.h"
-
-extern __typeof(longjmp) __libc_longjmp attribute_noreturn;
-
-void
-longjmp (jmp_buf env, int val)
-{
- __libc_longjmp (env, val);
-}
-weak_alias (longjmp, siglongjmp)
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch b/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch
index 649d188..a438e97 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch
@@ -69,7 +69,7 @@ libpthread_linux_SSRC := #ptw-close.S ptw-open.S ptw-waitid.S ptw-waidpid.S ptw-
libc_linux_CSRC += libc_pthread_init.c libc_multiple_threads.c \
register-atfork.c unregister-atfork.c getpid.c \
- raise.c jmp-unwind.c libc-lowlevellock.c
+ raise.c jmp-unwind.c
librt_linux_CSRC += mq_notify.c timer_create.c timer_delete.c \
timer_getoverr.c timer_gettime.c timer_routines.c \
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/arc/sysdep-cancel.h b/libpthread/nptl/sysdeps/unix/sysv/linux/arc/sysdep-cancel.h
index cddd754..01fd844 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/arc/sysdep-cancel.h
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/arc/sysdep-cancel.h
@@ -38,6 +38,7 @@
mov r0, r9 /* prep mask for disable_asynccancel */ ` \
CDISABLE ` \
pop r0 /* get syscall ret value back */ ` \
+ pop blink /* UNDOCARGS above left blink on stack */ ` \
cmp r0, -1024 ` \
jls [blink] ` \
b __syscall_error@plt ` \
@@ -75,7 +76,9 @@
.endm
#define DOCARGS_0 push blink
-#define UNDOCARGS_0 pop blink
+
+/* don't pop blink at this point */
+#define UNDOCARGS_0 ld blink, [sp]
#define DOCARGS_1 DOCARGS_0` push r0
#define UNDOCARGS_1 pop r0` UNDOCARGS_0
@@ -99,9 +102,9 @@
#define UNDOCARGS_7 pop r6` UNDOCARGS_6
# define SINGLE_THREAD_P \
- THREAD_SELF r1 ` \
- ld r2, [r1, MULTIPLE_THREADS_OFFSET]` \
- cmp r2, 0
+ THREAD_SELF r9 ` \
+ ld r10, [r9, MULTIPLE_THREADS_OFFSET]` \
+ cmp r10, 0
/* ld r2, [r1, -TLS_PRE_TCB_SIZE + MULTIPLE_THREADS_OFFSET] */
#else /* !__ASSEMBLER__ */
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/jmp-unwind.c b/libpthread/nptl/sysdeps/unix/sysv/linux/jmp-unwind.c
index 6013ab0..965327c 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/jmp-unwind.c
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/jmp-unwind.c
@@ -27,6 +27,7 @@ extern void __pthread_cleanup_upto (__jmp_buf env, char *targetframe);
void
_longjmp_unwind (jmp_buf env, int val)
{
+ if (__pthread_cleanup_upto != NULL)
__pthread_cleanup_upto (env->__jmpbuf, CURRENT_STACK_FRAME);
}
libc_hidden_def(_longjmp_unwind)
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c b/libpthread/nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c
deleted file mode 100644
index 28672a6..0000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Paul Mackerras <paulus(a)au.ibm.com>, 2003.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-/* No difference to lowlevellock.c, except we lose a couple of functions. */
-#include "lowlevellock.c"
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/lowlevellock.c b/libpthread/nptl/sysdeps/unix/sysv/linux/lowlevellock.c
index 75369bd..4294a20 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/lowlevellock.c
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/lowlevellock.c
@@ -24,9 +24,6 @@
#include <tls.h>
void
-#ifndef IS_IN_libpthread
-weak_function
-#endif
__lll_lock_wait_private (int *futex)
{
if (*futex == 2)
hooks/post-receive
--
uClibc-ng - small C library for embedded systems
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "uClibc-ng - small C library for embedded systems".
The branch, master has been updated
via 24ca498fc322936281b0c69c271dd64979c313eb (commit)
from 7136bb422a0681d787d07dc2936f08395b8a1007 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 24ca498fc322936281b0c69c271dd64979c313eb
Author: Waldemar Brodkorb <wbx(a)uclibc-ng.org>
Date: Sun Oct 9 20:15:00 2016 +0200
fix mips/mips64 build for old compilers
gcc 4.8 does not support nan flag.
Reported-by: Thomas Petazzoni <thomas.petazzoni(a)free-electrons.com>
-----------------------------------------------------------------------
Summary of changes:
Rules.mak | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Rules.mak b/Rules.mak
index 67189ff..b9dbf25 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -404,8 +404,8 @@ ifeq ($(TARGET_ARCH),mips)
CPU_CFLAGS-$(CONFIG_MIPS_N64_ABI)+=-mabi=64
CPU_CFLAGS-$(CONFIG_MIPS_O32_ABI)+=-mabi=32
CPU_CFLAGS-$(CONFIG_MIPS_N32_ABI)+=-mabi=n32
- CPU_CFLAGS-$(CONFIG_MIPS_NAN_LEGACY)+=-mnan=legacy
- CPU_CFLAGS-$(CONFIG_MIPS_NAN_2008)+=-mnan=2008
+ CPU_CFLAGS-$(CONFIG_MIPS_NAN_LEGACY)+=$(call check_gcc,-mnan=legacy)
+ CPU_CFLAGS-$(CONFIG_MIPS_NAN_2008)+=$(call check_gcc,-mnan=2008)
CPU_LDFLAGS-y += $(CPU_CFLAGS)
endif
hooks/post-receive
--
uClibc-ng - small C library for embedded systems