Merge branch 'master' into codesourcery.

All Matt's advices applied.
This commit is contained in:
Serge Vakulenko
2014-05-06 19:55:35 -07:00
67 changed files with 2355 additions and 1671 deletions

View File

@@ -1,5 +1,5 @@
MACHINE = mips
DESTDIR ?= $(TOPSRC)
MACHINE = mips
DESTDIR ?= $(TOPSRC)
RELEASE = 0.0
BUILD = $(shell git rev-list HEAD --count)
VERSION = $(RELEASE)-$(BUILD)
@@ -22,30 +22,40 @@ endif
# MPLABX C32 compiler doesn't support some functionality
# we need, so use chipKIT compiler by default.
ifndef GCCPREFIX
ifeq (/usr/local/pic32-tools/bin/pic32-gcc,$(wildcard /usr/local/pic32-tools/bin/pic32-gcc))
GCCPREFIX = /usr/local/pic32-tools/bin/pic32-
LDFLAGS = -Wl,--oformat=elf32-tradlittlemips
INCLUDES = -I/usr/local/pic32-tools/lib/gcc/pic32mx/4.5.1/include
endif
endif
# Generic MIPS toolchain
# ~~~~~~~~~~~~~~~~~~~~~~
# You can build it from sources, as described on page
# http://retrobsd.org/wiki/doku.php/doc/toolchain-mips
ifndef GCCPREFIX
ifeq (/usr/local/mips-gcc-4.7.2/bin/mips-elf-gcc,$(wildcard /usr/local/mips-gcc-4.7.2/bin/mips-elf-gcc))
GCCPREFIX = /usr/local/mips-gcc-4.7.2/bin/mips-elf-
LDFLAGS =
INCLUDES =
endif
endif
# Mentor Sourcery CodeBench Lite toolchain
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# You can download a Linux or Windows binary package from
# https://sourcery.mentor.com/GNUToolchain/release2641
ifndef GCCPREFIX
ifeq (/usr/local/mips-2013.11/bin/mips-sde-elf-gcc,$(wildcard /usr/local/mips-2013.11/bin/mips-sde-elf-gcc))
GCCPREFIX = /usr/local/mips-2013.11/bin/mips-sde-elf-
LDFLAGS = -Wl,--oformat=elf32-tradlittlemips
INCLUDES =
endif
endif
ifndef GCCPREFIX
$(error Unable to locate any GCC MIPS toolchain!)
endif
CC = $(GCCPREFIX)gcc -mips32r2 -EL -msoft-float -nostdinc -fshort-double -I$(TOPSRC)/include $(INCLUDES)
CXX = $(GCCPREFIX)g++ -mips32r2 -EL -msoft-float -nostdinc -fshort-double -I$(TOPSRC)/include $(INCLUDES)