aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Eric Andersen <andersen@codepoet.org>2003-03-04 19:16:19 +0000
committerGravatar Eric Andersen <andersen@codepoet.org>2003-03-04 19:16:19 +0000
commit1fc3f2f3de0f731c2869a48f951557eed6704218 (patch)
treee5fa011e92f78d0feab200dde260ba21561e76d0
parent36830baea210bba2490f643a1d147bf9adb2b62b (diff)
downloadbuildroot-1fc3f2f3de0f731c2869a48f951557eed6704218.tar.gz
buildroot-1fc3f2f3de0f731c2869a48f951557eed6704218.tar.bz2
Rework things to ensure we are cross compiling. Teach problematic
apps like openssh to cross compile. This eliminates the need for the magic ld-uClibc.so.0 symlink in /lib
-rw-r--r--Makefile9
-rw-r--r--README16
-rw-r--r--make/autoconf.mk4
-rw-r--r--make/automake.mk4
-rw-r--r--make/bash.mk6
-rw-r--r--make/berkeleydb.mk4
-rw-r--r--make/bison.mk4
-rw-r--r--make/bridge.mk2
-rw-r--r--make/coreutils.mk8
-rw-r--r--make/dhcp_relay.mk2
-rw-r--r--make/diffutils.mk4
-rw-r--r--make/ed.mk4
-rw-r--r--make/file.mk6
-rw-r--r--make/findutils.mk7
-rw-r--r--make/flex.mk4
-rw-r--r--make/gawk.mk5
-rw-r--r--make/gcc_target.mk67
-rw-r--r--make/gdb.mk5
-rw-r--r--make/gdbserver.mk6
-rw-r--r--make/grep.mk5
-rw-r--r--make/hostap.mk2
-rw-r--r--make/jpeg.mk4
-rw-r--r--make/libglib12.mk4
-rw-r--r--make/libtool.mk4
-rw-r--r--make/links.mk4
-rw-r--r--make/linux.mk3
-rw-r--r--make/lrzsz.mk4
-rw-r--r--make/m4.mk4
-rw-r--r--make/make.mk4
-rw-r--r--make/mke2fs.mk4
-rw-r--r--make/ncurses.mk8
-rw-r--r--make/newt.mk4
-rw-r--r--make/ntp.mk4
-rw-r--r--make/openssh.mk13
-rw-r--r--make/openssl.mk4
-rw-r--r--make/patch.mk4
-rw-r--r--make/pciutils.mk4
-rw-r--r--make/pcmcia.mk2
-rw-r--r--make/pppd.mk4
-rw-r--r--make/rxvt.mk4
-rw-r--r--make/sed.mk4
-rw-r--r--make/socat.mk4
-rw-r--r--make/strace.mk3
-rw-r--r--make/system-linux.mk26
-rw-r--r--make/tar.mk4
-rw-r--r--make/tn5250.mk4
-rw-r--r--make/uclibc_toolchain.mk6
-rw-r--r--make/uclibc_toolchain_2_95.mk6
-rw-r--r--make/user-mode-linux.mk2
-rw-r--r--make/valgrind.mk4
-rw-r--r--sources/openssh.patch135
-rw-r--r--sources/openssl.patch30
52 files changed, 339 insertions, 149 deletions
diff --git a/Makefile b/Makefile
index ae8561ec79..0c075a682f 100644
--- a/Makefile
+++ b/Makefile
@@ -167,6 +167,15 @@ HOST_ARCH:=$(shell $(HOSTCC) -dumpmachine | sed -e s'/-.*//' \
-e 's/cris.*/cris/' \
)
GNU_HOST_NAME:=$(HOST_ARCH)-pc-linux-gnu
+TARGET_CONFIGURE_OPTS=PATH=$(TARGET_PATH) \
+ AR=$(TARGET_CROSS)ar \
+ AS=$(TARGET_CROSS)as \
+ LD=$(TARGET_CROSS)ld \
+ NM=$(TARGET_CROSS)nm \
+ CC=$(TARGET_CROSS)gcc \
+ GCC=$(TARGET_CROSS)gcc \
+ CXX=$(TARGET_CROSS)g++ \
+ RANLIB=$(TARGET_CROSS)ranlib
all: world
diff --git a/README b/README
index 533db7340e..e0cf6efbe1 100644
--- a/README
+++ b/README
@@ -27,19 +27,3 @@ Have fun!
Please feed suggestions, bug reports, insults, and bribes back to:
Erik Andersen <andersen@codepoet.org>
-
-
-NOTE:
-
- For './configure' to behave itself with certain applications, you may need
- to create a symlink under "/lib" on your system that points to the uClibc
- shared library loader in the staging directory. For example, on my system
-
- $ cd /lib
- $ sudo ln -s /home/andersen/buildroot/build/staging_dir/lib/ld-uClibc.so.0 ld-uClibc.so.0
-
- If you don't use sudo, run 'su -' to become root when making the link. If
- you aren't root it won't work. The reason for this symlink, is it allows
- './configure' to actually execute the test applications it compiles against
- uClibc during the configuration process....
-
diff --git a/make/autoconf.mk b/make/autoconf.mk
index fe11b2c7d8..2332f546a1 100644
--- a/make/autoconf.mk
+++ b/make/autoconf.mk
@@ -21,9 +21,11 @@ $(AUTOCONF_DIR)/.unpacked: $(DL_DIR)/$(AUTOCONF_SOURCE)
$(AUTOCONF_DIR)/.configured: $(AUTOCONF_DIR)/.unpacked
(cd $(AUTOCONF_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) EMACS="no" \
+ $(TARGET_CONFIGURE_OPTS) EMACS="no" \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
diff --git a/make/automake.mk b/make/automake.mk
index 6d4bbaa7d6..4231a9d8d5 100644
--- a/make/automake.mk
+++ b/make/automake.mk
@@ -21,9 +21,11 @@ $(AUTOMAKE_DIR)/.unpacked: $(DL_DIR)/$(AUTOMAKE_SOURCE)
$(AUTOMAKE_DIR)/.configured: $(AUTOMAKE_DIR)/.unpacked
(cd $(AUTOMAKE_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
diff --git a/make/bash.mk b/make/bash.mk
index da4c733ec3..23370612a5 100644
--- a/make/bash.mk
+++ b/make/bash.mk
@@ -21,10 +21,13 @@ $(BASH_DIR)/.unpacked: $(DL_DIR)/$(BASH_SOURCE)
$(BASH_DIR)/.configured: $(BASH_DIR)/.unpacked
(cd $(BASH_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) CC_FOR_BUILD=$(HOSTCC) \
+ $(TARGET_CONFIGURE_OPTS) CC_FOR_BUILD=$(HOSTCC) \
+ ac_cv_func_setvbuf_reversed=no \
+ bash_cv_have_mbstate_t=yes \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
@@ -46,6 +49,7 @@ $(BASH_DIR)/$(BASH_BINARY): $(BASH_DIR)/.configured
$(TARGET_DIR)/$(BASH_TARGET_BINARY): $(BASH_DIR)/$(BASH_BINARY)
$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(BASH_DIR) install
+ rm -f $(TARGET_DIR)/bin/bash*
mv $(TARGET_DIR)/usr/bin/bash* $(TARGET_DIR)/bin/
(cd $(TARGET_DIR)/bin; ln -fs bash sh)
rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
diff --git a/make/berkeleydb.mk b/make/berkeleydb.mk
index 9029fc3630..3d75334875 100644
--- a/make/berkeleydb.mk
+++ b/make/berkeleydb.mk
@@ -19,9 +19,11 @@ $(DB_DIR)/.dist: $(DL_DIR)/$(DB_SOURCE)
$(DB_DIR)/.configured: $(DB_DIR)/.dist
(cd $(DB_DIR)/build_unix; rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
../dist/configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
diff --git a/make/bison.mk b/make/bison.mk
index c38396530f..2803cdccb0 100644
--- a/make/bison.mk
+++ b/make/bison.mk
@@ -21,9 +21,11 @@ $(BISON_DIR)/.unpacked: $(DL_DIR)/$(BISON_SOURCE)
$(BISON_DIR)/.configured: $(BISON_DIR)/.unpacked
(cd $(BISON_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
diff --git a/make/bridge.mk b/make/bridge.mk
index f84b1b46f0..b26726a3ee 100644
--- a/make/bridge.mk
+++ b/make/bridge.mk
@@ -18,7 +18,7 @@ $(BRIDGE_BUILD_DIR)/.unpacked: $(DL_DIR)/$(BRIDGE_SOURCE)
$(BRIDGE_BUILD_DIR)/.configured: $(BRIDGE_BUILD_DIR)/.unpacked
(cd $(BRIDGE_BUILD_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--with-linux-headers=$(BUILD_DIR)/linux \
);
diff --git a/make/coreutils.mk b/make/coreutils.mk
index ebfd11b9ae..2ec01ae92b 100644
--- a/make/coreutils.mk
+++ b/make/coreutils.mk
@@ -23,9 +23,11 @@ $(COREUTILS_DIR)/.unpacked: $(DL_DIR)/$(COREUTILS_SOURCE)
$(COREUTILS_DIR)/.configured: $(COREUTILS_DIR)/.unpacked
(cd $(COREUTILS_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
@@ -38,6 +40,10 @@ $(COREUTILS_DIR)/.configured: $(COREUTILS_DIR)/.unpacked
--infodir=/usr/info \
--disable-nls \
);
+ #Fix up the max number of open files per process, which apparently
+ # is not set when cross compiling
+ perl -i -p -e 's,.*UTILS_OPEN_MAX.*,#define UTILS_OPEN_MAX 1019,g' \
+ $(COREUTILS_DIR)/config.h
touch $(COREUTILS_DIR)/.configured
$(COREUTILS_DIR)/$(COREUTILS_BINARY): $(COREUTILS_DIR)/.configured
diff --git a/make/dhcp_relay.mk b/make/dhcp_relay.mk
index 31651ef8cf..8252b4aebd 100644
--- a/make/dhcp_relay.mk
+++ b/make/dhcp_relay.mk
@@ -23,7 +23,7 @@ $(DHCP_RELAY_DIR)/.unpacked: $(DL_DIR)/$(DHCP_RELAY_SOURCE)
touch $(DHCP_RELAY_DIR)/.unpacked
$(DHCP_RELAY_DIR)/.configured: $(DHCP_RELAY_DIR)/.unpacked
- (cd $(DHCP_RELAY_DIR); PATH=$(TARGET_PATH) CC=$(TARGET_CC) ./configure );
+ (cd $(DHCP_RELAY_DIR); $(TARGET_CONFIGURE_OPTS) ./configure );
touch $(DHCP_RELAY_DIR)/.configured
$(DHCP_RELAY_DIR)/$(DHCP_RELAY_BINARY): $(DHCP_RELAY_DIR)/.configured
diff --git a/make/diffutils.mk b/make/diffutils.mk
index daff147ded..2778d60607 100644
--- a/make/diffutils.mk
+++ b/make/diffutils.mk
@@ -21,9 +21,11 @@ $(DIFFUTILS_DIR)/.unpacked: $(DL_DIR)/$(DIFFUTILS_SOURCE)
$(DIFFUTILS_DIR)/.configured: $(DIFFUTILS_DIR)/.unpacked
(cd $(DIFFUTILS_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
diff --git a/make/ed.mk b/make/ed.mk
index 323e9dc117..f1108e34d2 100644
--- a/make/ed.mk
+++ b/make/ed.mk
@@ -26,9 +26,11 @@ $(ED_DIR)/.unpacked: $(DL_DIR)/$(ED_SOURCE) $(DL_DIR)/$(ED_PATCH)
$(ED_DIR)/.configured: $(ED_DIR)/.unpacked
(cd $(ED_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--disable-nls \
diff --git a/make/file.mk b/make/file.mk
index ab9fc863cb..cd7301debf 100644
--- a/make/file.mk
+++ b/make/file.mk
@@ -17,13 +17,17 @@ file-source: $(DL_DIR)/$(FILE_SOURCE)
$(FILE_DIR)/.unpacked: $(DL_DIR)/$(FILE_SOURCE)
$(FILE_CAT) $(DL_DIR)/$(FILE_SOURCE) | tar -C $(BUILD_DIR) -xvf -
+ # Use the system file utility, not the one we just built
+ perl -pi -e "s,\./file,file,g" $(FILE_DIR)/Makefile.in $(FILE_DIR)/Makefile.am
touch $(FILE_DIR)/.unpacked
$(FILE_DIR)/.configured: $(FILE_DIR)/.unpacked
(cd $(FILE_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
diff --git a/make/findutils.mk b/make/findutils.mk
index 540965e5ea..ca204c19bf 100644
--- a/make/findutils.mk
+++ b/make/findutils.mk
@@ -18,15 +18,16 @@ findutils-source: $(DL_DIR)/$(FINDUTILS_SOURCE)
$(FINDUTILS_DIR)/.unpacked: $(DL_DIR)/$(FINDUTILS_SOURCE)
$(FINDUTILS_CAT) $(DL_DIR)/$(FINDUTILS_SOURCE) | tar -C $(BUILD_DIR) -xvf -
mv $(FINDUTILS_DIR).orig $(FINDUTILS_DIR)
- (cd $(FINDUTILS_DIR); perl -i -p -e "s,# define mbstate_t int,# define mbstate_t int\n\
- # define wchar_t char,;" $(FINDUTILS_DIR)/lib/quotearg.c)
touch $(FINDUTILS_DIR)/.unpacked
$(FINDUTILS_DIR)/.configured: $(FINDUTILS_DIR)/.unpacked
(cd $(FINDUTILS_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
+ ac_cv_func_setvbuf_reversed=no \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
diff --git a/make/flex.mk b/make/flex.mk
index d37a9f7fe1..aa2f8573de 100644
--- a/make/flex.mk
+++ b/make/flex.mk
@@ -26,9 +26,11 @@ $(FLEX_DIR)/.unpacked: $(DL_DIR)/$(FLEX_SOURCE) $(DL_DIR)/$(FLEX_PATCH)
$(FLEX_DIR)/.configured: $(FLEX_DIR)/.unpacked
(cd $(FLEX_DIR); autoconf; rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
diff --git a/make/gawk.mk b/make/gawk.mk
index 691dff4a76..3a2831e46d 100644
--- a/make/gawk.mk
+++ b/make/gawk.mk
@@ -21,9 +21,12 @@ $(GAWK_DIR)/.unpacked: $(DL_DIR)/$(GAWK_SOURCE)
$(GAWK_DIR)/.configured: $(GAWK_DIR)/.unpacked
(cd $(GAWK_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
+ ac_cv_func_getpgrp_void=yes \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
diff --git a/make/gcc_target.mk b/make/gcc_target.mk
index 56ca6b47cb..1fc0977bc3 100644
--- a/make/gcc_target.mk
+++ b/make/gcc_target.mk
@@ -89,12 +89,19 @@ $(BINUTILS_DIR2)/.configured: $(BINUTILS_DIR2_DEPENDS)
mkdir -p $(TARGET_DIR)/usr/include
mkdir -p $(TARGET_DIR)/usr/$(GNU_TARGET_NAME)/
(cd $(TARGET_DIR)/usr/$(GNU_TARGET_NAME); ln -fs ../include sys-include)
- (cd $(BINUTILS_DIR2); PATH=$(TARGET_PATH) AR=$(TARGET_CROSS)ar \
- RANLIB=$(TARGET_CROSS)ranlib LD=$(TARGET_CROSS)ld NM=$(TARGET_CROSS)nm \
- CC=$(TARGET_CROSS)gcc \
+ (cd $(BINUTILS_DIR2); $(TARGET_CONFIGURE_OPTS) \
+ AR_FOR_TARGET=$(TARGET_CROSS)ar \
+ AS_FOR_TARGET=$(TARGET_CROSS)as \
+ LD_FOR_TARGET=$(TARGET_CROSS)ld \
+ NM_FOR_TARGET=$(TARGET_CROSS)nm \
+ CC_FOR_TARGET=$(TARGET_CROSS)gcc \
+ GCC_FOR_TARGET=$(TARGET_CROSS)gcc \
+ CXX_FOR_TARGET=$(TARGET_CROSS)g++ \
+ RANLIB_FOR_TARGET=$(TARGET_CROSS)ranlib \
$(BINUTILS_DIR)/configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
@@ -114,18 +121,10 @@ $(BINUTILS_DIR2)/.configured: $(BINUTILS_DIR2_DEPENDS)
touch $(BINUTILS_DIR2)/.configured
$(BINUTILS_DIR2)/binutils/objdump: $(BINUTILS_DIR2)/.configured
- $(MAKE) AR=$(TARGET_CROSS)ar \
- RANLIB=$(TARGET_CROSS)ranlib LD=$(TARGET_CROSS)ld \
- CC=$(TARGET_CROSS)gcc GCC_FOR_TARGET=$(TARGET_CROSS)gcc \
- CC_FOR_TARGET=$(TARGET_CROSS)gcc tooldir=/usr -C $(BINUTILS_DIR2)
+ $(MAKE) tooldir=/usr -C $(BINUTILS_DIR2)
$(TARGET_DIR)/usr/bin/ld: $(BINUTILS_DIR2)/binutils/objdump
- CC=$(HOSTCC) GCC_FOR_TARGET=$(TARGET_CROSS)gcc \
- AR_FOR_TARGET=$(TARGET_CROSS)ar RANLIB_FOR_TARGET=$(TARGET_CROSS)ranlib \
- LD_FOR_TARGET=$(TARGET_CROSS)ld NM_FOR_TARGET=$(TARGET_CROSS)nm \
- CC_FOR_TARGET=$(TARGET_CROSS)gcc \
- $(MAKE) \
- tooldor=/usr \
+ $(MAKE) \
prefix=$(TARGET_DIR)/usr \
exec_prefix=$(TARGET_DIR)/usr \
bindir=$(TARGET_DIR)/usr/bin \
@@ -141,7 +140,7 @@ $(TARGET_DIR)/usr/bin/ld: $(BINUTILS_DIR2)/binutils/objdump
includedir=$(TARGET_DIR)/usr/include \
gxx_include_dir=$(TARGET_DIR)/usr/include/c++ \
toolexecdir=$(TARGET_DIR)/lib/gcc-lib/$(GNU_TARGET_NAME) \
- -C $(BINUTILS_DIR2) install;
+ -C $(BINUTILS_DIR2) install;
rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
$(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
-$(STRIP) $(TARGET_DIR)/usr/$(GNU_TARGET_NAME)/bin/*
@@ -287,18 +286,19 @@ $(GCC_BUILD_DIR3)/.configured: $(GCC_BUILD_DIR3)/.gcc_build_hacks
mkdir -p $(TARGET_DIR)/usr/$(GNU_TARGET_NAME)
(cd $(TARGET_DIR)/usr/$(GNU_TARGET_NAME); ln -fs ../include)
(cd $(TARGET_DIR)/usr/$(GNU_TARGET_NAME); ln -fs ../include sys-include)
- (cd $(GCC_BUILD_DIR3); PATH=$(TARGET_PATH) \
- AS=$(TARGET_CROSS)as \
- LD=$(TARGET_CROSS)ld \
- AR=$(TARGET_CROSS)ar \
- NM=$(TARGET_CROSS)nm \
- CC=$(TARGET_CROSS)gcc \
- GCC=$(TARGET_CROSS)gcc \
- CXX=$(TARGET_CROSS)c++ \
- RANLIB=$(TARGET_CROSS)ranlib \
+ (cd $(GCC_BUILD_DIR3); $(TARGET_CONFIGURE_OPTS) \
+ AR_FOR_TARGET=$(TARGET_CROSS)ar \
+ AS_FOR_TARGET=$(TARGET_CROSS)as \
+ LD_FOR_TARGET=$(TARGET_CROSS)ld \
+ NM_FOR_TARGET=$(TARGET_CROSS)nm \
+ CC_FOR_TARGET=$(TARGET_CROSS)gcc \
+ GCC_FOR_TARGET=$(TARGET_CROSS)gcc \
+ CXX_FOR_TARGET=$(TARGET_CROSS)g++ \
+ RANLIB_FOR_TARGET=$(TARGET_CROSS)ranlib \
$(GCC_DIR)/configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
@@ -322,28 +322,11 @@ $(GCC_BUILD_DIR3)/.configured: $(GCC_BUILD_DIR3)/.gcc_build_hacks
touch $(GCC_BUILD_DIR3)/.configured
$(GCC_BUILD_DIR3)/.compiled: $(GCC_BUILD_DIR3)/.configured
- AS=$(TARGET_CROSS)as \
- LD=$(TARGET_CROSS)ld \
- AR=$(TARGET_CROSS)ar \
- NM=$(TARGET_CROSS)nm \
- CC=$(TARGET_CROSS)gcc \
- GCC=$(TARGET_CROSS)gcc \
- CXX=$(TARGET_CROSS)g++ \
- RANLIB=$(TARGET_CROSS)ranlib \
- $(MAKE) -C $(GCC_BUILD_DIR3)
+ $(MAKE) -C $(GCC_BUILD_DIR3)
touch $(GCC_BUILD_DIR3)/.compiled
$(TARGET_DIR)/usr/bin/gcc: $(GCC_BUILD_DIR3)/.compiled
- $(MAKE) \
- CC=$(TARGET_CROSS)gcc \
- AS=$(TARGET_CROSS)as \
- LD=$(TARGET_CROSS)ld \
- AR=$(TARGET_CROSS)ar \
- NM=$(TARGET_CROSS)nm \
- CC=$(TARGET_CROSS)gcc \
- GCC=$(TARGET_CROSS)gcc \
- CXX=$(TARGET_CROSS)g++ \
- RANLIB=$(TARGET_CROSS)ranlib \
+ $(MAKE) \
prefix=$(TARGET_DIR)/usr \
exec_prefix=$(TARGET_DIR)/usr \
bindir=$(TARGET_DIR)/usr/bin \
diff --git a/make/gdb.mk b/make/gdb.mk
index 0cbcd92972..e696b65ec8 100644
--- a/make/gdb.mk
+++ b/make/gdb.mk
@@ -19,10 +19,7 @@ $(GDB_DIR)/.unpacked: $(DL_DIR)/$(GDB_SOURCE) $(GDB_PATCH)
$(GDB_DIR)/.configured: $(GDB_DIR)/.unpacked
(cd $(GDB_DIR); rm -rf config.cache; \
- AR=$(TARGET_CROSS)ar \
- AS=$(TARGET_CROSS)as LD=$(TARGET_CROSS)ld \
- RANLIB=$(TARGET_CROSS)ranlib NM=$(TARGET_CROSS)nm \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
diff --git a/make/gdbserver.mk b/make/gdbserver.mk
index bafd4d9e17..103184cefc 100644
--- a/make/gdbserver.mk
+++ b/make/gdbserver.mk
@@ -12,12 +12,10 @@ GDB_WDIR:=$(BUILD_DIR)/gdbserver
$(GDB_WDIR)/.configured: $(GDB_DIR)/.unpacked
mkdir -p $(GDB_WDIR)
(cd $(GDB_WDIR); rm -rf config.cache; \
- AR=$(TARGET_CROSS)ar \
- AS=$(TARGET_CROSS)as LD=$(TARGET_CROSS)ld \
- RANLIB=$(TARGET_CROSS)ranlib NM=$(TARGET_CROSS)nm \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
$(GDB_DIR)/gdb/gdbserver/configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
diff --git a/make/grep.mk b/make/grep.mk
index 7073322f08..88dbbbe4ab 100644
--- a/make/grep.mk
+++ b/make/grep.mk
@@ -21,9 +21,11 @@ $(GNUGREP_DIR)/.unpacked: $(DL_DIR)/$(GNUGREP_SOURCE)
$(GNUGREP_DIR)/.configured: $(GNUGREP_DIR)/.unpacked
(cd $(GNUGREP_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
@@ -36,6 +38,7 @@ $(GNUGREP_DIR)/.configured: $(GNUGREP_DIR)/.unpacked
--infodir=/usr/info \
--disable-nls \
--disable-perl-regexp \
+ --without-included-regex \
);
touch $(GNUGREP_DIR)/.configured
diff --git a/make/hostap.mk b/make/hostap.mk
index 8edd3444b8..89532b3dac 100644
--- a/make/hostap.mk
+++ b/make/hostap.mk
@@ -24,7 +24,7 @@ $(HOSTAP_BUILD_DIR)/.configured: $(HOSTAP_BUILD_DIR)/.unpacked
touch $(HOSTAP_BUILD_DIR)/.configured
$(HOSTAP_BUILD_DIR)/driver/modules/hostap.o: $(HOSTAP_BUILD_DIR)/.configured
- $(MAKE) -C $(HOSTAP_BUILD_DIR) pccard KERNEL_PATH=$(BUILD_DIR)/linux CC=$(TARGET_CC)
+ $(MAKE) -C $(HOSTAP_BUILD_DIR) pccard KERNEL_PATH=$(LINUX_SOURCE_DIR) CC=$(TARGET_CC)
$(MAKE) -C $(HOSTAP_BUILD_DIR)/utils CC=$(TARGET_CC)
$(MAKE) -C $(HOSTAP_BUILD_DIR)/hostapd CC=$(TARGET_CC)
touch -c $(HOSTAP_BUILD_DIR)/driver/modules/hostap.o
diff --git a/make/jpeg.mk b/make/jpeg.mk
index 34e985e5d1..fa15569e67 100644
--- a/make/jpeg.mk
+++ b/make/jpeg.mk
@@ -37,9 +37,11 @@ $(JPEG_DIR)/.unpacked: $(DL_DIR)/$(JPEG_SOURCE)
$(JPEG_DIR)/.configured: $(JPEG_DIR)/.unpacked
zcat $(DL_DIR)/$(JPEG_SOURCE) | tar -C $(BUILD_DIR) -xvf -
(cd $(JPEG_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
diff --git a/make/libglib12.mk b/make/libglib12.mk
index 07218e4c30..fee7f3b288 100644
--- a/make/libglib12.mk
+++ b/make/libglib12.mk
@@ -20,9 +20,11 @@ $(LIBGLIB12_DIR)/.unpacked: $(DL_DIR)/$(LIBGLIB12_SOURCE)
$(LIBGLIB12_DIR)/.configured: $(LIBGLIB12_DIR)/.unpacked
(cd $(LIBGLIB12_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
diff --git a/make/libtool.mk b/make/libtool.mk
index 126b720d84..e924da9ea2 100644
--- a/make/libtool.mk
+++ b/make/libtool.mk
@@ -21,9 +21,11 @@ $(LIBTOOL_DIR)/.unpacked: $(DL_DIR)/$(LIBTOOL_SOURCE)
$(LIBTOOL_DIR)/.configured: $(LIBTOOL_DIR)/.unpacked
(cd $(LIBTOOL_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
diff --git a/make/links.mk b/make/links.mk
index d664cc8f35..a54e4b0af6 100644
--- a/make/links.mk
+++ b/make/links.mk
@@ -18,9 +18,11 @@ $(LINKS_DIR)/.unpacked: $(DL_DIR)/$(LINKS_SOURCE)
$(LINKS_DIR)/.configured: $(LINKS_DIR)/.unpacked
(cd $(LINKS_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
diff --git a/make/linux.mk b/make/linux.mk
index ca97b72691..8a25ee145c 100644
--- a/make/linux.mk
+++ b/make/linux.mk
@@ -36,6 +36,9 @@ LINUX_SOURCE=linux-$(DOWNLOAD_LINUX_VERSION).tar.bz2
LINUX_SITE=ftp://ftp.kernel.org/pub/linux/kernel/v2.4
LINUX_KCONFIG=$(SOURCE_DIR)/linux.config
LINUX_KERNEL=$(BUILD_DIR)/buildroot-kernel
+# Used by pcmcia-cs and others
+LINUX_SOURCE_DIR=$(LINUX_DIR)
+
$(DL_DIR)/$(LINUX_SOURCE):
$(WGET) -P $(DL_DIR) $(LINUX_SITE)/$(LINUX_SOURCE)
diff --git a/make/lrzsz.mk b/make/lrzsz.mk
index a212052ba1..3fedaa90c0 100644
--- a/make/lrzsz.mk
+++ b/make/lrzsz.mk
@@ -36,9 +36,11 @@ $(LRZSZ_DIR)/.unpacked: $(DL_DIR)/$(LRZSZ_SOURCE)
$(LRZSZ_DIR)/.configured: $(LRZSZ_DIR)/.unpacked
(cd $(LRZSZ_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
diff --git a/make/m4.mk b/make/m4.mk
index e435386e92..1ee543024b 100644
--- a/make/m4.mk
+++ b/make/m4.mk
@@ -21,9 +21,11 @@ $(M4_DIR)/.unpacked: $(DL_DIR)/$(M4_SOURCE)
$(M4_DIR)/.configured: $(M4_DIR)/.unpacked
(cd $(M4_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
);
diff --git a/make/make.mk b/make/make.mk
index 08240d937c..fdf3dc1be0 100644
--- a/make/make.mk
+++ b/make/make.mk
@@ -21,9 +21,11 @@ $(GNUMAKE_DIR)/.unpacked: $(DL_DIR)/$(GNUMAKE_SOURCE)
$(GNUMAKE_DIR)/.configured: $(GNUMAKE_DIR)/.unpacked
(cd $(GNUMAKE_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
diff --git a/make/mke2fs.mk b/make/mke2fs.mk
index 589da672b8..759d865289 100644
--- a/make/mke2fs.mk
+++ b/make/mke2fs.mk
@@ -21,9 +21,11 @@ $(MKE2FS_DIR)/.unpacked: $(DL_DIR)/$(MKE2FS_SOURCE)
$(MKE2FS_DIR)/.configured: $(MKE2FS_DIR)/.unpacked
(cd $(MKE2FS_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--with-cc=$(TARGET_CC) \
--with-linker=$(TARGET_CROSS)ld \
--prefix=/usr \
diff --git a/make/ncurses.mk b/make/ncurses.mk
index 4c91fc5c97..7cc7947387 100644
--- a/make/ncurses.mk
+++ b/make/ncurses.mk
@@ -5,7 +5,7 @@
#
#############################################################
# Copyright (C) 2002 by Ken Restivo <ken@246gt.com>
-# $Id: ncurses.mk,v 1.22 2003/02/12 12:43:15 andersen Exp $
+# $Id: ncurses.mk,v 1.23 2003/03/04 19:16:18 andersen Exp $
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Library General Public License as
@@ -39,10 +39,12 @@ $(NCURSES_DIR)/.dist: $(DL_DIR)/$(NCURSES_SOURCE)
$(NCURSES_DIR)/.configured: $(NCURSES_DIR)/.dist
(cd $(NCURSES_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) BUILD_CC=$(HOSTCC) \
- HOSTCC=$(HOSTCC) CC=$(TARGET_CC) \
+ BUILD_CC=$(HOSTCC) HOSTCC=$(HOSTCC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
diff --git a/make/newt.mk b/make/newt.mk
index d8208ac29a..04c5c8b7c8 100644
--- a/make/newt.mk
+++ b/make/newt.mk
@@ -23,9 +23,11 @@ $(NEWT_DIR)/.source: $(DL_DIR)/$(NEWT_SOURCE)
$(NEWT_DIR)/.configured: $(NEWT_DIR)/.source
(cd $(NEWT_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
diff --git a/make/ntp.mk b/make/ntp.mk
index e7c820aeb8..5b3b94fb9f 100644
--- a/make/ntp.mk
+++ b/make/ntp.mk
@@ -24,9 +24,11 @@ $(NTP_DIR)/.unpacked: $(DL_DIR)/$(NTP_SOURCE)
$(NTP_DIR)/.configured: $(NTP_DIR)/.unpacked
(cd $(NTP_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
diff --git a/make/openssh.mk b/make/openssh.mk
index 21a04c2a7b..af7b129949 100644
--- a/make/openssh.mk
+++ b/make/openssh.mk
@@ -7,24 +7,29 @@
OPENSSH_SITE:=ftp://ftp.tux.org/bsd/openbsd/OpenSSH/portable/
OPENSSH_DIR:=$(BUILD_DIR)/openssh-3.5p1
OPENSSH_SOURCE:=openssh-3.5p1.tar.gz
+OPENSSH_PATCH:=$(SOURCE_DIR)/openssh.patch
$(DL_DIR)/$(OPENSSH_SOURCE):
$(WGET) -P $(DL_DIR) $(OPENSSH_SITE)/$(OPENSSH_SOURCE)
-$(OPENSSH_DIR)/.unpacked: $(DL_DIR)/$(OPENSSH_SOURCE)
+$(OPENSSH_DIR)/.unpacked: $(DL_DIR)/$(OPENSSH_SOURCE) $(OPENSSH_PATCH)
zcat $(DL_DIR)/$(OPENSSH_SOURCE) | tar -C $(BUILD_DIR) -xvf -
+ cat $(OPENSSH_PATCH) | patch -p1 -d $(OPENSSH_DIR)
touch $(OPENSSH_DIR)/.unpacked
$(OPENSSH_DIR)/.configured: $(OPENSSH_DIR)/.unpacked
- (cd $(OPENSSH_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ (cd $(OPENSSH_DIR); rm -rf config.cache; autoconf; \
+ $(TARGET_CONFIGURE_OPTS) \
+ LD=$(TARGET_CROSS)gcc \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
- --libexecdir=/usr/lib \
+ --libexecdir=/usr/sbin \
--sysconfdir=/etc \
--datadir=/usr/share \
--localstatedir=/var \
diff --git a/make/openssl.mk b/make/openssl.mk
index 5bb67fca6b..a2416d26af 100644
--- a/make/openssl.mk
+++ b/make/openssl.mk
@@ -6,8 +6,8 @@
# TARGETS
OPENSSL_SITE:=http://www.openssl.org/source
-OPENSSL_SOURCE:=openssl-0.9.7.tar.gz
-OPENSSL_DIR:=$(BUILD_DIR)/openssl-0.9.7
+OPENSSL_SOURCE:=openssl-0.9.7a.tar.gz
+OPENSSL_DIR:=$(BUILD_DIR)/openssl-0.9.7a
OPENSSL_PATCH=$(SOURCE_DIR)/openssl.patch
$(DL_DIR)/$(OPENSSL_SOURCE):
diff --git a/make/patch.mk b/make/patch.mk
index 4f7329f6b1..e8ceec1ad6 100644
--- a/make/patch.mk
+++ b/make/patch.mk
@@ -21,9 +21,11 @@ $(GNUPATCH_DIR)/.unpacked: $(DL_DIR)/$(GNUPATCH_SOURCE)
$(GNUPATCH_DIR)/.configured: $(GNUPATCH_DIR)/.unpacked
(cd $(GNUPATCH_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
diff --git a/make/pciutils.mk b/make/pciutils.mk
index 8daf033f7b..ede63c12af 100644
--- a/make/pciutils.mk
+++ b/make/pciutils.mk
@@ -28,9 +28,11 @@ $(PCIUTILS_DIR)/.unpacked: $(DL_DIR)/$(PCIUTILS_SOURCE) $(DL_DIR)/$(PCIIDS_SOURC
$(PCIUTILS_DIR)/.configured: $(PCIUTILS_DIR)/.unpacked
(cd $(PCIUTILS_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
diff --git a/make/pcmcia.mk b/make/pcmcia.mk
index 7dcc6f897f..bf94fed858 100644
--- a/make/pcmcia.mk
+++ b/make/pcmcia.mk
@@ -41,7 +41,7 @@ $(PCMCIA_DIR)/.patched: $(PCMCIA_DIR)/.unpacked
touch $(PCMCIA_DIR)/.patched
$(PCMCIA_DIR)/.configured: $(PCMCIA_DIR)/.patched
- ( cd $(PCMCIA_DIR) ; ./Configure --kernel=$(LINUX_DIR) --noprompt \
+ ( cd $(PCMCIA_DIR) ; ./Configure --kernel=$(LINUX_SOURCE_DIR) --noprompt \
--rcdir=/etc --arch=$(ARCH) --trust --srctree --nocardbus \
--sysv --kcc=$(HOSTCC) --ucc=$(TARGET_CC) --ld=$(TARGET_CROSS)ld \
--target=$(TARGET_DIR))
diff --git a/make/pppd.mk b/make/pppd.mk
index 81fa87b51b..6622543a9f 100644
--- a/make/pppd.mk
+++ b/make/pppd.mk
@@ -26,9 +26,11 @@ $(PPPD_DIR)/.unpacked: $(DL_DIR)/$(PPPD_SOURCE)
$(PPPD_DIR)/.configured: $(PPPD_DIR)/.unpacked
(cd $(PPPD_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
diff --git a/make/rxvt.mk b/make/rxvt.mk
index 0d6e9732b4..a633547038 100644
--- a/make/rxvt.mk
+++ b/make/rxvt.mk
@@ -38,9 +38,11 @@ $(RXVT_DIR)/.unpacked: $(DL_DIR)/$(RXVT_SOURCE)
$(RXVT_DIR)/.configured: $(RXVT_DIR)/.unpacked
(cd $(RXVT_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr/X11R6 \
--mandir=/usr/man \
--infodir=/usr/info \
diff --git a/make/sed.mk b/make/sed.mk
index 1b0b66577c..9220682de1 100644
--- a/make/sed.mk
+++ b/make/sed.mk
@@ -21,9 +21,11 @@ $(SED_DIR)/.unpacked: $(DL_DIR)/$(SED_SOURCE)
$(SED_DIR)/.configured: $(SED_DIR)/.unpacked
(cd $(SED_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
diff --git a/make/socat.mk b/make/socat.mk
index 92344d07ca..35bc6326f5 100644
--- a/make/socat.mk
+++ b/make/socat.mk
@@ -27,9 +27,11 @@ $(SOCAT_WORKDIR)/Makefile: $(SOCAT_DIR)/.unpacked
rm -f $(SOCAT_WORKDIR)/Makefile
mkdir -p $(SOCAT_WORKDIR)
(cd $(SOCAT_WORKDIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
$(SOCAT_DIR)/configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
diff --git a/make/strace.mk b/make/strace.mk
index fdca1ee0d0..ae4fe3d3ec 100644
--- a/make/strace.mk
+++ b/make/strace.mk
@@ -20,10 +20,11 @@ $(STRACE_DIR)/.unpacked: $(DL_DIR)/$(STRACE_SOURCE)
$(STRACE_DIR)/.configured: $(STRACE_DIR)/.unpacked
(cd $(STRACE_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
diff --git a/make/system-linux.mk b/make/system-linux.mk
index 9b92f083fd..6098cc6bc4 100644
--- a/make/system-linux.mk
+++ b/make/system-linux.mk
@@ -17,10 +17,26 @@ ifneq ($(filter $(TARGETS),system-linux),)
LINUX_SOURCE=/usr/src/linux
LINUX_DIR=$(BUILD_DIR)/linux
LINUX_KERNEL=$(BUILD_DIR)/buildroot-kernel
+# Used by pcmcia-cs and others
+LINUX_SOURCE_DIR=$(LINUX_SOURCE)
$(LINUX_DIR)/.configured:
- mkdir -p $(LINUX_DIR)
- (cd $(LINUX_DIR); ln -s $(LINUX_SOURCE)/include)
+ mkdir -p $(LINUX_DIR)/include
+ (cd $(LINUX_DIR)/include; \
+ for i in $(LINUX_SOURCE)/include/*; do ln -sf $$i ; done; \
+ rm -f asm; \
+ if [ "$(ARCH)" = "powerpc" ];then \
+ ln -fs asm-ppc asm; \
+ elif [ "$(ARCH)" = "mips" ];then \
+ ln -fs asm-mips asm; \
+ elif [ "$(ARCH)" = "mipsel" ];then \
+ ln -fs asm-mips asm; \
+ elif [ "$(ARCH)" = "cris" ];then \
+ ln -fs asm-cris asm; \
+ else ln -fs asm-$(ARCH) asm; \
+ fi)
+ cp $(LINUX_SOURCE)/Makefile $(LINUX_DIR)/
+ cp $(LINUX_SOURCE)/Rules.make $(LINUX_DIR)/
touch $(LINUX_DIR)/.configured
$(LINUX_KERNEL): $(LINUX_DIR)/.configured
@@ -28,13 +44,13 @@ $(LINUX_KERNEL): $(LINUX_DIR)/.configured
$(STAGING_DIR)/include/linux/version.h: $(LINUX_DIR)/.configured
mkdir -p $(STAGING_DIR)/include
rm -rf $(STAGING_DIR)/include/linux
- cp -dpa $(LINUX_SOURCE)/include/linux $(STAGING_DIR)/include/
+ cp -dpa $(LINUX_DIR)/include/linux $(STAGING_DIR)/include/
rm -rf $(STAGING_DIR)/include/asm
mkdir -p $(STAGING_DIR)/include/asm
- cp -dpa $(LINUX_SOURCE)/include/asm/* $(STAGING_DIR)/include/asm/
+ cp -dpa $(LINUX_DIR)/include/asm/* $(STAGING_DIR)/include/asm/
rm -rf $(STAGING_DIR)/include/scsi
mkdir -p $(STAGING_DIR)/include/scsi
- cp -dpa $(LINUX_SOURCE)/include/scsi/* $(STAGING_DIR)/include/scsi
+ cp -dpa $(LINUX_DIR)/include/scsi/* $(STAGING_DIR)/include/scsi
touch -c $(STAGING_DIR)/include/linux/version.h
system-linux: $(STAGING_DIR)/include/linux/version.h
diff --git a/make/tar.mk b/make/tar.mk
index 168f2543ba..a0213dd0aa 100644
--- a/make/tar.mk
+++ b/make/tar.mk
@@ -21,9 +21,11 @@ $(GNUTAR_DIR)/.unpacked: $(DL_DIR)/$(GNUTAR_SOURCE)
$(GNUTAR_DIR)/.configured: $(GNUTAR_DIR)/.unpacked
(cd $(GNUTAR_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
diff --git a/make/tn5250.mk b/make/tn5250.mk
index d37d4f4742..e443a4f4d7 100644
--- a/make/tn5250.mk
+++ b/make/tn5250.mk
@@ -11,9 +11,11 @@ $(TN5250_DIR)/.dist: $(DL_DIR)/$(TN5250_SOURCE)
$(TN5250_DIR)/.configured: $(TN5250_DIR)/.dist
(cd $(TN5250_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
diff --git a/make/uclibc_toolchain.mk b/make/uclibc_toolchain.mk
index 008d06ae7d..2027d7dd3f 100644
--- a/make/uclibc_toolchain.mk
+++ b/make/uclibc_toolchain.mk
@@ -137,6 +137,8 @@ $(BINUTILS_DIR1)/.configured: $(BINUTILS_DIR)/.patched
(cd $(BINUTILS_DIR1); CC=$(HOSTCC) \
$(BINUTILS_DIR)/configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_HOST_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=$(STAGING_DIR) \
--exec-prefix=$(STAGING_DIR) \
--bindir=$(STAGING_DIR)/bin \
@@ -248,6 +250,8 @@ $(GCC_BUILD_DIR1)/.configured: $(GCC_DIR)/.gcc_build_hacks
RANLIB=$(TARGET_CROSS)ranlib CC=$(HOSTCC) \
$(GCC_DIR)/configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_HOST_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=$(STAGING_DIR) \
--exec-prefix=$(STAGING_DIR) \
--bindir=$(STAGING_DIR)/bin \
@@ -401,6 +405,8 @@ $(GCC_BUILD_DIR2)/.configured: $(GCC_DIR)/.g++_build_hacks
NM=$(TARGET_CROSS)nm CC=$(HOSTCC) \
$(GCC_DIR)/configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_HOST_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=$(STAGING_DIR) \
--exec-prefix=$(STAGING_DIR) \
--bindir=$(STAGING_DIR)/bin \
diff --git a/make/uclibc_toolchain_2_95.mk b/make/uclibc_toolchain_2_95.mk
index b0d8d9c658..3335d0483d 100644
--- a/make/uclibc_toolchain_2_95.mk
+++ b/make/uclibc_toolchain_2_95.mk
@@ -145,6 +145,8 @@ $(BINUTILS_DIR1)/.configured: $(BINUTILS_DIR)/.patched
(cd $(BINUTILS_DIR1); CC=$(HOSTCC) \
$(BINUTILS_DIR)/configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_HOST_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=$(STAGING_DIR) \
--exec-prefix=$(STAGING_DIR) \
--bindir=$(STAGING_DIR)/bin \
@@ -267,6 +269,8 @@ $(GCC_BUILD_DIR1)/.configured: $(GCC_DIR)/.gcc_build_hacks
RANLIB=$(TARGET_CROSS)ranlib CC=$(HOSTCC) \
$(GCC_DIR)/configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_HOST_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=$(STAGING_DIR) \
--exec-prefix=$(STAGING_DIR) \
--bindir=$(STAGING_DIR)/bin \
@@ -456,6 +460,8 @@ $(GCC_BUILD_DIR2)/.configured: $(GCC_DIR)/.g++_build_hacks
NM=$(TARGET_CROSS)nm CC=$(HOSTCC) \
$(GCC_DIR)/configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_HOST_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=$(STAGING_DIR) \
--exec-prefix=$(STAGING_DIR) \
--bindir=$(STAGING_DIR)/bin \
diff --git a/make/user-mode-linux.mk b/make/user-mode-linux.mk
index 04ee8df346..3313912786 100644
--- a/make/user-mode-linux.mk
+++ b/make/user-mode-linux.mk
@@ -13,6 +13,8 @@ LINUX_PATCH_1:=uml-patch-$(LINUX_VERSION)-45.bz2
LINUX_PATCH_1_SITE:=http://telia.dl.sourceforge.net/sourceforge/user-mode-linux
LINUX_KCONFIG=$(SOURCE_DIR)/linux-uml.config
LINUX_KERNEL=$(BASE_DIR)/UMlinux
+# Used by pcmcia-cs and others
+LINUX_SOURCE_DIR=$(LINUX_DIR)
$(DL_DIR)/$(LINUX_SOURCE):
$(WGET) -P $(DL_DIR) $(LINUX_SITE)/$(LINUX_SOURCE)
diff --git a/make/valgrind.mk b/make/valgrind.mk
index 54c09ac285..f076369456 100644
--- a/make/valgrind.mk
+++ b/make/valgrind.mk
@@ -22,9 +22,11 @@ $(VALGRIND_DIR)/.patched: $(VALGRIND_DIR)/.unpacked
$(VALGRIND_DIR)/.configured: $(VALGRIND_DIR)/.patched
(cd $(VALGRIND_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
diff --git a/sources/openssh.patch b/sources/openssh.patch
new file mode 100644
index 0000000000..2fe19e3d54
--- /dev/null
+++ b/sources/openssh.patch
@@ -0,0 +1,135 @@
+diff -urN openssh-3.5p1.orig/configure.ac openssh-3.5p1/configure.ac
+--- openssh-3.5p1.orig/configure.ac 2002-09-25 18:38:47.000000000 -0600
++++ openssh-3.5p1/configure.ac 2003-03-04 04:54:47.000000000 -0700
+@@ -504,6 +504,9 @@
+ [
+ AC_MSG_RESULT(no)
+ AC_DEFINE(BROKEN_ONE_BYTE_DIRENT_D_NAME)
++ ],
++ [AC_MSG_RESULT(yes)
++ AC_MSG_WARN([Cannot run test when crosscompiling, defaulted to yes.])
+ ]
+ )
+
+@@ -535,6 +538,9 @@
+ [
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR([** Incomplete or missing s/key libraries.])
++ ],
++ [AC_MSG_RESULT(yes)
++ AC_MSG_WARN([Cannot run test when crosscompiling, defaulted to yes.])
+ ])
+ fi
+ ]
+@@ -676,6 +682,9 @@
+ AC_MSG_RESULT(no)
+ AC_DEFINE(BROKEN_SNPRINTF)
+ AC_MSG_WARN([****** Your snprintf() function is broken, complain to your vendor])
++ ],
++ [AC_MSG_RESULT(yes)
++ AC_MSG_WARN([Cannot run test when crosscompiling, defaulted to yes.])
+ ]
+ )
+ fi
+@@ -810,6 +819,10 @@
+ [
+ AC_MSG_RESULT(not found)
+ AC_MSG_ERROR(OpenSSL version header not found.)
++ ],
++ [
++ ssl_header_ver="90700f (OpenSSL 0.9.7a 19 Feb 2003)"
++ AC_MSG_WARN([Cannot run test when crosscompiling, defaulted to $ssl_header_ver])
+ ]
+ )
+
+@@ -843,6 +856,10 @@
+ [
+ AC_MSG_RESULT(not found)
+ AC_MSG_ERROR(OpenSSL library not found.)
++ ],
++ [
++ ssl_library_ver="90700f (OpenSSL 0.9.7a 19 Feb 2003)"
++ AC_MSG_WARN([Cannot run test when crosscompiling, defaulted to $ssl_library_ver])
+ ]
+ )
+
+@@ -860,6 +877,10 @@
+ [
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR(Your OpenSSL headers do not match your library)
++ ],
++ [
++ AC_MSG_RESULT(yes)
++ AC_MSG_WARN([Cannot run test when crosscompiling, defaulted to yes.])
+ ]
+ )
+
+@@ -889,6 +910,11 @@
+ # Default to use of the rand helper if OpenSSL doesn't
+ # seed itself
+ USE_RAND_HELPER=yes
++ ],
++ [
++ OPENSSL_SEEDS_ITSELF=yes
++ AC_MSG_RESULT(yes)
++ AC_MSG_WARN([Cannot run test when crosscompiling, defaulted to yes.])
+ ]
+ )
+
+@@ -1475,7 +1501,8 @@
+ #else
+ main() { exit(0); }
+ #endif
+- ], [ true ], [ AC_DEFINE(BROKEN_SNPRINTF) ]
++ ], [ true ], [ AC_DEFINE(BROKEN_SNPRINTF) ],
++ [ true ]
+ )
+ fi
+ AC_SUBST(NO_SFTP)
+@@ -1596,6 +1623,7 @@
+ }
+ ],
+ [ ac_cv_have_accrights_in_msghdr="yes" ],
++ [ ac_cv_have_accrights_in_msghdr="no" ],
+ [ ac_cv_have_accrights_in_msghdr="no" ]
+ )
+ ])
+@@ -1620,7 +1648,8 @@
+ }
+ ],
+ [ ac_cv_have_control_in_msghdr="yes" ],
+- [ ac_cv_have_control_in_msghdr="no" ]
++ [ ac_cv_have_control_in_msghdr="no" ],
++ [ ac_cv_have_control_in_msghdr="yes" ]
+ )
+ ])
+ if test "x$ac_cv_have_control_in_msghdr" = "xyes" ; then
+@@ -1931,13 +1960,14 @@
+ )
+ fi
+ fi
++if test "$cross_compiling" != yes; then
+ AC_CHECK_FILE("/dev/ptc",
+ [
+ AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC)
+ have_dev_ptc=1
+ ]
+ )
+-
++fi
+ # Options from here on. Some of these are preset by platform above
+ AC_ARG_WITH(mantype,
+ [ --with-mantype=man|cat|doc Set man page type],
+diff -urN openssh-3.5p1.orig/sshd_config openssh-3.5p1/sshd_config
+--- openssh-3.5p1.orig/sshd_config 2002-09-26 21:21:58.000000000 -0600
++++ openssh-3.5p1/sshd_config 2003-03-04 04:42:03.000000000 -0700
+@@ -89,5 +89,8 @@
+ #Banner /some/path
+ #VerifyReverseMapping no
+
++ClientAliveInterval 15
++ClientAliveCountMax 4
++
+ # override default of no subsystems
+-Subsystem sftp /usr/libexec/sftp-server
++Subsystem sftp /usr/sbin/sftp-server
diff --git a/sources/openssl.patch b/sources/openssl.patch
index 0be7965137..341f47e60f 100644
--- a/sources/openssl.patch
+++ b/sources/openssl.patch
@@ -66,17 +66,6 @@
#else
# define LOAD ld
# define X(i) [%i1+i*4]
---- openssl-0.9.7.orig/crypto/md5/md5.h
-+++ openssl-0.9.7/crypto/md5/md5.h
-@@ -78,7 +78,7 @@
-
- #if defined(OPENSSL_SYS_WIN16) || defined(__LP32__)
- #define MD5_LONG unsigned long
--#elif defined(OENSSL_SYS_CRAY) || defined(__ILP64__)
-+#elif defined(OPENSSL_SYS_CRAY) || defined(__ILP64__)
- #define MD5_LONG unsigned long
- #define MD5_LONG_LOG2 3
- /*
--- openssl-0.9.7.orig/crypto/opensslconf.h
+++ openssl-0.9.7/crypto/opensslconf.h
@@ -4,17 +4,38 @@
@@ -171,25 +160,6 @@
#endif
/* These default values were supplied by
---- openssl-0.9.7.orig/crypto/ui/ui_util.c
-+++ openssl-0.9.7/crypto/ui/ui_util.c
-@@ -78,12 +78,14 @@
- if (ui)
- {
- ok = UI_add_input_string(ui,prompt,0,buf,0,size-1);
-- if (ok == 0 && verify)
-+ if (ok >= 0 && verify)
- ok = UI_add_verify_string(ui,prompt,0,buff,0,size-1,
- buf);
-- if (ok == 0)
-+ if (ok >= 0)
- ok=UI_process(ui);
- UI_free(ui);
- }
-+ if (ok > 0)
-+ ok = 0;
- return(ok);
- }
--- openssl-0.9.7.orig/ssl/ssl_algs.c
+++ openssl-0.9.7/ssl/ssl_algs.c
@@ -109,3 +109,8 @@