Commit 637978fa authored by Sergei Trofimovich's avatar Sergei Trofimovich Committed by Austin Seipp
Browse files

Use 'install' command for 'inplace/' install as we do in 'make install'

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

Signed-off-by: default avatarSergei Trofimovich <>

Test Plan: tested ghc installation on vanilla and hardened distributions

Reviewers: austin

Reviewed By: austin

Subscribers: phaskell, simonmar, relrod, ezyang, carter

Differential Revision:
parent df1e7750
...@@ -286,7 +286,7 @@ endif ...@@ -286,7 +286,7 @@ endif
ifeq "$(findstring clean,$(MAKECMDGOALS))" "" ifeq "$(findstring clean,$(MAKECMDGOALS))" ""
ifeq "$$($1_$2_INSTALL_INPLACE)" "YES" ifeq "$$($1_$2_INSTALL_INPLACE)" "YES"
$$($1_$2_INPLACE) : $1/$2/build/tmp/$$($1_$2_PROG_INPLACE) | $$$$(dir $$$$@)/. $$($1_$2_INPLACE) : $1/$2/build/tmp/$$($1_$2_PROG_INPLACE) | $$$$(dir $$$$@)/.
"$$(CP)" -p $$< $$@ $$(INSTALL) -m 755 $$< $$@
endif endif
endif endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment