From: Michael Tremer Date: Wed, 11 Jun 2008 08:48:50 +0000 (+0200) Subject: Binutils... X-Git-Tag: v3.0-alpha1~978^2~12 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=15bf4b5848aa91010c13faca0d2f53e57e291d94;p=ipfire-3.x.git Binutils... --- diff --git a/lfs/binutils b/lfs/binutils index 00f0bc871..8ad8f753c 100644 --- a/lfs/binutils +++ b/lfs/binutils @@ -45,7 +45,9 @@ endif # Top-level Rules ############################################################################### -objects = $(DL_FILE) $(THISAPP)-configure-1.patch +objects = $(DL_FILE) $(THISAPP)-configure-1.patch \ + $(THISAPP)-pt_pax-1.patch \ + $(THISAPP)-lazy-1.patch install : $(TARGET) @@ -64,84 +66,57 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) -mkdir -v $(DIR_SRC)/binutils-build cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-configure-1.patch -ifeq "$(firstword $(MAKEFILE_LIST))" "$(PKG_NAME)" - # - # Normal build - # - +ifeq "$(STAGE)" "toolchain" ifeq "$(PASS)" "1" -ifeq "$(MACHINE)" "$(MACHINE_REAL)" - cd $(DIR_SRC)/binutils-build && CC="gcc -B/usr/bin/" ../$(THISAPP)/configure \ - --prefix=$(TOOLS_DIR) \ - --disable-nls \ - --disable-werror - - cd $(DIR_SRC)/binutils-build && make -j $(PARALLELISM) - cd $(DIR_SRC)/binutils-build && make install - cd $(DIR_SRC)/binutils-build && make -C ld clean - cd $(DIR_SRC)/binutils-build && make -C ld LIB_PATH=$(TOOLS_DIR)/lib - cd $(DIR_SRC)/binutils-build && cp -v ld/ld-new $(TOOLS_DIR)/bin -else - # - # Cross build - # - cd $(DIR_SRC)/binutils-build && ../$(THISAPP)/configure \ - --prefix=$(TOOLS_DIR) \ - --build=${IFS_HOST} \ - --host=${IFS_TARGET} \ - --target=${IFS_TARGET} \ - --disable-nls \ - --enable-shared \ - --disable-multilib - - cd $(DIR_SRC)/binutils-build && make configure-host + cd $(DIR_SRC)/binutils-build && \ + ../$(THISAPP)/configure \ + --target=$(IFS_TARGET) \ + --prefix=$(TOOLS_DIR) \ + --disable-nls \ + --disable-werror cd $(DIR_SRC)/binutils-build && make -j $(PARALLELISM) cd $(DIR_SRC)/binutils-build && make install -endif + + cd $(TOOLS_DIR)/$(IFS_TARGET)/bin; \ + if [ "$(IFS_TARGET)" == "$$($(DIR_APP)/config.guess)" ]; then \ + for t in $$(ls -1); do \ + ln -sfv $${t} $(TOOLS_DIR)/bin/$(IFS_TARGET)-$${t}; \ + done; \ + fi endif ifeq "$(PASS)" "2" - cd $(DIR_SRC)/binutils-build && ../$(THISAPP)/configure \ - --prefix=$(TOOLS_DIR) \ - --disable-nls \ - --with-lib-path=$(TOOLS_DIR)/lib - + cd $(DIR_SRC)/binutils-build && \ + CC="$(IFS_TARGET)-gcc -B$(TOOLS_DIR)/lib/" \ + AR=$(IFS_TARGET)-ar \ + RANLIB=$(IFS_TARGET)-ranlib \ + ../$(THISAPP)/configure \ + --prefix=$(TOOLS_DIR) \ + --disable-nls \ + --with-lib-path=$(TOOLS_DIR)/lib cd $(DIR_SRC)/binutils-build && make -j $(PARALLELISM) cd $(DIR_SRC)/binutils-build && make install - + cd $(DIR_SRC)/binutils-build && make -C ld clean cd $(DIR_SRC)/binutils-build && make -C ld LIB_PATH=/usr/lib:/lib cd $(DIR_SRC)/binutils-build && cp -v ld/ld-new $(TOOLS_DIR)/bin endif +endif ifeq "$(STAGE)" "base" - cd $(DIR_SRC)/binutils-build && ../$(THISAPP)/configure --prefix=/usr \ - --enable-shared +ifeq "$(PAX)" "1" + cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-pt_pax-1.patch +endif + cd $(DIR_SRC)/binutils-build && \ + CC="gcc -specs=$$(dirname $$(gcc --print-libgcc-file-name))/myspecs -B/usr/lib/ -B/usr/bin/" \ + ../$(THISAPP)/configure \ + --prefix=/usr \ + --enable-shared \ + --disable-werror cd $(DIR_SRC)/binutils-build && make tooldir=/usr -j $(PARALLELISM) cd $(DIR_SRC)/binutils-build && make tooldir=/usr install - - cp -fv ../$(THISAPP)/include/libiberty.h /usr/include -endif -else - # - # Cross build - # - - cd $(DIR_SRC)/binutils-build && AR=ar AS=as ../$(THISAPP)/configure \ - --prefix=$(CTOOLS_DIR) \ - --host=${IFS_HOST} \ - --target=${IFS_TARGET} \ - --with-lib-path=$(TOOLS_DIR)/lib \ - --disable-nls \ - --enable-shared \ - --disable-multilib - cd $(DIR_SRC)/binutils-build && make configure-host - cd $(DIR_SRC)/binutils-build && make -j $(PARALLELISM) - cd $(DIR_SRC)/binutils-build && make install - - -mkdir -p $(TOOLS_DIR)/include - cp -fv $(DIR_APP)/include/libiberty.h $(TOOLS_DIR)/include + cp -fv ../$(THISAPP)/include/libiberty.h /usr/include endif @rm -rf $(DIR_APP) $(DIR_SRC)/binutils-build