From a6bca9642c0e2a321eaf34ffbd8b0cf0ce386545 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Tue, 5 Mar 2013 10:01:01 +0800 Subject: [PATCH] Externals/cross-compiler - Compilation works (for some definitions) --- Externals/cross-compiler/Makefile | 14 ++++++++------ .../patches/binutils/ld/emulparams/acess2_i386.sh | 1 + .../cross-compiler/patches/gcc/gcc/config/acess2.h | 2 ++ 3 files changed, 11 insertions(+), 6 deletions(-) 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 -- 2.20.1