summaryrefslogtreecommitdiff
path: root/ios
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@gmail.com>2012-07-30 00:04:57 +0200
committerSebastian Rasmussen <sebras@gmail.com>2012-08-06 13:51:57 +0200
commite964faf9c2b4d327971969a589932a9b2572b5a7 (patch)
tree5581daf28bee6e2efe1f01586f3fe716510b45d7 /ios
parent4d36e9613da5190aba2c0c6c8281e5d35cf9758c (diff)
downloadmupdf-e964faf9c2b4d327971969a589932a9b2572b5a7.tar.xz
Always rebuild static libraries in unix, instead of updating them
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.
Diffstat (limited to 'ios')
-rw-r--r--ios/build_libs.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/ios/build_libs.sh b/ios/build_libs.sh
index 72c07ce0..836601d1 100644
--- a/ios/build_libs.sh
+++ b/ios/build_libs.sh
@@ -27,7 +27,7 @@ make -C .. libs || exit 1
echo Assembling final library in $TARGET_BUILD_DIR/.
mkdir -p "$TARGET_BUILD_DIR"
rm -f $TARGET_BUILD_DIR/libLibraries.a
-ar cru $TARGET_BUILD_DIR/libLibraries.a ../$OUT/*.o
+ar cr $TARGET_BUILD_DIR/libLibraries.a ../$OUT/*.o
ranlib $TARGET_BUILD_DIR/libLibraries.a
echo Done.