Precisely preserve the timestamps when stripping debugging symbols#2642
Conversation
The `--preserve-dates` flag for `strip` and `objcopy` only has whole second resolution. This meant that the modification time was being truncated to an integer number of seconds. Consequently, when stripping a file, some of the dependencies of that file would appear to be newer, and hence the file would be unnecessarily remade during a second call to make. Simple soultion: copy the timestamps to a separate file before we strip and copy them back after.
|
@livecode-vulcan review ok 005d6d6 |
|
💙 review by @livecodeali ok 005d6d6 |
Precisely preserve the timestamps when stripping debugging symbols The `--preserve-dates` flag for `strip` and `objcopy` only has whole second resolution. This meant that the modification time was being truncated to an integer number of seconds. Consequently, when stripping a file, some of the dependencies of that file would appear to be newer, and hence the file would be unnecessarily remade during a second call to make. Simple solution: copy the timestamps to a separate file before we strip and copy them back after.
|
It would seem that the --attributes-only option is understood on vulcan :( |
|
The |
The 32-bit linux build is built on Debian Squeeze which only has coreutils 8.5. Version >= 8.6 is required for the `--attributes-only` option on `cp`, so ignore failure of these commands.
|
I've changed it so that any failure of the cp command are ignored. |
|
📝 Hi @livecodestephen, I haven't been able to verify that you've signed our LiveCode Contributor's Agreement. If you have previously signed the Contributor's Agreement, I may not be able to detect it because you haven't linked your GitHub account to your LiveCode account. Please see the information for contributors for more information. |
|
@livecode-vulcan review okay b7180c7 |
|
💙 review by @livecodefraser ok b7180c7 |
|
@livecodestephen: Could you sign the CLA, so that we can merge that it? Thanks |
|
I didn't realise that was required for LiveCode staff. Will do it now. |
Precisely preserve the timestamps when stripping debugging symbols The `--preserve-dates` flag for `strip` and `objcopy` only has whole second resolution. This meant that the modification time was being truncated to an integer number of seconds. Consequently, when stripping a file, some of the dependencies of that file would appear to be newer, and hence the file would be unnecessarily remade during a second call to make. Simple solution: copy the timestamps to a separate file before we strip and copy them back after.
Precisely preserve the timestamps when stripping debugging symbols
|
I have reverted this as it was causing problems with the build - running under gdb I got the error message
|
|
Which system was having problems? I'll see if I can reproduce it. |
|
I can reproduce on my Debian Wheezy VM |
Precisely preserve the timestamps when stripping debugging symbols This is an update to #2642. On Debian Wheezy the `cp --attributes-only --preserve=timestamps` command was emptying the contents of the destination. I've changed it to using `mv` and `touch` instead. This should now work on Squeeze, so it no longer has to ignore any failures. I also removed an unnecessary `mkdir` from `util/build-extensions.sh`. This line was causing an error as `basename` doesn't have an `-s` flag on Debian Wheezy.
The
--preserve-datesflag forstripandobjcopyonly has wholesecond resolution. This meant that the modification time was being
truncated to an integer number of seconds. Consequently, when
stripping a file, some of the dependencies of that file would appear
to be newer, and hence the file would be unnecessarily remade during a
second call to make.
Simple solution: copy the timestamps to a separate file before we
strip and copy them back after.