hardkernel / linux

Linux kernel source tree
Other
426 stars 406 forks source link

error: 'asm' operand requires impossible reload #417

Open happysmash27 opened 3 years ago

happysmash27 commented 3 years ago

When running make odroidxu4_defconfig then make, compilation fails with the following error:

fs/btrfs/delayed-ref.c: In function 'add_delayed_tree_ref':
./arch/arm/include/asm/atomic.h:302:2: error: 'asm' operand requires impossible reload
happysmash27 commented 3 years ago

Using my system cross-compiler instead of the suggested one, with export CROSS_COMPILE=armv7a-unknown-linux-gnueabihf-, seems to be working as a workaround for this issue (it is still compiling at `-j16). I am unsure if this will cause any other issues, so will see once I solve my issue compiling u-boot and get this to run.

happysmash27 commented 3 years ago

This eventually gave a bunch of errors like:

drivers/net/wireless/rtl8812au/os_dep/linux/ioctl_linux.c: In function ‘rtw_mp_efuse_get’:
drivers/net/wireless/rtl8812au/os_dep/linux/ioctl_linux.c:9538:4: error: ‘sprintf’ argument 3 overlaps destination object ‘extra’ [-Werror=restrict]
 9538 |    sprintf(extra, "%s0x%02X ", extra, pEfuseHal->fakeBTEfuseModifiedMap[addr+i]);
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

So I decided to change my system compiler from armv7a-unknown-linux-gnueabihf-10.1.0 to armv7a-unknown-linux-gnueabihf-7.5.0. Will update on this later. If this does not work, I will just disable that module.