mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-24 05:00:07 +00:00
Squashed 'gitstatus/' changes from b226d8e06..f889c13d1
f889c13d1 build: clean up dragonfly support (#297) 2b6366fbd Merge branch 'msvetlik-dragonflybsd-support' 409c791eb Added detection of DragonflyBSD and tested compilation on v6.2.1 git-subtree-dir: gitstatus git-subtree-split: f889c13d18fbf6f3109d6889be34d50af04d99b9
This commit is contained in:
parent
bee6e09262
commit
4b21cd06ff
1 changed files with 23 additions and 8 deletions
31
build
31
build
|
@ -100,7 +100,7 @@ if [ -n "$gitstatus_install_tools" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
freebsd)
|
freebsd|dragonfly)
|
||||||
command pkg install -y cmake gmake binutils git perl5 wget
|
command pkg install -y cmake gmake binutils git perl5 wget
|
||||||
;;
|
;;
|
||||||
openbsd)
|
openbsd)
|
||||||
|
@ -141,7 +141,7 @@ if [ -n "$gitstatus_install_tools" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cpus="$(command getconf _NPROCESSORS_ONLN 2>/dev/null)" ||
|
cpus="$(command getconf _NPROCESSORS_ONLN 2>/dev/null)" ||
|
||||||
cpus="$(command sysctl -n hw.ncpu 2>/dev/null)" ||
|
cpus="$(command sysctl -n hw.ncpu 2>/dev/null)" ||
|
||||||
cpus=8
|
cpus=8
|
||||||
|
|
||||||
case "$gitstatus_cpu" in
|
case "$gitstatus_cpu" in
|
||||||
|
@ -174,12 +174,21 @@ if 2>/dev/null "$CC" \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
command rm -f -- "$workdir"/cc-test "$workdir"/cc-test.o
|
command rm -f -- "$workdir"/cc-test "$workdir"/cc-test.o
|
||||||
if 2>/dev/null "$CC" \
|
if 2>/dev/null "$CC" \
|
||||||
-fstack-clash-protection -fcf-protection \
|
-fstack-clash-protection \
|
||||||
-Werror \
|
-Werror \
|
||||||
-c "$workdir"/cc-test.c \
|
-c "$workdir"/cc-test.c \
|
||||||
-o "$workdir"/cc-test.o; then
|
-o "$workdir"/cc-test.o; then
|
||||||
cflags="$cflags -fstack-clash-protection -fcf-protection"
|
cflags="$cflags -fstack-clash-protection"
|
||||||
|
fi
|
||||||
|
|
||||||
|
command rm -f -- "$workdir"/cc-test "$workdir"/cc-test.o
|
||||||
|
if 2>/dev/null "$CC" \
|
||||||
|
-fcf-protection \
|
||||||
|
-Werror \
|
||||||
|
-c "$workdir"/cc-test.c \
|
||||||
|
-o "$workdir"/cc-test.o; then
|
||||||
|
cflags="$cflags -fcf-protection"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
command rm -f -- "$workdir"/cc-test "$workdir"/cc-test.o
|
command rm -f -- "$workdir"/cc-test "$workdir"/cc-test.o
|
||||||
|
@ -224,6 +233,12 @@ case "$gitstatus_kernel" in
|
||||||
gitstatus_ldflags="$gitstatus_ldflags ${static_pie:--static}"
|
gitstatus_ldflags="$gitstatus_ldflags ${static_pie:--static}"
|
||||||
libgit2_cmake_flags="$libgit2_cmake_flags -DENABLE_REPRODUCIBLE_BUILDS=ON"
|
libgit2_cmake_flags="$libgit2_cmake_flags -DENABLE_REPRODUCIBLE_BUILDS=ON"
|
||||||
;;
|
;;
|
||||||
|
dragonfly)
|
||||||
|
gitstatus_cxx=clang++12
|
||||||
|
gitstatus_make=gmake
|
||||||
|
gitstatus_ldflags="$gitstatus_ldflags ${static_pie:--static}"
|
||||||
|
libgit2_cmake_flags="$libgit2_cmake_flags -DENABLE_REPRODUCIBLE_BUILDS=ON"
|
||||||
|
;;
|
||||||
openbsd)
|
openbsd)
|
||||||
gitstatus_cxx=eg++
|
gitstatus_cxx=eg++
|
||||||
gitstatus_make=gmake
|
gitstatus_make=gmake
|
||||||
|
@ -574,7 +589,7 @@ case "$gitstatus_kernel" in
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
freebsd|openbsd|netbsd|darwin)
|
freebsd|openbsd|netbsd|darwin|dragonfly)
|
||||||
if [ -n "$docker_cmd" ]; then
|
if [ -n "$docker_cmd" ]; then
|
||||||
>&2 echo "[error] docker (-d) is not supported on $gitstatus_kernel"
|
>&2 echo "[error] docker (-d) is not supported on $gitstatus_kernel"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Reference in a new issue