From 25c377296b77c489f33ebf6ea6b7e869281fadbf Mon Sep 17 00:00:00 2001 From: Chris Johns Date: Fri, 19 Oct 2012 12:42:39 -0700 Subject: Add back the libx.a file to the root file system. --- shell-init | 4 ++-- wscript | 9 ++++++++- x-long-name-to-create-gnu-extension-in-archive.c | 10 +++------- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/shell-init b/shell-init index 0f5e342..2805528 100644 --- a/shell-init +++ b/shell-init @@ -1,4 +1,4 @@ #rtl-trace set all #rtl-trace set load load-sect symbol reloc unresolved -dlo libx.a:xa.c.2.o -dlo libx.a:x-long-name-to-create-gnu-extension-in-archive.c.2.o +dlo libx.a:xa.c.1.o +dlo libx.a:x-long-name-to-create-gnu-extension-in-archive.c.1.o diff --git a/wscript b/wscript index 4359216..b7f07f5 100644 --- a/wscript +++ b/wscript @@ -60,11 +60,18 @@ def build(bld): defines = bld.defines, source = ['bspinit.c']) + bld(target = 'x', + features = 'c cstlib', + includes = bld.includes, + defines = bld.defines, + source = ['xa.c', + 'x-long-name-to-create-gnu-extension-in-archive.c']) + # # Create the root file system. # bld(target = 'fs-root.tar', - source = ['shell-init'], + source = ['shell-init', 'libx.a'], rule = 'tar cf - ${SRC} > ${TGT}') bld.objects(name = 'rootfs', target = 'fs-root-tarfile.o', diff --git a/x-long-name-to-create-gnu-extension-in-archive.c b/x-long-name-to-create-gnu-extension-in-archive.c index 38cf079..0280d99 100644 --- a/x-long-name-to-create-gnu-extension-in-archive.c +++ b/x-long-name-to-create-gnu-extension-in-archive.c @@ -8,20 +8,16 @@ static int zero; unsigned int public = 0x12345678; -void w_writeln(double d); +void w_writeln(float d); void x_writeln(const char* s); void y_writeln(const char* s) __attribute__ ((section (".bar"))); int z_writeln(int argc, const char* argv[]); int my_main (int argc, char* argv[]); -#if RTL_GSYM_EMBEDDED -#define sin(_d) (_d) -#endif - void -w_writeln(double d) +w_writeln(float d) { - printf ("sin(%f) = %f\n", d, sin(d)); + printf ("%f / 3 = %f\n", d / 3); } void -- cgit v1.2.3