Build scripts: fixed timestamp setting
This commit is contained in:
@@ -3,21 +3,22 @@ set -e
|
||||
|
||||
cd /p2pool
|
||||
git fetch --jobs=$(nproc)
|
||||
git checkout $3
|
||||
git checkout $2
|
||||
git submodule update --recursive --jobs $(nproc)
|
||||
|
||||
export TZ=UTC0
|
||||
|
||||
CURRENT_DATE=$(date -u -d @$2 +"%Y-%m-%d")
|
||||
CURRENT_TIME=$(date -u -d @$2 +"%H:%M:%S")
|
||||
TOUCH_DATE=$(date -u -d @$2 +"%Y%m%d%H%M.%S")
|
||||
BUILD_TIMESTAMP=$(git show --no-patch --format=%ct $2)
|
||||
CURRENT_DATE=$(date -u -d @$BUILD_TIMESTAMP +"%Y-%m-%d")
|
||||
CURRENT_TIME=$(date -u -d @$BUILD_TIMESTAMP +"%H:%M:%S")
|
||||
TOUCH_DATE=$(date -u -d @$BUILD_TIMESTAMP +"%Y%m%d%H%M.%S")
|
||||
|
||||
flags_size="-ffunction-sections -fdata-sections -Wl,-s -Wl,--gc-sections"
|
||||
flags_datetime="-D__DATE__=\"\\\"$CURRENT_DATE\\\"\" -D__TIME__=\"\\\"$CURRENT_TIME\\\"\" -Wno-builtin-macro-redefined"
|
||||
|
||||
flags_libs="--target=x86_64-pc-windows-gnu -Os -flto -Wl,/timestamp:$2 -fuse-ld=lld -w $flags_size $flags_datetime"
|
||||
flags_libs="--target=x86_64-pc-windows-gnu -Os -flto -Wl,/timestamp:$BUILD_TIMESTAMP -fuse-ld=lld -w $flags_size $flags_datetime"
|
||||
|
||||
flags_p2pool="--target=x86_64-pc-windows-gnu -Wl,/timestamp:$2 -fuse-ld=lld -femulated-tls -Wno-unused-command-line-argument $flags_size $flags_datetime"
|
||||
flags_p2pool="--target=x86_64-pc-windows-gnu -Wl,/timestamp:$BUILD_TIMESTAMP -fuse-ld=lld -femulated-tls -Wno-unused-command-line-argument $flags_size $flags_datetime"
|
||||
flags_cxx_headers="-isystem /usr/local/x86_64-w64-mingw32/include/c++ -isystem /usr/local/x86_64-w64-mingw32/include/c++/15.1.0 -isystem /usr/local/x86_64-w64-mingw32/include"
|
||||
|
||||
cd /p2pool
|
||||
|
||||
Reference in New Issue
Block a user