Finish strace build
This commit is contained in:
parent
b34b0980ef
commit
735d28224e
2 changed files with 24 additions and 9 deletions
12
.github/workflows/build-strace.yml
vendored
12
.github/workflows/build-strace.yml
vendored
|
@ -1,6 +1,8 @@
|
||||||
name: strace
|
name: strace
|
||||||
on:
|
on:
|
||||||
workflow_dispatch
|
push:
|
||||||
|
branches:
|
||||||
|
- strace
|
||||||
jobs:
|
jobs:
|
||||||
build-x86:
|
build-x86:
|
||||||
name: Build strace x86
|
name: Build strace x86
|
||||||
|
@ -18,6 +20,14 @@ jobs:
|
||||||
- name: Install testing dependencies
|
- name: Install testing dependencies
|
||||||
run: apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing yodl
|
run: apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing yodl
|
||||||
|
|
||||||
|
- name: Install build compiler
|
||||||
|
run: /bin/sh -c "apk update && apk upgrade && apk add --no-cache curl rsync sudo util-linux && cd / && curl -so ${ARCH}-cross.tgz ${HOST}/${ARCH}-cross.tgz && tar -xf ${ARCH}-cross.tgz && rm ${ARCH}-cross.tgz && cd ${ARCH}-cross"
|
||||||
|
env:
|
||||||
|
ARCH: x86_64-linux-musl
|
||||||
|
HOST: http://musl.cc/
|
||||||
|
TEMP: /tmp
|
||||||
|
USER: 0
|
||||||
|
|
||||||
- name: Build strace
|
- name: Build strace
|
||||||
id: build_strace
|
id: build_strace
|
||||||
run: $GITHUB_WORKSPACE/build/targets/build_strace.sh x86
|
run: $GITHUB_WORKSPACE/build/targets/build_strace.sh x86
|
||||||
|
|
|
@ -10,34 +10,39 @@ fi
|
||||||
source $GITHUB_WORKSPACE/build/lib.sh
|
source $GITHUB_WORKSPACE/build/lib.sh
|
||||||
init_lib "$1"
|
init_lib "$1"
|
||||||
|
|
||||||
|
VERSION="v6.3"
|
||||||
|
|
||||||
build_strace() {
|
build_strace() {
|
||||||
fetch "https://github.com/strace/strace" "${BUILD_DIRECTORY}/strace" git
|
fetch "https://github.com/strace/strace" "${BUILD_DIRECTORY}/strace" git
|
||||||
cd "${BUILD_DIRECTORY}/strace"
|
cd "${BUILD_DIRECTORY}/strace"
|
||||||
git clean -fdx
|
git clean -fdx
|
||||||
git checkout v5.7
|
git checkout "$VERSION"
|
||||||
./bootstrap
|
./bootstrap
|
||||||
CMD="CFLAGS=\"${GCC_OPTS}\" "
|
CMD="CFLAGS=\"${GCC_OPTS}\" "
|
||||||
CMD+="CXXFLAGS=\"${GXX_OPTS}\" "
|
CMD+="CXXFLAGS=\"${GXX_OPTS}\" "
|
||||||
CMD+="LDFLAGS=\"-static -pthread\" "
|
CMD+="LDFLAGS=\"-static -pthread\" "
|
||||||
if [ "$CURRENT_ARCH" != "x86" ] && [ "$CURRENT_ARCH" != "x86_64" ];then
|
if [ "$CURRENT_ARCH" != "x86_64" ];then
|
||||||
CMD+="CC_FOR_BUILD=\"/i686-linux-musl-cross/bin/i686-linux-musl-gcc\" "
|
CMD+="CC_FOR_BUILD=\"/x86_64-linux-musl-cross/bin/x86_64-linux-musl-gcc\" "
|
||||||
CMD+="CPP_FOR_BUILD=\"/i686-linux-musl-cross/bin/i686-linux-musl-g++\" "
|
CMD+="CPP_FOR_BUILD=\"/x86_64-linux-musl-cross/bin/x86_64-linux-musl-g++ -E\" "
|
||||||
|
CMD+="CXX_FOR_BUILD=\"/x86_64-linux-musl-cross/bin/x86_64-linux-musl-g++ -E\" "
|
||||||
fi
|
fi
|
||||||
CMD+="./configure --host=i486-linux-musl --target=$(get_host_triple)"
|
CMD+="./configure --disable-mpers --host=$(get_host_triple)"
|
||||||
eval "$CMD"
|
eval "$CMD"
|
||||||
make CFLAGS="-w" -j4
|
make CFLAGS="-w" -j4
|
||||||
strip strace
|
strip "${BUILD_DIRECTORY}/strace/src/strace"
|
||||||
}
|
}
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
build_strace
|
build_strace
|
||||||
local version
|
local version
|
||||||
version=$(get_version "${BUILD_DIRECTORY}/strace/strace --version 2>&1 | head -n1 | awk '{print \$4}'")
|
version=$(get_version "${BUILD_DIRECTORY}/strace/src/strace -V 2>&1 | head -n1 | awk '{print \$4}'")
|
||||||
cp "${BUILD_DIRECTORY}/strace/strace" "${OUTPUT_DIRECTORY}/strace"
|
version_number=$(echo "$version" | cut -d"-" -f2)
|
||||||
|
cp "${BUILD_DIRECTORY}/strace/src/strace" "${OUTPUT_DIRECTORY}/strace${version}"
|
||||||
echo "[+] Finished building strace ${CURRENT_ARCH}"
|
echo "[+] Finished building strace ${CURRENT_ARCH}"
|
||||||
|
|
||||||
echo ::set-output name=PACKAGED_NAME::"strace${version}"
|
echo ::set-output name=PACKAGED_NAME::"strace${version}"
|
||||||
echo ::set-output name=PACKAGED_NAME_PATH::"${OUTPUT_DIRECTORY}/*"
|
echo ::set-output name=PACKAGED_NAME_PATH::"${OUTPUT_DIRECTORY}/*"
|
||||||
|
echo ::set-output name=PACKAGED_VERSION::"${version_number}"
|
||||||
}
|
}
|
||||||
|
|
||||||
main
|
main
|
||||||
|
|
Loading…
Reference in a new issue