summaryrefslogtreecommitdiffstats
path: root/tools/include
diff options
context:
space:
mode:
authorWilly Tarreau <w@1wt.eu>2021-01-21 08:20:31 +0100
committerPaul E. McKenney <paulmck@kernel.org>2021-01-21 19:06:45 +0100
commit3c6ce7a5363723a05bfe3ee03a8d4a9b66841ae4 (patch)
tree37d6565cda7982c1a243cfcb6937bffdae03006b /tools/include
parenttools/nolibc: Emit detailed error for missing alternate syscall number defini... (diff)
downloadlinux-3c6ce7a5363723a05bfe3ee03a8d4a9b66841ae4.tar.xz
linux-3c6ce7a5363723a05bfe3ee03a8d4a9b66841ae4.zip
tools/nolibc: Fix position of -lgcc in the documented example
The documentation header in the nolibc.h file provides an example command line, but it places the -lgcc argument before the source files, which can fail with libgcc.a (e.g. on ARM when uidiv is needed). This commit therefore moves the -lgcc to the end of the command line, hopefully before this example leaks into makefiles. This is a port of nolibc's upstream commit b5e282089223 to the Linux kernel. Fixes: 66b6f755ad45 ("rcutorture: Import a copy of nolibc") Tested-by: Valentin Schneider <valentin.schneider@arm.com> Tested-by: Mark Rutland <mark.rutland@arm.com> [arm64] Signed-off-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'tools/include')
-rw-r--r--tools/include/nolibc/nolibc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/include/nolibc/nolibc.h b/tools/include/nolibc/nolibc.h
index 618acad6c932..8b7a9830dd22 100644
--- a/tools/include/nolibc/nolibc.h
+++ b/tools/include/nolibc/nolibc.h
@@ -71,7 +71,7 @@
*
* A simple static executable may be built this way :
* $ gcc -fno-asynchronous-unwind-tables -fno-ident -s -Os -nostdlib \
- * -static -include nolibc.h -lgcc -o hello hello.c
+ * -static -include nolibc.h -o hello hello.c -lgcc
*
* A very useful calling convention table may be found here :
* http://man7.org/linux/man-pages/man2/syscall.2.html