bug-mes
[Top][All Lists]
Advanced

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

Re: [bug-mes] mes target selection - currently hardcoded


From: Jan Nieuwenhuizen
Subject: Re: [bug-mes] mes target selection - currently hardcoded
Date: Mon, 04 Feb 2019 20:25:06 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Danny Milosavljevic writes:

Hi Danny,

>> maybe you got bitten by this too.
>
> Maybe!  That would explain a lot.  It was kinda spooky.

OK, if we keep something like this, we must be sure to propagate any
previously set --build,host,target.

> If we do touch the mechanism anyway, I'd add host, build and target.
>
> I'm not much of a fan of cross-compiling (after having it done for way too
> long), but there's no reason not to support it.  Especially for bootstrapping
> new architectures it is nice to AT FIRST bootstrap it using a cross compiler
> (if only to see whether it's working at all).
>
> So surprisingly, I advocate adding build, host and target, although I
> hopefully won't use a different target myself ;)

I fully agree; I did much too much of this myself too.

> In general, if anything, only the build system type could be usefully
> autodetected.

Yes.

> The host system type can default to the build system type (and I think
> that's good).

Sure.

> The target system type can default to the ... hmmmmmmmmmmm... host system
> type, I guess?  Not sure.

Autoconf info pages to the rescue: defaults to host.

> If host and target are the same but build is different, you are offloading
> for another system and want both the compiler you build and the executables
> it eventually generates to run on the "client" system that requested the
> offload.
>
> If build and host are equal but target is different, you are building
> for another system, but you want all the actual tools to run on your
> machine as much as possible (embedded developers use this because their
> targets have too little RAM to run dev tools--and certainly they can't
> run a compiler there).
>
> So I guess with autodetection it would be something like:
>
> <let the user set up build_system, host_system, target_system variables first>
>
> if [ -z $build_system ]
> then
>   build_system=`uname -m` # if we want it
>   echo "error">&2 # if we want that instead
>   exit 1 # if we want that
> fi
>
> if [ -z $host_system ]
> then
>   host_system=$build_system
> fi
>
> if [ -z $target_system ]
> then
>   target_system=$host_system
> fi
>
> Sometimes they call the gnu thing the "triple", so it would be build_triple, 
> maybe.
>
> On Guix we often use the Nix system type which is not a triple (example: 
> armhf-linux).

This makes sense, let's make it so!

janneke

-- 
Jan Nieuwenhuizen <address@hidden> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | AvatarĀ® http://AvatarAcademy.com



reply via email to

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