H. Peter Anvin | 10 Jul 19:19 2007

Mucking with assembly files

I seem to always be the one with the kbuild corner cases...

As part of my x86 setup rewrite, there has been some concern that using
asm(".code16gcc"); isn't as safe as it should be (because of gcc
reordering), and making it safe apparently means disabling optimizations
that adds at least 5% to the code size.  Not really a huge deal, but
undesirable in the long run.

The alternative is to compile to a .s file and then inject ".code16gcc"
to the top of the .s file before assembling it into a .o file.  This
means overriding some of kbuild's implicit rules, and I'm not sure how
to do that cleanly.

	-hpa

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
Oleg Verych | 10 Jul 21:46 2007
Picon
Picon

Re: Mucking with assembly files

On Tue, Jul 10, 2007 at 10:19:14AM -0700, H. Peter Anvin wrote:
> I seem to always be the one with the kbuild corner cases...
> 
> As part of my x86 setup rewrite, there has been some concern that using
> asm(".code16gcc"); isn't as safe as it should be (because of gcc
> reordering), and making it safe apparently means disabling optimizations
> that adds at least 5% to the code size.  Not really a huge deal, but
> undesirable in the long run.
> 
> The alternative is to compile to a .s file and then inject ".code16gcc"
> to the top of the .s file before assembling it into a .o file.  This
> means overriding some of kbuild's implicit rules, and I'm not sure how
> to do that cleanly.

As part of my kbuild/kconfig pre-rewrite info collecting... whatever :)

I did asm-offsets build rewrite RFC four week ago:
<http://mid.gmane.org/20070612234558.648949000 <at> flower.upol.cz>

You may be interested in it. But Sam is busy, nothing happend since
then.
____

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
Mike Frysinger | 10 Jul 23:30 2007
Picon

help text on choices

ive always wondered about this but never got around to asking ;)

is the help text on the top level choice supposed to be usable ?  for example:
choice
    prompt "you [may] have a choice"
    default YES
    help
      This help text is never viewable :(
config YES
    bool "yes"
    help
      This help text is viewable when "yes" is selected.
config NO
    bool "no"
    help
      This help text is viewable when "no" is selected.
endchoice

if you highlight the "you [may] have a choice" and query help, you get
no output ... but if you go into the choice selection and query help
on the options, you can view the help text for those individual ones.
generally i like to put an overview in the choice help and explain
each option in depth in the individual choices.
-mike

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
(Continue reading)

Sam Ravnborg | 14 Jul 21:01 2007

Re: Mucking with assembly files

On Tue, Jul 10, 2007 at 10:19:14AM -0700, H. Peter Anvin wrote:
> I seem to always be the one with the kbuild corner cases...
> 
> As part of my x86 setup rewrite, there has been some concern that using
> asm(".code16gcc"); isn't as safe as it should be (because of gcc
> reordering), and making it safe apparently means disabling optimizations
> that adds at least 5% to the code size.  Not really a huge deal, but
> undesirable in the long run.
> 
> The alternative is to compile to a .s file and then inject ".code16gcc"
> to the top of the .s file before assembling it into a .o file.  This
> means overriding some of kbuild's implicit rules, and I'm not sure how
> to do that cleanly.

Is this still relevant considering you adopted the -funit-at-a-time
proposal?

	Sam

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
Sam Ravnborg | 14 Jul 21:06 2007

Re: help text on choices

On Tue, Jul 10, 2007 at 04:30:30PM -0500, Mike Frysinger wrote:
> ive always wondered about this but never got around to asking ;)
> 
> is the help text on the top level choice supposed to be usable ?  for example:
> choice
>     prompt "you [may] have a choice"
>     default YES
>     help
>       This help text is never viewable :(
> config YES
>     bool "yes"
>     help
>       This help text is viewable when "yes" is selected.
> config NO
>     bool "no"
>     help
>       This help text is viewable when "no" is selected.
> endchoice
> 
> if you highlight the "you [may] have a choice" and query help, you get
> no output ... but if you go into the choice selection and query help
> on the options, you can view the help text for those individual ones.
> generally i like to put an overview in the choice help and explain
> each option in depth in the individual choices.

It is a menuconfig limitation. xconfig shows the helptext as one
would expect it to do.

See attached screenshot.

(Continue reading)

Sam Ravnborg | 14 Jul 21:07 2007

Re: Mucking with assembly files

On Tue, Jul 10, 2007 at 09:46:25PM +0200, Oleg Verych wrote:
> On Tue, Jul 10, 2007 at 10:19:14AM -0700, H. Peter Anvin wrote:
> > I seem to always be the one with the kbuild corner cases...
> > 
> > As part of my x86 setup rewrite, there has been some concern that using
> > asm(".code16gcc"); isn't as safe as it should be (because of gcc
> > reordering), and making it safe apparently means disabling optimizations
> > that adds at least 5% to the code size.  Not really a huge deal, but
> > undesirable in the long run.
> > 
> > The alternative is to compile to a .s file and then inject ".code16gcc"
> > to the top of the .s file before assembling it into a .o file.  This
> > means overriding some of kbuild's implicit rules, and I'm not sure how
> > to do that cleanly.
> 
> As part of my kbuild/kconfig pre-rewrite info collecting... whatever :)
> 
> I did asm-offsets build rewrite RFC four week ago:
> <http://mid.gmane.org/20070612234558.648949000 <at> flower.upol.cz>
> 
> You may be interested in it. But Sam is busy, nothing happend since
> then.

Just returned from a nice 2 week vacation with no Internet access
and no computer turned on (not counting the GPS).
And still lacking behind on other stuff too.

	Sam

-------------------------------------------------------------------------
(Continue reading)

H. Peter Anvin | 14 Jul 22:37 2007

Re: Mucking with assembly files

Sam Ravnborg wrote:
> 
> Is this still relevant considering you adopted the -funit-at-a-time
> proposal?
> 

Not at the moment, no.

	-hpa

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
H. Peter Anvin | 17 Jul 20:49 2007

arch/i386/boot rebuilt on every compile...

For some reason, everything in arch/i386/boot is rebuilt on every
compile.  It's not a huge time waster, but it has annoyed people enough
that they ask me about it.  version.o and setup.elf obviously would,
since they contain a version string, but none of the other .o files have
any obvious reason for being rebuild, and the .cmd files don't show any
dependencies that I would expect to be revved for each revision.

Help?

	-hpa

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
Sam Ravnborg | 17 Jul 22:27 2007

Re: arch/i386/boot rebuilt on every compile...

On Tue, Jul 17, 2007 at 11:49:42AM -0700, H. Peter Anvin wrote:
> For some reason, everything in arch/i386/boot is rebuilt on every
> compile.  It's not a huge time waster, but it has annoyed people enough
> that they ask me about it.  version.o and setup.elf obviously would,
> since they contain a version string, but none of the other .o files have
> any obvious reason for being rebuild, and the .cmd files don't show any
> dependencies that I would expect to be revved for each revision.
> 
> Help?

Seen it to - but were busy with other stuff.

If you do a
$ make V=2
Then you will notice that kbuild tells you that the .o files are built because
they are not listed in $(targets).

Reading the commonts in scripts/Kbuild.include it says:
"this is most likely a bug in your kbuild file".

So I did the following and it cured it:

[PATCH] x86: do not recompile boot for each build

Signed-off-by: Sam Ravnborg <sam <at> ravnborg.org>
---
diff --git a/arch/i386/boot/Makefile b/arch/i386/boot/Makefile
index 08678a0..93386a4 100644
--- a/arch/i386/boot/Makefile
+++ b/arch/i386/boot/Makefile
(Continue reading)

H. Peter Anvin | 17 Jul 22:30 2007

Re: arch/i386/boot rebuilt on every compile...

Sam Ravnborg wrote:
> 
> Seen it to - but were busy with other stuff.
> 
> If you do a
> $ make V=2
> Then you will notice that kbuild tells you that the .o files are built because
> they are not listed in $(targets).
> 

Thanks.  That was the missing bit.  Didn't know about V=2, that's quite
handy.

> Reading the commonts in scripts/Kbuild.include it says:
> "this is most likely a bug in your kbuild file".
> 
> So I did the following and it cured it:

Will merge.

	-hpa

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

Gmane