All of lore.kernel.org
 help / color / mirror / Atom feed
* [ppc patch] ASFLAGS and CFLAGS
@ 2004-10-16  0:48 Hollis Blanchard
  2004-10-16  9:34 ` Marco Gerards
  0 siblings, 1 reply; 7+ messages in thread
From: Hollis Blanchard @ 2004-10-16  0:48 UTC (permalink / raw)
  To: grub-devel

This patch adds -msoft-float to CFLAGS as discussed previously, and
replaces -fno-builtin with -ffreestanding (which according to gcc docs
implies -fno-builtin).

It also removes 2 flags from ASFLAGS that are meaningless for assembly
files.

I haven't yet resolved the genmk.rb issues with listing grubof in
sbin_UTILITIES. We don't want grubof to be an "IMAGE", as that does an
objcopy -O binary. So I think a new class is required in genmk.rb...
perhaps called pkgdata_ELF or so.

-Hollis

2004-10-15  Hollis Blanchard  <hollis@penguinppc.org>

	* conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -nostdinc
	and -fno-builtin.
	(COMMON_CFLAGS): Remove -D__ASSEMBLY__ and -fno-builtin; add
	-ffreestanding and -msoft-float.

Index: conf/powerpc-ieee1275.rmk
===================================================================
RCS file: /cvsroot/grub/grub2/conf/powerpc-ieee1275.rmk,v
retrieving revision 1.10
diff -u -p -r1.10 powerpc-ieee1275.rmk
--- conf/powerpc-ieee1275.rmk	22 Sep 2004 18:26:16 -0000	1.10
+++ conf/powerpc-ieee1275.rmk	16 Oct 2004 00:08:14 -0000
@@ -1,8 +1,8 @@
 
 # -*- makefile -*-
 
-COMMON_ASFLAGS = -nostdinc -fno-builtin -D__ASSEMBLY__
-COMMON_CFLAGS = -fno-builtin -D__ASSEMBLY__
+COMMON_ASFLAGS = -D__ASSEMBLY__
+COMMON_CFLAGS = -ffreestanding -msoft-float
 
 # Images.
 



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ppc patch] ASFLAGS and CFLAGS
  2004-10-16  0:48 [ppc patch] ASFLAGS and CFLAGS Hollis Blanchard
@ 2004-10-16  9:34 ` Marco Gerards
  2004-10-16 15:07   ` Hollis Blanchard
  0 siblings, 1 reply; 7+ messages in thread
From: Marco Gerards @ 2004-10-16  9:34 UTC (permalink / raw)
  To: The development of GRUB 2

Hollis Blanchard <hollis@penguinppc.org> writes:

> I haven't yet resolved the genmk.rb issues with listing grubof in
> sbin_UTILITIES. We don't want grubof to be an "IMAGE", as that does an
> objcopy -O binary. So I think a new class is required in genmk.rb...
> perhaps called pkgdata_ELF or so.

Perhaps you can prevent that when using the proper LDFLAGS for grubof
only.  I prefer that over what you did in this patch, if that also
fixes the problem.

Thanks,
Marco




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ppc patch] ASFLAGS and CFLAGS
  2004-10-16  9:34 ` Marco Gerards
@ 2004-10-16 15:07   ` Hollis Blanchard
  2004-10-17 16:36     ` Marco Gerards
  2004-10-17 20:30     ` Yoshinori K. Okuji
  0 siblings, 2 replies; 7+ messages in thread
From: Hollis Blanchard @ 2004-10-16 15:07 UTC (permalink / raw)
  To: The development of GRUB 2

On Oct 16, 2004, at 4:34 AM, Marco Gerards wrote:

> Hollis Blanchard <hollis@penguinppc.org> writes:
>
>> I haven't yet resolved the genmk.rb issues with listing grubof in
>> sbin_UTILITIES. We don't want grubof to be an "IMAGE", as that does an
>> objcopy -O binary. So I think a new class is required in genmk.rb...
>> perhaps called pkgdata_ELF or so.
>
> Perhaps you can prevent that when using the proper LDFLAGS for grubof
> only.  I prefer that over what you did in this patch, if that also
> fixes the problem.

I don't understand. There are a few problems:
- -msoft-float is missing from COMMON_CFLAGS
- COMMON_ASFLAGS contains C-specific flags (-nostdinc -fno-builtin)
- COMMON_CFLAGS contains assmebly-specific flags (-D__ASSEMBLY__)

My patch addresses all three problems, with the caveat that 
COMMON_ASFLAGS is not actually used yet. To use COMMON_ASFLAGS, we need 
to fix genmk.rb. Changing LDFLAGS would have no effect on the problems 
listed above.

-Hollis




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ppc patch] ASFLAGS and CFLAGS
  2004-10-16 15:07   ` Hollis Blanchard
@ 2004-10-17 16:36     ` Marco Gerards
  2004-10-17 20:30     ` Yoshinori K. Okuji
  1 sibling, 0 replies; 7+ messages in thread
From: Marco Gerards @ 2004-10-17 16:36 UTC (permalink / raw)
  To: The development of GRUB 2

Hollis Blanchard <hollis@penguinppc.org> writes:

> On Oct 16, 2004, at 4:34 AM, Marco Gerards wrote:
>
>> Hollis Blanchard <hollis@penguinppc.org> writes:
>>
>>> I haven't yet resolved the genmk.rb issues with listing grubof in
>>> sbin_UTILITIES. We don't want grubof to be an "IMAGE", as that does an
>>> objcopy -O binary. So I think a new class is required in genmk.rb...
>>> perhaps called pkgdata_ELF or so.
>>
>> Perhaps you can prevent that when using the proper LDFLAGS for grubof
>> only.  I prefer that over what you did in this patch, if that also
>> fixes the problem.
>
> I don't understand. There are a few problems:
> - -msoft-float is missing from COMMON_CFLAGS

I think the best thing is to add this until all code depending on this
is removed.

> - COMMON_ASFLAGS contains C-specific flags (-nostdinc -fno-builtin)

This is just copied from i386-pc.rmk.  I assume there was a good
reason for this so I copied this.  Please leave it there unless there
is a good reason to remove it or Okuji says it is not required.

> - COMMON_CFLAGS contains assmebly-specific flags (-D__ASSEMBLY__)

This is a stupid copy-paste mistake from me.

> My patch addresses all three problems, with the caveat that
> COMMON_ASFLAGS is not actually used yet. To use COMMON_ASFLAGS, we
> need to fix genmk.rb. Changing LDFLAGS would have no effect on the
> problems listed above.

The problem I talked about is that COMMON_ASFLAGS is not used.  You
are right genmk.rb might need to be fixed, I do not know.  But using
pkgdata_IMAGES would be the right thing to do, AFAIK.  The best thing
to do is fixing both issues.

Thanks,
Marco






^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ppc patch] ASFLAGS and CFLAGS
  2004-10-16 15:07   ` Hollis Blanchard
  2004-10-17 16:36     ` Marco Gerards
@ 2004-10-17 20:30     ` Yoshinori K. Okuji
  2004-10-17 21:41       ` Hollis Blanchard
  1 sibling, 1 reply; 7+ messages in thread
From: Yoshinori K. Okuji @ 2004-10-17 20:30 UTC (permalink / raw)
  To: The development of GRUB 2

On Saturday 16 October 2004 17:07, Hollis Blanchard wrote:
> - COMMON_ASFLAGS contains C-specific flags (-nostdinc -fno-builtin)

-fno-builtin is meaningless, but -nostdinc is not. Note that we use cpp 
for assembly preprocessing.

Okuji



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ppc patch] ASFLAGS and CFLAGS
  2004-10-17 20:30     ` Yoshinori K. Okuji
@ 2004-10-17 21:41       ` Hollis Blanchard
  2004-10-17 21:52         ` Yoshinori K. Okuji
  0 siblings, 1 reply; 7+ messages in thread
From: Hollis Blanchard @ 2004-10-17 21:41 UTC (permalink / raw)
  To: The development of GRUB 2

On Oct 17, 2004, at 3:30 PM, Yoshinori K. Okuji wrote:

> On Saturday 16 October 2004 17:07, Hollis Blanchard wrote:
>> - COMMON_ASFLAGS contains C-specific flags (-nostdinc -fno-builtin)
>
> -fno-builtin is meaningless, but -nostdinc is not. Note that we use cpp
> for assembly preprocessing.

Do you use "#include <file-living-in-/usr/include>" in an assembly file?

-Hollis




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ppc patch] ASFLAGS and CFLAGS
  2004-10-17 21:41       ` Hollis Blanchard
@ 2004-10-17 21:52         ` Yoshinori K. Okuji
  0 siblings, 0 replies; 7+ messages in thread
From: Yoshinori K. Okuji @ 2004-10-17 21:52 UTC (permalink / raw)
  To: The development of GRUB 2

On Sunday 17 October 2004 23:41, Hollis Blanchard wrote:
> Do you use "#include <file-living-in-/usr/include>" in an assembly
> file?

No, but I don't understand your question. If I use "#include <foo.h>", 
gcc tries to find foo.h from standard locations first, unless -nostdinc 
is used.

Okuji



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2004-10-17 21:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-16  0:48 [ppc patch] ASFLAGS and CFLAGS Hollis Blanchard
2004-10-16  9:34 ` Marco Gerards
2004-10-16 15:07   ` Hollis Blanchard
2004-10-17 16:36     ` Marco Gerards
2004-10-17 20:30     ` Yoshinori K. Okuji
2004-10-17 21:41       ` Hollis Blanchard
2004-10-17 21:52         ` Yoshinori K. Okuji

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.