summaryrefslogtreecommitdiffstats
path: root/package/samba4/samba4-0007-build-find-blkcnt_t-size-via-array.patch
diff options
context:
space:
mode:
authorGustavo Zacarias <gustavo@zacarias.com.ar>2014-04-22 21:07:58 -0300
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2014-04-24 11:13:32 +0200
commit002aeba3de481d8d304b5d3d301cc7047073705a (patch)
tree2f6f7088655bdf40dd7e8f9fcc862e823be36796 /package/samba4/samba4-0007-build-find-blkcnt_t-size-via-array.patch
parent36afe6de9c8760b4dc26ca89e97e78dce627e716 (diff)
downloadbuildroot-002aeba3de481d8d304b5d3d301cc7047073705a.tar.gz
buildroot-002aeba3de481d8d304b5d3d301cc7047073705a.zip
samba4: bump to version 4.1.7 and improve cross build
Bump to the latest 4.1.7 version and improve the cross-build logic. With the new patches the build is basically architecture-agnostic making it possible to ditch the arch-specific cache to use a generic one. Some toolchains might not be too happy with samba4 because of bitrot, hopefully we'll find and fix or blacklist those with autobuilder help. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/samba4/samba4-0007-build-find-blkcnt_t-size-via-array.patch')
-rw-r--r--package/samba4/samba4-0007-build-find-blkcnt_t-size-via-array.patch52
1 files changed, 52 insertions, 0 deletions
diff --git a/package/samba4/samba4-0007-build-find-blkcnt_t-size-via-array.patch b/package/samba4/samba4-0007-build-find-blkcnt_t-size-via-array.patch
new file mode 100644
index 0000000000..f7e9c23fd9
--- /dev/null
+++ b/package/samba4/samba4-0007-build-find-blkcnt_t-size-via-array.patch
@@ -0,0 +1,52 @@
+From 934f8c8e9439de4f15b2e61016d5d29233d8d5fa Mon Sep 17 00:00:00 2001
+From: Gustavo Zacarias <gustavo@zacarias.com.ar>
+Date: Wed, 16 Apr 2014 08:01:36 -0300
+Subject: [PATCH 5/5] build: find blkcnt_t size via array
+
+Using the same trick as commit 0d9bb86293c9d39298786df095c73a6251b08b7e
+find blkcnt_t size via an array so that it can be determined via build
+rather than running it.
+
+Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
+---
+ source3/wscript | 22 ++++++++++++----------
+ 1 file changed, 12 insertions(+), 10 deletions(-)
+
+diff --git a/source3/wscript b/source3/wscript
+index aade503..6a5728f 100644
+--- a/source3/wscript
++++ b/source3/wscript
+@@ -277,18 +277,20 @@ int main(int argc, char **argv)
+ headers='sys/types.h sys/stat.h unistd.h')
+
+ if "HAVE_BLKCNT_T" in conf.env:
+- conf.CHECK_CODE('''
+- return sizeof(blkcnt_t) == 4 ? 0 : 1''',
+- 'SIZEOF_BLKCNT_T_4', execute=True,
+- headers='replace.h sys/types.h sys/stat.h unistd.h',
+- msg="Checking whether blkcnt_t is 32 bit")
++ conf.CHECK_CODE('''
++ static int test_array[1 - 2 * !(((long int)(sizeof(blkcnt_t))) <= 4)];''',
++ 'SIZEOF_BLKCNT_T_4',
++ headers='replace.h sys/types.h sys/stat.h unistd.h',
++ msg="Checking whether blkcnt_t is 32 bit")
+
++ # If sizeof is 4 it can't be 8
+ if "HAVE_BLKCNT_T" in conf.env:
+- conf.CHECK_CODE('''
+- return sizeof(blkcnt_t) == 8 ? 0 : 1''',
+- 'SIZEOF_BLKCNT_T_8', execute=True,
+- headers='replace.h sys/types.h sys/stat.h unistd.h',
+- msg="Checking whether blkcnt_t is 64 bit")
++ if not conf.CONFIG_SET('SIZEOF_BLKCNT_T_4'):
++ conf.CHECK_CODE('''
++ static int test_array[1 - 2 * !(((long int)(sizeof(blkcnt_t))) <= 8)];''',
++ 'SIZEOF_BLKCNT_T_8',
++ headers='replace.h sys/types.h sys/stat.h unistd.h',
++ msg="Checking whether blkcnt_t is 64 bit")
+
+ # Check for POSIX capability support
+ conf.CHECK_FUNCS_IN('cap_get_proc', 'cap', headers='sys/capability.h')
+--
+1.8.3.2
+
OpenPOWER on IntegriCloud