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 18:36:21 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Danny Milosavljevic writes:

Hi Danny,

> currently, a lot of the configure script parts in mes assume that 32 bit x86 
> is
> the target/testing architecture.

Yes, I even see references of MES_SEED, which is deprecated.

> It would be better if we mandated specifying the architecture instead of
> assuming a default.  That would make it easier for the user to see what's
> getting selected and why.

Specifying an architecture hasn't gotten much attention; esp. as even
x86_64 is not fully supported yet.

We also have to reconsider this GNUmakefile snippet

--8<---------------cut here---------------start------------->8---
.config.make:
        ${srcdir}/configure --prefix=$(prefix)
--8<---------------cut here---------------end--------------->8---

maybe you got bitten by this too.

> If we wanted to, we could also autodetect it as follows (but I would prefer
> if we didn't):

If we can think of a way to provide a good default then that's nice, but
I agree we should not do this at the cost of silently choosing the wrong
architecture like it is now.

> At least in GuixSD it is the case that if one adds the coreutils to the
> environment then the "uname" executable will return "armv7l" for arm.
>
> Example:
>
> $ guix environment -s armhf-linux --ad-hoc binutils coreutils
> [env]$ uname -m
> armv7l
>
> However, guile inside the environment will not (when using the system
> call) give you the same value.
>
> scheme@(guile-user)> (uname)
> $1 = #("Linux" "dayas" "4.20.0-gnu" "#1 SMP 1" "x86_64")

Ah, that's good to know.

> That's understandable because even after we emulate ARM for the executables,
> the Linux kernel is still the same as before and indeed runs on x86_64.
>
> Since we want to target non-Guix platforms it's probably not a good idea
> to rely on the above.

Yes, so let's postpone adding a default for now.

I think that means we need at least a --host flag on configure...but
what about --build?  Should we add them both?  Have HOST-TYPE default to
BUILD-TYPE?  WDYT?

> For reference, a list of unpushed patches to mes to make it use ARM
> follow:

Thanks!  Which reminds me: mescc currently takes a -m BITS option

  -m BITS             compile for BITS bits [32]

The idea was to mimick GCC and allow easy cross-compiling on intel
(32->64 and 64-32).  We can keep this for intel but it probably does
not make sense for ARM?

I think we need a true architecture flag on mescc.  Possibly mimick
configure and add

  --host=ARCH {armv4,x86,x86_64}

and have it default to what it got from configure.  WDYT?

Greetings,
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]