emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hard-coded paths to crt1.o and the like


From: Stefan Monnier
Subject: Re: Hard-coded paths to crt1.o and the like
Date: Tue, 12 Feb 2008 16:50:16 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux)

> I recently noticed that a particular embedded development system comes
> with a precompiled vim, but without emacs. Such an injustice! 8-)

Better stay away from such harmful environments ;-)

> It turns out there is probably a reason: I've been trying to compile
> emacs-22.1 with a cross-compiler, and also with different native
> compiler and library versions, and it's not straightforward.

Indeed.  Cross-compiling is rarely if ever used for Emacs, so it has
very little (to say the least) testing and people don't think too hard
about it when making changes.

I think the only case I've heard of is when building a x86 target on an
amd64 system (or an x86 system on an amd64 kernel).  There may be
related situations with other systems, tho.

> Apart from the following 'configure' parameter, cross-compiling and the like 
> does not seem to be documented:

>   ./configure --help
  
>   [...]
  
>   --host=HOST  cross-compile to build programs to run on HOST [BUILD]

Yes, that's all that should be needed [if we lived in a dreamworld,
that is].
  
> When using a native compiler, but a different libc version to the one
> that's already installed, the main hurdle seems to be the hard-coded
> references to the follwoing files.  That's also a problem when
> cross-compiling.

>   crt1.o
>   crti.o
>   crtn.o

Indeed.  Also, IIRC the configure script will occasionally *run* some
test programs to determine if some feature or bug is present, so that
may be another source of hurdles.

> Hard-coded paths in build scripts are always a bad idea (in my
> opinion).  Can someone introduce some environment variable that, if
> defined, would replace the hard-coded /usr/lib/ paths? That variable
> should be listed in "./configure --help", next to "LDFLAGS"
> and friends.

I'm not sure where those hardocded paths are located.  Also I'm
wondering if there may be a way to provide this info more generically
(e.g. if the /usr/lib should actually be found in /opt/url/lib we could
just provide a ROOT=/opt or something, maybe?).


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]