Bug 11276 - build error: CONFIG_OPTIMIZE_INLINING=y causes gcc 4.2 to do stupid things
build error: CONFIG_OPTIMIZE_INLINING=y causes gcc 4.2 to do stupid things
Status: CLOSED CODE_FIX
Product: Drivers
Classification: Unclassified
Component: PNP
All Linux
: P1 normal
Assigned To: Adam Belay
:
Depends on:
Blocks: Regressions-2.6.26
  Show dependency treegraph
 
Reported: 2008-08-07 13:33 UTC by Rafael J. Wysocki
Modified: 2008-09-16 22:07 UTC (History)
3 users (show)

See Also:
Kernel Version: 2.6.27-rc2
Tree: Mainline
Regression: Yes


Attachments
Fix for build problem. (507 bytes, patch)
2008-09-16 14:29 UTC, David S. Miller
Details | Diff

Description Rafael J. Wysocki 2008-08-07 13:33:47 UTC
Subject    : build issue #549 for v2.6.27-rc2 :ixj.c:(.text+0x172b89): undefined reference to `pnp_get_resource'
Submitter  : Toralf Förster <toralf.foerster@gmx.de>
Date       : 2008-08-06 17:18
References : http://marc.info/?l=linux-kernel&m=121804329014332&w=4

This entry is being used for tracking a regression from 2.6.26.  Please don't
close it until the problem is fixed in the mainline.
Comment 1 Adrian Bunk 2008-08-08 03:50:33 UTC
Submitter       : Randy Dunlap <randy.dunlap@oracle.com>
References      : http://lkml.org/lkml/2008/7/22/353
                  http://lkml.org/lkml/2008/7/30/189
Handled-By      : Bjorn Helgaas <bjorn.helgaas@hp.com>
Patch           : http://lkml.org/lkml/2008/7/22/364


Caused by:

commit 3f9b5cc018566ad9562df0648395649aebdbc5e0
Author: Ingo Molnar <mingo@elte.hu>
Date:   Fri Jul 18 16:30:05 2008 +0200

    x86: re-enable OPTIMIZE_INLINING
    
    re-enable OPTIMIZE_INLINING more widely. Jeff Dike fixed the remaining
    outstanding issue in this commit:
Comment 2 Rafael J. Wysocki 2008-09-12 15:21:30 UTC
On Friday, 12 of September 2008, Randy Dunlap wrote:
> Rafael J. Wysocki wrote:
> > This message has been generated automatically as a part of a report
> > of recent regressions.
> > 
> > The following bug entry is on the current list of known regressions
> > from 2.6.26.  Please verify if it still should be listed and let me know
> > (either way).
> > 
> > 
> > Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=11276
> > Subject		: build error: CONFIG_OPTIMIZE_INLINING=y causes gcc 4.2 to do stupid things
> > Submitter	: Randy Dunlap <randy.dunlap@oracle.com>
> > Date		: 2008-08-06 17:18 (38 days old)
> > References	: http://marc.info/?l=linux-kernel&m=121804329014332&w=4
> > 		  http://lkml.org/lkml/2008/7/22/353
> > Handled-By	: Bjorn Helgaas <bjorn.helgaas@hp.com>
> > Patch		: http://lkml.org/lkml/2008/7/22/364
> 
> Yes, I still see this build error.

Comment 3 David S. Miller 2008-09-16 14:22:49 UTC
The way these PNP drivers deal with the CONFIG_PNP dependency
(they essentialy don't deal with it and depend upon some levels
of optimization when compiling the inline functions in linux/pnp.h)
is way too fragile to live.

Either we should add proper selects in the Kconfig files for these
drivers using the pnp_*() interfaces, or pnp.h should be refactored
so that it works no matter how the compiler decides to optimize or
not optimize constant compile time conditions.
Comment 4 David S. Miller 2008-09-16 14:29:13 UTC
Created attachment 17816 [details]
Fix for build problem.

This is the only sane way to fix this problem, if we are going to
provide dummy interfaces for PNP even when CONFIG_PNP is disabled,
we have to do so for all such referenced interfaces.
Comment 5 Adrian Bunk 2008-09-16 22:07:48 UTC
fixed by commit ef3d7714f6b75b51825ad0384b5ce48358427e50

Note You need to log in before you can comment on or make changes to this bug.