Message ID | CA+BsyQ5rwfHxZTShaEum3A456-zFekijGV_+EsUH9=tGenUTBA@mail.gmail.com |
---|---|
State | Changes Requested |
Headers | show |
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
> 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. Thomas, Tested with both the autobuild config (musl) and Linaro 2014.9, builds fine. Forwarding the buildroot patches now, then I'll look at submitting them upstream. regards Brendan
============================= --- 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__)) #endif =============================