androidndk-pkgs: Fix cc-wrapper flags

(cherry picked from commit 5f4bf240f51124ffa19a5fa0ac48bf144768d9ff)
This commit is contained in:
Ken Micklas 2019-04-02 12:45:37 -04:00 committed by Matthew Bauer
parent 11a6d01db6
commit f2bb67c806

View file

@ -100,8 +100,7 @@ rec {
$out/bin/${stdenv.targetPlatform.config}-c++ \
$out/bin/${stdenv.targetPlatform.config}-gcc \
$out/bin/${stdenv.targetPlatform.config}-g++ \
-e '130i extraBefore+=(-Wl,--fix-cortex-a8)' \
-e 's|^(extraBefore=)\(\)$|\1(${builtins.toString flags})|'
-e 's|^(extraBefore=)\((.*)\)$|\1(\2 -Wl,--fix-cortex-a8 ${builtins.toString flags})|'
'')
# GCC 4.9 is the first relase with "-fstack-protector"
+ lib.optionalString (lib.versionOlder targetInfo.gccVer "4.9") ''