Skip to content

Commit 9c0096c

Browse files
authored
Merge pull request raspberrypi#881 from sulix/rust_uml_fix
Fix building under UML
2 parents 8d68625 + 11c41c4 commit 9c0096c

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

arch/um/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ KBUILD_CFLAGS += $(CFLAGS) $(CFLAGS-y) -D__arch_um__ \
6868
-Din6addr_loopback=kernel_in6addr_loopback \
6969
-Din6addr_any=kernel_in6addr_any -Dstrrchr=kernel_strrchr
7070

71+
KBUILD_RUSTFLAGS += -Crelocation-model=pie
72+
7173
KBUILD_AFLAGS += $(ARCH_INCLUDE)
7274

7375
USER_CFLAGS = $(patsubst $(KERNEL_DEFINES),,$(patsubst -I%,,$(KBUILD_CFLAGS))) \

arch/x86/Makefile.um

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# SPDX-License-Identifier: GPL-2.0
22
core-y += arch/x86/crypto/
33

4+
#
5+
# Disable SSE and other FP/SIMD instructions to match normal x86
6+
#
7+
KBUILD_CFLAGS += -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx
8+
KBUILD_RUSTFLAGS += -Ctarget-feature=-sse,-sse2,-sse3,-ssse3,-sse4.1,-sse4.2,-avx,-avx2
9+
410
ifeq ($(CONFIG_X86_32),y)
511
START := 0x8048000
612

0 commit comments

Comments
 (0)