- Notifications
You must be signed in to change notification settings - Fork28
Commit826eff5
committed
Ensure static libraries have correct mod time even if ranlib messes it up.
In at least Apple's version of ranlib, the output file is updated to havea mod time equal to the max of the timestamps of its components, and thatdata only has seconds precision. On a filesystem with sub-second filetimestamp precision --- say, APFS --- this can result in the finishedstatic library appearing older than its input files, which causes uselessrebuilds and possible outright failures in parallel makes.We've only seen this reported in the field from people using Apple'sranlib with a non-Apple make, because Apple's make doesn't know aboutsub-second timestamps either so it doesn't decide rebuilds are needed.But Apple's ranlib presumably shares code with at least some BSDen,so it's not that unlikely that the same problem could arise elsewhere.To fix, just "touch" the output file after ranlib finishes.We seem to need this in only one place. There are other calls ofranlib in our makefiles, but they are working on intermediate fileswhose timestamps are not actually important, or else on an installedstatic library for which sub-second timestamp precision is unlikelyto matter either. (Also, so far as I can tell, Apple's ranlib doesn'tmess up the file timestamp in the latter usage anyhow.)In passing, change "ranlib" to "$(RANLIB)" in one place that wasbypassing the make macro for no good reason.Per bug #15525 from Jack Kelly (via Alyssa Ross).Back-patch to all supported branches.Discussion:https://postgr.es/m/15525-a30da084f17a1faa@postgresql.org1 parent6812042 commit826eff5
1 file changed
+7
-1
lines changedLines changed: 7 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
287 | 287 |
| |
288 | 288 |
| |
289 | 289 |
| |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
290 | 295 |
| |
291 | 296 |
| |
292 | 297 |
| |
293 | 298 |
| |
294 | 299 |
| |
| 300 | + | |
295 | 301 |
| |
296 | 302 |
| |
297 | 303 |
| |
| |||
450 | 456 |
| |
451 | 457 |
| |
452 | 458 |
| |
453 |
| - | |
| 459 | + | |
454 | 460 |
| |
455 | 461 |
| |
456 | 462 |
| |
|
0 commit comments
Comments
(0)