Set the STRIP_CMD to ':' for dontStrip

(as mentioned in mk/build.mk.sample)
This commit is contained in:
Divam 2020-08-05 14:51:06 +09:00
parent b6c3c725c6
commit a9ac31c299
5 changed files with 30 additions and 10 deletions

View file

@ -55,7 +55,7 @@ let
(targetPlatform != hostPlatform)
"${targetPlatform.config}-";
buildMK = ''
buildMK = dontStrip: ''
BuildFlavour = ${ghcFlavour}
ifneq \"\$(BuildFlavour)\" \"\"
include mk/flavours/\$(BuildFlavour).mk
@ -68,6 +68,8 @@ let
HADDOCK_DOCS = NO
BUILD_SPHINX_HTML = NO
BUILD_SPHINX_PDF = NO
'' + stdenv.lib.optionalString dontStrip ''
STRIP_CMD = :
'' + stdenv.lib.optionalString (!enableProfiliedLibs) ''
GhcLibWays = "v dyn"
'' + stdenv.lib.optionalString enableRelocatedStaticLibs ''
@ -127,7 +129,7 @@ stdenv.mkDerivation (rec {
export READELF="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}readelf"
export STRIP="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}strip"
echo -n "${buildMK}" > mk/build.mk
echo -n "${buildMK dontStrip}" > mk/build.mk
sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
'' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}"
@ -211,6 +213,8 @@ stdenv.mkDerivation (rec {
hardeningDisable = [ "format" ] ++ stdenv.lib.optional stdenv.targetPlatform.isMusl "pie";
dontStrip = false;
postInstall = ''
# Install the bash completion file.
install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc

View file

@ -52,7 +52,7 @@ let
(targetPlatform != hostPlatform)
"${targetPlatform.config}-";
buildMK = ''
buildMK = dontStrip: ''
BuildFlavour = ${ghcFlavour}
ifneq \"\$(BuildFlavour)\" \"\"
include mk/flavours/\$(BuildFlavour).mk
@ -65,6 +65,8 @@ let
HADDOCK_DOCS = NO
BUILD_SPHINX_HTML = NO
BUILD_SPHINX_PDF = NO
'' + stdenv.lib.optionalString dontStrip ''
STRIP_CMD = :
'' + stdenv.lib.optionalString enableRelocatedStaticLibs ''
GhcLibHcOpts += -fPIC
GhcRtsHcOpts += -fPIC
@ -122,7 +124,7 @@ stdenv.mkDerivation (rec {
export READELF="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}readelf"
export STRIP="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}strip"
echo -n "${buildMK}" > mk/build.mk
echo -n "${buildMK dontStrip}" > mk/build.mk
sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
'' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}"
@ -206,6 +208,8 @@ stdenv.mkDerivation (rec {
hardeningDisable = [ "format" ] ++ stdenv.lib.optional stdenv.targetPlatform.isMusl "pie";
dontStrip = false;
postInstall = ''
# Install the bash completion file.
install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc

View file

@ -55,7 +55,7 @@ let
(targetPlatform != hostPlatform)
"${targetPlatform.config}-";
buildMK = ''
buildMK = dontStrip: ''
BuildFlavour = ${ghcFlavour}
ifneq \"\$(BuildFlavour)\" \"\"
include mk/flavours/\$(BuildFlavour).mk
@ -68,6 +68,8 @@ let
HADDOCK_DOCS = NO
BUILD_SPHINX_HTML = NO
BUILD_SPHINX_PDF = NO
'' + stdenv.lib.optionalString dontStrip ''
STRIP_CMD = :
'' + stdenv.lib.optionalString (!enableProfiliedLibs) ''
GhcLibWays = "v dyn"
'' + stdenv.lib.optionalString enableRelocatedStaticLibs ''
@ -127,7 +129,7 @@ stdenv.mkDerivation (rec {
export READELF="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}readelf"
export STRIP="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}strip"
echo -n "${buildMK}" > mk/build.mk
echo -n "${buildMK dontStrip}" > mk/build.mk
sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
'' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}"
@ -211,6 +213,8 @@ stdenv.mkDerivation (rec {
hardeningDisable = [ "format" ] ++ stdenv.lib.optional stdenv.targetPlatform.isMusl "pie";
dontStrip = false;
postInstall = ''
# Install the bash completion file.
install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc

View file

@ -55,7 +55,7 @@ let
(targetPlatform != hostPlatform)
"${targetPlatform.config}-";
buildMK = ''
buildMK = dontStrip: ''
BuildFlavour = ${ghcFlavour}
ifneq \"\$(BuildFlavour)\" \"\"
include mk/flavours/\$(BuildFlavour).mk
@ -68,6 +68,8 @@ let
HADDOCK_DOCS = NO
BUILD_SPHINX_HTML = NO
BUILD_SPHINX_PDF = NO
'' + stdenv.lib.optionalString dontStrip ''
STRIP_CMD = :
'' + stdenv.lib.optionalString (!enableProfiliedLibs) ''
GhcLibWays = "v dyn"
'' + stdenv.lib.optionalString enableRelocatedStaticLibs ''
@ -127,7 +129,7 @@ stdenv.mkDerivation (rec {
export READELF="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}readelf"
export STRIP="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}strip"
echo -n "${buildMK}" > mk/build.mk
echo -n "${buildMK dontStrip}" > mk/build.mk
sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
'' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}"
@ -211,6 +213,8 @@ stdenv.mkDerivation (rec {
hardeningDisable = [ "format" ] ++ stdenv.lib.optional stdenv.targetPlatform.isMusl "pie";
dontStrip = false;
postInstall = ''
# Install the bash completion file.
install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc

View file

@ -58,7 +58,7 @@ let
(targetPlatform != hostPlatform)
"${targetPlatform.config}-";
buildMK = ''
buildMK = dontStrip: ''
BuildFlavour = ${ghcFlavour}
ifneq \"\$(BuildFlavour)\" \"\"
include mk/flavours/\$(BuildFlavour).mk
@ -71,6 +71,8 @@ let
HADDOCK_DOCS = NO
BUILD_SPHINX_HTML = NO
BUILD_SPHINX_PDF = NO
'' + stdenv.lib.optionalString dontStrip ''
STRIP_CMD = :
'' + stdenv.lib.optionalString enableRelocatedStaticLibs ''
GhcLibHcOpts += -fPIC
GhcRtsHcOpts += -fPIC
@ -132,7 +134,7 @@ stdenv.mkDerivation (rec {
export READELF="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}readelf"
export STRIP="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}strip"
echo -n "${buildMK}" > mk/build.mk
echo -n "${buildMK dontStrip}" > mk/build.mk
echo ${version} > VERSION
echo ${src.rev} > GIT_COMMIT_ID
./boot
@ -222,6 +224,8 @@ stdenv.mkDerivation (rec {
hardeningDisable = [ "format" ] ++ stdenv.lib.optional stdenv.targetPlatform.isMusl "pie";
dontStrip = false;
postInstall = ''
# Install the bash completion file.
install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc