Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
  • 2 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
Showing with 19 additions and 7 deletions.
  1. +3 −7 software/common.mak
  2. +16 −0 software/compiler-rt/lm32.mk
View
10 software/common.mak
@@ -1,18 +1,17 @@
# Mico32 toolchain
#
-CROSS_COMPILER=lm32-rtems4.11-
-CLANG=clang -ccc-host-triple mico32-generic-generic -ccc-gcc-name $(CROSS_COMPILER)gcc
+CROSS_COMPILER=lm32-elf-
+# TODO: mico32 should be renamed lm32 in LLVM
+CLANG=clang -ccc-host-triple mico32-elf
CC_normal := $(CLANG)
AR_normal := $(CROSS_COMPILER)ar
-AS_normal := $(CROSS_COMPILER)as
LD_normal := $(CROSS_COMPILER)ld
OBJCOPY_normal := $(CROSS_COMPILER)objcopy
RANLIB_normal := $(CROSS_COMPILER)ranlib
CC_quiet = @echo " CC " $@ && $(CLANG)
AR_quiet = @echo " AR " $@ && $(CROSS_COMPILER)ar
-AS_quiet = @echo " AS " $@ && $(CROSS_COMPILER)as
LD_quiet = @echo " LD " $@ && $(CROSS_COMPILER)ld
OBJCOPY_quiet = @echo " OBJCOPY " $@ && $(CROSS_COMPILER)objcopy
RANLIB_quiet = @echo " RANLIB " $@ && $(CROSS_COMPILER)ranlib
@@ -20,14 +19,12 @@ RANLIB_quiet = @echo " RANLIB " $@ && $(CROSS_COMPILER)ranlib
ifeq ($(V),1)
CC = $(CC_normal)
AR = $(AR_normal)
- AS = $(AS_normal)
LD = $(LD_normal)
OBJCOPY = $(OBJCOPY_normal)
RANLIB = $(RANLIB_normal)
else
CC = $(CC_quiet)
AR = $(AR_quiet)
- AS = $(AS_quiet)
LD = $(LD_quiet)
OBJCOPY = $(OBJCOPY_quiet)
RANLIB = $(RANLIB_quiet)
@@ -36,7 +33,6 @@ endif
# Toolchain options
#
INCLUDES = -I$(M2DIR)/software/include/base -I$(M2DIR)/software/include -I$(M2DIR)/common
-ASFLAGS = -nostdinc $(INCLUDES)
CFLAGS = -O9 -Wall -Wstrict-prototypes -Wold-style-definition -Wshadow \
-Wmissing-prototypes -fsigned-char -nostdinc $(INCLUDES)
LDFLAGS = -nostdlib -nodefaultlibs
View
16 software/compiler-rt/lm32.mk
@@ -0,0 +1,16 @@
+Description := LatticeMico32
+
+Configs := lm32
+Arch := lm32
+
+CC := clang
+
+# TODO: mico32 should be renamed lm32 in LLVM
+CFLAGS := -Wall -Werror -O3 -D_YUGA_LITTLE_ENDIAN=0 -D_YUGA_BIG_ENDIAN=1 -ccc-host-triple mico32-elf
+
+FUNCTIONS := divsi3 modsi3 comparedf2 negsf2 negdf2 addsf3 subsf3 mulsf3 divsf3 \
+ floatsisf floatunsisf fixsfsi fixunssfsi adddf3 subdf3 muldf3 divdf3 floatsidf floatunsidf fixdfsi fixunsdfsi
+
+# Those are already implemented in HW and should not be needed.
+# But the other functions directly depend on them.
+FUNCTIONS += udivsi3 lshrdi3 muldi3 ashldi3

No commit comments for this range

Something went wrong with that request. Please try again.