diff mbox

[RFC] btrfs-progs: Support for musl libc (and perhaps also uclibc)

Message ID 5492AC94.8050104@wizzup.org (mailing list archive)
State Not Applicable
Headers show

Commit Message

Merlijn Wajer Dec. 18, 2014, 10:29 a.m. UTC
Hi,

On 17/12/14 17:49, David Sterba wrote:
> On Sat, Dec 13, 2014 at 03:35:09PM +0100, Merlijn Wajer wrote:
> [snip]
> 
>> Attached are the two patches generated with git format-patch. I am aware
>> that this may not be required format for submitting patches -- but
>> please give me some time to get used to the etiquette. :-)
> 
> Thanks, there are minor things that I won't bother to point out to
> occasional contributors and fix them myself. The only formal requirement
> is the Signed-off-by tag, you can find the description eg. here
> 
> http://lxr.free-electrons.com/source/Documentation/SubmittingPatches#L358

Alright, cool. I've rebased my two patches and used --signoff when
amending the commit. Please find the new patches attached.


>> Please let me know if musl-libc (or any other libc) is a supported
>> platform, and if so, if and how I can improve on said patches.
> 
> I'm not aware of non-glibc users, but I don't see any problem to add
> support for more libc implementations. However, I won't regularly verify
> that it builds so it might break.

That is fine; at this point there are not a lot of people using an
alternative libc, so this is common practice. I'll be here with a new
round of patches if it breaks in a future release; it shouldn't really
break too often. :)


> Seems that only standardized library calls are used in btrfs-progs so
> any kind of support is probably going to be satisfied by #ifdefs.
> Your patches are simple so I'll try to schedule them to some 3.18.x
> update.

That would be great; thank you.

Regards,
Merlijn

Comments

David Sterba Dec. 18, 2014, 5:43 p.m. UTC | #1
On Thu, Dec 18, 2014 at 11:29:40AM +0100, Merlijn Wajer wrote:
> That is fine; at this point there are not a lot of people using an
> alternative libc, so this is common practice. I'll be here with a new
> round of patches if it breaks in a future release; it shouldn't really
> break too often. :)

Good. I've put the patches to 3.18 queue.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

From 5ae5cfa3af473625ef5b31daf5f229f12be753d2 Mon Sep 17 00:00:00 2001
From: Merlijn Wajer <merlijn@wizzup.org>
Date: Sat, 13 Dec 2014 15:08:43 +0100
Subject: [PATCH 2/2] Disable backtrace and define __always_inline

Disable backtrace and define __always_inline when glibc is not used as
libc. This, together with some header changes allows btrfs-progs to
compile with musl-libc.

Signed-off-by: Merlijn Wajer <merlijn@wizzup.org>
---
 kerncompat.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/kerncompat.h b/kerncompat.h
index 8afadc8..05823a7 100644
--- a/kerncompat.h
+++ b/kerncompat.h
@@ -29,6 +29,12 @@ 
 #include <stddef.h>
 #include <linux/types.h>
 #include <stdint.h>
+
+#ifndef __glibc__
+#define BTRFS_DISABLE_BACKTRACE
+#define __always_inline __inline __attribute__ ((__always_inline__))
+#endif
+
 #ifndef BTRFS_DISABLE_BACKTRACE
 #include <execinfo.h>
 #endif
-- 
2.0.4