LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@infradead.org>
To: Kyle McMartin <kyle@ubuntu.com>
Cc: Meelis Roos <mroos@linux.ee>,
Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: Re: V4L2: __ucmpdi2 undefined on ppc
Date: Sat, 16 Dec 2006 16:15:12 -0200 [thread overview]
Message-ID: <1166292912.20055.72.camel@praia> (raw)
In-Reply-To: <20061214195842.GA14041@athena.road.mcmartin.ca>
> I posted a patch to Paul this week to fix this, as saw we saw it on
> Ubuntu's powerpc kernel builds.
>
> Since ppc32 can't do a 64bit comparison on its own it seems, gcc
> will generate a call to a helper function from libgcc. What other
> arches do is link libgcc.a into libs-y, and export the symbol
> they want from it. The build process will discard the rest of the
> .a that is unused. parisc uses this method, for example.
>
> Gcc targets can provide optimized versions of these helpers in
> assembly, but at least in this case, the generic C version seems
> to be used everywhere. It might be useful to provide kernel local
> copies of these C versions linked __weak or something if the
> arch happens to need them.
>
> (Not going to sign off or anything, since I've already sent it to
> paulus@ and I don't want it to get merged without his approval...)
Seems to be a good way to solve it.
> ---
> diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
> index a00fe72..5b60c05 100644
> --- a/arch/powerpc/Makefile
> +++ b/arch/powerpc/Makefile
> @@ -139,6 +139,8 @@ core-$(CONFIG_XMON) += arch/powerpc/xmon/
>
> drivers-$(CONFIG_OPROFILE) += arch/powerpc/oprofile/
>
> +libs-y += `$(CC) -print-libgcc-file-name`
> +
> # Default to zImage, override when needed
> defaultimage-y := zImage
> defaultimage-$(CONFIG_PPC_ISERIES) := vmlinux
> diff --git a/arch/powerpc/kernel/ppc_ksyms.c b/arch/powerpc/kernel/ppc_ksyms.c
> index 9179f07..dea8384 100644
> --- a/arch/powerpc/kernel/ppc_ksyms.c
> +++ b/arch/powerpc/kernel/ppc_ksyms.c
> @@ -164,6 +164,9 @@ long long __lshrdi3(long long, int);
> EXPORT_SYMBOL(__ashrdi3);
> EXPORT_SYMBOL(__ashldi3);
> EXPORT_SYMBOL(__lshrdi3);
> +
> +extern void __ucmpdi2(void);
> +EXPORT_SYMBOL(__ucmpdi2);
> #endif
>
> EXPORT_SYMBOL(memcpy);
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
Cheers,
Mauro.
next prev parent reply other threads:[~2006-12-16 18:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-13 12:11 Meelis Roos
2006-12-13 12:59 ` Paweł Sikora
2006-12-13 23:41 ` Mauro Carvalho Chehab
2006-12-14 19:58 ` Kyle McMartin
2006-12-16 18:15 ` Mauro Carvalho Chehab [this message]
2006-12-17 13:29 ` David Woodhouse
[not found] ` <6a89f9d50802060639j4b3a8b7u4e4e596b010ee353@mail.gmail.com>
2008-03-02 18:48 ` Stephane Marchesin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1166292912.20055.72.camel@praia \
--to=mchehab@infradead.org \
--cc=kyle@ubuntu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mroos@linux.ee \
--subject='Re: V4L2: __ucmpdi2 undefined on ppc' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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).