Skip to content

Commit

Permalink
tools/rcutorture: Fix position of -lgcc in mkinitrd.sh
Browse files Browse the repository at this point in the history
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: b94ec36 ("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>
  • Loading branch information
Willy Tarreau authored and Paul E. McKenney committed Jan 21, 2021
1 parent 3c6ce7a commit 26cec81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/testing/selftests/rcutorture/bin/mkinitrd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 26cec81

Please sign in to comment.