lkml.org 
[lkml]   [2019]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Build failures since 5.4-rc3
From
Date
On 10/15/19 2:32 PM, Joe Perches wrote:
>
> Hey Larry.
>
>
> Looks like this should be:
>
> #define FALL_THROUGH __attribute__((__fallthrough__))
>
> and there appear to be many of these #defines that
> use __attribute__((foo)) where foo does not use the
> double underscored prefix and suffix form
>
> I also downloaded and trivially attempted to build vbox
> without success, but I don't find this #define anywhere
> in the sources. Clues?
>
> $ git clone git://github.com/mirror/vbox.git
> $ cd vbox
>
> $ git grep FALL_THROUGH
> $
>
> $ ./configure
> Checking for environment: Determined build machine: linux.amd64, target machine: linux.amd64, OK.
> Checking for kBuild:
> ** kmk (variable KBUILDDIR) not found!
> Check /home/joe/vbox/configure.log for details
>
>
> $ cat configure.log
> # Log file generated by
> #
> # './configure '
> #
>
> ***** Checking environment *****
> Determined build machine: linux.amd64, target machine: linux.amd64
>
>
> ***** Checking kBuild *****
> ** kmk (variable KBUILDDIR) not found!
>
> $

I am the maintainer of VirtualBox for openSUSE, and it is their version that has
the problem.

The original code had the following macro definitions:

# define RT_FALL_THROUGH() __attribute__((fallthrough))
#define RT_FALL_THRU() RT_FALL_THROUGH()

The code uses both forms interchangeably. That failed - I think the () fooled
the compiler.

I replaced those with

#define FALL_THROUGH __attribute__((__fallthrough__))
#define RT_FALL_THRU() FALL_THROUGH
#define RT_FALL_THROUGH() FALL_THROUGH

My initial try was without the underscores around fallthrough, which caused a
conflict with the one in your changes. Putting them back resulted in code that
builds fine. Thanks for the help.

Larry

\
 
 \ /
  Last update: 2019-10-15 22:27    [W:0.052 / U:0.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site