Skip to content

menuconfig: use cross-compiler for configuration

Administrator requested to merge menuconfig-cross into master

Not using the cross compiler for kconfig leads to some differences to the actual compilation, like the following:

diff --git a/main/linux-postmarketos-qcom-msm8996/config-postmarketos-qcom-msm8996.aarch64 b/main/linux-postmarketos-qcom-msm8996/config-postmarketos-qcom-msm8996.aarch64
index 09347ece..955327e9 100644
--- a/main/linux-postmarketos-qcom-msm8996/config-postmarketos-qcom-msm8996.aarch64
+++ b/main/linux-postmarketos-qcom-msm8996/config-postmarketos-qcom-msm8996.aarch64
@@ -4,12 +4,13 @@
 #
 
 #
-# Compiler: aarch64-alpine-linux-musl-gcc (Alpine 10.2.1_pre1) 10.2.1 20201203
+# Compiler: gcc (Alpine 10.2.1_pre1) 10.2.1 20201203
 #
 CONFIG_CC_IS_GCC=y
 CONFIG_GCC_VERSION=100201
 CONFIG_LD_VERSION=235010000
 CONFIG_CLANG_VERSION=0
+CONFIG_CC_CAN_LINK=y
 CONFIG_CC_HAS_ASM_GOTO=y
 CONFIG_CC_HAS_ASM_INLINE=y
 CONFIG_IRQ_WORK=y
@@ -268,6 +269,7 @@ CONFIG_FIX_EARLYCON_MEM=y
 CONFIG_PGTABLE_LEVELS=4
 CONFIG_ARCH_SUPPORTS_UPROBES=y
 CONFIG_ARCH_PROC_KCORE_TEXT=y
+CONFIG_BROKEN_GAS_INST=y
 
 #
 # Platform selection
@@ -411,7 +413,6 @@ CONFIG_KUSER_HELPERS=y
 #
 CONFIG_ARM64_HW_AFDBM=y
 CONFIG_ARM64_PAN=y
-CONFIG_ARM64_LSE_ATOMICS=y
 CONFIG_ARM64_USE_LSE_ATOMICS=y
 CONFIG_ARM64_VHE=y
 # end of ARMv8.1 architectural features
@@ -428,10 +429,6 @@ CONFIG_ARM64_CNP=y
 #
 # ARMv8.3 architectural features
 #
-CONFIG_ARM64_PTR_AUTH=y
-CONFIG_CC_HAS_BRANCH_PROT_PAC_RET=y
-CONFIG_CC_HAS_SIGN_RETURN_ADDRESS=y
-CONFIG_AS_HAS_PAC=y
 CONFIG_AS_HAS_CFI_NEGATE_RA_STATE=y
 # end of ARMv8.3 architectural features
 
@@ -454,8 +451,6 @@ CONFIG_ARM64_MODULE_PLTS=y
 CONFIG_RELOCATABLE=y
 CONFIG_RANDOMIZE_BASE=y
 CONFIG_RANDOMIZE_MODULE_REGION_FULL=y
-CONFIG_CC_HAVE_STACKPROTECTOR_SYSREG=y
-CONFIG_STACKPROTECTOR_PER_TASK=y
 # end of Kernel Features
 
 #

@ollieparanoid I've kind of picked out the init_buildenv function as it kind of does what I want here (with force=True set) and copied the setting of CROSS_COMPILE & CC too. The code on my PR works but is definitely ugly in my opinion and should not be merged as-is but I'm also not sure how this can be properly refactored.

Merge request reports

Loading