File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
pkgs/development/interpreters/perl Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -106,12 +106,11 @@ stdenv.mkDerivation (rec {
106106 "-Dman1dir=${ placeholder "out" } /share/man/man1"
107107 "-Dman3dir=${ placeholder "out" } /share/man/man3"
108108 ] ++
109- ( if stdenv . hostPlatform . isStatic
109+ ( if ( stdenv . cc . targetPrefix != "" )
110110 then [
111111 "-Dcc=${ stdenv . cc . targetPrefix } cc"
112112 "-Dnm=${ stdenv . cc . targetPrefix } nm"
113113 "-Dar=${ stdenv . cc . targetPrefix } ar"
114- "-Uusedl"
115114 ]
116115 else [
117116 "-Dcc=cc"
@@ -123,6 +122,7 @@ stdenv.mkDerivation (rec {
123122 "-Dlocincpth=${ libcInc } /include"
124123 "-Dloclibpth=${ libcLib } /lib"
125124 ]
125+ ++ lib . optional stdenv . hostPlatform . isStatic "-Uusedl"
126126 ++ lib . optionals ( ( builtins . match ''5\.[0-9]*[13579]\..+'' version ) != null ) [ "-Dusedevel" "-Uversiononly" ]
127127 ++ lib . optional stdenv . hostPlatform . isSunOS "-Dcc=gcc"
128128 ++ lib . optional enableThreading "-Dusethreads"
@@ -135,7 +135,8 @@ stdenv.mkDerivation (rec {
135135
136136 configureScript = lib . optionalString ( ! crossCompiling ) "${ stdenv . shell } ./Configure" ;
137137
138- postConfigure = lib . optionalString stdenv . hostPlatform . isStatic ''
138+ # !canExecute cross uses miniperl which doesn't have this
139+ postConfigure = lib . optionalString ( ! crossCompiling && stdenv . cc . targetPrefix != "" ) ''
139140 substituteInPlace Makefile \
140141 --replace-fail "AR = ar" "AR = ${ stdenv . cc . targetPrefix } ar"
141142 '' ;
You can’t perform that action at this time.
0 commit comments