diff options
author | Marco Maggesi <maggesi@math.unifi.it> | 2012-06-06 20:44:11 +0000 |
---|---|---|
committer | Marco Maggesi <maggesi@math.unifi.it> | 2012-06-06 20:44:11 +0000 |
commit | cadc02cb2b101437dac600aeb1243d4671ef778d (patch) | |
tree | 4c8cdd79a40fd2c8c8dd0487ecf92d6145a82dbb /pkgs/development/compilers | |
parent | 4b2c3d52de9033506077fb87e0f0521ec00d1240 (diff) | |
download | nixpkgs-cadc02cb2b101437dac600aeb1243d4671ef778d.tar nixpkgs-cadc02cb2b101437dac600aeb1243d4671ef778d.tar.gz nixpkgs-cadc02cb2b101437dac600aeb1243d4671ef778d.tar.bz2 nixpkgs-cadc02cb2b101437dac600aeb1243d4671ef778d.tar.lz nixpkgs-cadc02cb2b101437dac600aeb1243d4671ef778d.tar.xz nixpkgs-cadc02cb2b101437dac600aeb1243d4671ef778d.tar.zst nixpkgs-cadc02cb2b101437dac600aeb1243d4671ef778d.zip |
Fix build of ocaml 3.12.1 on darwin
svn path=/nixpkgs/trunk/; revision=34373
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r-- | pkgs/development/compilers/ocaml/3.12.1-darwin-fix-configure.patch | 32 | ||||
-rw-r--r-- | pkgs/development/compilers/ocaml/3.12.1.nix | 3 |
2 files changed, 34 insertions, 1 deletions
diff --git a/pkgs/development/compilers/ocaml/3.12.1-darwin-fix-configure.patch b/pkgs/development/compilers/ocaml/3.12.1-darwin-fix-configure.patch new file mode 100644 index 00000000000..4b867bbb1e6 --- /dev/null +++ b/pkgs/development/compilers/ocaml/3.12.1-darwin-fix-configure.patch @@ -0,0 +1,32 @@ +diff -Nuar ocaml-3.12.1/configure ocaml-3.12.1-fix-configure/configure +--- ocaml-3.12.1/configure 2011-07-04 23:15:01.000000000 +0200 ++++ ocaml-3.12.1-fix-configure/configure 2012-06-06 22:20:40.000000000 +0200 +@@ -259,7 +259,7 @@ + bytecccompopts="-fno-defer-pop $gcc_warnings -DSHRINKED_GNUC" + mathlib="";; + *,*-*-darwin*) +- bytecccompopts="-fno-defer-pop -no-cpp-precomp $gcc_warnings" ++ bytecccompopts="-fno-defer-pop $gcc_warnings" + mathlib="" + # Tell gcc that we can use 32-bit code addresses for threaded code + # unless we are compiled for a shared library (-fPIC option) +@@ -739,7 +739,7 @@ + *,*,rhapsody,*) nativecccompopts="$gcc_warnings -DDARWIN_VERSION_6 $dl_defs" + if $arch64; then partialld="ld -r -arch ppc64"; fi;; + *,gcc*,cygwin,*) nativecccompopts="$gcc_warnings -U_WIN32";; +- amd64,gcc*,macosx,*) partialld="ld -r -arch x86_64";; ++ amd64,gcc*,macosx,*) partialld="ld -r";; + amd64,gcc*,solaris,*) partialld="ld -r -m elf_x86_64";; + *,gcc*,*,*) nativecccompopts="$gcc_warnings";; + esac +@@ -752,8 +752,8 @@ + asppprofflags='-pg -DPROFILING';; + alpha,*,*) as='as' + aspp='gcc -c';; +- amd64,*,macosx) as='as -arch x86_64' +- aspp='gcc -arch x86_64 -c';; ++ amd64,*,macosx) as='as' ++ aspp='gcc -c';; + amd64,*,solaris) as='as --64' + aspp='gcc -m64 -c';; + amd64,*,*) as='as' diff --git a/pkgs/development/compilers/ocaml/3.12.1.nix b/pkgs/development/compilers/ocaml/3.12.1.nix index 44fe2d139d8..66075d4a966 100644 --- a/pkgs/development/compilers/ocaml/3.12.1.nix +++ b/pkgs/development/compilers/ocaml/3.12.1.nix @@ -20,7 +20,8 @@ stdenv.mkDerivation rec { buildFlags = "world" + optionalString useNativeCompilers " bootstrap world.opt"; buildInputs = [ncurses] ++ optionals useX11 [ x11 ]; installTargets = "install" + optionalString useNativeCompilers " installopt"; - patchPhase = '' + patches = optionals stdenv.isDarwin [ ./3.12.1-darwin-fix-configure.patch ]; + preConfigure = '' CAT=$(type -tp cat) sed -e "s@/bin/cat@$CAT@" -i config/auto-aux/sharpbang ''; |