Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: m-labs/misoc
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3a4408a
Choose a base ref
...
head repository: m-labs/misoc
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 20b137f
Choose a head ref
  • 4 commits
  • 5 files changed
  • 1 contributor

Commits on May 31, 2012

  1. Remove compiler-rt config

    Sebastien Bourdeauducq committed May 31, 2012
    Copy the full SHA
    fc9e723 View commit details
  2. software/libbase: add some more types

    Sebastien Bourdeauducq committed May 31, 2012
    Copy the full SHA
    b13bc6e View commit details
  3. software: use new Clang target name

    Sebastien Bourdeauducq committed May 31, 2012
    Copy the full SHA
    ee8ef23 View commit details
  4. software: more flexible compilation target

    Sebastien Bourdeauducq committed May 31, 2012
    Copy the full SHA
    20b137f View commit details
Showing with 31 additions and 37 deletions.
  1. +3 −0 software/bios/Makefile
  2. +19 −21 software/common.mak
  3. +0 −16 software/compiler-rt/lm32.mk
  4. +6 −0 software/include/base/stdio.h
  5. +3 −0 software/libbase/Makefile
3 changes: 3 additions & 0 deletions software/bios/Makefile
Original file line number Diff line number Diff line change
@@ -24,6 +24,9 @@ bios-rescue.elf: linker-rescue.ld $(OBJECTS) libs
-lbase -lcompiler_rt
chmod -x $@

%.o: %.c
$(compile-dep)

libs:
make -C $(M2DIR)/software/libbase

40 changes: 19 additions & 21 deletions software/common.mak
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
# Mico32 toolchain
#
CROSS_COMPILER=lm32-elf-
# TODO: mico32 should be renamed lm32 in LLVM
CLANG=clang -ccc-host-triple mico32-elf
TARGET_PREFIX=lm32-elf
CLANG=clang -ccc-host-triple $(TARGET_PREFIX)

CC_normal := $(CLANG)
AR_normal := $(CROSS_COMPILER)ar
LD_normal := $(CROSS_COMPILER)ld
OBJCOPY_normal := $(CROSS_COMPILER)objcopy
RANLIB_normal := $(CROSS_COMPILER)ranlib
AR_normal := $(TARGET_PREFIX)-ar
LD_normal := $(TARGET_PREFIX)-ld
OBJCOPY_normal := $(TARGET_PREFIX)-objcopy
RANLIB_normal := $(TARGET_PREFIX)-ranlib

CC_quiet = @echo " CC " $@ && $(CLANG)
AR_quiet = @echo " AR " $@ && $(CROSS_COMPILER)ar
LD_quiet = @echo " LD " $@ && $(CROSS_COMPILER)ld
OBJCOPY_quiet = @echo " OBJCOPY " $@ && $(CROSS_COMPILER)objcopy
RANLIB_quiet = @echo " RANLIB " $@ && $(CROSS_COMPILER)ranlib
AR_quiet = @echo " AR " $@ && $(TARGET_PREFIX)-ar
LD_quiet = @echo " LD " $@ && $(TARGET_PREFIX)-ld
OBJCOPY_quiet = @echo " OBJCOPY " $@ && $(TARGET_PREFIX)-objcopy
RANLIB_quiet = @echo " RANLIB " $@ && $(TARGET_PREFIX)-ranlib

ifeq ($(V),1)
CC = $(CC_normal)
@@ -40,11 +37,12 @@ LDFLAGS = -nostdlib -nodefaultlibs
# compile and generate dependencies, based on
# http://scottmcpeak.com/autodepend/autodepend.html

%.o: $(SRCDIR)%.c
$(CC) -c $(CFLAGS) $(SRCDIR)$*.c -o $*.o
@$(CC_normal) -MM $(CFLAGS) $(SRCDIR)$*.c > $*.d
@mv -f $*.d $*.d.tmp
@sed -e 's|.*:|$*.o:|' < $*.d.tmp > $*.d
@sed -e 's/.*://' -e 's/\\$$//' < $*.d.tmp | fmt -1 | \
sed -e 's/^ *//' -e 's/$$/:/' >> $*.d
@rm -f $*.d.tmp
define compile-dep =
$(CC) -c $(CFLAGS) $< -o $*.o
@$(CC_normal) -MM $(CFLAGS) $< > $*.d
@mv -f $*.d $*.d.tmp
@sed -e 's|.*:|$*.o:|' < $*.d.tmp > $*.d
@sed -e 's/.*://' -e 's/\\$$//' < $*.d.tmp | fmt -1 | \
sed -e 's/^ *//' -e 's/$$/:/' >> $*.d
@rm -f $*.d.tmp
endef
16 changes: 0 additions & 16 deletions software/compiler-rt/lm32.mk

This file was deleted.

6 changes: 6 additions & 0 deletions software/include/base/stdio.h
Original file line number Diff line number Diff line change
@@ -12,6 +12,12 @@ int sprintf(char *buf, const char *fmt, ...);

int printf(const char *fmt, ...);

/* Not sure this belongs here... */
typedef long long loff_t;
typedef long off_t;
typedef int mode_t;
typedef int dev_t;

/*
* Note: this library does not provide FILE operations.
* User code must implement them.
3 changes: 3 additions & 0 deletions software/libbase/Makefile
Original file line number Diff line number Diff line change
@@ -12,6 +12,9 @@ libbase.a: $(OBJECTS)
$(AR) clr libbase.a $(OBJECTS)
$(RANLIB) libbase.a

%.o: %.c
$(compile-dep)

.PHONY: clean

clean: