From d2aed129ead922899257bd3ff2e4a03746745f8c Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Mon, 7 Jul 2008 11:53:19 +0000 Subject: [PATCH] emacs: Link successfully on 64 bit. I'm using this expression on a Linux 64-bit installation that's been patched to use glibc 2.5, not the current version 2.7. My installation needs this patch and it looks sensible enough to me, but I've been told that others can install Emacs on 64 bit machines without this. Hopefully, this doesn't break anything. svn path=/nixpkgs/trunk/; revision=12303 --- pkgs/applications/editors/emacs-22/builder.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/editors/emacs-22/builder.sh b/pkgs/applications/editors/emacs-22/builder.sh index 6bb6c54a5b8..fe32b10e914 100644 --- a/pkgs/applications/editors/emacs-22/builder.sh +++ b/pkgs/applications/editors/emacs-22/builder.sh @@ -5,11 +5,16 @@ preConfigure() { 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/lib/crt1.o $libc/lib/crt1.o \ - --replace /usr/lib/crti.o $libc/lib/crti.o \ - --replace /usr/lib/crtn.o $libc/lib/crtn.o + --replace /usr/${glibclibdir}/crt1.o $libc/${glibclibdir}/crt1.o \ + --replace /usr/${glibclibdir}/crti.o $libc/${glibclibdir}/crti.o \ + --replace /usr/${glibclibdir}/crtn.o $libc/${glibclibdir}/crtn.o done for i in Makefile.in ./src/Makefile.in ./lib-src/Makefile.in ./leim/Makefile.in; do