mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: "Enrico Weigelt, metux IT consult" <enrico.weigelt@gr13.net>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH] OSELAS.Toolchain: glibc: patches for gcc6
Date: Mon, 24 Oct 2016 15:23:16 +0200	[thread overview]
Message-ID: <0628202f-5422-55e3-82bd-677c28509262@gr13.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 183 bytes --]


gcc6 seems to be more strict about ambigious brackets.


-- 

mit freundlichen Grüßen
--
Enrico, Sohn von Wilfried, a.d.F. Weigelt,
metux IT consulting
+49-151-27565287

[-- Attachment #2: 0002-glibc-patches-for-gcc6.patch --]
[-- Type: text/x-patch, Size: 15146 bytes --]

From f0a5101702aa6bf0851d110b7e23d52782994a8b Mon Sep 17 00:00:00 2001
From: "Enrico Weigelt, metux IT consult" <enrico.weigelt@gr13.net>
Date: Mon, 24 Oct 2016 12:44:41 +0200
Subject: [PATCH 02/11] glibc: patches for gcc6

gcc6 is more strict on ambigous if/else, so we need to add more brackets
---
 ...v.c-add-brackets-around-ambigious-if-else.patch | 38 ++++++++++++++++++++++
 ...l.c-add-brackets-around-ambigious-if-else.patch | 38 ++++++++++++++++++++++
 patches/glibc-2.23/series                          |  2 ++
 ...v.c-add-brackets-around-ambigious-if-else.patch | 38 ++++++++++++++++++++++
 ...l.c-add-brackets-around-ambigious-if-else.patch | 38 ++++++++++++++++++++++
 patches/glibc-crt-2.23/series                      |  2 ++
 ...v.c-add-brackets-around-ambigious-if-else.patch | 38 ++++++++++++++++++++++
 ...l.c-add-brackets-around-ambigious-if-else.patch | 38 ++++++++++++++++++++++
 patches/glibc-first-2.23/series                    |  2 ++
 ...v.c-add-brackets-around-ambigious-if-else.patch | 38 ++++++++++++++++++++++
 ...l.c-add-brackets-around-ambigious-if-else.patch | 38 ++++++++++++++++++++++
 patches/glibc-headers-2.23/series                  |  2 ++
 12 files changed, 312 insertions(+)
 create mode 100644 patches/glibc-2.23/0601-stdlib-setenv.c-add-brackets-around-ambigious-if-else.patch
 create mode 100644 patches/glibc-2.23/0602-nis-nis_call.c-add-brackets-around-ambigious-if-else.patch
 create mode 100644 patches/glibc-crt-2.23/0001-stdlib-setenv.c-add-brackets-around-ambigious-if-else.patch
 create mode 100644 patches/glibc-crt-2.23/0002-nis-nis_call.c-add-brackets-around-ambigious-if-else.patch
 create mode 100644 patches/glibc-crt-2.23/series
 create mode 100644 patches/glibc-first-2.23/0001-stdlib-setenv.c-add-brackets-around-ambigious-if-else.patch
 create mode 100644 patches/glibc-first-2.23/0002-nis-nis_call.c-add-brackets-around-ambigious-if-else.patch
 create mode 100644 patches/glibc-first-2.23/series
 create mode 100644 patches/glibc-headers-2.23/0001-stdlib-setenv.c-add-brackets-around-ambigious-if-else.patch
 create mode 100644 patches/glibc-headers-2.23/0002-nis-nis_call.c-add-brackets-around-ambigious-if-else.patch
 create mode 100644 patches/glibc-headers-2.23/series

diff --git a/patches/glibc-2.23/0601-stdlib-setenv.c-add-brackets-around-ambigious-if-else.patch b/patches/glibc-2.23/0601-stdlib-setenv.c-add-brackets-around-ambigious-if-else.patch
new file mode 100644
index 0000000..1108358
--- /dev/null
+++ b/patches/glibc-2.23/0601-stdlib-setenv.c-add-brackets-around-ambigious-if-else.patch
@@ -0,0 +1,38 @@
+From 52dd8f497b8fb7159c0770594fc145cb94523690 Mon Sep 17 00:00:00 2001
+From: "Enrico Weigelt, metux IT consult" <enrico.weigelt@gr13.net>
+Date: Fri, 21 Oct 2016 17:55:39 +0200
+Subject: [PATCH] stdlib: setenv.c: add brackets around ambigious if/else
+
+---
+ stdlib/setenv.c                                    |  6 +++-
+ 2 files changed, 40 insertions(+), 1 deletion(-)
+ create mode 100644 0001-stdlib-setenv.c-add-brackets-around-ambigious-if-else.patch
+
+diff --git a/stdlib/setenv.c b/stdlib/setenv.c
+index da61ee0..c442c54 100644
+--- a/stdlib/setenv.c
++++ b/stdlib/setenv.c
+@@ -276,8 +276,10 @@ unsetenv (const char *name)
+   LOCK;
+ 
+   ep = __environ;
+-  if (ep != NULL)
++  if ((ep != NULL))
++  {
+     while (*ep != NULL)
++    {
+       if (!strncmp (*ep, name, len) && (*ep)[len] == '=')
+ 	{
+ 	  /* Found it.  Remove this pointer by moving later ones back.  */
+@@ -290,6 +292,8 @@ unsetenv (const char *name)
+ 	}
+       else
+ 	++ep;
++    }
++  }
+ 
+   UNLOCK;
+ 
+-- 
+2.6.4.442.g545299f
+
diff --git a/patches/glibc-2.23/0602-nis-nis_call.c-add-brackets-around-ambigious-if-else.patch b/patches/glibc-2.23/0602-nis-nis_call.c-add-brackets-around-ambigious-if-else.patch
new file mode 100644
index 0000000..19591ad
--- /dev/null
+++ b/patches/glibc-2.23/0602-nis-nis_call.c-add-brackets-around-ambigious-if-else.patch
@@ -0,0 +1,38 @@
+From 4bdfce299a8b8f5e27915ad3fd149bc766c74389 Mon Sep 17 00:00:00 2001
+From: "Enrico Weigelt, metux IT consult" <enrico.weigelt@gr13.net>
+Date: Fri, 21 Oct 2016 19:49:43 +0200
+Subject: [PATCH] nis: nis_call.c: add brackets around ambigious if/else
+
+---
+ nis/nis_call.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/nis/nis_call.c b/nis/nis_call.c
+index 3fa37e4..3db8429 100644
+--- a/nis/nis_call.c
++++ b/nis/nis_call.c
+@@ -679,8 +679,10 @@ nis_server_cache_add (const_nis_name name, int search_parent,
+ 
+   /* Choose which entry should be evicted from the cache.  */
+   loc = &nis_server_cache[0];
+-  if (*loc != NULL)
++  if ((*loc != NULL))
++  {
+     for (i = 1; i < 16; ++i)
++    {
+       if (nis_server_cache[i] == NULL)
+ 	{
+ 	  loc = &nis_server_cache[i];
+@@ -690,6 +692,9 @@ nis_server_cache_add (const_nis_name name, int search_parent,
+ 	       || ((*loc)->uses == nis_server_cache[i]->uses
+ 		   && (*loc)->expires > nis_server_cache[i]->expires))
+ 	loc = &nis_server_cache[i];
++    }
++  }
++
+   old = *loc;
+   *loc = new;
+ 
+-- 
+2.6.4.442.g545299f
+
diff --git a/patches/glibc-2.23/series b/patches/glibc-2.23/series
index f41d245..90cc529 100644
--- a/patches/glibc-2.23/series
+++ b/patches/glibc-2.23/series
@@ -19,3 +19,5 @@
 #tag:open-glibc-bugs --start-number 500
 0500-ARM-fix-PI-futex-breakge-glibc-bug-18463.patch
 # 0864aa35a84bed6790ecc904cfd6bb4c  - git-ptx-patches magic
+0601-stdlib-setenv.c-add-brackets-around-ambigious-if-else.patch
+0602-nis-nis_call.c-add-brackets-around-ambigious-if-else.patch
diff --git a/patches/glibc-crt-2.23/0001-stdlib-setenv.c-add-brackets-around-ambigious-if-else.patch b/patches/glibc-crt-2.23/0001-stdlib-setenv.c-add-brackets-around-ambigious-if-else.patch
new file mode 100644
index 0000000..1108358
--- /dev/null
+++ b/patches/glibc-crt-2.23/0001-stdlib-setenv.c-add-brackets-around-ambigious-if-else.patch
@@ -0,0 +1,38 @@
+From 52dd8f497b8fb7159c0770594fc145cb94523690 Mon Sep 17 00:00:00 2001
+From: "Enrico Weigelt, metux IT consult" <enrico.weigelt@gr13.net>
+Date: Fri, 21 Oct 2016 17:55:39 +0200
+Subject: [PATCH] stdlib: setenv.c: add brackets around ambigious if/else
+
+---
+ stdlib/setenv.c                                    |  6 +++-
+ 2 files changed, 40 insertions(+), 1 deletion(-)
+ create mode 100644 0001-stdlib-setenv.c-add-brackets-around-ambigious-if-else.patch
+
+diff --git a/stdlib/setenv.c b/stdlib/setenv.c
+index da61ee0..c442c54 100644
+--- a/stdlib/setenv.c
++++ b/stdlib/setenv.c
+@@ -276,8 +276,10 @@ unsetenv (const char *name)
+   LOCK;
+ 
+   ep = __environ;
+-  if (ep != NULL)
++  if ((ep != NULL))
++  {
+     while (*ep != NULL)
++    {
+       if (!strncmp (*ep, name, len) && (*ep)[len] == '=')
+ 	{
+ 	  /* Found it.  Remove this pointer by moving later ones back.  */
+@@ -290,6 +292,8 @@ unsetenv (const char *name)
+ 	}
+       else
+ 	++ep;
++    }
++  }
+ 
+   UNLOCK;
+ 
+-- 
+2.6.4.442.g545299f
+
diff --git a/patches/glibc-crt-2.23/0002-nis-nis_call.c-add-brackets-around-ambigious-if-else.patch b/patches/glibc-crt-2.23/0002-nis-nis_call.c-add-brackets-around-ambigious-if-else.patch
new file mode 100644
index 0000000..19591ad
--- /dev/null
+++ b/patches/glibc-crt-2.23/0002-nis-nis_call.c-add-brackets-around-ambigious-if-else.patch
@@ -0,0 +1,38 @@
+From 4bdfce299a8b8f5e27915ad3fd149bc766c74389 Mon Sep 17 00:00:00 2001
+From: "Enrico Weigelt, metux IT consult" <enrico.weigelt@gr13.net>
+Date: Fri, 21 Oct 2016 19:49:43 +0200
+Subject: [PATCH] nis: nis_call.c: add brackets around ambigious if/else
+
+---
+ nis/nis_call.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/nis/nis_call.c b/nis/nis_call.c
+index 3fa37e4..3db8429 100644
+--- a/nis/nis_call.c
++++ b/nis/nis_call.c
+@@ -679,8 +679,10 @@ nis_server_cache_add (const_nis_name name, int search_parent,
+ 
+   /* Choose which entry should be evicted from the cache.  */
+   loc = &nis_server_cache[0];
+-  if (*loc != NULL)
++  if ((*loc != NULL))
++  {
+     for (i = 1; i < 16; ++i)
++    {
+       if (nis_server_cache[i] == NULL)
+ 	{
+ 	  loc = &nis_server_cache[i];
+@@ -690,6 +692,9 @@ nis_server_cache_add (const_nis_name name, int search_parent,
+ 	       || ((*loc)->uses == nis_server_cache[i]->uses
+ 		   && (*loc)->expires > nis_server_cache[i]->expires))
+ 	loc = &nis_server_cache[i];
++    }
++  }
++
+   old = *loc;
+   *loc = new;
+ 
+-- 
+2.6.4.442.g545299f
+
diff --git a/patches/glibc-crt-2.23/series b/patches/glibc-crt-2.23/series
new file mode 100644
index 0000000..8f396a7
--- /dev/null
+++ b/patches/glibc-crt-2.23/series
@@ -0,0 +1,2 @@
+0001-stdlib-setenv.c-add-brackets-around-ambigious-if-else.patch
+0002-nis-nis_call.c-add-brackets-around-ambigious-if-else.patch
diff --git a/patches/glibc-first-2.23/0001-stdlib-setenv.c-add-brackets-around-ambigious-if-else.patch b/patches/glibc-first-2.23/0001-stdlib-setenv.c-add-brackets-around-ambigious-if-else.patch
new file mode 100644
index 0000000..1108358
--- /dev/null
+++ b/patches/glibc-first-2.23/0001-stdlib-setenv.c-add-brackets-around-ambigious-if-else.patch
@@ -0,0 +1,38 @@
+From 52dd8f497b8fb7159c0770594fc145cb94523690 Mon Sep 17 00:00:00 2001
+From: "Enrico Weigelt, metux IT consult" <enrico.weigelt@gr13.net>
+Date: Fri, 21 Oct 2016 17:55:39 +0200
+Subject: [PATCH] stdlib: setenv.c: add brackets around ambigious if/else
+
+---
+ stdlib/setenv.c                                    |  6 +++-
+ 2 files changed, 40 insertions(+), 1 deletion(-)
+ create mode 100644 0001-stdlib-setenv.c-add-brackets-around-ambigious-if-else.patch
+
+diff --git a/stdlib/setenv.c b/stdlib/setenv.c
+index da61ee0..c442c54 100644
+--- a/stdlib/setenv.c
++++ b/stdlib/setenv.c
+@@ -276,8 +276,10 @@ unsetenv (const char *name)
+   LOCK;
+ 
+   ep = __environ;
+-  if (ep != NULL)
++  if ((ep != NULL))
++  {
+     while (*ep != NULL)
++    {
+       if (!strncmp (*ep, name, len) && (*ep)[len] == '=')
+ 	{
+ 	  /* Found it.  Remove this pointer by moving later ones back.  */
+@@ -290,6 +292,8 @@ unsetenv (const char *name)
+ 	}
+       else
+ 	++ep;
++    }
++  }
+ 
+   UNLOCK;
+ 
+-- 
+2.6.4.442.g545299f
+
diff --git a/patches/glibc-first-2.23/0002-nis-nis_call.c-add-brackets-around-ambigious-if-else.patch b/patches/glibc-first-2.23/0002-nis-nis_call.c-add-brackets-around-ambigious-if-else.patch
new file mode 100644
index 0000000..19591ad
--- /dev/null
+++ b/patches/glibc-first-2.23/0002-nis-nis_call.c-add-brackets-around-ambigious-if-else.patch
@@ -0,0 +1,38 @@
+From 4bdfce299a8b8f5e27915ad3fd149bc766c74389 Mon Sep 17 00:00:00 2001
+From: "Enrico Weigelt, metux IT consult" <enrico.weigelt@gr13.net>
+Date: Fri, 21 Oct 2016 19:49:43 +0200
+Subject: [PATCH] nis: nis_call.c: add brackets around ambigious if/else
+
+---
+ nis/nis_call.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/nis/nis_call.c b/nis/nis_call.c
+index 3fa37e4..3db8429 100644
+--- a/nis/nis_call.c
++++ b/nis/nis_call.c
+@@ -679,8 +679,10 @@ nis_server_cache_add (const_nis_name name, int search_parent,
+ 
+   /* Choose which entry should be evicted from the cache.  */
+   loc = &nis_server_cache[0];
+-  if (*loc != NULL)
++  if ((*loc != NULL))
++  {
+     for (i = 1; i < 16; ++i)
++    {
+       if (nis_server_cache[i] == NULL)
+ 	{
+ 	  loc = &nis_server_cache[i];
+@@ -690,6 +692,9 @@ nis_server_cache_add (const_nis_name name, int search_parent,
+ 	       || ((*loc)->uses == nis_server_cache[i]->uses
+ 		   && (*loc)->expires > nis_server_cache[i]->expires))
+ 	loc = &nis_server_cache[i];
++    }
++  }
++
+   old = *loc;
+   *loc = new;
+ 
+-- 
+2.6.4.442.g545299f
+
diff --git a/patches/glibc-first-2.23/series b/patches/glibc-first-2.23/series
new file mode 100644
index 0000000..8f396a7
--- /dev/null
+++ b/patches/glibc-first-2.23/series
@@ -0,0 +1,2 @@
+0001-stdlib-setenv.c-add-brackets-around-ambigious-if-else.patch
+0002-nis-nis_call.c-add-brackets-around-ambigious-if-else.patch
diff --git a/patches/glibc-headers-2.23/0001-stdlib-setenv.c-add-brackets-around-ambigious-if-else.patch b/patches/glibc-headers-2.23/0001-stdlib-setenv.c-add-brackets-around-ambigious-if-else.patch
new file mode 100644
index 0000000..1108358
--- /dev/null
+++ b/patches/glibc-headers-2.23/0001-stdlib-setenv.c-add-brackets-around-ambigious-if-else.patch
@@ -0,0 +1,38 @@
+From 52dd8f497b8fb7159c0770594fc145cb94523690 Mon Sep 17 00:00:00 2001
+From: "Enrico Weigelt, metux IT consult" <enrico.weigelt@gr13.net>
+Date: Fri, 21 Oct 2016 17:55:39 +0200
+Subject: [PATCH] stdlib: setenv.c: add brackets around ambigious if/else
+
+---
+ stdlib/setenv.c                                    |  6 +++-
+ 2 files changed, 40 insertions(+), 1 deletion(-)
+ create mode 100644 0001-stdlib-setenv.c-add-brackets-around-ambigious-if-else.patch
+
+diff --git a/stdlib/setenv.c b/stdlib/setenv.c
+index da61ee0..c442c54 100644
+--- a/stdlib/setenv.c
++++ b/stdlib/setenv.c
+@@ -276,8 +276,10 @@ unsetenv (const char *name)
+   LOCK;
+ 
+   ep = __environ;
+-  if (ep != NULL)
++  if ((ep != NULL))
++  {
+     while (*ep != NULL)
++    {
+       if (!strncmp (*ep, name, len) && (*ep)[len] == '=')
+ 	{
+ 	  /* Found it.  Remove this pointer by moving later ones back.  */
+@@ -290,6 +292,8 @@ unsetenv (const char *name)
+ 	}
+       else
+ 	++ep;
++    }
++  }
+ 
+   UNLOCK;
+ 
+-- 
+2.6.4.442.g545299f
+
diff --git a/patches/glibc-headers-2.23/0002-nis-nis_call.c-add-brackets-around-ambigious-if-else.patch b/patches/glibc-headers-2.23/0002-nis-nis_call.c-add-brackets-around-ambigious-if-else.patch
new file mode 100644
index 0000000..19591ad
--- /dev/null
+++ b/patches/glibc-headers-2.23/0002-nis-nis_call.c-add-brackets-around-ambigious-if-else.patch
@@ -0,0 +1,38 @@
+From 4bdfce299a8b8f5e27915ad3fd149bc766c74389 Mon Sep 17 00:00:00 2001
+From: "Enrico Weigelt, metux IT consult" <enrico.weigelt@gr13.net>
+Date: Fri, 21 Oct 2016 19:49:43 +0200
+Subject: [PATCH] nis: nis_call.c: add brackets around ambigious if/else
+
+---
+ nis/nis_call.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/nis/nis_call.c b/nis/nis_call.c
+index 3fa37e4..3db8429 100644
+--- a/nis/nis_call.c
++++ b/nis/nis_call.c
+@@ -679,8 +679,10 @@ nis_server_cache_add (const_nis_name name, int search_parent,
+ 
+   /* Choose which entry should be evicted from the cache.  */
+   loc = &nis_server_cache[0];
+-  if (*loc != NULL)
++  if ((*loc != NULL))
++  {
+     for (i = 1; i < 16; ++i)
++    {
+       if (nis_server_cache[i] == NULL)
+ 	{
+ 	  loc = &nis_server_cache[i];
+@@ -690,6 +692,9 @@ nis_server_cache_add (const_nis_name name, int search_parent,
+ 	       || ((*loc)->uses == nis_server_cache[i]->uses
+ 		   && (*loc)->expires > nis_server_cache[i]->expires))
+ 	loc = &nis_server_cache[i];
++    }
++  }
++
+   old = *loc;
+   *loc = new;
+ 
+-- 
+2.6.4.442.g545299f
+
diff --git a/patches/glibc-headers-2.23/series b/patches/glibc-headers-2.23/series
new file mode 100644
index 0000000..8f396a7
--- /dev/null
+++ b/patches/glibc-headers-2.23/series
@@ -0,0 +1,2 @@
+0001-stdlib-setenv.c-add-brackets-around-ambigious-if-else.patch
+0002-nis-nis_call.c-add-brackets-around-ambigious-if-else.patch
-- 
2.6.4.442.g545299f


[-- Attachment #3: Type: text/plain, Size: 91 bytes --]

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

                 reply	other threads:[~2016-10-24 13:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=0628202f-5422-55e3-82bd-677c28509262@gr13.net \
    --to=enrico.weigelt@gr13.net \
    --cc=ptxdist@pengutronix.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox