When building small libs/exec on ppc32 I usally get sparse files like so: ls -lsh | sort -n .... 64K -rwxr-xr-x 1 jocke users 68K Jan 22 11:20 mgmt_alarmd* 64K -rwxr-xr-x 1 jocke users 67K Jan 22 11:20 ne_memd* 56K -rwxr-xr-x 1 jocke users 67K Jan 22 11:20 cp_dummy* 56K -rwxr-xr-x 1 jocke users 66K Jan 22 11:20 mgmt_pmd* 48K -rwxr-xr-x 1 jocke users 69K Jan 22 11:20 ntpdate* 48K -rwxr-xr-x 1 jocke users 67K Jan 22 11:20 ne_rc* ... 12K -rwxr-xr-x 1 jocke users 9.0K Jan 22 11:18 swu_prepost_script.sh* 12K -rwxr-xr-x 1 jocke users 66K Jan 22 11:20 tickadj* 12K -rwxr-xr-x 1 jocke users 66K Jan 22 11:20 tclsh8.4* 12K -rwxr-xr-x 1 jocke users 66K Jan 22 11:20 genkeys* downgraded binutils from 2.25.1 to 2.24 but the problem remains. Using earlier toolchain I can see that this extra sparse space is just garbage because there the files are much smaller, some 12-16KB This is a huge problem as these sparse file are packaged into a tar file and when unpacked they loose the sparse and will expand to 66K on disk and fill up the my small FS. This has also been reported upstream in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69429 I reporting it here to in case it has to do with how we build gcc (or binutils)
Turns out I only thought I had downgraded binutils because I forgot run binutils-config. Actually downgrading to biniutils-2.24, the problem goes away so I guess this is caused by binutils-2.25, possibly by forcing a min size which maps to 64KB page size?
looks like upstream already posted the relevant details for you. you can add that flag to your LDFLAGS if you want smaller binaries. as for tar not handling sparse files, you should be using the -S flag.