Skip to content

Commit

Permalink
Merge pull request #54 from kubilus1/upg-gcc
Browse files Browse the repository at this point in the history
Upgrade gcc ver (and other reqs)
  • Loading branch information
kubilus1 authored Feb 7, 2021
2 parents f169aca + cb95867 commit dcd86cc
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
- run:
name: build toolchain
command: make toolchain_build
no_output_timeout: 30m
- run:
name: build tools
command: make tools_build
Expand Down
19 changes: 11 additions & 8 deletions toolchain/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ BUILDDIR?=$(TOPDIR)/build
WORKDIR?=$(TCDIR)/work
FILESDIR?=$(TCDIR)/files

GCC_VERSION=6.3.0
BINUTILS_VERSION=2.24
NEWLIB_VERSION=1.19.0
GCC_VERSION=9.3.0
BINUTILS_VERSION=2.34
NEWLIB_VERSION=3.3.0
HOST?=x86_64-pc-linux-gnu

LOG?=/dev/null

Expand All @@ -35,27 +36,27 @@ install:
build-binutils: $(WORKDIR)/build-binutils
$(WORKDIR)/build-binutils:
mkdir -p $@
cd $@ && ../binutils-$(BINUTILS_VERSION)/configure --target=m68k-elf --prefix=$(BUILDDIR) --enable-install-libbfd --disable-werror
cd $@ && ../binutils-$(BINUTILS_VERSION)/configure --host=$(HOST) --target=m68k-elf --prefix=$(BUILDDIR) --enable-install-libbfd --disable-werror
$(MAKE) -C $@ all install DESTDIR= > $(LOG)

build-gcc-1: $(WORKDIR)/build-gcc
$(WORKDIR)/build-gcc:
cd $(WORKDIR)/gcc-$(GCC_VERSION) && patch -p1 -i $(FILESDIR)/gcc.patch
#cd $(WORKDIR)/gcc-$(GCC_VERSION) && patch -p1 -i $(FILESDIR)/gcc.patch
cd $(WORKDIR)/gcc-$(GCC_VERSION) && ./contrib/download_prerequisites
mkdir -p $@
cd $@ && ../gcc-$(GCC_VERSION)/configure --target=m68k-elf --prefix=$(BUILDDIR) --without-headers --with-newlib --enable-languages=c --disable-libssp --disable-tls --with-cpu=m68000 --disable-werror --disable-nls --disable-multilib
cd $@ && ../gcc-$(GCC_VERSION)/configure --host=$(HOST) --target=m68k-elf --prefix=$(BUILDDIR) --without-headers --with-newlib --enable-languages=c --disable-libssp --disable-tls --with-cpu=m68000 --disable-werror --disable-nls --disable-multilib
$(MAKE) -C $@ all install DESTDIR= > $(LOG)

build-newlib: $(WORKDIR)/build-newlib
$(WORKDIR)/build-newlib:
find $(BUILDDIR) -name "m68k-elf-cc"
find $(WORKDIR) -name "m68k-elf-cc"
mkdir -p $@
cd $@ && ../newlib-$(NEWLIB_VERSION)/configure --target=m68k-elf --prefix=$(BUILDDIR) --with-cpu=m68000 --disable-werror
cd $@ && ../newlib-$(NEWLIB_VERSION)/configure --host=$(HOST) --target=m68k-elf --prefix=$(BUILDDIR) --with-cpu=m68000 --disable-werror
$(MAKE) -C $@ all install DESTDIR= $(LOG)

build-gcc-2:
cd $(WORKDIR)/build-gcc && ../gcc-$(GCC_VERSION)/configure --target=m68k-elf --prefix=$(BUILDDIR) --with-newlib --disable-libssp --disable-tls --enable-threads=single --enable-languages=c --with-cpu=m68000 --disable-werror --disable-nls --disable-multilib
cd $(WORKDIR)/build-gcc && ../gcc-$(GCC_VERSION)/configure --host=$(HOST) --target=m68k-elf --prefix=$(BUILDDIR) --with-newlib --disable-libssp --disable-tls --enable-threads=single --enable-languages=c --with-cpu=m68000 --disable-werror --disable-nls --disable-multilib
$(MAKE) -C $(WORKDIR)/build-gcc all install DESTDIR= $(LOG)
cp $(BUILDDIR)/lib/gcc/m68k-elf/$(GCC_VERSION)/libgcc.a $(BUILDDIR)/lib/.

Expand All @@ -72,9 +73,11 @@ toolchain_clean:
#####################################################
TGZS=$(wildcard $(FILESDIR)/*.tar.gz)
BZ2S+=$(wildcard $(FILESDIR)/*.tar.bz2)
XZS+=$(wildcard $(FILESDIR)/*.tar.xz)

ARCH_DIRS=$(TGZS:.tar.gz=)
ARCH_DIRS+=$(BZ2S:.tar.bz2=)
ARCH_DIRS+=$(XZS:.tar.xz=)

PKGS=$(addprefix $(WORKDIR)/,$(notdir $(ARCH_DIRS)))

Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit dcd86cc

Please sign in to comment.