changeset 1676:0f4499211cfa

Move hello.c into /src in the root filesystem so the instructions in the README to try building it aren't wrong.
author Rob Landley <rob@landley.net>
date Sun, 17 Aug 2014 18:12:50 -0500
parents a87931846137
children c11a357ea92d
files host-tools.sh simple-cross-compiler.sh simple-root-filesystem.sh sources/root-filesystem/src/hello.c sources/toys/hello.c
diffstat 5 files changed, 13 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- 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
--- 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?
 
--- 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
 
--- /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 <stdio.h>
+
+int main(int argc, char *argv[])
+{
+  printf("Hello world!\n");
+  return 0;
+}
--- 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 <stdio.h>
-
-int main(int argc, char *argv[])
-{
-  printf("Hello world!\n");
-  return 0;
-}