From 4c120bba951f8a628de78d807c876ffee848f0c7 Mon Sep 17 00:00:00 2001 From: Evgenii Shatokhin Date: Mon, 9 Jul 2018 14:12:08 +0300 Subject: [PATCH] Handle the case when CONFIG_64BIT gets removed '#CONFIG_64BIT is not set' is present in the template config for i586 but it seems to be removed somehow when preparing the actual config. I haven't investigated why and how. For now, let us simply restore it. --- kernel.spec | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/kernel.spec b/kernel.spec index 6d0201d..6b9e0b4 100644 --- a/kernel.spec +++ b/kernel.spec @@ -612,18 +612,22 @@ CONFIG_DIR=arch/x86/configs mkdir -p "${CONFIG_DIR}" for flav in ${FLAVOURS}; do + cfg_file=arch/x86/configs/%{arch_suffix}_defconfig-${flav} echo "Creating configuration file for \"$flav\" kernel." cp ./kernel-%{arch_suffix}.config .config # Make sure a newline is at the end of the basic part of the config. echo >> .config cat ./kernel-${flav}-%{arch_suffix}.config >> .config make ARCH=%{_arch} oldconfig && \ - mv .config arch/x86/configs/%{arch_suffix}_defconfig-${flav} && \ - echo "Created arch/x86/configs/%{arch_suffix}_defconfig-${flav}." + mv .config ${cfg_file} && \ + echo "Created ${cfg_file}." # Do not try to build 64-bit kernels for 32-bit systems, for now. +# Looks like something might have removed '# CONFIG_64BIT is not set' from +# the config, let us restore it. %ifarch %{ix86} - sed -i 's/CONFIG_64BIT=y/# CONFIG_64BIT is not set/' arch/x86/configs/%{arch_suffix}_defconfig-${flav} + sed -i 's/CONFIG_64BIT=y//' ${cfg_file} + echo '# CONFIG_64BIT is not set' >> ${cfg_file} %endif done