changeset 2151:18d32520bcb5

take config.guess from binutils instead of gcc binutils comes before gcc and also has a newer config.guess.
author Mark Brand <mabrand@mabrand.nl>
date Sun, 27 Nov 2011 22:13:09 +0100
parents 128b0f98fc89
children 63eeef8e03e9
files src/binutils.mk src/gcc.mk
diffstat 2 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/binutils.mk	Sun Nov 27 20:30:37 2011 +0100
+++ b/src/binutils.mk	Sun Nov 27 22:13:09 2011 +0100
@@ -21,8 +21,15 @@
 endef
 
 define $(PKG)_BUILD
+    # install config.guess for general use
+    $(INSTALL) -d '$(PREFIX)/bin'
+    $(INSTALL) -m755 '$(1)/config.guess' '$(PREFIX)/bin/'
+    $(INSTALL) -m755 '$(1)/config.sub' '$(PREFIX)/bin/'
+
+    # Cannot use BUILD which was defined before config.guess existed.
     cd '$(1)' && ./configure \
         --target='$(TARGET)' \
+        --build="`config.guess`" \
         --prefix='$(PREFIX)' \
         --with-gcc \
         --with-gnu-ld \
--- a/src/gcc.mk	Sun Nov 27 20:30:37 2011 +0100
+++ b/src/gcc.mk	Sun Nov 27 22:13:09 2011 +0100
@@ -29,14 +29,11 @@
     cd '$(1)' && $(call UNPACK_PKG_ARCHIVE,gcc-mpfr)
     mv '$(1)/$(gcc-mpfr_SUBDIR)' '$(1)/mpfr'
 
-    # install config.guess for general use
-    $(INSTALL) -m755 '$(1)/config.guess' '$(PREFIX)/bin'
-    $(INSTALL) -m755 '$(1)/config.sub' '$(PREFIX)/bin'
-
     # build GCC and support libraries
     mkdir '$(1).build'
     cd    '$(1).build' && '$(1)/configure' \
         --target='$(TARGET)' \
+        --build='$(BUILD)' \
         --prefix='$(PREFIX)' \
         --libdir='$(PREFIX)/lib' \
         --enable-languages='c,c++,objc,fortran' \