Skip to content
This repository has been archived by the owner on Apr 13, 2019. It is now read-only.

Commit

Permalink
Use -march and -mabi instead of -m32/-mno-float
Browse files Browse the repository at this point in the history
  • Loading branch information
aswaterman committed Jan 6, 2017
1 parent 8493175 commit 23bf08e
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions arch/riscv/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,31 +32,32 @@ ifeq ($(CONFIG_64BIT),y)
BITS := 64
UTS_MACHINE := riscv64

KBUILD_CFLAGS += -m64
KBUILD_AFLAGS += -m64
KBUILD_CFLAGS += -mabi=lp64
KBUILD_AFLAGS += -mabi=lp64
KBUILD_MARCH = rv64im
LDFLAGS += -melf64lriscv
else
BITS := 32
UTS_MACHINE := riscv32

KBUILD_CFLAGS += -m32
KBUILD_AFLAGS += -m32
KBUILD_CFLAGS += -mabi=ilp32
KBUILD_AFLAGS += -mabi=ilp32
KBUILD_MARCH = rv32im
LDFLAGS += -melf32lriscv
endif

ifeq ($(CONFIG_RV_ATOMIC),)
KBUILD_CFLAGS += -mno-atomic
ifeq ($(CONFIG_RV_ATOMIC),y)
KBUILD_RV_ATOMIC = a
endif

KBUILD_CFLAGS += -Wall
KBUILD_CFLAGS += -mno-float
KBUILD_AFLAGS += -mno-float

ifeq ($(CONFIG_RVC),y)
KBUILD_CFLAGS += -mrvc
KBUILD_AFLAGS += -Wa,-mrvc
KBUILD_RVC = c
endif

KBUILD_AFLAGS += -march=$(KBUILD_MARCH)$(KBUILD_RV_ATOMIC)fd$(KBUILD_RVC)

KBUILD_CFLAGS += -mno-save-restore

head-y := arch/riscv/kernel/head.o
Expand Down

0 comments on commit 23bf08e

Please sign in to comment.