From de8bbafb53845d7b216dc936f15cdcf2436f7d33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Fri, 13 Mar 2009 16:46:10 +0000 Subject: [PATCH] Adding -fPIC code for static library code in perl and vxl, for x86_64. svn path=/nixpkgs/trunk/; revision=14526 --- pkgs/development/interpreters/perl-5.10/default.nix | 2 ++ pkgs/development/libraries/vxl/default.nix | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/pkgs/development/interpreters/perl-5.10/default.nix b/pkgs/development/interpreters/perl-5.10/default.nix index cb479c97be20..486bb8f54845 100644 --- a/pkgs/development/interpreters/perl-5.10/default.nix +++ b/pkgs/development/interpreters/perl-5.10/default.nix @@ -9,6 +9,8 @@ stdenv.mkDerivation { sha256 = "0bivbz15x02m02gqs6hs77cgjr2msfrhnvp5xqk359jg6w6llill"; }; + NIX_CFLAGS_COMPILE = if stdenv.system == "x86_64-linux" then "-fPIC" else ""; + patches = [ # This patch does the following: # 1) Do use the PATH environment variable to find the `pwd' command. diff --git a/pkgs/development/libraries/vxl/default.nix b/pkgs/development/libraries/vxl/default.nix index 7cdb6963cd25..652c423fd7ef 100644 --- a/pkgs/development/libraries/vxl/default.nix +++ b/pkgs/development/libraries/vxl/default.nix @@ -9,6 +9,12 @@ stdenv.mkDerivation { buildInputs = [ cmake unzip libtiff expat zlib libpng libjpeg ]; + cmakeFlags = if (stdenv.system == "x86_64-linux") then + "-DCMAKE_CXX_FLAGS=-fPIC -DCMAKE_C_FLAGS=-fPIC" + else + ""; + + meta = { description = "C++ Libraries for Computer Vision Research and Implementation"; homepage = http://vxl.sourceforge.net/;