[ONE Q&A, Help & Troubleshooting] n00del:
Hi,

I tried to build my own rom with the tutorial for the 1+1 of cynogenmod.

The first built was fine, so I wanted to change the toolchain for compiling the new built with SABERMOD.

This is what I done so far :

- git clone -b master https://github.com/SaberMod/android_prebuilts_gcc_linux-x86_arm_sabermod-arm-linux-androideabi-4.9 prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-SM-4.9

- built/envsetup.sh =

export ANDROID_TOOLCHAIN_2ND_ARCH=
local ARCH=$(get_build_var TARGET_ARCH)
case $ARCH in
x86) toolchaindir=x86/x86_64-linux-android-$targetgccversion/bin
;;
x86_64) toolchaindir=x86/x86_64-linux-android-$targetgccversion/bin
;;
arm) toolchaindir=arm/arm-linux-androideabi-SM-4.9/bin
;;
arm64) toolchaindir=aarch64/aarch64-linux-android-$targetgccversion/bin;
toolchaindir2=arm/arm-linux-androideabi-$targetgccversion2/bin
;;
mips|mips64) toolchaindir=mips/mips64el-linux-android-$targetgccversion/bin
;;
*)
echo "Can't find toolchain for unknown architecture: $ARCH"
toolchaindir=xxxxxxxxx
;;

unset ANDROID_KERNEL_TOOLCHAIN_PATH
case $ARCH in
arm)
# Legacy toolchain configuration used for ARM kernel compilation
toolchaindir=arm/arm-eabi-SM-4.9/bin
if [ -d "$gccprebuiltdir/$toolchaindir" ]; then
export ARM_EABI_TOOLCHAIN="$gccprebuiltdir/$toolchaindir"
ANDROID_KERNEL_TOOLCHAIN_PATH="$ARM_EABI_TOOLCHAIN":
fi
;;

- repo sync and other "pre-steps"

-brunch bacon

After 45 minutes I was getting this error:

make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/root/android/system/kernel/oneplus/msm8974'
make: *** [TARGET_KERNEL_BINARIES] Error 2
make: *** Waiting for unfinished jobs....
warning: unknown warning option '-Wno-unused-local-typedef' [-Wunknown-warning-option]
external/chromium_org/third_party/protobuf/src/google/protobuf/compiler/command_line_interface.cc:166:21: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare]
for (int i = 0; i < parts.size() - 1; i++) {
~ ^ ~~~~~~~~~~~~~~~~
external/chromium_org/third_party/protobuf/src/google/protobuf/compiler/command_line_interface.cc:533:25: warning: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned int') [-Wsign-compare]
for (int i = 0; i < data_.size(); i++) {
~ ^ ~~~~~~~~~~~~
external/chromium_org/third_party/protobuf/src/google/protobuf/compiler/command_line_interface.cc:615:21: warning: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned int') [-Wsign-compare]
for (int i = 0; i < proto_path_.size(); i++) {
~ ^ ~~~~~~~~~~~~~~~~~~
external/chromium_org/third_party/protobuf/src/google/protobuf/compiler/command_line_interface.cc:633:21: warning: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned int') [-Wsign-compare]
for (int i = 0; i < input_files_.size(); i++) {
~ ^ ~~~~~~~~~~~~~~~~~~~
external/chromium_org/third_party/protobuf/src/google/protobuf/compiler/command_line_interface.cc:655:23: warning: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned int') [-Wsign-compare]
for (int i = 0; i < output_directives_.size(); i++) {
~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~
external/chromium_org/third_party/protobuf/src/google/protobuf/compiler/command_line_interface.cc:745:21: warning: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned int') [-Wsign-compare]
for (int i = 0; i < input_files_.size(); i++) {
~ ^ ~~~~~~~~~~~~~~~~~~~
external/chromium_org/third_party/protobuf/src/google/protobuf/compiler/command_line_interface.cc:925:23: warning: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned int') [-Wsign-compare]
for (int i = 0; i < parts.size(); i++) {
~ ^ ~~~~~~~~~~~~
external/chromium_org/third_party/protobuf/src/google/protobuf/compiler/command_line_interface.cc:1209:23: warning: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned int') [-Wsign-compare]
for (int i = 0; i < parsed_files.size(); i++) {
~ ^ ~~~~~~~~~~~~~~~~~~~
external/chromium_org/third_party/protobuf/src/google/protobuf/compiler/command_line_interface.cc:1238:21: warning: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned int') [-Wsign-compare]
for (int i = 0; i < parsed_files.size(); i++) {
~ ^ ~~~~~~~~~~~~~~~~~~~
external/chromium_org/third_party/protobuf/src/google/protobuf/compiler/command_line_interface.cc:1371:23: warning: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned int') [-Wsign-compare]
for (int i = 0; i < parsed_files.size(); i++) {
~ ^ ~~~~~~~~~~~~~~~~~~~
external/chromium_org/third_party/protobuf/src/google/protobuf/compiler/command_line_interface.cc:1377:23: warning: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned int') [-Wsign-compare]
for (int i = 0; i < parsed_files.size(); i++) {
~ ^ ~~~~~~~~~~~~~~~~~~~
12 warnings generated.
warning: unknown warning option '-Wno-unused-local-typedef' [-Wunknown-warning-option]
external/chromium_org/third_party/protobuf/src/google/protobuf/compiler/plugin.cc:136:21: warning: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned int') [-Wsign-compare]
for (int i = 0; i < parsed_files.size(); i++) {
~ ^ ~~~~~~~~~~~~~~~~~~~
2 warnings generated.

#### make failed to build some targets (45:19 (mm:ss)) ####

Looks like an kernel compiling error, but I dont know how to fix it :(.

Maybe someone can help me out of this.