--- In "naturalwatt" <> wrote:
>
> --- In "j.chitte" <j.chitte@> wrote:
> I would think you would add -L /path/to/your/libraries to the CFLAGS.
> CPPFLAGS is only for C++ (.cxx) files.
>
> The compilation command listed below is a linker step as is refers to several
> .o (object) files and the output file as portmap.
>
> Alternatively set LDFLAGS to the /path/to/libraries.
>
> I don't recognise --sysroot as a GCC option.
>
> Martin
>
Thanks , don't confuse CXXFLAGS with CPPFLAGS, man cpp mentions --sysroot
option in several places but seems to omit to actually document it :?
I have got past the -lwrap problem by adding library paths but now it fails to
find the correct libc:
CFLAGS="-march=armv4t" CPPFLAGS="--sysroot=/tsroot -I=/usr/include"
LDFLAGS="-L/tsroot/usr/lib/ -L/tsroot/lib/" make
....
arm-unknown-linux-gnueabi-gcc -L/back/ts/root2/usr/lib/ -L/back/ts/root2/lib/
-pie portmap.o pmap_check.o from_local.o -lwrap -o portmap
/back/ts/ct-ng/x-tools/arm-unknown-linux-gnueabi/lib/gcc/arm-unknown-linux-gnueabi/4.3.2/../../../../arm-unknown-linux-gnueabi/bin/ld:
skipping incompatible /lib/libc.so.6 when searching for /lib/libc.so.6
/back/ts/ct-ng/x-tools/arm-unknown-linux-gnueabi/lib/gcc/arm-unknown-linux-gnueabi/4.3.2/../../../../arm-unknown-linux-gnueabi/bin/ld:
cannot find /lib/libc.so.6
collect2: ld returned 1 exit status
make: *** [portmap] Error 1
the second error suggest it is explicitly searching for /lib/libc.so.6 , ie a
HOST system file not just libc.so.6 which it would find in the indicated lib
dirs.
I can't see why that's happending.
thx.
> >
> > Hi,
> >
> > I have managed to build dropbear with zlib since it has a ./configure
> > option : --with-zlib=<path to sysroot libz>
> >
> > but trying to build portmap , which is a makefile only project I get stuck
> > as to how to point it to the libs.
> >
> > CFLAGS="-march=armv4t" CPPFLAGS="--sysroot=/tsroot " make
> > ...
> > arm-unknown-linux-gnueabi-gcc -pie portmap.o pmap_check.o from_local.o
> > -lwrap -o portmap
> > /back/ts/ct-ng/x-tools/arm-unknown-linux-gnueabi/lib/gcc/arm-unknown-linux-gnueabi/4.3.2/../../../../arm-unknown-linux-gnueabi/bin/ld:
> > cannot find -lwrap
> >
> >
> > I would have thought sysroot would enable it to search the standard lib and
> > usr/lib paths but it does not seem to be the case.
> >
> > Is there another option I need to add to CPPFLAGS??
> >
> > TIA
> >
>
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|