Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

software: go back to GCC

  • Loading branch information...
commit 20003f0adac77cdd695b956740ebefa99b71df65 1 parent c56c916
Sébastien Bourdeauducq authored February 16, 2013
1  .gitignore
... ...
@@ -1,7 +1,6 @@
1 1
 __pycache__
2 2
 build/*
3 3
 *.o
4  
-*.ts
5 4
 *.d
6 5
 *.a
7 6
 *.bin
19  README
@@ -17,17 +17,15 @@ production version of Milkymist SoC, visit:
17 17
 [> Instructions (software)
18 18
 --------------------------
19 19
 1. Compile and install binutils. Take the latest version from GNU.
20  
-  ./configure --target=lm32-elf
  20
+  mkdir build && cd build
  21
+  ../configure --target=lm32-elf
21 22
   make
22 23
   make install
23 24
   
24  
-2. Compile and install LLVM and Clang.
25  
-  git clone git://github.com/milkymist/llvm-lm32.git
26  
-  cd llvm-lm32/tools
27  
-  git clone git://github.com/milkymist/clang-lm32.git clang
28  
-  cd ..
29  
-  mkdir build
30  
-  cmake ..
  25
+2. Compile and install GCC 4.5. Take gcc-core and gcc-g++ from GNU.
  26
+  rm -rf libstdc++-v3
  27
+  mkdir build && cd build
  28
+  ../configure --target=lm32-elf --enable-languages="c,c++" --disable-libgcc --disable-libssp
31 29
   make
32 30
   make install
33 31
 
@@ -42,8 +40,7 @@ production version of Milkymist SoC, visit:
42 40
   make flash
43 41
 
44 42
 The second command requires m1nor, FJMEM and UrJTAG.
45  
-These tools can be found respectively at:
46  
-  http://projects.qi-hardware.com/index.php/p/wernermisc/
  43
+These tools can be found at:
47 44
   https://github.com/milkymist/fjmem-m1
48 45
   http://urjtag.org
49 46
   
@@ -84,7 +81,7 @@ The authors grant the additional permissions that the code can be used in
84 81
 conjunction with the LatticeMico32 CPU core from Lattice.
85 82
 
86 83
 Unless otherwise noted, Milkymist-NG's source code is copyright (C)
87  
-2011-2012 Sebastien Bourdeauducq. Other authors retain ownership of their
  84
+2011-2013 Sebastien Bourdeauducq. Other authors retain ownership of their
88 85
 contributions. If a submission can reasonably be considered independently
89 86
 copyrightable, it's yours and I encourage you to claim it with
90 87
 appropriate copyright notices. This submission then falls under the
35  software/common.mak
... ...
@@ -1,19 +1,18 @@
1  
-TARGET_PREFIX=lm32-elf
2  
-CLANG=clang -target lm32
  1
+TARGET_PREFIX=lm32-elf-
3 2
 
4  
-CC_normal := $(CLANG)
5  
-AS_normal := $(TARGET_PREFIX)-as
6  
-AR_normal := $(TARGET_PREFIX)-ar
7  
-LD_normal := $(TARGET_PREFIX)-ld
8  
-OBJCOPY_normal := $(TARGET_PREFIX)-objcopy
9  
-RANLIB_normal := $(TARGET_PREFIX)-ranlib
  3
+CC_normal := $(TARGET_PREFIX)gcc
  4
+AS_normal := $(TARGET_PREFIX)as
  5
+AR_normal := $(TARGET_PREFIX)ar
  6
+LD_normal := $(TARGET_PREFIX)ld
  7
+OBJCOPY_normal := $(TARGET_PREFIX)objcopy
  8
+RANLIB_normal := $(TARGET_PREFIX)ranlib
10 9
 
11  
-CC_quiet = @echo " CC " $@ && $(CLANG)
12  
-AS_quiet = @echo " AS " $@ && $(TARGET_PREFIX)-as
13  
-AR_quiet = @echo " AR " $@ && $(TARGET_PREFIX)-ar
14  
-LD_quiet = @echo " LD " $@ && $(TARGET_PREFIX)-ld
15  
-OBJCOPY_quiet = @echo " OBJCOPY " $@ && $(TARGET_PREFIX)-objcopy
16  
-RANLIB_quiet = @echo " RANLIB  " $@ && $(TARGET_PREFIX)-ranlib
  10
+CC_quiet = @echo " CC " $@ && $(TARGET_PREFIX)gcc
  11
+AS_quiet = @echo " AS " $@ && $(TARGET_PREFIX)as
  12
+AR_quiet = @echo " AR " $@ && $(TARGET_PREFIX)ar
  13
+LD_quiet = @echo " LD " $@ && $(TARGET_PREFIX)ld
  14
+OBJCOPY_quiet = @echo " OBJCOPY " $@ && $(TARGET_PREFIX)objcopy
  15
+RANLIB_quiet = @echo " RANLIB  " $@ && $(TARGET_PREFIX)ranlib
17 16
 
18 17
 ifeq ($(V),1)
19 18
 	CC = $(CC_normal)
@@ -34,22 +33,22 @@ endif
34 33
 # Toolchain options
35 34
 #
36 35
 INCLUDES = -I$(M2DIR)/software/include/base -I$(M2DIR)/software/include -I$(M2DIR)/common
37  
-CFLAGS = -O3 -Wall -Wstrict-prototypes -Wold-style-definition -Wshadow \
38  
-	 -Wmissing-prototypes -nostdinc $(INCLUDES)
  36
+CFLAGS = -O3 -mbarrel-shift-enabled -mmultiply-enabled -mdivide-enabled -msign-extend-enabled \
  37
+	-Wall -Wstrict-prototypes -Wold-style-definition -Wshadow \
  38
+	-Wmissing-prototypes -fno-builtin -nostdinc $(INCLUDES)
39 39
 LDFLAGS = -nostdlib -nodefaultlibs
40 40
 
41 41
 # compile and generate dependencies, based on
42 42
 # http://scottmcpeak.com/autodepend/autodepend.html
43 43
 
44 44
 define compile-dep
45  
-$(CC) -c $(CFLAGS) $< -o $*.ts -S
  45
+$(CC) -c $(CFLAGS) $< -o $*.o
46 46
 @$(CC_normal) -MM $(CFLAGS) $< > $*.d
47 47
 @mv -f $*.d $*.d.tmp
48 48
 @sed -e 's|.*:|$*.o:|' < $*.d.tmp > $*.d
49 49
 @sed -e 's/.*://' -e 's/\\$$//' < $*.d.tmp | fmt -1 | \
50 50
 	sed -e 's/^ *//' -e 's/$$/:/' >> $*.d
51 51
 @rm -f $*.d.tmp
52  
-@$(AS_normal) -o $*.o $*.ts
53 52
 endef
54 53
 
55 54
 define assemble
2  software/libcompiler-rt/Makefile
@@ -4,7 +4,7 @@ include $(M2DIR)/software/common.mak
4 4
 CFLAGS+=-D_YUGA_LITTLE_ENDIAN=0 -D_YUGA_BIG_ENDIAN=1 -Wno-missing-prototypes
5 5
 
6 6
 OBJECTS=divsi3.o modsi3.o comparedf2.o negsf2.o negdf2.o addsf3.o subsf3.o mulsf3.o divsf3.o lshrdi3.o muldi3.o divdi3.o ashldi3.o ashrdi3.o udivmoddi4.o \
7  
-  floatsisf.o floatunsisf.o fixsfsi.o fixunssfsi.o adddf3.o subdf3.o muldf3.o divdf3.o floatsidf.o floatunsidf.o floatdidf.o fixdfsi.o fixunsdfsi.o
  7
+  floatsisf.o floatunsisf.o fixsfsi.o fixunssfsi.o adddf3.o subdf3.o muldf3.o divdf3.o floatsidf.o floatunsidf.o floatdidf.o fixdfsi.o fixunsdfsi.o clzsi2.o
8 8
 
9 9
 all: libcompiler-rt.a
10 10
 

0 notes on commit 20003f0

Please sign in to comment.
Something went wrong with that request. Please try again.