@@ -7,9 +7,10 @@ BUILDDIR?=$(TOPDIR)/build
7
7
WORKDIR? =$(TCDIR ) /work
8
8
FILESDIR? =$(TCDIR ) /files
9
9
10
- GCC_VERSION =6.3.0
11
- BINUTILS_VERSION =2.24
12
- NEWLIB_VERSION =1.19.0
10
+ GCC_VERSION =9.3.0
11
+ BINUTILS_VERSION =2.34
12
+ NEWLIB_VERSION =3.3.0
13
+ HOST? =x86_64-pc-linux-gnu
13
14
14
15
LOG? =/dev/null
15
16
@@ -35,27 +36,27 @@ install:
35
36
build-binutils : $(WORKDIR ) /build-binutils
36
37
$(WORKDIR ) /build-binutils :
37
38
mkdir -p $@
38
- cd $@ && ../binutils-$(BINUTILS_VERSION ) /configure --target=m68k-elf --prefix=$(BUILDDIR ) --enable-install-libbfd --disable-werror
39
+ cd $@ && ../binutils-$(BINUTILS_VERSION ) /configure --host= $( HOST ) -- target=m68k-elf --prefix=$(BUILDDIR ) --enable-install-libbfd --disable-werror
39
40
$(MAKE ) -C $@ all install DESTDIR= > $(LOG )
40
41
41
42
build-gcc-1 : $(WORKDIR ) /build-gcc
42
43
$(WORKDIR ) /build-gcc :
43
- cd $(WORKDIR ) /gcc-$(GCC_VERSION ) && patch -p1 -i $(FILESDIR ) /gcc.patch
44
+ # cd $(WORKDIR)/gcc-$(GCC_VERSION) && patch -p1 -i $(FILESDIR)/gcc.patch
44
45
cd $(WORKDIR ) /gcc-$(GCC_VERSION ) && ./contrib/download_prerequisites
45
46
mkdir -p $@
46
- 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
47
+ 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
47
48
$(MAKE ) -C $@ all install DESTDIR= > $(LOG )
48
49
49
50
build-newlib : $(WORKDIR ) /build-newlib
50
51
$(WORKDIR ) /build-newlib :
51
52
find $(BUILDDIR ) -name " m68k-elf-cc"
52
53
find $(WORKDIR ) -name " m68k-elf-cc"
53
54
mkdir -p $@
54
- cd $@ && ../newlib-$(NEWLIB_VERSION ) /configure --target=m68k-elf --prefix=$(BUILDDIR ) --with-cpu=m68000 --disable-werror
55
+ cd $@ && ../newlib-$(NEWLIB_VERSION ) /configure --host= $( HOST ) -- target=m68k-elf --prefix=$(BUILDDIR ) --with-cpu=m68000 --disable-werror
55
56
$(MAKE ) -C $@ all install DESTDIR= $(LOG )
56
57
57
58
build-gcc-2 :
58
- 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
59
+ 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
59
60
$(MAKE ) -C $(WORKDIR ) /build-gcc all install DESTDIR= $(LOG )
60
61
cp $(BUILDDIR ) /lib/gcc/m68k-elf/$(GCC_VERSION ) /libgcc.a $(BUILDDIR ) /lib/.
61
62
@@ -72,9 +73,11 @@ toolchain_clean:
72
73
# ####################################################
73
74
TGZS =$(wildcard $(FILESDIR ) /* .tar.gz)
74
75
BZ2S+ =$(wildcard $(FILESDIR ) /* .tar.bz2)
76
+ XZS+ =$(wildcard $(FILESDIR ) /* .tar.xz)
75
77
76
78
ARCH_DIRS=$(TGZS:.tar.gz =)
77
79
ARCH_DIRS+=$(BZ2S:.tar.bz2 =)
80
+ ARCH_DIRS+=$(XZS:.tar.xz =)
78
81
79
82
PKGS =$(addprefix $(WORKDIR ) /,$(notdir $(ARCH_DIRS ) ) )
80
83
0 commit comments