On Fri, Dec 10, 2010 at 05:46:18PM -0600, robert wrote:
> Plodding back through my build once again, altogether pleased with 
> revisiting my old friends, binutils and gcc and linux, I wonder, is 
> there a way to run a very simple test on these installs.
> 
> I know of course that we have the elaborate screens full of testing as 
> we move along, but is there not something quite simple that I could do 
> just after my gcc build for example, that would give me a bit of 
> confidence that things have gone correctly.  Perhaps, say, run a simple 
> "goodbye, uranus" prog ... or is that "hello world" (more often than not 
> without the comma)?
> 
> Mostly psychology, I know, but if I could just do a simple "test build" 
> of a nothing c prog, 'twould be reassuring.

 AFAIK, there is nothing stopping you compiling such a program after
the toolchain has all been *installed* in chapter 6.  We do, indeed,
compile a "does nothing" program at the end of gcc.  The main
problem with writing either hello.c or a C++ variant (hopefully, as
.cxx, but .C and .cpp are sometimes used) is that we haven't got an
editor.  You can, or course, use the editor on the host system to
create the program and test that it compiles (_if_ your host is
sufficiently modern - with each release gcc, g++ and glibc get
increasingly picky about what they will accept).  Then you can copy
the source to chroot and build and run it there (as well as then
running ldd on it to be sure it isn't using any /tools libraries).

 "hello, world" seems a good output in this context - we expect it to
work, and if it doesn't you don't get to see the message ;)

ĸen
-- 
das eine Mal als Tragödie, das andere Mal als Farce
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to