Merge pull request #53539 from matthewbauer/darwin-fixes4

Fixes for recent darwin changes
This commit is contained in:
Matthew Bauer 2019-01-07 15:44:21 -06:00 committed by GitHub
commit 3cfdf8eb23
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 13 additions and 11 deletions

View file

@ -49,7 +49,7 @@ in stdenv.mkDerivation rec {
sed -i 's/os_trace(\(.*\)");$/printf(\1\\n");/g' ./projects/compiler-rt/lib/sanitizer_common/sanitizer_mac.cc
substituteInPlace CMakeLists.txt \
--replace 'set(_install_name_dir INSTALL_NAME_DIR "@rpath")' "set(_install_name_dir)" \
--replace 'set(CMAKE_INSTALL_NAME_DIR "@rpath")' "set(CMAKE_INSTALL_NAME_DIR "$out/lib")" \
--replace 'set(CMAKE_INSTALL_RPATH "@executable_path/../lib")' ""
''
+ ''

View file

@ -82,7 +82,7 @@ in stdenv.mkDerivation rec {
--replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)'
substituteInPlace CMakeLists.txt \
--replace 'set(_install_name_dir INSTALL_NAME_DIR "@rpath")' "set(_install_name_dir)" \
--replace 'set(CMAKE_INSTALL_NAME_DIR "@rpath")' "set(CMAKE_INSTALL_NAME_DIR "$lib/lib")" \
--replace 'set(CMAKE_INSTALL_RPATH "@executable_path/../lib")' ""
''
# Patch llvm-config to return correct library path based on --link-{shared,static}.

View file

@ -16,7 +16,8 @@ appleDerivation {
substituteInPlace adv_cmds.xcodeproj/project.pbxproj \
--replace "FD201DC214369B4200906237 /* pkill.c in Sources */," "" \
--replace "FDF278D60FC6204E00D7A3C6 /* locale.cc in Sources */," "" \
--replace '/usr/lib/libtermcap.dylib' 'libncurses.dylib'
--replace '/usr/lib/libtermcap.dylib' 'libncurses.dylib' \
--replace 'DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";' ""
'';
buildPhase = ''

View file

@ -18,14 +18,16 @@ appleDerivation {
cp xnu-*/bsd/i386/disklabel.h i386
cp -r xnu-*/bsd/sys System
cp -r Libc-*/uuid System
substituteInPlace diskdev_cmds.xcodeproj/project.pbxproj \
--replace 'DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";' ""
'';
installPhase = ''
install -D Products/Release/libdisk.a $out/lib/libdisk.a
rm Products/Release/libdisk.a
for f in Products/Release/*; do
if [ -f $f ]; then
install -D $file $out/bin/$(basename $f)
done
install -D $f $out/bin/$(basename $f)
fi
done
'';

View file

@ -21,8 +21,8 @@ appleDerivation rec {
installPhase = ''
for f in Products/Release/*; do
if [ -f $f ]; then
install -D $file $out/bin/$(basename $f)
done
install -D $f $out/bin/$(basename $f)
fi
done
for n in 1; do

View file

@ -22,7 +22,7 @@ appleDerivation rec {
installPhase = ''
for f in Products/Release/*; do
if [ -f $f ]; then
install -D $file $out/bin/$(basename $f)
install -D $f $out/bin/$(basename $f)
fi
done

View file

@ -11,9 +11,8 @@ stdenv.mkDerivation
nativeBuildInputs = [ xcbuildHook ];
installPhase =
''
prog=$(find . -type f -name insert_dylib)
mkdir -p $out/bin
install -m755 $prog $out/bin
install -m755 Products/Release/insert_dylib $out/bin
'';
meta.platforms = stdenv.lib.platforms.darwin;
}

View file

@ -98,7 +98,7 @@ in rec {
cp -d ${xz.out}/lib/liblzma*.* $out/lib
# Copy binutils.
for i in as ld ar ranlib nm strip otool install_name_tool dsymutil lipo; do
for i in as ld ar ranlib nm strip otool install_name_tool lipo; do
cp ${cctools_}/bin/$i $out/bin
done