Merge pull request #39844 from obsidiansystems/cctools-cleanup
cctools, apple libiconv: Apple clean up for iOS cross
This commit is contained in:
commit
c377b21f83
@ -1,14 +1,14 @@
|
|||||||
{ stdenv, appleDerivation }:
|
{ stdenv, appleDerivation, autoreconfHook }:
|
||||||
|
|
||||||
appleDerivation {
|
appleDerivation {
|
||||||
preConfigure = "cd libiconv";
|
postUnpack = "sourceRoot=$sourceRoot/libiconv";
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
mv $out/lib/libiconv.dylib $out/lib/libiconv-nocharset.dylib
|
mv $out/lib/libiconv.dylib $out/lib/libiconv-nocharset.dylib
|
||||||
install_name_tool -id $out/lib/libiconv-nocharset.dylib $out/lib/libiconv-nocharset.dylib
|
${stdenv.cc.bintools.targetPrefix}install_name_tool -id $out/lib/libiconv-nocharset.dylib $out/lib/libiconv-nocharset.dylib
|
||||||
|
|
||||||
# re-export one useless symbol; ld will reject a dylib that only reexports other dylibs
|
# re-export one useless symbol; ld will reject a dylib that only reexports other dylibs
|
||||||
echo 'void dont_use_this(){}' | clang -dynamiclib -x c - -current_version 2.4.0 \
|
echo 'void dont_use_this(){}' | ${stdenv.cc.bintools.targetPrefix}clang -dynamiclib -x c - -current_version 2.4.0 \
|
||||||
-compatibility_version 7.0.0 -current_version 7.0.0 -o $out/lib/libiconv.dylib \
|
-compatibility_version 7.0.0 -current_version 7.0.0 -o $out/lib/libiconv.dylib \
|
||||||
-Wl,-reexport_library -Wl,$out/lib/libiconv-nocharset.dylib \
|
-Wl,-reexport_library -Wl,$out/lib/libiconv-nocharset.dylib \
|
||||||
-Wl,-reexport_library -Wl,$out/lib/libcharset.dylib
|
-Wl,-reexport_library -Wl,$out/lib/libcharset.dylib
|
||||||
|
@ -108,17 +108,15 @@ let
|
|||||||
# include_next "unistd.h"
|
# include_next "unistd.h"
|
||||||
#endif
|
#endif
|
||||||
EOF
|
EOF
|
||||||
'' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
|
|
||||||
sed -i -e 's|clang++|& -I${libcxx}/include/c++/v1|' cctools/autogen.sh
|
|
||||||
'' + stdenv.lib.optionalString useOld ''
|
|
||||||
cd cctools
|
cd cctools
|
||||||
|
'' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
|
||||||
|
sed -i -e 's|clang++|& -I${libcxx}/include/c++/v1|' autogen.sh
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# TODO: this builds an ld without support for LLVM's LTO. We need to teach it, but that's rather
|
# TODO: this builds an ld without support for LLVM's LTO. We need to teach it, but that's rather
|
||||||
# hairy to handle during bootstrap. Perhaps it could be optional?
|
# hairy to handle during bootstrap. Perhaps it could be optional?
|
||||||
preConfigure = stdenv.lib.optionalString (!useOld) ''
|
preConfigure = ''
|
||||||
cd cctools
|
|
||||||
'' + ''
|
|
||||||
sh autogen.sh
|
sh autogen.sh
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user