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

Re: Bug#184893: kernel-source-2.4.20: C3 compile options wrong for gcc 3.2



On Sat, Mar 15, 2003 at 10:27:27PM +0000, David Goodenough wrote:
> 
> Possibly, but it would appear that it does not honour the old directives,
> at least the code that is generated is different.  I generated kernels
> with the warnings and with a fixed Makefile and the generated kernels
> are of different size.

That's a bug in gcc-3.2.  In fact it seems that it doesn't respect
-falign-jumps at all:

gcc-3.2 -falign-labels=0 -falign-jumps=0 -S -O2 a.c

*****
int m();
int n();

int k(int l) {
	if (l == 3) {
		m();
		n();
		m();
		m();
		n();
	} else {
		n();
		n();
		n();
		m();
		m();
	}
	return 3;
}
*****
	.file	"b.c"
	.text
	.align 2
	.p2align 2,,3
.globl k
	.type	k,@function
k:
	pushl	%ebp
	movl	%esp, %ebp
	subl	$8, %esp
	cmpl	$3, 8(%ebp)
	je	.L4
	call	n
	call	n
	call	n
	call	m
	call	m
.L3:
	movl	$3, %eax
	leave
	ret
	.p2align 2,,3
.L4:
	call	m
	call	n
	call	m
	call	m
	call	n
	jmp	.L3
.Lfe1:
	.size	k,.Lfe1-k
	.ident	"GCC: (GNU) 3.2.1 20020924 (Debian prerelease)"
*****

Anyway, I'm closing this bug because the 2.4 kernels must still work
with gcc 2.95 which does not support -falign.
-- 
Debian GNU/Linux 3.0 is out! ( http://www.debian.org/ )
Email:  Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt



Reply to: