lkml.org 
[lkml]   [2009]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] UNREACHABLE() macro
On Fri, 11 Sep 2009 21:43:42 -0700 "H. Peter Anvin" <hpa@kernel.org> wrote:

> On 09/11/2009 08:49 PM, Arjan van de Ven wrote:
> > On Fri, 11 Sep 2009 14:55:25 -0700 (PDT)
> > Roland McGrath <roland@redhat.com> wrote:
> >
> >>> That's a bit of a mouthful. Did you consider a runtime probe with
> >>> scripts/Kbuild.include's try-run, cc-option, etc?
> >>
> >> I did not see any precedent in the sources for using those to test for
> >> features by compiling particular test sources (i.e. in autoconf
> >
> > look at the stackprotector flags.. they work this way already.
> > It gets done once per kernel build...
> >
>
> That works for flags, but not for the presence of builtin functions.
> You can't even just try compiling something, since it will turn into an
> ordinary function if not present... not obvious until link.
>

Use -Wall -Werror and if the compiler doesn't know about
__builtin_unreachable() it will error out.



\
 
 \ /
  Last update: 2009-09-12 07:59    [W:0.060 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site