From 7ec88bf6bd6a9dfe4faff8d559f6b7769fb90175 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Fri, 2 Oct 2009 12:45:13 +0000 Subject: [PATCH] emacs-23: apply the crt{1,i,n}.o patch only on Linux svn path=/nixpkgs/trunk/; revision=17603 --- pkgs/applications/editors/emacs-23/builder.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/editors/emacs-23/builder.sh b/pkgs/applications/editors/emacs-23/builder.sh index a975fa4601e..d04e7a4fdd3 100644 --- a/pkgs/applications/editors/emacs-23/builder.sh +++ b/pkgs/applications/editors/emacs-23/builder.sh @@ -1,14 +1,19 @@ source $stdenv/setup +# This hook is supposed to be run on Linux. It patches the proper locations of +# the crt{1,i,n}.o files into the build to ensure that Emacs is linked with +# *our* versions, not the ones found in the system, as it would do by default. +# On other platforms, this appears to be unnecessary. preConfigure() { + case "${system}" in + x86_64-linux) glibclibdir=lib64 ;; + i686-linux) glibclibdir=lib ;; + *) return; + esac + libc=$(cat ${NIX_GCC}/nix-support/orig-libc) echo "libc: $libc" - case "${system}" in - x86_64-*) glibclibdir=lib64 ;; - *) glibclibdir=lib ;; - esac - for i in src/s/*.h src/m/*.h; do substituteInPlace $i \ --replace /usr/${glibclibdir}/crt1.o $libc/${glibclibdir}/crt1.o \