Skip to contentSkip to conversation

RISC-V: lib: Fix build error for 64-bit

PATCH In review Olof Johansson 1 participant 3 messages Oct 31, 2018 RISC-V

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 RISC-V: lib: Fix build error for 64-bit

Fixes the following build error from tinyconfig:

riscv64-unknown-linux-gnu-ld: kernel/sched/fair.o: in function `.L8':
fair.c:(.text+0x70): undefined reference to __lshrti3' riscv64-unknown-linux-gnu-ld: kernel/time/clocksource.o: in function .L0 ':
clocksource.c:(.text+0x334): undefined reference to `__lshrti3'

Fixes 7f47c73b355f ("RISC-V: Build tishift only on 64-bit")
---
 arch/riscv/lib/Makefile  |  2 +-
 arch/riscv/lib/tishift.S | 59 +++++++++++++++++++++++++-----------------------
 2 files changed, 32 insertions(+), 29 deletions(-)
arch/riscv/lib/Makefile +1 -1
index 5739bd05d289e..4e2e600f7d538 100644
@@ -3,6 +3,6 @@ lib-y	+= memcpy.o
 lib-y	+= memset.o
 lib-y	+= uaccess.o
 
-lib-(CONFIG_64BIT) += tishift.o
+lib-$(CONFIG_64BIT) += tishift.o
 
 lib-$(CONFIG_32BIT) += udivdi3.o
arch/riscv/lib/tishift.S +31 -28

64 lines not on this page · raw message

Signature · 1 line
2.11.0
#1 lore raw
Quoted 7 lines · Olof Johansson

Fixes the following build error from tinyconfig:

riscv64-unknown-linux-gnu-ld: kernel/sched/fair.o: in function `.L8':
fair.c:(.text+0x70): undefined reference to __lshrti3' riscv64-unknown-linux-gnu-ld: kernel/time/clocksource.o: in function .L0 ':
clocksource.c:(.text+0x334): undefined reference to `__lshrti3'

Err, fixed the whitespace in tishift.S while I was at it. Undo if you want.

-Olof

#2 lore raw
Quoted 11 lines · Olof Johansson
Quoted 7 lines · Olof Johansson

Fixes the following build error from tinyconfig:

riscv64-unknown-linux-gnu-ld: kernel/sched/fair.o: in function `.L8':
fair.c:(.text+0x70): undefined reference to __lshrti3' riscv64-unknown-linux-gnu-ld: kernel/time/clocksource.o: in function .L0 ':
clocksource.c:(.text+0x334): undefined reference to `__lshrti3'

Err, fixed the whitespace in tishift.S while I was at it. Undo if you want.

Ended up with a few more fixes, so I split this in two and will repost as a series. Apologies for the noise.

-Olof