blob: 95af97513728ff7a8b99f2dfe61f974793fa27f8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
  | 
# Build scripts for uclibc
setup_build_variables_uclibc() {
  UCLIBC_PATH="${BASE}/klee-uclibc-${LLVM_VERSION_SHORT}"
  uclibc_url="https://github.com/klee/klee-uclibc.git"
}
download_uclibc() {
  source "${DIR}/common-functions"
  git_clone_or_update "${uclibc_url}" "${UCLIBC_PATH}" "${UCLIBC_VERSION}"
}
build_uclibc() { 
  cd "${UCLIBC_PATH}" || return 1
  ./configure --make-llvm-lib --with-cc "${BITCODE_CC}" --with-llvm-config "${LLVM_CONFIG}"
  make || return 1
  touch .is_installed
}
install_uclibc() {
  return 0  
}
# Check if the binary artifact is installed
is_installed_uclibc() {
  (
    setup_build_variables_uclibc
    [[ -f "${UCLIBC_PATH}"/.is_installed ]]
  ) || return 1
}
get_docker_config_id_uclibc() {
  (
    source "${DIR}/common-functions"
    setup_build_variables_uclibc
    uclibc_remote_commit="$(get_git_hash "${uclibc_url}" "${UCLIBC_VERSION}")"
    echo "${uclibc_remote_commit}_${LLVM_VERSION_SHORT}"
  )
}
get_build_artifacts_uclibc() {
  (
    setup_build_variables_uclibc
    echo "${UCLIBC_PATH}"
  )
}
setup_artifact_variables_uclibc() {
  setup_build_variables_uclibc
}
 
  |