# HG changeset patch # User Rob Landley # Date 1408317170 18000 # Node ID 0f4499211cfa77eef2df55039136b0406f04d720 # Parent a87931846137394a0fb35e752cf099af16b3aac1 Move hello.c into /src in the root filesystem so the instructions in the README to try building it aren't wrong. diff -r a87931846137 -r 0f4499211cfa host-tools.sh --- a/host-tools.sh Sun Aug 17 13:03:48 2014 -0500 +++ b/host-tools.sh Sun Aug 17 18:12:50 2014 -0500 @@ -64,7 +64,7 @@ if [ "$BUILD_STATIC" != none ] then - $CC "$SOURCES/toys/hello.c" --static -o /dev/null + $CC "$SOURCES/root-filesystem/src/hello.c" --static -o /dev/null if [ $? -ne 0 ] then diff -r a87931846137 -r 0f4499211cfa simple-cross-compiler.sh --- a/simple-cross-compiler.sh Sun Aug 17 13:03:48 2014 -0500 +++ b/simple-cross-compiler.sh Sun Aug 17 18:12:50 2014 -0500 @@ -69,8 +69,9 @@ echo "Sanity test: building Hello World." -"${ARCH}-gcc" -Os "${SOURCES}/toys/hello.c" -o "$WORK"/hello && -"${ARCH}-gcc" -Os -static "${SOURCES}/toys/hello.c" -o "$WORK"/hello || dienow +"${ARCH}-gcc" -Os "${SOURCES}/root-filesystem/src/hello.c" -o "$WORK"/hello && +"${ARCH}-gcc" -Os -static "${SOURCES}/root-filesystem/src/hello.c" \ + -o "$WORK"/hello || dienow # Does the hello world we just built actually run? diff -r a87931846137 -r 0f4499211cfa simple-root-filesystem.sh --- a/simple-root-filesystem.sh Sun Aug 17 13:03:48 2014 -0500 +++ b/simple-root-filesystem.sh Sun Aug 17 18:12:50 2014 -0500 @@ -59,12 +59,12 @@ # Put statically and dynamically linked hello world programs on there for # test purposes. -"${ARCH}-cc" "${SOURCES}/toys/hello.c" -Os $CFLAGS \ +"${ARCH}-cc" "${SOURCES}/root-filesystem/src/hello.c" -Os $CFLAGS \ -o "$STAGE_USR/bin/hello-dynamic" || dienow if [ "$BUILD_STATIC" != none ] then - "${ARCH}-cc" "${SOURCES}/toys/hello.c" -Os $CFLAGS -static \ + "${ARCH}-cc" "${SOURCES}/root-filesystem/src/hello.c" -Os $CFLAGS -static \ -o "$STAGE_USR/bin/hello-static" || dienow fi diff -r a87931846137 -r 0f4499211cfa sources/root-filesystem/src/hello.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sources/root-filesystem/src/hello.c Sun Aug 17 18:12:50 2014 -0500 @@ -0,0 +1,7 @@ +#include + +int main(int argc, char *argv[]) +{ + printf("Hello world!\n"); + return 0; +} diff -r a87931846137 -r 0f4499211cfa sources/toys/hello.c --- a/sources/toys/hello.c Sun Aug 17 13:03:48 2014 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ -#include - -int main(int argc, char *argv[]) -{ - printf("Hello world!\n"); - return 0; -}