[Galaxy S 5 Q&A, Help & Troubleshooting] Phoenix09:
[MENTION=5620037]MEGAX91[/MENTION]: can I have some help building this?

$ export ARCH=arm
$ export CROSS_COMPILE=~/arm-cortex_a15-linux-gnueabihf-linaro_4.9.4-2015.06/bin/arm-cortex_a15-linux-gnueabihf-
$ make guyver_defconfig VARIANT_DEFCONFIG=apq8084_sec_kccat6_eur_defconfig
drivers/input/joystick/Kconfig:133: can't open file "drivers/input/joystick/iforce/Kconfig"
make[1]: *** [guyver_defconfig] Error 1
make: *** [guyver_defconfig] Error 2

so comment that out then:

$ make -j4
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CC scripts/mod/devicetable-offsets.s
CC arch/arm/kernel/asm-offsets.s
GEN scripts/mod/devicetable-offsets.h
HOSTCC scripts/mod/file2alias.o
In file included from include/linux/mm.h:18:0,
from arch/arm/kernel/asm-offsets.c:14:
include/linux/bit_spinlock.h: In function ‘bit_spin_unlock’:
include/linux/bit_spinlock.h:62:2: error: implicit declaration of function ‘smp_mb__before_atomic’ [-Werror=implicit-function-declaration]
clear_bit_unlock(bitnum, addr);
^
cc1: some warnings being treated as errors
make[1]: *** [arch/arm/kernel/asm-offsets.s] Error 1
make: *** [prepare0] Error 2
make: *** Waiting for unfinished jobs....
HOSTLD scripts/mod/modpost

remove -Werror=implicit-function-declaration and edit gcc-wrapper.py so all warnings are allowed

then I get:

$ make -j1
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CALL scripts/checksyscalls.sh
CC scripts/mod/devicetable-offsets.s
GEN scripts/mod/devicetable-offsets.h
HOSTCC scripts/mod/file2alias.o
HOSTLD scripts/mod/modpost
CHK include/generated/compile.h
CC arch/arm/mach-msm/peripheral-loader.o
In file included from include/linux/mm.h:18:0,
from include/linux/memblock.h:18,
from arch/arm/mach-msm/peripheral-loader.c:19:
include/linux/bit_spinlock.h: In function ‘bit_spin_unlock’:
include/linux/bit_spinlock.h:62:2: warning: implicit declaration of function ‘smp_mb__before_atomic’ [-Wimplicit-function-declaration]
clear_bit_unlock(bitnum, addr);
^
In file included from arch/arm/mach-msm/peripheral-loader.c:32:0:
include/linux/interrupt.h: In function ‘tasklet_disable_nosync’:
include/linux/interrupt.h:562:2: warning: implicit declaration of function ‘smp_mb__after_atomic’ [-Wimplicit-function-declaration]
smp_mb__after_atomic();
^
In file included from include/linux/cache.h:4:0,
from include/linux/time.h:4,
from include/linux/stat.h:18,
from include/linux/module.h:10,
from arch/arm/mach-msm/peripheral-loader.c:13:
arch/arm/mach-msm/peripheral-loader.c: In function ‘msm_pil_init’:
include/linux/kernel.h:23:18: warning: passing argument 1 of ‘msm_ion_client_create’ makes pointer from integer without a cast
#define UINT_MAX (~0U)
^
arch/arm/mach-msm/peripheral-loader.c:939:30: note: in expansion of macro ‘UINT_MAX’
ion = msm_ion_client_create(UINT_MAX, "pil");
^
In file included from include/linux/msm_ion.h:4:0,
from arch/arm/mach-msm/peripheral-loader.c:28:
include/linux/../../drivers/staging/android/ion/msm/msm_ion.h:103:20: note: expected ‘const char *’ but argument is of type ‘unsigned int’
struct ion_client *msm_ion_client_create(const char *name);
^
arch/arm/mach-msm/peripheral-loader.c:939:8: error: too many arguments to function ‘msm_ion_client_create’
ion = msm_ion_client_create(UINT_MAX, "pil");
^
In file included from include/linux/msm_ion.h:4:0,
from arch/arm/mach-msm/peripheral-loader.c:28:
include/linux/../../drivers/staging/android/ion/msm/msm_ion.h:103:20: note: declared here
struct ion_client *msm_ion_client_create(const char *name);
^
make[1]: *** [arch/arm/mach-msm/peripheral-loader.o] Error 1
make: *** [arch/arm/mach-msm] Error 2