Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 572592 - sys-devel/binutils-2.25.1 always creates 64KB files on ppc targets
Summary: sys-devel/binutils-2.25.1 always creates 64KB files on ppc targets
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL: https://gcc.gnu.org/PR69429
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-22 11:19 UTC by Joakim Tjernlund
Modified: 2016-01-26 18:14 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joakim Tjernlund 2016-01-22 11:19:53 UTC
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)
Comment 1 Joakim Tjernlund 2016-01-22 12:13:05 UTC
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?
Comment 2 SpanKY gentoo-dev 2016-01-26 18:14:00 UTC
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.