This commit is contained in:
129
glibc-compiled-binaries.diff
Normal file
129
glibc-compiled-binaries.diff
Normal file
@@ -0,0 +1,129 @@
|
||||
---
|
||||
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(-)
|
||||
|
||||
--- config.make.in
|
||||
+++ config.make.in
|
||||
@@ -90,6 +90,7 @@ add-ons = @add_ons@
|
||||
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.
|
||||
--- configure
|
||||
+++ configure
|
||||
@@ -567,6 +567,7 @@ ac_clean_files=
|
||||
ac_config_libobj_dir=.
|
||||
LIBOBJS=
|
||||
cross_compiling=no
|
||||
+compiled_binaries_can_run_on_buildhost=yes
|
||||
subdirs=
|
||||
MFLAGS=
|
||||
MAKEFLAGS=
|
||||
@@ -687,6 +688,7 @@ ac_ct_CC
|
||||
OBJEXT
|
||||
BUILD_CC
|
||||
cross_compiling
|
||||
+compiled_binaries_can_run_on_buildhost
|
||||
CPP
|
||||
CXX
|
||||
CXXFLAGS
|
||||
@@ -1180,6 +1182,13 @@ do
|
||||
{ (exit 1); exit 1; }; }
|
||||
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.
|
||||
@@ -1195,6 +1204,7 @@ if test "x$host_alias" != x; then
|
||||
If a cross compiler is detected then cross compile mode will be used." >&2
|
||||
elif test "x$build_alias" != "x$host_alias"; then
|
||||
cross_compiling=yes
|
||||
+ compiled_binaries_can_run_on_buildhost=no
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -1381,6 +1391,9 @@ Optional Features:
|
||||
VERSION
|
||||
--enable-all-warnings enable all useful warnings gcc can issue
|
||||
|
||||
+ --enable-runbinaries the compiled binaries should run on the buildhost because
|
||||
+ it happens to have a compatible cpu
|
||||
+
|
||||
Optional Packages:
|
||||
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
|
||||
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
|
||||
@@ -9212,6 +9225,7 @@ ac_ct_CC!$ac_ct_CC$ac_delim
|
||||
OBJEXT!$OBJEXT$ac_delim
|
||||
BUILD_CC!$BUILD_CC$ac_delim
|
||||
cross_compiling!$cross_compiling$ac_delim
|
||||
+compiled_binaries_can_run_on_buildhost!$compiled_binaries_can_run_on_buildhost$ac_delim
|
||||
CPP!$CPP$ac_delim
|
||||
CXX!$CXX$ac_delim
|
||||
CXXFLAGS!$CXXFLAGS$ac_delim
|
||||
@@ -9240,7 +9254,7 @@ PERL!$PERL$ac_delim
|
||||
INSTALL_INFO!$INSTALL_INFO$ac_delim
|
||||
_ACEOF
|
||||
|
||||
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
|
||||
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 98; then
|
||||
break
|
||||
elif $ac_last_try; then
|
||||
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
|
||||
--- configure.in
|
||||
+++ configure.in
|
||||
@@ -835,6 +835,7 @@ if test $host != $build; then
|
||||
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
|
||||
--- posix/Makefile
|
||||
+++ posix/Makefile
|
||||
@@ -301,7 +301,7 @@ $(inst_libexecdir)/getconf: $(inst_bindi
|
||||
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 \
|
||||
$(run-program-prefix) $< _POSIX_V6_WIDTH_RESTRICTED_ENVS > $@.new
|
||||
else
|
||||
--- sunrpc/Makefile
|
||||
+++ sunrpc/Makefile
|
||||
@@ -98,7 +98,7 @@ otherlibs += $(nssobjdir)/libnss_files.a
|
||||
$(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
|
||||
--- timezone/Makefile
|
||||
+++ timezone/Makefile
|
||||
@@ -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/%) \
|
Reference in New Issue
Block a user