build.sh: consistently use CC_ARG and LD_ARG

All make calls (especially `make defconfig`) might rely on the correct
compiler to be used. In order to use the same compiler consistently,
determine the CC_ARG and LD_ARG before the first call. Also combine them
to ensure they are used as a pair consistently.

The issue was discovered when building upstream-linux-4.19.y with
CC=clang and the deprecation warning got triggered during make mrproper
and make defconfig.

Change-Id: Ia1905adfda28d78f37f56724fe5fbfd13852f2c7
Cc: Alistair Strachan <astrachan@google.com>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Matthias Maennich <maennich@google.com>
1 file changed