* gcc confused about static inline. - route.c
@ 2005-03-28 21:23 cliff white
2005-03-28 21:41 ` Dave Jones
2005-03-28 21:53 ` Francois Romieu
0 siblings, 2 replies; 5+ messages in thread
From: cliff white @ 2005-03-28 21:23 UTC (permalink / raw)
To: jgarzik, netdev
Building the gkernel bits, have this error:
net/ipv4/route.c: In function `rt_remove_balanced_route':
net/ipv4/route.c:151: sorry, unimplemented: inlining failed in call to 'compare_keys': function body not available
net/ipv4/route.c:540: sorry, unimplemented: called from here
route.c has this define at line 151
:
static inline int compare_keys(struct flowi *fl1, struct flowi *fl2);
function body is defined starting at line 861.
We are using gcc 3.4.2 right now, is there a way to fix this?
thanks
cliffw
--
"Ive always gone through periods where I bolt upright at four in the morning;
now at least theres a reason." -Michael Feldman
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gcc confused about static inline. - route.c
2005-03-28 21:23 gcc confused about static inline. - route.c cliff white
@ 2005-03-28 21:41 ` Dave Jones
2005-03-28 22:59 ` cliff white
2005-03-28 21:53 ` Francois Romieu
1 sibling, 1 reply; 5+ messages in thread
From: Dave Jones @ 2005-03-28 21:41 UTC (permalink / raw)
To: cliff white; +Cc: jgarzik, netdev
On Mon, Mar 28, 2005 at 01:23:14PM -0800, cliff white wrote:
>
> Building the gkernel bits, have this error:
>
> net/ipv4/route.c: In function `rt_remove_balanced_route':
> net/ipv4/route.c:151: sorry, unimplemented: inlining failed in call to 'compare_keys': function body not available
> net/ipv4/route.c:540: sorry, unimplemented: called from here
>
> route.c has this define at line 151
> :
> static inline int compare_keys(struct flowi *fl1, struct flowi *fl2);
>
> function body is defined starting at line 861.
>
> We are using gcc 3.4.2 right now, is there a way to fix this?
> thanks
> cliffw
Shuffling the order of the functions fixed this for me.
Dave
Signed-off-by: Dave Jones <davej@redhat.com>
diff -urNp --exclude-from=/home/davej/.exclude linux-10001/init/Makefile linux-10002/init/Makefile
--- linux-2.6.11/net/ipv4/route.c~ 2005-03-24 19:18:24.000000000 -0500
+++ linux-2.6.11/net/ipv4/route.c 2005-03-24 19:19:39.000000000 -0500
@@ -520,6 +520,13 @@ static inline u32 rt_score(struct rtable
return score;
}
+static inline int compare_keys(struct flowi *fl1, struct flowi *fl2)
+{
+ return memcmp(&fl1->nl_u.ip4_u, &fl2->nl_u.ip4_u, sizeof(fl1->nl_u.ip4_u)) == 0 &&
+ fl1->oif == fl2->oif &&
+ fl1->iif == fl2->iif;
+}
+
#ifdef CONFIG_IP_ROUTE_MULTIPATH_CACHED
static struct rtable **rt_remove_balanced_route(struct rtable **chain_head,
struct rtable *expentry,
@@ -858,13 +865,6 @@ work_done:
out: return 0;
}
-static inline int compare_keys(struct flowi *fl1, struct flowi *fl2)
-{
- return memcmp(&fl1->nl_u.ip4_u, &fl2->nl_u.ip4_u, sizeof(fl1->nl_u.ip4_u)) == 0 &&
- fl1->oif == fl2->oif &&
- fl1->iif == fl2->iif;
-}
-
static int rt_intern_hash(unsigned hash, struct rtable *rt, struct rtable **rp)
{
struct rtable *rth, **rthp;
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gcc confused about static inline. - route.c
2005-03-28 21:23 gcc confused about static inline. - route.c cliff white
2005-03-28 21:41 ` Dave Jones
@ 2005-03-28 21:53 ` Francois Romieu
2005-03-28 23:00 ` cliff white
1 sibling, 1 reply; 5+ messages in thread
From: Francois Romieu @ 2005-03-28 21:53 UTC (permalink / raw)
To: cliff white; +Cc: jgarzik, netdev
cliff white <cliffw@osdl.org> :
[...]
> We are using gcc 3.4.2 right now, is there a way to fix this?
http://marc.theaimsgroup.com/?l=bk-commits-head&m=111188776823016&w=2
--
Ueimor
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gcc confused about static inline. - route.c
2005-03-28 21:41 ` Dave Jones
@ 2005-03-28 22:59 ` cliff white
0 siblings, 0 replies; 5+ messages in thread
From: cliff white @ 2005-03-28 22:59 UTC (permalink / raw)
To: Dave Jones; +Cc: jgarzik, netdev
On Mon, 28 Mar 2005 16:41:03 -0500
Dave Jones <davej@redhat.com> wrote:
> On Mon, Mar 28, 2005 at 01:23:14PM -0800, cliff white wrote:
> >
> > Building the gkernel bits, have this error:
> >
> > net/ipv4/route.c: In function `rt_remove_balanced_route':
> > net/ipv4/route.c:151: sorry, unimplemented: inlining failed in call to 'compare_keys': function body not available
> > net/ipv4/route.c:540: sorry, unimplemented: called from here
> >
> > route.c has this define at line 151
> > :
> > static inline int compare_keys(struct flowi *fl1, struct flowi *fl2);
> >
> > function body is defined starting at line 861.
> >
> > We are using gcc 3.4.2 right now, is there a way to fix this?
> > thanks
> > cliffw
>
>
> Shuffling the order of the functions fixed this for me.
>
Thanks, that looked like the answer, but i wanted to ask anyway...
cliffw
> Dave
>
> Signed-off-by: Dave Jones <davej@redhat.com>
>
> diff -urNp --exclude-from=/home/davej/.exclude linux-10001/init/Makefile linux-10002/init/Makefile
> --- linux-2.6.11/net/ipv4/route.c~ 2005-03-24 19:18:24.000000000 -0500
> +++ linux-2.6.11/net/ipv4/route.c 2005-03-24 19:19:39.000000000 -0500
> @@ -520,6 +520,13 @@ static inline u32 rt_score(struct rtable
> return score;
> }
>
> +static inline int compare_keys(struct flowi *fl1, struct flowi *fl2)
> +{
> + return memcmp(&fl1->nl_u.ip4_u, &fl2->nl_u.ip4_u, sizeof(fl1->nl_u.ip4_u)) == 0 &&
> + fl1->oif == fl2->oif &&
> + fl1->iif == fl2->iif;
> +}
> +
> #ifdef CONFIG_IP_ROUTE_MULTIPATH_CACHED
> static struct rtable **rt_remove_balanced_route(struct rtable **chain_head,
> struct rtable *expentry,
> @@ -858,13 +865,6 @@ work_done:
> out: return 0;
> }
>
> -static inline int compare_keys(struct flowi *fl1, struct flowi *fl2)
> -{
> - return memcmp(&fl1->nl_u.ip4_u, &fl2->nl_u.ip4_u, sizeof(fl1->nl_u.ip4_u)) == 0 &&
> - fl1->oif == fl2->oif &&
> - fl1->iif == fl2->iif;
> -}
> -
> static int rt_intern_hash(unsigned hash, struct rtable *rt, struct rtable **rp)
> {
> struct rtable *rth, **rthp;
>
--
"Ive always gone through periods where I bolt upright at four in the morning;
now at least theres a reason." -Michael Feldman
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gcc confused about static inline. - route.c
2005-03-28 21:53 ` Francois Romieu
@ 2005-03-28 23:00 ` cliff white
0 siblings, 0 replies; 5+ messages in thread
From: cliff white @ 2005-03-28 23:00 UTC (permalink / raw)
To: Francois Romieu; +Cc: jgarzik, netdev
On Mon, 28 Mar 2005 23:53:37 +0200
Francois Romieu <romieu@fr.zoreil.com> wrote:
> cliff white <cliffw@osdl.org> :
> [...]
> > We are using gcc 3.4.2 right now, is there a way to fix this?
>
> http://marc.theaimsgroup.com/?l=bk-commits-head&m=111188776823016&w=2
>
Whumps.
Thanks, i missed this email.
Didn't know it was already fixed.
cliffw
> --
> Ueimor
>
--
"Ive always gone through periods where I bolt upright at four in the morning;
now at least theres a reason." -Michael Feldman
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-03-28 23:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-28 21:23 gcc confused about static inline. - route.c cliff white
2005-03-28 21:41 ` Dave Jones
2005-03-28 22:59 ` cliff white
2005-03-28 21:53 ` Francois Romieu
2005-03-28 23:00 ` cliff white
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).