Bug 8008 - cctools' ar leaves incorrect timestamp
Summary: cctools' ar leaves incorrect timestamp
Status: NEW
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Build system (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: LowPrio
Assignee: Bugzilla mail exporter
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-19 15:55 CEST by Pierre Ossman
Modified: 2022-10-25 12:49 CEST (History)
0 users

See Also:
Acceptance Criteria:


Attachments

Description Pierre Ossman cendio 2022-10-19 15:55:05 CEST
There is a bug/misfeature in cctools' ar, where it ends up with a cropped mtime on the output .a file. This confuses make, which then thinks the .a file is older than it really is, resulting in things being remade needlessly. ar from binutils doesn't have this issue.


An example:

1. I update source.c, it gets mtime 1.234.
2. I run 'make'
3. make runs gcc to produce source.o and it gets mtime 2.234.
4. make runs ar to produce lib.a and it gets mtime 2.000.

Next time I run 'make', it will rebuild lib.a since 2.000 is earlier than 2.234.

Compare this with binutils, where lib.a would get an mtime like 2.678.

Note You need to log in before you can comment on or make changes to this bug.