Skip to content

Commit

Permalink
snippets/cbl: Revert '-fno-builtin-bcmp'
Browse files Browse the repository at this point in the history
I think this should be fixed in LLVM: ClangBuiltLinux/linux#416 (comment)

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
  • Loading branch information
nathanchance committed Mar 12, 2019
1 parent b41ae75 commit f5c6ca5
Showing 1 changed file with 1 addition and 34 deletions.
35 changes: 1 addition & 34 deletions snippets/cbl
Original file line number Diff line number Diff line change
Expand Up @@ -97,22 +97,6 @@ function bldkw() {
*) display_error "Invalid TARGET_ARCH specified!"; return ;;
esac

while (( ${#} )); do
case ${1} in
"KCFLAGS="*)
declare "${1%%=*}"="${1##*=}"
# SC2191: The = here is literal. To assign by index, use ( [index]=value ) with no spaces. To keep as literal, quote it.
# shellcheck disable=SC2191
MAKE_FLAGS+=( KCFLAGS="${KCFLAGS} -fno-builtin-bcmp" ) ;;
*)
MAKE_FLAGS+=( "${1}" ) ;;
esac
shift
done
# SC2191: The = here is literal. To assign by index, use ( [index]=value ) with no spaces. To keep as literal, quote it.
# shellcheck disable=SC2191
echo "${MAKE_FLAGS[*]}" | rg -q KCFLAGS || MAKE_FLAGS+=( KCFLAGS="-fno-builtin-bcmp" )

# We are only concerned about little endian for ARM right now unless otherwise stated
if [[ ${TARGET_ARCH} =~ arm && -z ${BIG_ENDIAN} ]]; then
KCONFIG_ALLCONFIG=${KERNEL_BUILD_FOLDER}/little-endian.config
Expand Down Expand Up @@ -665,23 +649,6 @@ function kcbw() {(
COMMON_FOLDER=${KERNEL_FOLDER}/common
BRANCH=android-${1:-4.9}; shift

MAKE_FLAGS=()
while (( ${#} )); do
case ${1} in
"KCFLAGS="*)
declare "${1%%=*}"="${1##*=}"
# SC2191: The = here is literal. To assign by index, use ( [index]=value ) with no spaces. To keep as literal, quote it.
# shellcheck disable=SC2191
MAKE_FLAGS+=( KCFLAGS="${KCFLAGS} -fno-builtin-bcmp" ) ;;
*)
MAKE_FLAGS+=( "${1}" ) ;;
esac
shift
done
# SC2191: The = here is literal. To assign by index, use ( [index]=value ) with no spaces. To keep as literal, quote it.
# shellcheck disable=SC2191
echo "${MAKE_FLAGS[*]}" | rg -q KCFLAGS || MAKE_FLAGS+=( KCFLAGS="-fno-builtin-bcmp" )

cd "${BUILD_FOLDER}" || die "wtf"

# SC1004: This backslash+linefeed is literal. Break outside single quotes if you just want to break the line.
Expand Down Expand Up @@ -730,7 +697,7 @@ function update_clang_config() {
# shellcheck disable=SC2016
sed -i 's/=hidden/=hidden $(call cc-option, -fsplit-lto-unit)/g' "${COMMON_FOLDER}"/Makefile

OUT_DIR=${OUT_FOLDER} BUILD_CONFIG=${BUILD_CONFIG} ./build.sh CC=clang "${MAKE_FLAGS[@]}"
OUT_DIR=${OUT_FOLDER} BUILD_CONFIG=${BUILD_CONFIG} ./build.sh CC=clang "${@}"

git -C "${COMMON_FOLDER}" rh -q

Expand Down

0 comments on commit f5c6ca5

Please sign in to comment.