Home Home > GIT Browse > linux-next
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Kubecek <mkubecek@suse.cz>2018-12-03 14:43:06 +0100
committerMichal Suchanek <msuchanek@suse.de>2018-12-03 14:48:23 +0100
commit98367ef04931be721ac54e3e7205a89db345ca4c (patch)
tree86a24d288036648c61a31f94d6713a584acbbec9
parent990531c14308487e07711bbc18734e26f4ded328 (diff)
run_oldconfig - crosscompile
-rwxr-xr-xscripts/run_oldconfig.sh31
1 files changed, 31 insertions, 0 deletions
diff --git a/scripts/run_oldconfig.sh b/scripts/run_oldconfig.sh
index 123ab38243..de637afa3a 100755
--- a/scripts/run_oldconfig.sh
+++ b/scripts/run_oldconfig.sh
@@ -407,6 +407,37 @@ for config in $config_files; do
MAKE_ARGS="ARCH=$cpu_arch"
;;
esac
+ unset cross_arch
+ unset cross_extra
+ case $config in
+ arm64/*)
+ cross_arch="aarch64"
+ ;;
+ arm*/*)
+ cross_arch="arm"
+ cross_extra="gnueabi-"
+ ;;
+ ppc64le/*)
+ cross_arch="powerpc64le"
+ ;;
+ ppc64/*)
+ cross_arch="powerpc64"
+ ;;
+ ppc/*)
+ cross_arch="powerpc"
+ ;;
+ i386/*)
+ # hack: whatever i386-suse-linux-gcc is, it does not support asm-goto
+ cross_arch="x86_64"
+ ;;
+ *)
+ cross_arch="${config%%/*}"
+ ;;
+ esac
+ cross_compile="${CROSS_COMPILE-${cross_arch}-suse-linux-${cross_extra}}"
+ if [ -n "$cross_compile" -a -x /usr/bin/${cross_compile}gcc ]; then
+ MAKE_ARGS="$MAKE_ARGS CROSS_COMPILE=$cross_compile"
+ fi
if [ -n "$CC" ]; then
MAKE_ARGS="$MAKE_ARGS CC=$CC"
fi