identify musl32 using x86_32 instead of i686

This commit is contained in:
Walter Franzini 2019-06-08 00:40:28 +02:00 committed by Symphorien Gibol
parent 42e689e5bd
commit eabb56ac6c
2 changed files with 4 additions and 4 deletions

View File

@ -451,7 +451,7 @@ stdenv.mkDerivation {
hardening_unsupported_flags+=" stackprotector pic" hardening_unsupported_flags+=" stackprotector pic"
'' + optionalString (targetPlatform.libc == "newlib") '' '' + optionalString (targetPlatform.libc == "newlib") ''
hardening_unsupported_flags+=" stackprotector fortify pie pic" hardening_unsupported_flags+=" stackprotector fortify pie pic"
'' + optionalString (targetPlatform.libc == "musl" && targetPlatform.isi686) '' '' + optionalString (targetPlatform.libc == "musl" && targetPlatform.isx86_32) ''
hardening_unsupported_flags+=" stackprotector" hardening_unsupported_flags+=" stackprotector"
'' + optionalString targetPlatform.isNetBSD '' '' + optionalString targetPlatform.isNetBSD ''
hardening_unsupported_flags+=" stackprotector fortify" hardening_unsupported_flags+=" stackprotector fortify"

View File

@ -12,11 +12,11 @@ stdenv.mkDerivation rec {
separateDebugInfo = stdenv.isLinux && stdenv.hostPlatform.libc != "musl"; separateDebugInfo = stdenv.isLinux && stdenv.hostPlatform.libc != "musl";
enableParallelBuilding = true; enableParallelBuilding = true;
hardeningDisable = stdenv.lib.optional (stdenv.targetPlatform.isMusl && stdenv.targetPlatform.isi686) "stackprotector"; hardeningDisable = lib.optional (stdenv.targetPlatform.isMusl && stdenv.targetPlatform.isx86_32) "stackprotector";
# FIXME: the hardeingDisable attr above does not seems effective, so # FIXME: the hardeingDisable attr above does not seems effective, so
# the need to disable stackprotector via configureFlags # the need to disable stackprotector via configureFlags
configureFlags = stdenv.lib.optional (stdenv.targetPlatform.isMusl && stdenv.targetPlatform.isi686) "--disable-ssp"; configureFlags = lib.optional (stdenv.targetPlatform.isMusl && stdenv.targetPlatform.isx86_32) "--disable-ssp";
doCheck = true; doCheck = true;