summary refs log tree commit diff
path: root/pkgs/development/tools
diff options
context:
space:
mode:
authorJohn Ericson <Ericson2314@yahoo.com>2018-04-19 17:00:05 -0400
committerGitHub <noreply@github.com>2018-04-19 17:00:05 -0400
commitcf0dd1dbd24ccb3b866f53cffb893105b178016f (patch)
treed3570a6afe0cf1bd55b068a287791627ed76d15c /pkgs/development/tools
parent3dd676c1af5c673b1cb3ea6dc2f61054ccdcd6e1 (diff)
parentef3db7d14c90e1876d38ebc25428b4f65962ffbc (diff)
downloadnixpkgs-cf0dd1dbd24ccb3b866f53cffb893105b178016f.tar
nixpkgs-cf0dd1dbd24ccb3b866f53cffb893105b178016f.tar.gz
nixpkgs-cf0dd1dbd24ccb3b866f53cffb893105b178016f.tar.bz2
nixpkgs-cf0dd1dbd24ccb3b866f53cffb893105b178016f.tar.lz
nixpkgs-cf0dd1dbd24ccb3b866f53cffb893105b178016f.tar.xz
nixpkgs-cf0dd1dbd24ccb3b866f53cffb893105b178016f.tar.zst
nixpkgs-cf0dd1dbd24ccb3b866f53cffb893105b178016f.zip
Merge pull request #39172 from obsidiansystems/ios-cross
 ios-sdk-pkgs: Init from iOS SDK from XCode
Diffstat (limited to 'pkgs/development/tools')
-rw-r--r--pkgs/development/tools/misc/binutils/default.nix10
-rw-r--r--pkgs/development/tools/misc/binutils/support-ios.patch112
2 files changed, 119 insertions, 3 deletions
diff --git a/pkgs/development/tools/misc/binutils/default.nix b/pkgs/development/tools/misc/binutils/default.nix
index 5c88902a68c..123f679d779 100644
--- a/pkgs/development/tools/misc/binutils/default.nix
+++ b/pkgs/development/tools/misc/binutils/default.nix
@@ -1,5 +1,5 @@
 { stdenv, buildPackages
-, fetchurl, zlib
+, fetchurl, zlib, autoreconfHook264
 , buildPlatform, hostPlatform, targetPlatform
 , noSysDirs, gold ? true, bison ? null
 }:
@@ -64,12 +64,16 @@ stdenv.mkDerivation rec {
 
     # https://sourceware.org/bugzilla/show_bug.cgi?id=22868
     ./gold-symbol-visibility.patch
-  ];
+  ] ++ stdenv.lib.optional targetPlatform.isiOS ./support-ios.patch;
 
   outputs = [ "out" "info" "man" ];
 
   depsBuildBuild = [ buildPackages.stdenv.cc ];
-  nativeBuildInputs = [ bison ];
+  nativeBuildInputs = [
+    bison
+  ] ++ stdenv.lib.optionals targetPlatform.isiOS [
+    autoreconfHook264
+  ];
   buildInputs = [ zlib ];
 
   inherit noSysDirs;
diff --git a/pkgs/development/tools/misc/binutils/support-ios.patch b/pkgs/development/tools/misc/binutils/support-ios.patch
new file mode 100644
index 00000000000..919a3920727
--- /dev/null
+++ b/pkgs/development/tools/misc/binutils/support-ios.patch
@@ -0,0 +1,112 @@
+diff --git a/bfd/config.bfd b/bfd/config.bfd
+index f04a993f06..3357022f35 100644
+--- a/bfd/config.bfd
++++ b/bfd/config.bfd
+@@ -238,7 +238,7 @@ case "${targ}" in
+ 
+ # START OF targmatch.h
+ #ifdef BFD64
+-  aarch64-*-darwin*)
++  aarch64-*-darwin* | aarch64-*-ios*)
+     targ_defvec=aarch64_mach_o_vec
+     targ_selvecs="arm_mach_o_vec mach_o_le_vec mach_o_be_vec mach_o_fat_vec"
+     targ_archs="$targ_archs bfd_i386_arch bfd_powerpc_arch bfd_rs6000_arch"
+@@ -358,7 +358,7 @@ case "${targ}" in
+     targ_selvecs=arc_elf32_be_vec
+     ;;
+ 
+-  arm-*-darwin*)
++  arm-*-darwin* | arm-*-ios*)
+     targ_defvec=arm_mach_o_vec
+     targ_selvecs="mach_o_le_vec mach_o_be_vec mach_o_fat_vec"
+     targ_archs="$targ_archs bfd_i386_arch bfd_powerpc_arch bfd_rs6000_arch"
+diff --git a/configure.ac b/configure.ac
+index aae94501e4..4b1121e0d1 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -510,7 +510,7 @@ if test x$enable_libgomp = x ; then
+ 	;;
+     *-*-solaris2* | *-*-hpux11*)
+ 	;;
+-    *-*-darwin* | *-*-aix*)
++    *-*-darwin* | *-*-ios* | *-*-aix*)
+ 	;;
+     nvptx*-*-*)
+ 	;;
+@@ -706,7 +706,7 @@ case "${target}" in
+     ;;
+   x86_64-*-darwin[[912]]*)
+     ;;
+-  *-*-darwin*)
++  *-*-darwin* | *-*-ios*)
+     noconfigdirs="$noconfigdirs target-libffi"
+     ;;
+   *-*-netware*)
+@@ -788,7 +788,7 @@ esac
+ # Disable the go frontend on systems where it is known to not work. Please keep
+ # this in sync with contrib/config-list.mk.
+ case "${target}" in
+-*-*-darwin* | *-*-cygwin* | *-*-mingw*)
++*-*-darwin* | *-*-ios* | *-*-cygwin* | *-*-mingw*)
+     unsupported_languages="$unsupported_languages go"
+     ;;
+ esac
+@@ -797,7 +797,7 @@ esac
+ # For testing, you can easily override this with --enable-libgo.
+ if test x$enable_libgo = x; then
+     case "${target}" in
+-    *-*-darwin*)
++    *-*-darwin* | *-*-ios*)
+ 	# PR 46986
+ 	noconfigdirs="$noconfigdirs target-libgo"
+ 	;;
+@@ -916,11 +916,11 @@ esac
+ case "${target}" in
+   *-*-chorusos)
+     ;;
+-  aarch64-*-darwin*)
++  aarch64-*-darwin* | aarch64-*-ios*)
+     noconfigdirs="$noconfigdirs ld gas gdb gprof"
+     noconfigdirs="$noconfigdirs sim target-rda"
+     ;;
+-  arm-*-darwin*)
++  arm-*-darwin* | arm-*-ios*)
+     noconfigdirs="$noconfigdirs ld gas gdb gprof"
+     noconfigdirs="$noconfigdirs sim target-rda"
+     ;;
+@@ -936,7 +936,7 @@ case "${target}" in
+     noconfigdirs="$noconfigdirs ld gas gprof"
+     noconfigdirs="$noconfigdirs sim target-rda"
+     ;;
+-  *-*-darwin*)
++  *-*-darwin* | *-*-ios*)
+     noconfigdirs="$noconfigdirs ld gas gdb gprof"
+     noconfigdirs="$noconfigdirs sim target-rda"
+     ;;
+@@ -1226,7 +1226,7 @@ case "${host}" in
+   hppa*-*)	
+     host_makefile_frag="config/mh-pa"
+     ;;
+-  *-*-darwin*)
++  *-*-darwin* | *-*-ios*)
+     host_makefile_frag="config/mh-darwin"
+     ;;
+   powerpc-*-aix*)
+@@ -1708,7 +1708,7 @@ ACX_ELF_TARGET_IFELSE([# ELF platforms build the lto-plugin always.
+   # warn during gcc/ subconfigure; unless you're bootstrapping with
+   # -flto it won't be needed until after installation anyway.
+     case $target in
+-      *-cygwin* | *-mingw* | *-apple-darwin* | *djgpp*) ;;
++      *-cygwin* | *-mingw* | *-apple-darwin* | *-apple-ios* | *djgpp*) ;;
+       *) if test x"$enable_lto" = x"yes"; then
+ 	AC_MSG_ERROR([LTO support is not enabled for this target.])
+         fi
+@@ -2590,7 +2590,7 @@ rm -f conftest*
+ # Decide which environment variable is used to find dynamic libraries.
+ case "${host}" in
+   *-*-hpux*) RPATH_ENVVAR=SHLIB_PATH ;;
+-  *-*-darwin*) RPATH_ENVVAR=DYLD_LIBRARY_PATH ;;
++  *-*-darwin* | *-*-ios* ) RPATH_ENVVAR=DYLD_LIBRARY_PATH ;;
+   *-*-mingw* | *-*-cygwin ) RPATH_ENVVAR=PATH ;;
+   *) RPATH_ENVVAR=LD_LIBRARY_PATH ;;
+ esac