goingnuts wrote:musl is looking very promising! I still havent been able to compile a working gtk1.2 so not using it intensive yet...
IIRC, it was basically just that __(u)int{,8,16,32}_t needs to be defined/changed to (u)int{,8,16,32}_t.
-D__uint32_t=uint32_t -D__int32_t=int32_t or
Code: Select all
sed -e 's/__\(u*int[123468]*_t\)/\1/g' -i <filename>
The issue is that someone didn't bother setting the right feature test macros/standards and just used the internal aliases instead.
I can compile "guess_fstype_withext4_test1" with diet gcc by the following command:
diet gcc -D_BSD_SOURCE -s -Os guess_fstype.c main.c -o guess_fstype
ends up in a 17K bin.
As for the time issue I havent made progress. I thought that maybe the uclibc/dietlibc was using the global variable $TZ but they are not.
How'd you find this out?
note that TZ=XXX only affects timezone displayed; you need to set at least
TZ=XSTn[XDT(n-1)]
POSIX specifies the "n" as the value that needs to be added to localtime to get UTC.
In other words, for Perth you should use
TZ=WST-8
and California/PDT:
TZ=PST8PDT7
Did a strace on the bins - this indicate that they use the same value for the calculation. Btw. looking at the output of strace is quite interesting: The libc linked bin is doing a lot of things that seems irrelevant:
Code: Select all
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/lib/tls/i686/sse2/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/tls/i686/sse2", 0xbf9607dc) = -1 ENOENT (No such file or directory)
open("/lib/tls/i686/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/tls/i686", 0xbf9607dc) = -1 ENOENT (No such file or directory)
open("/lib/tls/sse2/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/tls/sse2", 0xbf9607dc) = -1 ENOENT (No such file or directory)
open("/lib/tls/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/tls", 0xbf9607dc) = -1 ENOENT (No such file or directory)
open("/lib/i686/sse2/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/i686/sse2", 0xbf9607dc) = -1 ENOENT (No such file or directory)
open("/lib/i686/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/i686", 0xbf9607dc) = -1 ENOENT (No such file or directory)
open("/lib/sse2/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/sse2", 0xbf9607dc) = -1 ENOENT (No such file or directory)
open("/lib/libc.so.6", O_RDONLY) = 3
Why does it have to sort of "guess" the location of libc.so.6? Must slow down every binary we start...
The theory is ostensibly that you can get an "optimized" libc for your system; as usual with glibc, it slows everything down