All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] packages/btrfs-progs: fix build issues under musl
Date: Thu, 30 Jul 2015 16:24:21 +0200	[thread overview]
Message-ID: <20150730162421.5a12b1aa@free-electrons.com> (raw)
In-Reply-To: <CA+BsyQ5rwfHxZTShaEum3A456-zFekijGV_+EsUH9=tGenUTBA@mail.gmail.com>

Dear Brendan Heading,

On Thu, 30 Jul 2015 15:16:04 +0100, Brendan Heading wrote:

> Unfortunately things moved a bit quickly - I'd submitted my patch to
> btrfs-progs yesterday and it was accepted earlier this morning before
> I had a chance to tell them about your more comprehensive approach.
> 
> Your inline patch had one small typo:
> =============================
> 
> --- a/kerncompat.h
> +++ b/kerncompat.h
> @@ -32,7 +32,7 @@
> 
>  #include <features.h>
> 
> -#ifdef HAVE_ALWAYS_INLINE
> +#ifndef HAVE_ALWAYS_INLINE
>  #define __always_inline __inline __attribute__ ((__always_inline__))

Humm, in fact my patch is wrong. So what they were doing is:

 #ifndef __GLIBC__
 #define __always_inline __inline __attribute__ ((__always_inline__))
 #endif

So in fact they are not testing that __always_inline__ is a valid gcc
function attribute.

They are defining __always_inline as a shortcut for marking a function
as always inline. This shortcut is defined by glibc, but not by other C
libraries, so they are doing it manually.

So, I think my patch should be adapted. You need to:

 * Remove the m4/ax_gcc_func_attribute.m4 file, revert my .gitignore
   change and remove the added AC_CONFIG_MACRO_DIR([m4]).

 * Add AC_CHECK_DECLS([__always_inline]) in configure.ac, and do
   #ifndef HAVE_DECL___ALWAYS_INLINE in kerncompat.h.

It will in fact make the patch a lot simpler, which is good.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  reply	other threads:[~2015-07-30 14:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-29 18:50 [Buildroot] [PATCH 1/1] packages/btrfs-progs: fix build issues under musl Brendan Heading
2015-07-29 20:47 ` Thomas Petazzoni
2015-07-29 20:54   ` Brendan Heading
2015-07-30 14:16   ` Brendan Heading
2015-07-30 14:24     ` Thomas Petazzoni [this message]
2015-07-30 15:30       ` Brendan Heading

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=20150730162421.5a12b1aa@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.