| #!/bin/bash |
| |
| download() |
| { |
| git_clone_update https://github.com/kernelslacker/trinity.git |
| } |
| |
| build() |
| { |
| gcc_major=$(gcc -dumpversion | cut -d. -f1) |
| if [ "$BM_NAME" = "trinity-static-x86_64" ]; then |
| export CC="gcc -static" |
| elif [ "$BM_NAME" = "trinity-static-i386" ]; then |
| export CC="gcc -m32 -static" |
| fi |
| |
| ./configure || return |
| if [ "$gcc_major" -ge 8 ]; then |
| CFLAGS="-Wno-address-of-packed-member -Werror=format-overflow=0" make |
| else |
| make |
| fi |
| } |
| |
| install() |
| { |
| # binary file will be installed into /bin/trinity |
| make install |
| INSTALL_PREFIX=/lkp/benchmarks/$BM_NAME make install |
| } |
| |
| pack() |
| { |
| { |
| echo /bin |
| echo /bin/trinity |
| echo /lkp |
| echo /lkp/benchmarks |
| find /lkp/benchmarks/$BM_NAME |
| } | |
| cpio --quiet -o -H newc --owner=root.root | gzip -n -9 > /lkp/benchmarks/${BM_NAME}.cgz |
| [[ $arch ]] && mv "/lkp/benchmarks/${BM_NAME}.cgz" "/lkp/benchmarks/${BM_NAME}-${arch}.cgz" |
| } |