]> www.infradead.org Git - users/dwmw2/linux.git/commit
selftests/powerpc: Allow building without static libc
authorMadhavan Srinivasan <maddy@linux.ibm.com>
Mon, 12 Aug 2024 09:41:52 +0000 (15:11 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 9 Sep 2024 06:35:04 +0000 (16:35 +1000)
commit8c9c01ce695eea84d19482e7429e3d54ceb7585c
treea5428c5bb5157ce0ed0db59c60c919d7f9af2c3a
parenta5a670df1db79f4bb462601aa4cc03caffa761a2
selftests/powerpc: Allow building without static libc

Currently exec-target.c is linked statically with libc, which on Fedora
at least requires installing an additional package (glibc-static).

If that package is not installed the build fails with:

    CC       exec_target
  /usr/bin/ld: cannot find -lc: No such file or directory
  collect2: error: ld returned 1 exit status

All exec_target.c does is call sys_exit, which can be done easily enough
using inline assembly, and removes the requirement for a static libc to
be installed.

Suggested-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20240812094152.418586-1-maddy@linux.ibm.com
tools/testing/selftests/powerpc/benchmarks/Makefile
tools/testing/selftests/powerpc/benchmarks/exec_target.c