about summary refs log tree commit diff
path: root/posix/Makefile
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2012-11-17 01:49:19 +0000
committerJoseph Myers <joseph@codesourcery.com>2012-11-17 01:49:19 +0000
commit531f1ae0a79b9c3a91654750b11d25b256d7215f (patch)
tree7c038bf7253a09342f858a9a002fc62b74cfd735 /posix/Makefile
parenta93f9cbc27a00f1bfe64b5ced19b8fde3bdbb1ea (diff)
downloadglibc-531f1ae0a79b9c3a91654750b11d25b256d7215f.tar.gz
glibc-531f1ae0a79b9c3a91654750b11d25b256d7215f.tar.xz
glibc-531f1ae0a79b9c3a91654750b11d25b256d7215f.zip
Generate /usr/libexec/getconf files when cross-compiling.
Diffstat (limited to 'posix/Makefile')
-rw-r--r--posix/Makefile14
1 files changed, 3 insertions, 11 deletions
diff --git a/posix/Makefile b/posix/Makefile
index 80fbf20321..5e0e886f83 100644
--- a/posix/Makefile
+++ b/posix/Makefile
@@ -298,15 +298,7 @@ $(inst_libexecdir)/getconf: $(inst_bindir)/getconf \
 	  mv -f $@/$$spec.new $@/$$spec; \
 	done < $(objpfx)getconf.speclist
 
-$(objpfx)getconf.speclist: $(objpfx)getconf
-ifeq (no,$(cross-compiling))
-	LC_ALL=C GETCONF_DIR=/dev/null \
-	$(run-program-prefix) $< _POSIX_V7_WIDTH_RESTRICTED_ENVS > $@.new
-	LC_ALL=C GETCONF_DIR=/dev/null \
-	$(run-program-prefix) $< _POSIX_V6_WIDTH_RESTRICTED_ENVS >> $@.new
-	LC_ALL=C GETCONF_DIR=/dev/null \
-	$(run-program-prefix) $< _XBS5_WIDTH_RESTRICTED_ENVS >> $@.new
-else
-	> $@.new
-endif
+$(objpfx)getconf.speclist: getconf-speclist.c posix-envs.def
+	$(compile.c) -E -o - \
+	    | sed -n -e '/@@@PRESENT_/s/@@@PRESENT_//p' > $@.new
 	mv -f $@.new $@