2009-02-20 08:46:43 +01:00
|
|
|
---
|
|
|
|
config.make.in | 1 +
|
|
|
|
configure | 16 +++++++++++++++-
|
|
|
|
configure.in | 1 +
|
|
|
|
posix/Makefile | 2 +-
|
|
|
|
sunrpc/Makefile | 2 +-
|
|
|
|
timezone/Makefile | 2 +-
|
|
|
|
6 files changed, 20 insertions(+), 4 deletions(-)
|
|
|
|
|
2012-04-13 11:37:44 +02:00
|
|
|
Index: glibc-2.15/config.make.in
|
2009-11-16 09:54:19 +01:00
|
|
|
===================================================================
|
2012-04-13 11:37:44 +02:00
|
|
|
--- glibc-2.15.orig/config.make.in
|
|
|
|
+++ glibc-2.15/config.make.in
|
|
|
|
@@ -100,6 +100,7 @@ add-ons = @add_ons@
|
2009-02-20 08:46:43 +01:00
|
|
|
add-on-subdirs = @add_on_subdirs@
|
|
|
|
sysdeps-add-ons = @sysdeps_add_ons@
|
|
|
|
cross-compiling = @cross_compiling@
|
|
|
|
+compiled-binaries-can-run-on-buildhost = @compiled_binaries_can_run_on_buildhost@
|
|
|
|
force-install = @force_install@
|
|
|
|
|
|
|
|
# Build tools.
|
2012-04-13 11:37:44 +02:00
|
|
|
Index: glibc-2.15/configure.in
|
2011-05-24 17:08:51 +02:00
|
|
|
===================================================================
|
2012-04-13 11:37:44 +02:00
|
|
|
--- glibc-2.15.orig/configure.in
|
|
|
|
+++ glibc-2.15/configure.in
|
|
|
|
@@ -15,6 +15,7 @@ if test $host != $build; then
|
2011-05-24 17:08:51 +02:00
|
|
|
AC_CHECK_PROGS(BUILD_CC, gcc cc)
|
|
|
|
fi
|
|
|
|
AC_SUBST(cross_compiling)
|
|
|
|
+AC_SUBST(compiled_binaries_can_run_on_buildhost)
|
|
|
|
AC_PROG_CPP
|
|
|
|
# We need the C++ compiler only for testing.
|
|
|
|
AC_PROG_CXX
|
2012-04-13 11:37:44 +02:00
|
|
|
Index: glibc-2.15/configure
|
2009-11-16 09:54:19 +01:00
|
|
|
===================================================================
|
2012-04-13 11:37:44 +02:00
|
|
|
--- glibc-2.15.orig/configure
|
|
|
|
+++ glibc-2.15/configure
|
|
|
|
@@ -553,6 +553,7 @@ ac_clean_files=
|
2009-02-20 08:46:43 +01:00
|
|
|
ac_config_libobj_dir=.
|
|
|
|
LIBOBJS=
|
|
|
|
cross_compiling=no
|
|
|
|
+compiled_binaries_can_run_on_buildhost=yes
|
|
|
|
subdirs=
|
|
|
|
MFLAGS=
|
|
|
|
MAKEFLAGS=
|
2011-12-27 09:19:44 +01:00
|
|
|
@@ -706,6 +707,7 @@ CXXFLAGS
|
2009-05-27 12:39:38 +02:00
|
|
|
CXX
|
|
|
|
CPP
|
2009-02-20 08:46:43 +01:00
|
|
|
cross_compiling
|
|
|
|
+compiled_binaries_can_run_on_buildhost
|
2009-05-27 12:39:38 +02:00
|
|
|
BUILD_CC
|
|
|
|
OBJEXT
|
|
|
|
ac_ct_CC
|
2011-12-27 09:19:44 +01:00
|
|
|
@@ -1250,6 +1252,13 @@ do
|
2011-05-24 17:08:51 +02:00
|
|
|
as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
|
2009-02-20 08:46:43 +01:00
|
|
|
done
|
|
|
|
|
|
|
|
+# Check whether --enable-runbinaries was given.
|
|
|
|
+if test "${enable_runbinaries+set}" = set; then
|
|
|
|
+ enableval=$enable_runbinaries; compiled_binaries_can_run_on_buildhost=$enableval
|
|
|
|
+else
|
|
|
|
+ compiled_binaries_can_run_on_buildhost=yes
|
|
|
|
+fi
|
|
|
|
+
|
|
|
|
# There might be people who depend on the old broken behavior: `$host'
|
|
|
|
# used to hold the argument of --host etc.
|
|
|
|
# FIXME: To remove some day.
|
2011-12-27 09:19:44 +01:00
|
|
|
@@ -1265,6 +1274,7 @@ if test "x$host_alias" != x; then
|
2011-05-24 17:08:51 +02:00
|
|
|
If a cross compiler is detected then cross compile mode will be used" >&2
|
2009-02-20 08:46:43 +01:00
|
|
|
elif test "x$build_alias" != "x$host_alias"; then
|
|
|
|
cross_compiling=yes
|
|
|
|
+ compiled_binaries_can_run_on_buildhost=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2011-12-27 09:19:44 +01:00
|
|
|
@@ -1450,6 +1460,9 @@ Optional Features:
|
|
|
|
--enable-multi-arch enable single DSO with optimizations for multiple
|
|
|
|
architectures
|
2009-11-16 09:54:19 +01:00
|
|
|
--enable-nss-crypt enable libcrypt to use nss
|
2009-02-20 08:46:43 +01:00
|
|
|
+ --enable-runbinaries the compiled binaries should run on the buildhost because
|
|
|
|
+ it happens to have a compatible cpu
|
|
|
|
+
|
2011-05-24 17:08:51 +02:00
|
|
|
|
2009-02-20 08:46:43 +01:00
|
|
|
Optional Packages:
|
|
|
|
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
|
2012-04-13 11:37:44 +02:00
|
|
|
Index: glibc-2.15/posix/Makefile
|
2009-11-16 09:54:19 +01:00
|
|
|
===================================================================
|
2012-04-13 11:37:44 +02:00
|
|
|
--- glibc-2.15.orig/posix/Makefile
|
|
|
|
+++ glibc-2.15/posix/Makefile
|
2011-12-27 09:19:44 +01:00
|
|
|
@@ -320,7 +320,7 @@ $(inst_libexecdir)/getconf: $(inst_bindi
|
2009-02-20 08:46:43 +01:00
|
|
|
done < $(objpfx)getconf.speclist
|
|
|
|
|
|
|
|
$(objpfx)getconf.speclist: $(objpfx)getconf
|
|
|
|
-ifeq (no,$(cross-compiling))
|
|
|
|
+ifeq (yes,$(compiled-binaries-can-run-on-buildhost))
|
|
|
|
LC_ALL=C GETCONF_DIR=/dev/null \
|
2009-11-16 09:54:19 +01:00
|
|
|
$(run-program-prefix) $< _POSIX_V7_WIDTH_RESTRICTED_ENVS > $@.new
|
|
|
|
LC_ALL=C GETCONF_DIR=/dev/null \
|
2012-04-13 11:37:44 +02:00
|
|
|
Index: glibc-2.15/sunrpc/Makefile
|
2009-11-16 09:54:19 +01:00
|
|
|
===================================================================
|
2012-04-13 11:37:44 +02:00
|
|
|
--- glibc-2.15.orig/sunrpc/Makefile
|
|
|
|
+++ glibc-2.15/sunrpc/Makefile
|
2011-12-27 09:19:44 +01:00
|
|
|
@@ -108,7 +108,7 @@ otherlibs += $(nssobjdir)/libnss_files.a
|
2009-02-20 08:46:43 +01:00
|
|
|
$(resolvobjdir)/libresolv.a
|
|
|
|
endif
|
|
|
|
|
|
|
|
-ifeq (no,$(cross-compiling))
|
|
|
|
+ifeq (yes,$(compiled-binaries-can-run-on-buildhost))
|
|
|
|
# We can only build this library if we can run the rpcgen we build.
|
|
|
|
headers += $(rpcsvc:%.x=rpcsvc/%.h)
|
|
|
|
extra-libs := librpcsvc
|
2012-04-13 11:37:44 +02:00
|
|
|
Index: glibc-2.15/timezone/Makefile
|
2009-11-16 09:54:19 +01:00
|
|
|
===================================================================
|
2012-04-13 11:37:44 +02:00
|
|
|
--- glibc-2.15.orig/timezone/Makefile
|
|
|
|
+++ glibc-2.15/timezone/Makefile
|
2009-02-20 08:46:43 +01:00
|
|
|
@@ -69,7 +69,7 @@ installed-posixrules-file := $(firstword
|
|
|
|
$(addprefix $(inst_zonedir)/, \
|
|
|
|
$(posixrules-file)))
|
|
|
|
|
|
|
|
-ifeq ($(cross-compiling),no)
|
|
|
|
+ifeq (yes,$(compiled-binaries-can-run-on-buildhost))
|
|
|
|
# Don't try to install the zoneinfo files since we can't run zic.
|
|
|
|
install-others = $(addprefix $(inst_zonedir)/,$(zonenames) \
|
|
|
|
$(zonenames:%=posix/%) \
|