From b3f157c685d6cc34173911e959bb7506dd8a4e72 Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Thu, 25 Aug 2022 09:24:58 +0200 Subject: [PATCH] Don't use dummy.c for glibc sanity check in chap 5 It seems glibc creates dummy.c for its own use. This leaves some dummy.xxx files in the directory, that may lead some users to think that the directory is not properly cleaned up after the test (I did :) So use a pipe so that only a.out is created --- chapter05/glibc.xml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/chapter05/glibc.xml b/chapter05/glibc.xml index e3685c4e4..103fa42c8 100644 --- a/chapter05/glibc.xml +++ b/chapter05/glibc.xml @@ -195,9 +195,8 @@ cd build functions (compiling and linking) of the new toolchain are working as expected. To perform a sanity check, run the following commands: -echo 'int main(){}' > dummy.c -$LFS_TGT-gcc dummy.c -readelf -l a.out | grep '/ld-linux' +echo 'int main(){}' | gcc -xc - +readelf -l a.out | grep ld-linux If everything is working correctly, there should be no errors, and the output of the last command will be of the form: @@ -212,9 +211,9 @@ readelf -l a.out | grep '/ld-linux' where the problem is and correct it. This issue must be resolved before continuing on. - Once all is well, clean up the test files: + Once all is well, clean up the test file: -rm -v dummy.c a.out +rm -v a.out