I'm trying to build uclibc-ng-test, but I can't link with complex trigo functions (such as cacos, casin, catan, etc.). They are required for the following test targets: test-double, test-double-finite, test-float, test-float-finite, test-idouble, and test-ifloat. They are declared in uclibc-ng/sysdeps/linux/common/bits/cmathcalls.h, but I can't find their definitions.
Does uclibc-ng define them?
180 Avenue de l'Europe 38330 Montbonnot FRANCE
Definitions of POLLWRNORM, POLLWRBAND and POLLREMOVE in xtensa linux
kernel are non-standard. Provide bits/poll.h with correct values for
This fixes the following strace build errors:
In file included from xlat/pollflags.h:4:0,
./static_assert.h:40:24: error: static assertion failed: "POLLWRBAND != 0x0100"
# define static_assert _Static_assert
xlat/pollflags.h:75:1: note: in expansion of macro ‘static_assert’
static_assert((POLLWRBAND) == (0x0100), "POLLWRBAND != 0x0100");
./static_assert.h:40:24: error: static assertion failed: "POLLREMOVE != 0x0800"
# define static_assert _Static_assert
xlat/pollflags.h:117:1: note: in expansion of macro ‘static_assert’
static_assert((POLLREMOVE) == (0x0800), "POLLREMOVE != 0x0800");
Signed-off-by: Max Filippov <jcmvbkbc(a)gmail.com>
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 b/libc/sysdeps/linux/xtensa/bits/poll.h
new file mode 100644
@@ -0,0 +1,49 @@
+/* Copyright (C) 1997, 2001, 2006 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ 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/>. */
+# error "Never use <bits/poll.h> directly; include <sys/poll.h> instead."
+/* Event types that can be polled for. These bits may be set in `events'
+ to indicate the interesting event types; they will appear in `revents'
+ to indicate the status of the file descriptor. */
+#define POLLIN 0x001 /* There is data to read. */
+#define POLLPRI 0x002 /* There is urgent data to read. */
+#define POLLOUT 0x004 /* Writing now will not block. */
+/* These values are defined in XPG4.2. */
+# define POLLRDNORM 0x040 /* Normal data may be read. */
+# define POLLRDBAND 0x080 /* Priority data may be read. */
+# define POLLWRNORM POLLOUT /* Writing now will not block. */
+# define POLLWRBAND 0x100 /* Priority data may be written. */
+/* These are extensions for Linux. */
+# define POLLMSG 0x400
+# define POLLREMOVE 0x800
+# define POLLRDHUP 0x2000
+/* Event types always implicitly polled for. These bits need not be set in
+ `events', but they will appear in `revents' to indicate the status of
+ the file descriptor. */
+#define POLLERR 0x008 /* Error condition. */
+#define POLLHUP 0x010 /* Hung up. */
+#define POLLNVAL 0x020 /* Invalid polling request. */
On January 29,2017 a patch (9b457baf8d46329f7d7ee2aa084022bb0df88551<https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/commit/?id=9b457baf8d4632…>)by mirabilos m(a)mirbsd.org<mailto:firstname.lastname@example.org> was accepted in the repository. I have a few questions on this patch.
1) The patch created a new file syscall6.S in the i386 directory. It seems functionally equivalent to the syscall.S. Both process 6 arguments plus the NR. Both use the exact same registers. Only an alignment directive has been added and the order of loading the registers is reverse. It also appears that glib does not have a special syscall6.S. Why did we go this route special casing 6 argument syscalls only?
2) The LOADARGS_6, RESTOREARGS_6 and ASMFMT_6 defines are removed from <bits/syscall.h>. It is not clear why from the patch.
3) There seems to be a deficiency in the syscall setup that is not present in glibc making it impossible to get a backtrace from a syscall. For example, If one looks at uclibs-ng's sysdeps.h in i386, one can see cfi_adjust_cfa_offset/cfi_rel_offset usage in the _PUSH_ARGS_1 and _POP_ARGS_N macros allowing backtrace information to be present on the stack. However, syscall/syscall6.S as well as bits/syscalls.h do not allow for this. In addition, it appears that glibc does have this mechanism in its syscall.S.
John Ata, CISSP
Senior Principal Software Engineer
STOP Operating System<http://www.baesystems.com/en-us/product/stop> Software Development
T 703-563-8115 | F 703-668-4359 | john.ata(a)baesystems.com<mailto:email@example.com>