]> git.baikalelectronics.ru Git - kernel.git/commitdiff
tools/rcutorture: Fix position of -lgcc in mkinitrd.sh
authorWilly Tarreau <w@1wt.eu>
Thu, 21 Jan 2021 07:48:08 +0000 (08:48 +0100)
committerPaul E. McKenney <paulmck@kernel.org>
Thu, 21 Jan 2021 18:06:45 +0000 (10:06 -0800)
The -lgcc command-line argument is placed poorly in the build options,
which can result in build failures, for exapmle, on ARM when uidiv()
is required.  This commit therefore places the -lgcc argument after the
source files.

Fixes: b94ec36896da ("rcutorture: Make use of nolibc when available")
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>
tools/testing/selftests/rcutorture/bin/mkinitrd.sh

index 38e424d2392cc2766fdb5c3ddd7f4bddacf04649..70d62fd0d31d43322ee292bc828a8c198280cce6 100755 (executable)
@@ -70,7 +70,7 @@ if echo -e "#if __x86_64__||__i386__||__i486__||__i586__||__i686__" \
        # architecture supported by nolibc
         ${CROSS_COMPILE}gcc -fno-asynchronous-unwind-tables -fno-ident \
                -nostdlib -include ../../../../include/nolibc/nolibc.h \
-               -lgcc -s -static -Os -o init init.c
+               -s -static -Os -o init init.c -lgcc
 else
        ${CROSS_COMPILE}gcc -s -static -Os -o init init.c
 fi