From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Wozniak Date: Fri, 11 Nov 2005 12:29:58 -0500 Subject: [U-Boot-Users] still trying with the examples directory on release 1.1.2 and Walnut config In-Reply-To: <6a7ac2300511110743s18a579fh89cc76927259769c@mail.gmail.com> References: <6a7ac2300511110743s18a579fh89cc76927259769c@mail.gmail.com> Message-ID: <4374D516.5080309@mc.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de John Davis wrote: > > Hello > > I managed to build the lib_generic/libgeneic.a file by manually > performing a make at the top-level by > specifing make lib_generic/libgeneric.a. I may be wrong, but libgeneric.a is only used by U-Boot and NOT by examples. Examples use the U-Boot ABI which provides access to libgeneric.a level functions as defined by include/exports.h > However, I do not get this library included when I try to build the > examples directory. Even if I hardcode the > examples directory Makefile so that it includes the lib_generic > directory, it still fails to build the examples > directory. See below. > > I have similar results if I change the order of the libgeneric > specifier. ie. > -L../lib_generic -lgeneric > -L/opt/fld_fakeroot/opt/mcp/ppc/bin/../lib/gcc-lib/ppc-linux/3.3.3 -lgcc > > Please advise. Its scary that putc does even work. Its not scary, its done through the ABI. > ----------------------------------- > > ppc-linux-ld -g -Ttext 0x40000 \ > -o hello_world -e hello_world hello_world.o libstubs.a \ > -L/opt/fld_fakeroot/opt/mcp/ppc/bin/../lib/gcc-lib/ppc-linux/3.3.3 -lgcc > -L../lib_generic -lgeneric ppc_405-ld -g -Ttext 0x40000 \ -o hello_world -e hello_world hello_world.o libstubs.a \ -L/lib/gcc-lib/powerpc-hardhat-linux/3.2.1 -lgcc This is my 1.1.2 build command - there is NO generic lib linked in! It is NOT needed because U-Boot ABI provides those library functions. > hello_world.o(.text+0x48): In function `hello_world': > /home/davis/cvs/mcp4/u-boot-1.1.2/examples/hello_world.c:36: undefined > reference to `printf' > hello_world.o(.text+0x4c):/home/davis/cvs/mcp4/u-boot-1.1.2/examples/hello_world.c:37: > undefined reference to `get_version' > hello_world.o(.text+0x58):/home/davis/cvs/mcp4/u-boot-1.1.2/examples/hello_world.c:37: > undefined reference to `printf' > hello_world.o(.text+0x64):/home/davis/cvs/mcp4/u-boot-1.1.2/examples/hello_world.c:39: > undefined reference to `printf' > hello_world.o(.text+0x70):/home/davis/cvs/mcp4/u-boot-1.1.2/examples/hello_world.c:41: > undefined reference to `printf' > hello_world.o(.text+0x9c):/home/davis/cvs/mcp4/u-boot-1.1.2/examples/hello_world.c:44: > undefined reference to `printf' > hello_world.o(.text+0xac):/home/davis/cvs/mcp4/u-boot-1.1.2/examples/hello_world.c:49: > undefined reference to `printf' > hello_world.o(.text+0xb0):/home/davis/cvs/mcp4/u-boot-1.1.2/examples/hello_world.c:50: > undefined reference to `tstc' > hello_world.o(.text+0xbc):/home/davis/cvs/mcp4/u-boot-1.1.2/examples/hello_world.c:53: > undefined reference to `getc' > hello_world.o(.text+0xc4):/home/davis/cvs/mcp4/u-boot-1.1.2/examples/hello_world.c:55: > undefined reference to `printf' > ../lib_generic/libgeneric.a(vsprintf.o)(.text+0x424): In function `panic': > /home/davis/cvs/mcp4/u-boot-1.1.2/lib_generic/vsprintf.c:376: undefined > reference to `vprintf' > ../lib_generic/libgeneric.a(vsprintf.o)(.text+0x42c):/home/davis/cvs/mcp4/u-boot-1.1.2/lib_generic/vsprintf.c:377: > undefined reference to `putc' > ../lib_generic/libgeneric.a(vsprintf.o)(.text+0x438):/home/davis/cvs/mcp4/u-boot-1.1.2/lib_generic/vsprintf.c:382: > undefined reference to `udelay' > ../lib_generic/libgeneric.a(vsprintf.o)(.text+0x44c):/home/davis/cvs/mcp4/u-boot-1.1.2/lib_generic/vsprintf.c:383: > undefined reference to `do_reset' > ../lib_generic/libgeneric.a(string.o)(.text+0x474): In function `strrchr': > /home/davis/cvs/mcp4/u-boot-1.1.2/lib_generic/string.c:208: undefined > reference to `strlen' > ../lib_generic/libgeneric.a(string.o)(.text+0x4d0): In function `strstr': > /home/davis/cvs/mcp4/u-boot-1.1.2/lib_generic/string.c:542: undefined > reference to `strlen' > ../lib_generic/libgeneric.a(string.o)(.text+0x4e4):/home/davis/cvs/mcp4/u-boot-1.1.2/lib_generic/string.c:545: > undefined reference to `strlen' > ../lib_generic/libgeneric.a(string.o)(.text+0x500):/home/davis/cvs/mcp4/u-boot-1.1.2/lib_generic/string.c:548: > undefined reference to `memcmp' > ../lib_generic/libgeneric.a(string.o)(.text+0x554): In function `strdup': > /home/davis/cvs/mcp4/u-boot-1.1.2/lib_generic/string.c:253: undefined > reference to `strlen' > ../lib_generic/libgeneric.a(string.o)(.text+0x55c):/home/davis/cvs/mcp4/u-boot-1.1.2/lib_generic/string.c:253: > undefined reference to `malloc' > ../lib_generic/libgeneric.a(string.o)(.text+0x578):/home/davis/cvs/mcp4/u-boot-1.1.2/lib_generic/string.c:258: > undefined reference to `strcpy' > make[1]: *** [hello_world] Error 1 > make[1]: Leaving directory `/home/davis/cvs/mcp4/u-boot-1.1.2/examples' >