From: Romain Naour <romain.naour@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 03/15] [RFC] package/uclibc: remove asm constraint
Date: Wed, 8 May 2019 17:07:08 +0200 [thread overview]
Message-ID: <20190508150720.27946-4-romain.naour@gmail.com> (raw)
In-Reply-To: <20190508150720.27946-1-romain.naour@gmail.com>
uClibc-ng don't build with gcc 9.1 [1] due to a new check that
"catch illegal asm constraint usage" [2].
gcc 9.1 print this error:
"invalid hard register usage between earlyclobber operand and input operand"
The asm constraint is present in uClibc since it support sparc (back in 2002)[3].
Note: There is no such constraint is Glibc counterpart code [4].
[1] https://gitlab.com/kubu93/toolchains-builder/-/jobs/205435757
[2] https://github.com/gcc-mirror/gcc/commit/b782636f28f5c378897c238081d28d7a4a6ca578
[3] https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/commit/?id=3b6d086531102b6d09ce852feb1e370d5dca3ce9
[4] https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/sparc/sysdep.h;h=981b2a26b7a91093f821c97876e55bc4be2d9f8a;hb=HEAD
Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: Waldemar Brodkorb <wbx@openadk.org>
---
I did not fully analyze the asm code to understand why the constraint is present.
I lightly tested using qemu_sparc_ss10_defconfig.
Any help is welcome :)
---
...FC-sparc-syscalls.h-remove-asm-constraint.patch | 46 ++++++++++++++++++++++
1 file changed, 46 insertions(+)
create mode 100644 package/uclibc/0003-RFC-sparc-syscalls.h-remove-asm-constraint.patch
diff --git a/package/uclibc/0003-RFC-sparc-syscalls.h-remove-asm-constraint.patch b/package/uclibc/0003-RFC-sparc-syscalls.h-remove-asm-constraint.patch
new file mode 100644
index 0000000000..050dc573b0
--- /dev/null
+++ b/package/uclibc/0003-RFC-sparc-syscalls.h-remove-asm-constraint.patch
@@ -0,0 +1,46 @@
+From 1854c332efa0ed5b9140d8df2a983625a1e2d9ef Mon Sep 17 00:00:00 2001
+From: Romain Naour <romain.naour@gmail.com>
+Date: Sun, 5 May 2019 10:56:30 +0200
+Subject: [PATCH] [RFC] sparc: syscalls.h: remove asm constraint
+
+uClibc-ng don't build with gcc 9.1 [1] due to a new check that
+"catch illegal asm constraint usage" [2].
+
+gcc 9.1 print this error:
+"invalid hard register usage between earlyclobber operand and input operand"
+
+The asm constraint is present in uClibc since it support sparc (back in 2002)[3].
+
+Note: There is no such constraint is Glibc counterpart code [4].
+
+[1] https://gitlab.com/kubu93/toolchains-builder/-/jobs/205435757
+[2] https://github.com/gcc-mirror/gcc/commit/b782636f28f5c378897c238081d28d7a4a6ca578
+[3] https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/commit/?id=3b6d086531102b6d09ce852feb1e370d5dca3ce9
+[4] https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/sparc/sysdep.h;h=981b2a26b7a91093f821c97876e55bc4be2d9f8a;hb=HEAD
+
+Signed-off-by: Romain Naour <romain.naour@gmail.com>
+Cc: Waldemar Brodkorb <wbx@openadk.org>
+---
+I did not fully analyze the asm code to understand why the constraint is present.
+I lightly tested using qemu_sparc_ss10_defconfig.
+Any help is welcome :)
+---
+ libc/sysdeps/linux/sparc/bits/syscalls.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libc/sysdeps/linux/sparc/bits/syscalls.h b/libc/sysdeps/linux/sparc/bits/syscalls.h
+index 75af7a1573..e52ab98466 100644
+--- a/libc/sysdeps/linux/sparc/bits/syscalls.h
++++ b/libc/sysdeps/linux/sparc/bits/syscalls.h
+@@ -33,7 +33,7 @@
+ register long __g1 __asm__("g1") = sys_num; \
+ LOAD_ARGS_##nr(args) \
+ __asm__ __volatile__( __SYSCALL_STRING \
+- : "=r" (__res), "=&r" (__o0) \
++ : "=r" (__res), "=r" (__o0) \
+ : "1" (__o0) ASM_ARGS_##nr, "r" (__g1) \
+ : __SYSCALL_CLOBBERS ); \
+ } \
+--
+2.14.5
+
--
2.14.5
next prev parent reply other threads:[~2019-05-08 15:07 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-08 15:07 [Buildroot] [PATCH v2 00/15] Add gcc 9.1 Romain Naour
2019-05-08 15:07 ` [Buildroot] [PATCH v2 01/15] package/glibc/arc: fix build issue with gcc-9.1 Romain Naour
2019-05-08 15:07 ` [Buildroot] [PATCH v2 02/15] linux: disable Werror for powerpc kernels Romain Naour
2019-05-26 14:51 ` Arnout Vandecappelle
2019-05-26 15:04 ` Yann E. MORIN
2019-05-08 15:07 ` Romain Naour [this message]
2019-05-08 15:07 ` [Buildroot] [PATCH v2 04/15] toolchain: add gcc 9 entry Romain Naour
2019-05-08 15:07 ` [Buildroot] [PATCH v2 05/15] package/gcc: add support for gcc 9.1 Romain Naour
2019-05-08 15:07 ` [Buildroot] [PATCH v2 06/15] arch: add BR2_ARCH_NEEDS_GCC_AT_LEAST_9 Romain Naour
2019-05-08 15:07 ` [Buildroot] [PATCH v2 07/15] toolchain-external: add gcc 9 entry Romain Naour
2019-05-08 15:07 ` [Buildroot] [PATCH v2 08/15] package/gcc: switch to gcc 8.x as the default Romain Naour
2019-05-08 15:07 ` [Buildroot] [PATCH v2 09/15] arch/arm: move dependency on 64-bit down to individual cores Romain Naour
2019-05-08 15:07 ` [Buildroot] [PATCH v2 10/15] arch/arm: some cores have a different name with gcc-9 Romain Naour
2019-05-08 15:07 ` [Buildroot] [PATCH v2 11/15] arch/arm: saphira is in fact an armv8.4a Romain Naour
2019-05-08 15:07 ` [Buildroot] [PATCH v2 12/15] arch/arm: add two new 64-bit-only armv8a cores Romain Naour
2019-05-08 15:07 ` [Buildroot] [PATCH v2 13/15] arch/arm: add two new cortex-based armv8.2a cores Romain Naour
2019-05-08 15:07 ` [Buildroot] [PATCH v2 14/15] arch/arm: add two new non-cortex-based " Romain Naour
2019-05-08 15:07 ` [Buildroot] [PATCH v2 15/15] package/gcc: enable gcc 9.1 for ork1 (openrisc) Romain Naour
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190508150720.27946-4-romain.naour@gmail.com \
--to=romain.naour@gmail.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox