summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2014-08-04 08:09:44 -0500
committerAustin Seipp <austin@well-typed.com>2014-08-04 08:09:44 -0500
commit637978fa8a7dae97ff67551cb9d5c8fc3ac0fa9d (patch)
tree92be0d85577bea8d0753d6c7e5a192b1962ad728
parentdf1e77504b1c187415aa4e28c8912897064139b2 (diff)
downloadhaskell-637978fa8a7dae97ff67551cb9d5c8fc3ac0fa9d.tar.gz
Use 'install' command for 'inplace/' install as we do in 'make install'
Summary: On hardened gentoo ghc-stage2 does not work as-is, as it uses runtime code generation/loading, thus ghc0stage2 needs to be marked in a special way (via POSIX extened attributes). Before the patch we used 'cp -p' command, which does not preserve that marking. It leads to buid failure on hardened. Hardened's 'install' does preserve POSIX xattrs, thus patch uses it instead. 'inplace/' directory can be seen the same way as target for 'make install', thus using the same facilities to install files to 'inplace/' sounds more consistent. Reported-by: Jay Yang Gentoo-bug: https://bugs.gentoo.org/518734 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> Test Plan: tested ghc installation on vanilla and hardened distributions Reviewers: austin Reviewed By: austin Subscribers: phaskell, simonmar, relrod, ezyang, carter Differential Revision: https://phabricator.haskell.org/D108
-rw-r--r--rules/build-prog.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/rules/build-prog.mk b/rules/build-prog.mk
index 399369ecfb..ba1fa00f46 100644
--- a/rules/build-prog.mk
+++ b/rules/build-prog.mk
@@ -286,7 +286,7 @@ endif
ifeq "$(findstring clean,$(MAKECMDGOALS))" ""
ifeq "$$($1_$2_INSTALL_INPLACE)" "YES"
$$($1_$2_INPLACE) : $1/$2/build/tmp/$$($1_$2_PROG_INPLACE) | $$$$(dir $$$$@)/.
- "$$(CP)" -p $$< $$@
+ $$(INSTALL) -m 755 $$< $$@
endif
endif