On 12/3/16, Barry Kauler <[email protected]> wrote:
> Yeah, supporting T2 has been a one-man-show mostly, for many years,
> with just a bit of input from others sometimes. I appreciate that Rene
> is keeping T2 alive.
>
> Regarding the problem of what appears to be a broken dietlibc in my
> Quirky Linux, and also causes dietlibc to fail in Stage-0 in T2,I have
> posted to a thread in the Puppy Linux forum:
>
> http://murga-linux.com/puppy/viewtopic.php?p=934447#934447
>
> In that thread, I have used the "-v" verbose option of the 'diet'
> executable, to show that gcc seems to be ignoring the injunction to
> find the dietlibc sys/types.h, instead finding the system sys/types.h
>
> Right now, it's a showstopper for me and T2.
>

I have a solution. I posted a fix to be able to compile dietlibc in my
host system, to the above Puppy Forum link. Quoting:

------------------------
Fixed it!

Have to export these environment variables, so gcc knows where the
system headers are, so that "-nostdinc" knows what to ignore!

I thought that gcc would already know that, given that it is compiled
by ubuntu as multilib.

Code:   
# export C_INCLUDE_PATH=/usr/include/arm-linux-gnueabihf
# export CPLUS_INCLUDE_PATH=/usr/include/arm-linux-gnueabihf
#
# /usr/lib/arm-linux-gnueabihf/diet/bin/diet -v gcc -nostdinc
helloworld.c -o helloworld
gcc -nostdlib -static -L/usr/lib/arm-linux-gnueabihf/diet/lib-arm
-L/usr/lib/diet/lib /usr/lib/arm-linux-gnueabihf/diet/lib-arm/start.o
-nostdinc helloworld.c -o helloworld -isystem
/usr/lib/arm-linux-gnueabihf/diet/include -D__dietlibc__
/usr/lib/arm-linux-gnueabihf/diet/lib-arm/libc.a -lgcc
/usr/lib/arm-linux-gnueabihf/diet/lib-arm/libc.a
helloworld.c:4:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
 main()
 ^
/usr/lib/arm-linux-gnueabihf/diet/lib-arm/libc.a(vprintf.o): In
function `vprintf':
(.text+0x2c): warning: warning: the printf functions add several
kilobytes of bloat.
#
------------------------

Now back onto T2. Compiling dietlibc, Stage-1, gcc is looking at those
same headers in the host system. So, it looks like I need to export
those same environment variables in dietlibc.conf.
I'm not sure how to do that though.

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[email protected] with a subject of: unsubscribe t2

Reply via email to