This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Don't run getconf on install if cross-compiling
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: libc-alpha at sourceware dot org
- Cc: roland at redhat dot com
- Date: Tue, 11 Sep 2007 22:51:19 +0000 (UTC)
- Subject: Don't run getconf on install if cross-compiling
The posix/Makefile rules for building $(inst_libexecdir)/getconf don't
work if cross-compiling (they involve running the newly built getconf)
and so should be disabled in that case, which this patch does. (The
failure was quiet until
2007-08-02 Roland McGrath <roland@redhat.com>
* posix/Makefile ($(inst_libexecdir)/getconf): Make hard links to
$(inst_bindir)/getconf if possible.
* posix/Makefile ($(objpfx)getconf.speclist): New target.
(generated): Add it.
($(inst_libexecdir)/getconf): Use it.
because the newly built program was run inside `` and its exit status
was lost, but now it causes make install to fail.)
2007-09-11 Joseph Myers <joseph@codesourcery.com>
* posix/Makefile (install-others-programs): Disable if
cross-compiling.
($(inst_libexecdir)/getconf, $(objpfx)getconf.speclist): Likewise.
Index: posix/Makefile
===================================================================
RCS file: /cvs/glibc/libc/posix/Makefile,v
retrieving revision 1.201
diff -u -r1.201 Makefile
--- posix/Makefile 4 Aug 2007 20:48:38 -0000 1.201
+++ posix/Makefile 11 Sep 2007 22:42:52 -0000
@@ -98,7 +98,9 @@
endif
others := getconf
install-bin := getconf
+ifeq (no,$(cross-compiling))
install-others-programs := $(inst_libexecdir)/getconf
+endif
before-compile := testcases.h ptestcases.h
@@ -291,6 +293,7 @@
$(objpfx)bug-glob2-mem: $(objpfx)bug-glob2.out
$(common-objpfx)malloc/mtrace $(objpfx)bug-glob2.mtrace > $@
+ifeq (no,$(cross-compiling))
$(inst_libexecdir)/getconf: $(inst_bindir)/getconf \
$(objpfx)getconf.speclist FORCE
$(addprefix $(..)./scripts/mkinstalldirs ,\
@@ -304,3 +307,4 @@
LC_ALL=C GETCONF_DIR=/dev/null \
$(run-program-prefix) $< _POSIX_V6_WIDTH_RESTRICTED_ENVS > $@.new
mv -f $@.new $@
+endif
--
Joseph S. Myers
joseph@codesourcery.com