Merge pull request #53539 from matthewbauer/darwin-fixes4
Fixes for recent darwin changes
This commit is contained in:
commit
3cfdf8eb23
@ -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
|
sed -i 's/os_trace(\(.*\)");$/printf(\1\\n");/g' ./projects/compiler-rt/lib/sanitizer_common/sanitizer_mac.cc
|
||||||
|
|
||||||
substituteInPlace CMakeLists.txt \
|
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")' ""
|
--replace 'set(CMAKE_INSTALL_RPATH "@executable_path/../lib")' ""
|
||||||
''
|
''
|
||||||
+ ''
|
+ ''
|
||||||
|
@ -82,7 +82,7 @@ in stdenv.mkDerivation rec {
|
|||||||
--replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)'
|
--replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)'
|
||||||
|
|
||||||
substituteInPlace CMakeLists.txt \
|
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")' ""
|
--replace 'set(CMAKE_INSTALL_RPATH "@executable_path/../lib")' ""
|
||||||
''
|
''
|
||||||
# Patch llvm-config to return correct library path based on --link-{shared,static}.
|
# Patch llvm-config to return correct library path based on --link-{shared,static}.
|
||||||
|
@ -16,7 +16,8 @@ appleDerivation {
|
|||||||
substituteInPlace adv_cmds.xcodeproj/project.pbxproj \
|
substituteInPlace adv_cmds.xcodeproj/project.pbxproj \
|
||||||
--replace "FD201DC214369B4200906237 /* pkill.c in Sources */," "" \
|
--replace "FD201DC214369B4200906237 /* pkill.c in Sources */," "" \
|
||||||
--replace "FDF278D60FC6204E00D7A3C6 /* locale.cc 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 = ''
|
buildPhase = ''
|
||||||
|
@ -18,14 +18,16 @@ appleDerivation {
|
|||||||
cp xnu-*/bsd/i386/disklabel.h i386
|
cp xnu-*/bsd/i386/disklabel.h i386
|
||||||
cp -r xnu-*/bsd/sys System
|
cp -r xnu-*/bsd/sys System
|
||||||
cp -r Libc-*/uuid System
|
cp -r Libc-*/uuid System
|
||||||
|
substituteInPlace diskdev_cmds.xcodeproj/project.pbxproj \
|
||||||
|
--replace 'DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";' ""
|
||||||
'';
|
'';
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
install -D Products/Release/libdisk.a $out/lib/libdisk.a
|
install -D Products/Release/libdisk.a $out/lib/libdisk.a
|
||||||
rm Products/Release/libdisk.a
|
rm Products/Release/libdisk.a
|
||||||
for f in Products/Release/*; do
|
for f in Products/Release/*; do
|
||||||
if [ -f $f ]; then
|
if [ -f $f ]; then
|
||||||
install -D $file $out/bin/$(basename $f)
|
install -D $f $out/bin/$(basename $f)
|
||||||
done
|
fi
|
||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -21,8 +21,8 @@ appleDerivation rec {
|
|||||||
installPhase = ''
|
installPhase = ''
|
||||||
for f in Products/Release/*; do
|
for f in Products/Release/*; do
|
||||||
if [ -f $f ]; then
|
if [ -f $f ]; then
|
||||||
install -D $file $out/bin/$(basename $f)
|
install -D $f $out/bin/$(basename $f)
|
||||||
done
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
for n in 1; do
|
for n in 1; do
|
||||||
|
@ -22,7 +22,7 @@ appleDerivation rec {
|
|||||||
installPhase = ''
|
installPhase = ''
|
||||||
for f in Products/Release/*; do
|
for f in Products/Release/*; do
|
||||||
if [ -f $f ]; then
|
if [ -f $f ]; then
|
||||||
install -D $file $out/bin/$(basename $f)
|
install -D $f $out/bin/$(basename $f)
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -11,9 +11,8 @@ stdenv.mkDerivation
|
|||||||
nativeBuildInputs = [ xcbuildHook ];
|
nativeBuildInputs = [ xcbuildHook ];
|
||||||
installPhase =
|
installPhase =
|
||||||
''
|
''
|
||||||
prog=$(find . -type f -name insert_dylib)
|
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
install -m755 $prog $out/bin
|
install -m755 Products/Release/insert_dylib $out/bin
|
||||||
'';
|
'';
|
||||||
meta.platforms = stdenv.lib.platforms.darwin;
|
meta.platforms = stdenv.lib.platforms.darwin;
|
||||||
}
|
}
|
||||||
|
@ -98,7 +98,7 @@ in rec {
|
|||||||
cp -d ${xz.out}/lib/liblzma*.* $out/lib
|
cp -d ${xz.out}/lib/liblzma*.* $out/lib
|
||||||
|
|
||||||
# Copy binutils.
|
# 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
|
cp ${cctools_}/bin/$i $out/bin
|
||||||
done
|
done
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user