ld.lld: error: relocation R_PPC_ADDR16_HA cannot be used against symbol 'ppc_md'; recompile with -fPIC

From: kernel test robot
Date: Sat Feb 01 2025 - 13:20:02 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 60c828cf80c07394762a1edfaff63bea55cc8e45
commit: c738866e47ef2e4d543698f0ab370ffe2b7e0d59 bcachefs: check_extents_to_backpointers() now only checks buckets with mismatches
date: 5 weeks ago
config: powerpc-randconfig-r123-20250201 (https://download.01.org/0day-ci/archive/20250202/202502020214.5NNn449d-lkp@xxxxxxxxx/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce: (https://download.01.org/0day-ci/archive/20250202/202502020214.5NNn449d-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202502020214.5NNn449d-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

>> ld.lld: error: relocation R_PPC_ADDR16_HA cannot be used against symbol 'ppc_md'; recompile with -fPIC
>>> defined in vmlinux.a(arch/powerpc/kernel/setup-common.o)
>>> referenced by idle.c:38 (arch/powerpc/kernel/idle.c:38)
>>> arch/powerpc/kernel/idle.o:(powersave_off) in archive vmlinux.a

Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for HOTPLUG_CPU
Depends on [n]: SMP [=y] && (PPC_PSERIES [=n] || PPC_PMAC [=n] || PPC_POWERNV [=n] || FSL_SOC_BOOKE [=n])
Selected by [y]:
- PM_SLEEP_SMP [=y] && SMP [=y] && (ARCH_SUSPEND_POSSIBLE [=y] || ARCH_HIBERNATION_POSSIBLE [=y]) && PM_SLEEP [=y]

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki