|
The u modifier to to the ar replace command tells ar to only
insert those object files into a static library that are newer
than those already in the library (both having the same name).
Moreover ar only stores timestamps down to second accuracy.
This may cause situations where the object file already inside
the library is considered equal to a newly built object file
(which might include a new function) because their timestamps
differ only in the sub-second part. One of the apps might have an
object file that references this new function. Since the static
library retains the old object file there will be a linking error
when linking the app. Even re-running make will not fix the issue
since the static library will have its modification time updated
to a timestamp later than the newly built object file, which
means that ar will not be run again. The only option is to make
nuke and rebuild from scratch.
From now on, the u modifier to the ar replace command is removed.
This means that ar will rebuild static libraries without taking
timestamps of object files into account, to make sure that the
build never ends up in the situation described above.
|