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: 0f47876d2e8e
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: d03dabb4608e
Choose a head ref
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on Jul 26, 2015

  1. common.mak: use clang/clang++ to compile C/C++ sources.

    Note that -integrated-as is not active by default on OR1K,
    so we're still shelling out to binutils to assemble.
    It is not yet possible to build everything using -integrated-as.
    whitequark committed Jul 26, 2015
    1
    Copy the full SHA
    69c2a70 View commit details
  2. common.mak: Pass -fexceptions to clang and clang++.

    This results in generation of .eh_frame sections. These sections
    can be discarded during final linking, or included if exception
    handling is desired. For exception handling to work, all sources
    must be built with -fexceptions.
    whitequark committed Jul 26, 2015
    Copy the full SHA
    d03dabb View commit details
Showing with 13 additions and 12 deletions.
  1. +13 −12 software/common.mak
25 changes: 13 additions & 12 deletions software/common.mak
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
include $(MSCDIR)/software/include/generated/cpu.mak
TARGET_PREFIX=$(CPU)-elf-
TRIPLE=$(CPU)-elf
TARGET_PREFIX=$(TRIPLE)-

RM ?= rm -f

CC_normal := $(TARGET_PREFIX)gcc
CX_normal := $(TARGET_PREFIX)g++
AR_normal := $(TARGET_PREFIX)ar
LD_normal := $(TARGET_PREFIX)ld
CC_normal := clang -target $(TRIPLE)
CX_normal := clang++ -target $(TRIPLE)
AR_normal := $(TARGET_PREFIX)ar
LD_normal := $(TARGET_PREFIX)ld
OBJCOPY_normal := $(TARGET_PREFIX)objcopy

CC_quiet = @echo " CC " $@ && $(TARGET_PREFIX)gcc
CX_quiet = @echo " CX " $@ && $(TARGET_PREFIX)g++
AR_quiet = @echo " AR " $@ && $(TARGET_PREFIX)ar
LD_quiet = @echo " LD " $@ && $(TARGET_PREFIX)ld
OBJCOPY_quiet = @echo " OBJCOPY " $@ && $(TARGET_PREFIX)objcopy
CC_quiet = @echo " CC " $@ && $(CC_normal)
CX_quiet = @echo " CX " $@ && $(CX_normal)
AR_quiet = @echo " AR " $@ && $(AR_normal)
LD_quiet = @echo " LD " $@ && $(LD_normal)
OBJCOPY_quiet = @echo " OBJCOPY " $@ && $(OBJCOPY_normal)

MSC_GIT_ID := $(shell cd $(MSCDIR) && python3 -c "from misoclib.cpu.identifier import get_id; print(hex(get_id()), end='')")

@@ -35,8 +36,8 @@ endif
#
INCLUDES = -I$(MSCDIR)/software/include/base -I$(MSCDIR)/software/include -I$(MSCDIR)/common
COMMONFLAGS = -Os $(CPUFLAGS) -Wall -fno-builtin -nostdinc -DMSC_GIT_ID=$(MSC_GIT_ID) $(INCLUDES)
CFLAGS = $(COMMONFLAGS) -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes
CXXFLAGS = $(COMMONFLAGS) -fno-exceptions -ffreestanding
CFLAGS = $(COMMONFLAGS) -fexceptions -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes
CXXFLAGS = $(COMMONFLAGS) -fexceptions -fno-rtti -ffreestanding
LDFLAGS = -nostdlib -nodefaultlibs -L$(MSCDIR)/software/include

# compile and generate dependencies, based on