From: John Hodge Date: Tue, 5 Mar 2013 02:01:01 +0000 (+0800) Subject: Externals/cross-compiler - Compilation works (for some definitions) X-Git-Tag: rel0.15~541 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=a6bca9642c0e2a321eaf34ffbd8b0cf0ce386545;p=tpg%2Facess2.git Externals/cross-compiler - Compilation works (for some definitions) --- diff --git a/Externals/cross-compiler/Makefile b/Externals/cross-compiler/Makefile index d9e214d9..4fcde2e8 100644 --- a/Externals/cross-compiler/Makefile +++ b/Externals/cross-compiler/Makefile @@ -45,7 +45,7 @@ $(warning $(BINUTILS_DIR) $(GCC_DIR)) $(GCC_DIR)/%: patches/gcc/%.patch @echo [PATCH] $@ - @tar -xf $(GCC_ARCHIVE) $@ + #@tar -xf $(GCC_ARCHIVE) $@ @patch $@ $< $(GCC_DIR)/%: patches/gcc/% @echo [CP] $@ @@ -53,7 +53,7 @@ $(GCC_DIR)/%: patches/gcc/% $(BINUTILS_DIR)/%: patches/binutils/%.patch @echo [PATCH] $@ - @tar -xf $(BINUTILS_ARCHIVE) $@ + #@tar -xf $(BINUTILS_ARCHIVE) $@ @patch $@ $< $(BINUTILS_DIR)/%: patches/binutils/% @echo [CP] $@ @@ -64,17 +64,19 @@ BDIR_BINUTILS := build-$(ARCH)/binutils $(BDIR_BINUTILS)/Makefile: $(addprefix $(BINUTILS_DIR)/,$(BINUTILS_CHANGES)) @mkdir -p $(BDIR_BINUTILS) - @cd $(BDIR_BINUTILS) && ../../$(BINUTILS_DIR)/configure --target=$(TARGET) --prefix=$(PREFIX) --disable-nls "--with-sysroot=$(SYSROOT)" + @cd $(BDIR_BINUTILS) && ../../$(BINUTILS_DIR)/configure --target=$(TARGET) --prefix=$(PREFIX) --disable-nls "--with-sysroot=$(SYSROOT)" --enable-shared $(PREFIX)/bin/$(TARGET)-ld: $(BDIR_BINUTILS)/Makefile - @cd $(BDIR_BINUTILS) && make all install -j $(PARLEVEL) + @make -C $(BDIR_BINUTILS) all -j $(PARLEVEL) + @make -C $(BDIR_BINUTILS) install $(BDIR_GCC)/Makefile: Makefile $(addprefix $(GCC_DIR)/,$(GCC_CHANGES)) @mkdir -p $(BDIR_GCC) @cd $(BDIR_GCC) && PATH=$(PREFIX)/bin:$$PATH ../../$(GCC_DIR)/configure --target=$(TARGET) --prefix=$(PREFIX) --disable-nls --enable-langs=c,c++ --includedir=$(ACESSDIR)/Usermode/include "--with-sysroot=$(SYSROOT)" $(PREFIX)/bin/$(TARGET)-gcc: $(BDIR_GCC)/Makefile - @PATH=$(PREFIX)/bin:$$PATH make -C $(BDIR_GCC) all-gcc all-target-libgcc -j $(PARLEVEL) - @make -C $(BDIR_GCC) install-gcc install-target-libgcc -j $(PARLEVEL) + @PATH=$(PREFIX)/bin:$$PATH make -C $(BDIR_GCC) all-gcc -j $(PARLEVEL) + @PATH=$(PREFIX)/bin:$$PATH make -C $(BDIR_GCC) all-target-libgcc -j $(PARLEVEL) + @make -C $(BDIR_GCC) install-gcc install-target-libgcc diff --git a/Externals/cross-compiler/patches/binutils/ld/emulparams/acess2_i386.sh b/Externals/cross-compiler/patches/binutils/ld/emulparams/acess2_i386.sh index fef69914..1581bbbe 100644 --- a/Externals/cross-compiler/patches/binutils/ld/emulparams/acess2_i386.sh +++ b/Externals/cross-compiler/patches/binutils/ld/emulparams/acess2_i386.sh @@ -3,6 +3,7 @@ OUTPUT_FORMAT=elf32-i386 TEXT_START_ADDR=0x08048000 MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" +TEMPLATE_NAME=elf32 ARCH=i386 MACHINE= diff --git a/Externals/cross-compiler/patches/gcc/gcc/config/acess2.h b/Externals/cross-compiler/patches/gcc/gcc/config/acess2.h index 8e998f91..c7ca51a9 100644 --- a/Externals/cross-compiler/patches/gcc/gcc/config/acess2.h +++ b/Externals/cross-compiler/patches/gcc/gcc/config/acess2.h @@ -7,6 +7,8 @@ builtin_assert ("system=unix"); \ } while(0); +#define LIB_SPEC "-lc -lld-acess" + /* #undef TARGET_VERSION // note that adding these two lines cause an error in gcc-4.7.0 #define TARGET_VERSION fprintf(stderr, " (i386 acess2)"); // the build process works fine without them until someone can work out an alternative