login
Header Space

 
 

Re: huge gcc 4.1.{0,1} __weak problem

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Jakub Jelinek <jakub@...>
Cc: Sam Ravnborg <sam@...>, Chris Knadle <Chris.Knadle@...>, Andrew Morton <akpm@...>, Adrian Bunk <bunk@...>, <venkatesh.pallipadi@...>, <davem@...>, <trini@...>, <mingo@...>, <tglx@...>, <hpa@...>, <linux-kernel@...>, <suresh.b.siddha@...>, Linus Torvalds <torvalds@...>, Sven-Haegar Koch <haegar@...>
Date: Friday, May 2, 2008 - 11:26 am

On Friday 02 May 2008 15:11:32 Jakub Jelinek wrote:
[snip]

I assume the GCC testsuite has the same generic problem, which is probably why 
it uses the -fdump-tree-optimized parameter to gcc. For example:

alistair@just:~$ cat test.c
void __attribute__((weak)) func(void)
{
    /* no code */
}

int main()
{
    func();
    return 0;
}

alistair@just:~$ gcc -O2 -fdump-tree-optimized test.c
alistair@just:~$ rm -f a.out
alistair@just:~$ cat test.c*.optimized | egrep "func \\(\\);"
  func ();

Ergo, my compiler isn't buggy. As this doesn't require a runtime test I think 
it would be OK for the kernel.

Of course, whether or not it's worth it is now debatable, given the 
information Sven-Haegar Koch provided (Debian's GCC version number is 
actually 4.1.2).

-- 
Cheers,
Alistair.

137/1 Warrender Park Road, Edinburgh, UK.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: huge gcc 4.1.{0,1} __weak problem, Chris Knadle, (Thu May 1, 7:55 pm)
Re: huge gcc 4.1.{0,1} __weak problem, Alistair John Strachan, (Fri May 2, 5:55 am)
Re: huge gcc 4.1.{0,1} __weak problem, Sven-Haegar Koch, (Fri May 2, 8:40 am)
Re: huge gcc 4.1.{0,1} __weak problem, Sam Ravnborg, (Fri May 2, 6:43 am)
Re: huge gcc 4.1.{0,1} __weak problem, Alistair John Strachan, (Fri May 2, 7:48 am)
Re: huge gcc 4.1.{0,1} __weak problem, Sam Ravnborg, (Fri May 2, 9:57 am)
Re: huge gcc 4.1.{0,1} __weak problem, Jeremy Fitzhardinge, (Fri May 2, 10:57 am)
Re: huge gcc 4.1.{0,1} __weak problem, Jakub Jelinek, (Fri May 2, 10:11 am)
Re: huge gcc 4.1.{0,1} __weak problem, Alistair John Strachan, (Fri May 2, 11:26 am)
Re: huge gcc 4.1.{0,1} __weak problem, Miquel van Smoorenburg, (Fri May 2, 5:19 am)
speck-geostationary