The Samba-Bugzilla – Attachment 12251 Details for
Bug 11750
gcc6 fails to build internal heimdal (seen with 4.4.0rc3)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
git-am fix for 4.4.next.
attr (text/plain), 12.57 KB, created by
Jeremy Allison
on 2016-07-01 15:57:37 UTC
(
hide
)
Description:
git-am fix for 4.4.next.
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2016-07-01 15:57:37 UTC
Size:
12.57 KB
patch
obsolete
>From 50cb2787bd6fb0bf8726a7cb3e4a58a44c708dab Mon Sep 17 00:00:00 2001 >From: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> >Date: Tue, 8 Mar 2016 10:23:09 +1300 >Subject: [PATCH 1/8] configure: set HAVE___ATTRIBUTE__ for heimdal > >Without this, heimdal ends up defining __attribute__ away, causing >gcc-6 compile errors with -Werror=return-type because it can't tell >when functions have __attribute__((noreturn)). > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=11750 > >Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> >Reviewed-by: Andrew Bartlett <abartlet@samba.org> >Reviewed-by: Garming Sam <garming@catalyst.net.nz> > >Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> >Autobuild-Date(master): Wed Mar 9 13:52:26 CET 2016 on sn-devel-144 > >(cherry picked from commit 1c796547f20fa3c7c2e93fd5ce6ee8453a2bb435) >--- > buildtools/wafsamba/wscript | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) > >diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript >index 586cc4b..8802e5a 100755 >--- a/buildtools/wafsamba/wscript >+++ b/buildtools/wafsamba/wscript >@@ -402,6 +402,22 @@ def configure(conf): > addmain=False, > msg='Checking for library destructor support') > >+ conf.CHECK_CODE(''' >+ void test_attribute(void) __attribute__ (()); >+ >+ void test_attribute(void) >+ { >+ return; >+ } >+ >+ int main(void) { >+ return 0; >+ } >+ ''', >+ 'HAVE___ATTRIBUTE__', >+ addmain=False, >+ msg='Checking for __attribute__') >+ > if sys.platform.startswith('aix'): > conf.DEFINE('_ALL_SOURCE', 1, add_to_cflags=True) > # Might not be needed if ALL_SOURCE is defined >-- >2.8.0.rc3.226.g39d4020 > > >From ee06c6d9f6cc3540e8b44c4fd7ac8371b4ba92a3 Mon Sep 17 00:00:00 2001 >From: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> >Date: Wed, 23 Mar 2016 11:16:48 +1300 >Subject: [PATCH 2/8] util/attr.h: use HAVE___ATTRIBUTE__, not __GNUC__ > comparisons > >The comparisons that look like > > #if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 ) > >fail if __GNUC_MINOR__ is 0. The intended comparison is something >more like > > #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) > >However, given that: > > * these checks are really trying to test the presence of > __attribute__, > > * there are now credible compilers that are not GCC, which have > __attribute__ but might not be good at emulating __GNUC__ > numbers, and > > * we really face little risk of running into GCC 2.95 > > * we have a HAVE___ATTRIBUTE__ check in ./configure > >let's not do the version comparisons. > >(Untested on GCC 2.95, GCC 3.0 and GCC 3.1). > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=11750 > >Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> >Reviewed-by: Andrew Bartlett <abartlet@samba.org> >Reviewed-by: Uri Simchoni <uri@samba.org> >(cherry picked from commit 88be24c279e29a363c2aabcb68b5f0a1e039f477) >--- > lib/util/attr.h | 16 ++++++++-------- > 1 file changed, 8 insertions(+), 8 deletions(-) > >diff --git a/lib/util/attr.h b/lib/util/attr.h >index b72696a..8e542c1 100644 >--- a/lib/util/attr.h >+++ b/lib/util/attr.h >@@ -35,7 +35,7 @@ > #endif > > #ifndef _DEPRECATED_ >-#if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 ) >+#ifdef HAVE___ATTRIBUTE__ > #define _DEPRECATED_ __attribute__ ((deprecated)) > #else > #define _DEPRECATED_ >@@ -43,7 +43,7 @@ > #endif > > #ifndef _WARN_UNUSED_RESULT_ >-#if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 ) >+#ifdef HAVE___ATTRIBUTE__ > #define _WARN_UNUSED_RESULT_ __attribute__ ((warn_unused_result)) > #else > #define _WARN_UNUSED_RESULT_ >@@ -51,7 +51,7 @@ > #endif > > #ifndef _NORETURN_ >-#if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 ) >+#ifdef HAVE___ATTRIBUTE__ > #define _NORETURN_ __attribute__ ((noreturn)) > #else > #define _NORETURN_ >@@ -59,7 +59,7 @@ > #endif > > #ifndef _PURE_ >-#if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1) >+#ifdef HAVE___ATTRIBUTE__ > #define _PURE_ __attribute__((pure)) > #else > #define _PURE_ >@@ -67,7 +67,7 @@ > #endif > > #ifndef NONNULL >-#if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1) >+#ifdef HAVE___ATTRIBUTE__ > #define NONNULL(param) param __attribute__((nonnull)) > #else > #define NONNULL(param) param >@@ -75,7 +75,7 @@ > #endif > > #ifndef PRINTF_ATTRIBUTE >-#if __GNUC__ >= 3 >+#ifdef HAVE___ATTRIBUTE__ > /** Use gcc attribute to check printf fns. a1 is the 1-based index of > * the parameter containing the format, and a2 the index of the first > * argument. Note that some gcc 2.x versions don't handle this >@@ -87,11 +87,11 @@ > #endif > > #ifndef FORMAT_ATTRIBUTE >-#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) >+#ifdef HAVE___ATTRIBUTE__ > /** Use gcc attribute to check printf fns. a1 is argument to format() > * in the above macro. This is needed to support Heimdal's printf > * decorations. Note that some gcc 2.x versions don't handle this >- * properly, and as such I've used the same minimum from heimdal: GCC 3.1 **/ >+ * properly. **/ > #define FORMAT_ATTRIBUTE(a) __attribute__ ((format a)) > #else > #define FORMAT_ATTRIBUTE(a) >-- >2.8.0.rc3.226.g39d4020 > > >From 86b3ded73c77f9d792fcdfdf0fd02ee81c19e625 Mon Sep 17 00:00:00 2001 >From: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> >Date: Wed, 23 Mar 2016 15:26:03 +1300 >Subject: [PATCH 3/8] libreplace: use HAVE___ATTRIBUTE__ instead of __GNUC__ > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=11750 > >Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> >Reviewed-by: Andrew Bartlett <abartlet@samba.org> >Reviewed-by: Uri Simchoni <uri@samba.org> >(cherry picked from commit 6ba2fe2e3f1ad27b12f4ef67f41c7ad4f29f17c3) >--- > lib/replace/replace.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/lib/replace/replace.h b/lib/replace/replace.h >index c764d06..7080373 100644 >--- a/lib/replace/replace.h >+++ b/lib/replace/replace.h >@@ -425,7 +425,7 @@ int rep_dlclose(void *handle); > #endif > > #ifndef PRINTF_ATTRIBUTE >-#if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 ) >+#ifdef HAVE___ATTRIBUTE__ > /** Use gcc attribute to check printf fns. a1 is the 1-based index of > * the parameter containing the format, and a2 the index of the first > * argument. Note that some gcc 2.x versions don't handle this >@@ -437,7 +437,7 @@ int rep_dlclose(void *handle); > #endif > > #ifndef _DEPRECATED_ >-#if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 ) >+#ifdef HAVE___ATTRIBUTE__ > #define _DEPRECATED_ __attribute__ ((deprecated)) > #else > #define _DEPRECATED_ >-- >2.8.0.rc3.226.g39d4020 > > >From cce658f2037bd8f604ceb78c4ad7b7069e7741f0 Mon Sep 17 00:00:00 2001 >From: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> >Date: Wed, 23 Mar 2016 15:26:49 +1300 >Subject: [PATCH 4/8] tevent.h: use HAVE___ATTRIBUTE__ instead of __GNUC__ > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=11750 > >Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> >Reviewed-by: Andrew Bartlett <abartlet@samba.org> >Reviewed-by: Uri Simchoni <uri@samba.org> >(cherry picked from commit a20ee62984bdb623f8fa55a9900cb69a99bf38e6) >--- > lib/tevent/tevent.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/lib/tevent/tevent.h b/lib/tevent/tevent.h >index cb95507..cc6b15e 100644 >--- a/lib/tevent/tevent.h >+++ b/lib/tevent/tevent.h >@@ -1752,7 +1752,7 @@ void tevent_thread_proxy_schedule(struct tevent_thread_proxy *tp, > > #ifdef TEVENT_DEPRECATED > #ifndef _DEPRECATED_ >-#if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 ) >+#ifdef HAVE___ATTRIBUTE__ > #define _DEPRECATED_ __attribute__ ((deprecated)) > #else > #define _DEPRECATED_ >-- >2.8.0.rc3.226.g39d4020 > > >From 55446af53f1460dd8ca0f4bde39cccf7bf08692c Mon Sep 17 00:00:00 2001 >From: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> >Date: Wed, 23 Mar 2016 15:27:45 +1300 >Subject: [PATCH 5/8] s3/modules/getdate: use HAVE___ATTRIBUTE__ instead of > __GNUC__ > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=11750 > >Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> >Reviewed-by: Andrew Bartlett <abartlet@samba.org> >Reviewed-by: Uri Simchoni <uri@samba.org> >(cherry picked from commit fb0ebbfcbfb5754b0fca7b309eaded0e57877230) >--- > source3/modules/getdate.c | 2 +- > source3/modules/getdate.y | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > >diff --git a/source3/modules/getdate.c b/source3/modules/getdate.c >index a27b75f..6ed9946 100644 >--- a/source3/modules/getdate.c >+++ b/source3/modules/getdate.c >@@ -181,7 +181,7 @@ > # include <string.h> > #endif > >-#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__ >+#ifndef HAVE___ATTRIBUTE__ > # define __attribute__(x) > #endif > >diff --git a/source3/modules/getdate.y b/source3/modules/getdate.y >index 21c01b8..1ddcda4 100644 >--- a/source3/modules/getdate.y >+++ b/source3/modules/getdate.y >@@ -72,7 +72,7 @@ > # include <string.h> > #endif > >-#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__ >+#ifndef HAVE___ATTRIBUTE__ > # define __attribute__(x) > #endif > >-- >2.8.0.rc3.226.g39d4020 > > >From 9067c49297e757108da2fcaedf3cd641aa754b42 Mon Sep 17 00:00:00 2001 >From: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> >Date: Wed, 23 Mar 2016 15:28:45 +1300 >Subject: [PATCH 6/8] mdssvc/sparql_parser.c: use HAVE___ATTRIBUTE__ instead of > __GNUC__ > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=11750 > >Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> >Reviewed-by: Andrew Bartlett <abartlet@samba.org> >Reviewed-by: Uri Simchoni <uri@samba.org> >(cherry picked from commit 7b92b84415dd3292538eb4e44fac12b4e564b984) >--- > source3/rpc_server/mdssvc/sparql_parser.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > >diff --git a/source3/rpc_server/mdssvc/sparql_parser.c b/source3/rpc_server/mdssvc/sparql_parser.c >index 8170290..3cd532b 100644 >--- a/source3/rpc_server/mdssvc/sparql_parser.c >+++ b/source3/rpc_server/mdssvc/sparql_parser.c >@@ -241,9 +241,7 @@ typedef short int yytype_int16; > #endif > > #ifndef YY_ATTRIBUTE >-# if (defined __GNUC__ \ >- && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ >- || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C >+# if HAVE___ATTRIBUTE__ > # define YY_ATTRIBUTE(Spec) __attribute__(Spec) > # else > # define YY_ATTRIBUTE(Spec) /* empty */ >-- >2.8.0.rc3.226.g39d4020 > > >From 948e8b15e73fef0bce750779e63113475a5856e0 Mon Sep 17 00:00:00 2001 >From: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> >Date: Wed, 23 Mar 2016 15:29:50 +1300 >Subject: [PATCH 7/8] s4/lib/wmi_wrap: use HAVE___ATTRIBUTE__ instead of > __GNUC__ > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=11750 > >Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> >Reviewed-by: Andrew Bartlett <abartlet@samba.org> >Reviewed-by: Uri Simchoni <uri@samba.org> >(cherry picked from commit 82258aa2a6ff1a8d139f60abb170aaffb0934025) >--- > source4/lib/wmi/wmi_wrap.c | 8 +------- > 1 file changed, 1 insertion(+), 7 deletions(-) > >diff --git a/source4/lib/wmi/wmi_wrap.c b/source4/lib/wmi/wmi_wrap.c >index a4aaf1b..07eba3e 100644 >--- a/source4/lib/wmi/wmi_wrap.c >+++ b/source4/lib/wmi/wmi_wrap.c >@@ -39,13 +39,7 @@ > > /* attribute recognised by some compilers to avoid 'unused' warnings */ > #ifndef SWIGUNUSED >-# if defined(__GNUC__) >-# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) >-# define SWIGUNUSED __attribute__ ((__unused__)) >-# else >-# define SWIGUNUSED >-# endif >-# elif defined(__ICC) >+# ifdef HAVE___ATTRIBUTE__ > # define SWIGUNUSED __attribute__ ((__unused__)) > # else > # define SWIGUNUSED >-- >2.8.0.rc3.226.g39d4020 > > >From 86dac41b9e93e2bdee2707d712e80310fa31177e Mon Sep 17 00:00:00 2001 >From: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> >Date: Wed, 23 Mar 2016 15:30:22 +1300 >Subject: [PATCH 8/8] third_party/zlib/zlib.h: use HAVE___ATTRIBUTE__ instead > of __GNUC__ > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=11750 > >Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> >Reviewed-by: Andrew Bartlett <abartlet@samba.org> >Reviewed-by: Uri Simchoni <uri@samba.org> > >Autobuild-User(master): Uri Simchoni <uri@samba.org> >Autobuild-Date(master): Thu Mar 24 18:43:34 CET 2016 on sn-devel-144 > >(cherry picked from commit d64877541036c6b82aa0204671bfdae08936b529) >--- > third_party/zlib/zlib.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/third_party/zlib/zlib.h b/third_party/zlib/zlib.h >index aa7f082..a303d77 100644 >--- a/third_party/zlib/zlib.h >+++ b/third_party/zlib/zlib.h >@@ -213,7 +213,7 @@ typedef gz_header FAR *gz_headerp; > #define zlib_version zlibVersion() > /* for compatibility with versions < 1.0.2 */ > >-#if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1) >+#ifdef HAVE___ATTRIBUTE__ > /** Use gcc attribute to check printf fns. a1 is the 1-based index of > * the parameter containing the format, and a2 the index of the first > * argument. Note that some gcc 2.x versions don't handle this >-- >2.8.0.rc3.226.g39d4020 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
abartlet
:
review+
Actions:
View
Attachments on
bug 11750
:
11970
| 12251