All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Nieuwenhuizen <janneke@gnu.org>
To: Daniel Kiper <dkiper@net-space.pl>
Cc: grub-devel@gnu.org
Subject: Re: [PATCH v2] grub-core: Build fixes for i386
Date: Wed, 26 May 2021 20:18:11 +0200	[thread overview]
Message-ID: <87v9751hr0.fsf@gnu.org> (raw)
In-Reply-To: <20210526150448.2xqk6k2vpmxovgi6@tomti.i.net-space.pl> (Daniel Kiper's message of "Wed, 26 May 2021 17:04:48 +0200")

Daniel Kiper writes:

Hello,

> Mostly nits... Please take a look below...

Great!

> On Tue, May 18, 2021 at 12:47:33PM +0200, Jan (janneke) Nieuwenhuizen wrote:
>> To reproduce, update the Grub source description in your local Guix
>
> s/Grub/GRUB/

Ok.

>> or install an x86 cross-build environment on x86-linux (32bit!) and
>
> s/32bit/32-bit/

Ok.

>> configure to cross build and make, e.g., do something like
>>
>>     ./configure \
>>        CC_FOR_BUILD=gcc \
>>        --build=i686-unknown-linux-gnu
>
> Missing "\" at the end of the line...

Fixed.

>> * grub-core/lib/i386/relocator64.S: Avoid x86_64 instructions on i386.
>
> Hmmm... What is this?

The "gitlog-to-changelog" scripts needs entries like this in order to
generate a GNU-compliant ChangeLog, see Emacs, LilyPond, Guile, Guix,
etc.  GRUB is the first GNU project that I encounter that has a
different take on this; sorry for missing that!

I have changed it to

--8<---------------cut here---------------start------------->8---
This fixes cross-compiling to x86 (e.g., the Hurd) from x86-linux of

    grub-core/lib/i386/relocator64.S

This file has six sections that only build with a 64-bit assembler,
yet only the first two sections had support for a 32-bit assembler;
this patch completes this for the remaining sections.
--8<---------------cut here---------------end--------------->8---

> And you should add your SOB at the end of commit message:
>
> Signed-off-by: Jan (janneke) Nieuwenhuizen <janneke@gnu.org>

Done.

And sorry; you asked that before.  I failed to do so because I only ever
encountered this use (e.g., quoting the Guix manual)

       When pushing a commit on behalf of somebody else, please add a
    ‘Signed-off-by’ line at the end of the commit log message—e.g., with
    ‘git am --signoff’.  This improves tracking of who did what.

and as I am the author, that would be redundant.

>> ---
>>  grub-core/lib/i386/relocator64.S | 27 +++++++++++++++++++++++++--
>>  1 file changed, 25 insertions(+), 2 deletions(-)
[..]
>> +	.byte 0x48
>> +        .byte 0x83
>> +        .byte 0xe4
>> +        .byte 0xf0
>
> Formatting is broken here...

Oops!  Apparently GRUB uses TAB characters.  Fixed!

(A .dir-locals.el file at the project root is often to avoid such
mistakes.)

>> +#ifdef	__x86_64__
>>  	movq	%rax, %rsi
>> -
>
> This and...
>
>> +#else
>> +	/* movq	%rax, %rsi */
>> +	.byte 	0x48
>> +	.byte	0x89
>> +	.byte 	0xc6
>> +#endif
>> +
>
> ... this change look strange. Could you fix it? Or explain in the
> commit message you are doing a cleanup by the way...

Hmm...what is it that looks strange here?  Obviously the MOV %RAX..
statement must be guarded and get a 32-bit alternative, and the empty
line after the move instruction now moves to the end of the block?

Greetings,
Janneke

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


  reply	other threads:[~2021-05-26 18:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-18 10:47 [PATCH v2] grub-core: Build fixes for i386 Jan (janneke) Nieuwenhuizen
2021-05-18 10:58 ` John Paul Adrian Glaubitz
2021-05-18 14:26   ` Daniel Kiper
2021-05-18 14:35     ` John Paul Adrian Glaubitz
2021-05-18 14:38       ` John Paul Adrian Glaubitz
2021-05-18 20:06 ` Matt Turner
2021-05-26 15:04 ` Daniel Kiper
2021-05-26 18:18   ` Jan Nieuwenhuizen [this message]
2021-05-27 14:27     ` Daniel Kiper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87v9751hr0.fsf@gnu.org \
    --to=janneke@gnu.org \
    --cc=dkiper@net-space.pl \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.