Skip to contentSkip to conversation

ARC: gcc - Redefine PTRDIFF_TYPE from "long int" to "int"

PATCH New Alexey Brodkin 2 participants 5 messages Sep 18, 2014 – Sep 23, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARC: gcc - Redefine PTRDIFF_TYPE from "long int" to "int"

Change of SIZE_TYPE from "long unsigned int" to "unsigned int"
http://git.buildroot.net/buildroot/commit/?id=0f236c1fef669192c8f5cc8ef26e93da91438dc2
introduced regression due to existing PTRDIFF_TYPE.

Now to fix regression convert PTRDIFF_TYPE to simple "int".

Fix is taken from current development branch of GCC for ARC and will be a part of the next release of ARC tools, so at that point patch should be dropped.

https://github.com/foss-for-synopsys-dwc-arc-processors/gcc/commit/846e92167aa4f486259c9ff44bb4e6cce6097fa4

Cc Anton Kolesov <[email protected]>
Cc Thomas Petazzoni <[email protected]>
Cc Peter Korsgaard <[email protected]>
---
 package/gcc/arc-2014.08/300-ptrdiff_type_int.patch | 26 ++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 package/gcc/arc-2014.08/300-ptrdiff_type_int.patch
package/gcc/arc-2014.08/300-ptrdiff_type_int.patch new file +26 -0
new file mode 100644
index 0000000..6ee765b
@@ -0,0 +1,26 @@
+Redefine PTRDIFF_TYPE
+
+Change of SIZE_TYPE from "long unsigned int" to "unsigned int" introduced
+regression due to existing PTRDIFF_TYPE.
+
+Now to fix regression convert PTRDIFF_TYPE to simple "int".
+
+Fix is taken from current development branch of GCC for ARC and will be a
+part of the next release of ARC tools, so at that point patch should be dropped.
+
+https://github.com/foss-for-synopsys-dwc-arc-processors/gcc/commit/846e92167aa4f486259c9ff44bb4e6cce6097fa4
+
+Signed-off-by: Claudiu Zissulescu <[email protected]>
+---
+
+--- a/gcc/config/arc/arc.h
++++ b/gcc/config/arc/arc.h
+@@ -488,7 +488,7 @@ if (GET_MODE_CLASS (MODE) == MODE_INT		\
+ #define DEFAULT_SIGNED_CHAR 0
+ 
+ #define SIZE_TYPE "unsigned int"
+-#define PTRDIFF_TYPE "long int"
++#define PTRDIFF_TYPE "int"
+ #define WCHAR_TYPE "int"
+ #define WCHAR_TYPE_SIZE 32
+ 
Signature · 1 line
1.9.3
#1 lore raw

PATCH 1/1 ARC: gcc - Redefine PTRDIFF_TYPE from "long int" to "int"

Hi Peter,

Quoted 11 lines · Alexey Brodkin

Change of SIZE_TYPE from "long unsigned int" to "unsigned int"
http://git.buildroot.net/buildroot/commit/?id=0f236c1fef669192c8f5cc8ef26e93da91438dc2
introduced regression due to existing PTRDIFF_TYPE.

Now to fix regression convert PTRDIFF_TYPE to simple "int".

Fix is taken from current development branch of GCC for ARC and will be a part of the next release of ARC tools, so at that point patch should be dropped.

https://github.com/foss-for-synopsys-dwc-arc-processors/gcc/commit/846e92167aa4f486259c9ff44bb4e6cce6097fa4

Quoted 9 lines
Cc Anton Kolesov <[email protected]>
Cc Thomas Petazzoni <[email protected]>
Cc Peter Korsgaard <[email protected]>
---
 package/gcc/arc-2014.08/300-ptrdiff_type_int.patch | 26 ++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 package/gcc/arc-2014.08/300-ptrdiff_type_int.patch

Any chance to get this patch applied?
This is a required fix for regressions introduced by
http://git.buildroot.net/buildroot/commit/?id=0f236c1fef669192c8f5cc8ef26e93da91438dc2

-Alexey

#2 lore raw

PATCH 1/1 ARC: gcc - Redefine PTRDIFF_TYPE from "long int" to "int"

In reply to Alexey Brodkin

Hi Peter,

Quoted 11 lines · Alexey Brodkin

Change of SIZE_TYPE from "long unsigned int" to "unsigned int"
http://git.buildroot.net/buildroot/commit/?id=0f236c1fef669192c8f5cc8ef26e93da91438dc2
introduced regression due to existing PTRDIFF_TYPE.

Now to fix regression convert PTRDIFF_TYPE to simple "int".

Fix is taken from current development branch of GCC for ARC and will be a part of the next release of ARC tools, so at that point patch should be dropped.

https://github.com/foss-for-synopsys-dwc-arc-processors/gcc/commit/846e92167aa4f486259c9ff44bb4e6cce6097fa4

Quoted 9 lines
Cc Anton Kolesov <[email protected]>
Cc Thomas Petazzoni <[email protected]>
Cc Peter Korsgaard <[email protected]>
---
 package/gcc/arc-2014.08/300-ptrdiff_type_int.patch | 26 ++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 package/gcc/arc-2014.08/300-ptrdiff_type_int.patch

Any chance to get this patch applied?
This is a required fix for regressions introduced by
http://git.buildroot.net/buildroot/commit/?id=0f236c1fef669192c8f5cc8ef26e93da91438dc2

-Alexey

#3 lore raw

PATCH 1/1 ARC: gcc - Redefine PTRDIFF_TYPE from "long int" to "int"

In reply to Alexey Brodkin

Hi Peter,

Quoted 11 lines · Alexey Brodkin

Change of SIZE_TYPE from "long unsigned int" to "unsigned int"
http://git.buildroot.net/buildroot/commit/?id=0f236c1fef669192c8f5cc8ef26e93da91438dc2
introduced regression due to existing PTRDIFF_TYPE.

Now to fix regression convert PTRDIFF_TYPE to simple "int".

Fix is taken from current development branch of GCC for ARC and will be a part of the next release of ARC tools, so at that point patch should be dropped.

https://github.com/foss-for-synopsys-dwc-arc-processors/gcc/commit/846e92167aa4f486259c9ff44bb4e6cce6097fa4

Quoted 9 lines
Cc Anton Kolesov <[email protected]>
Cc Thomas Petazzoni <[email protected]>
Cc Peter Korsgaard <[email protected]>
---
 package/gcc/arc-2014.08/300-ptrdiff_type_int.patch | 26 ++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 package/gcc/arc-2014.08/300-ptrdiff_type_int.patch

Any chance to get this patch applied?
This is a required fix for regressions introduced by
http://git.buildroot.net/buildroot/commit/?id=0f236c1fef669192c8f5cc8ef26e93da91438dc2

-Alexey

#4 lore raw

PATCH 1/1 ARC: gcc - Redefine PTRDIFF_TYPE from "long int" to "int"

In reply to Alexey Brodkin

Dear Alexey Brodkin,

Quoted 11 lines · Alexey Brodkin

Change of SIZE_TYPE from "long unsigned int" to "unsigned int"
http://git.buildroot.net/buildroot/commit/?id=0f236c1fef669192c8f5cc8ef26e93da91438dc2
introduced regression due to existing PTRDIFF_TYPE.

Now to fix regression convert PTRDIFF_TYPE to simple "int".

Fix is taken from current development branch of GCC for ARC and will be a part of the next release of ARC tools, so at that point patch should be dropped.

https://github.com/foss-for-synopsys-dwc-arc-processors/gcc/commit/846e92167aa4f486259c9ff44bb4e6cce6097fa4

Quoted 8 lines
Cc Anton Kolesov <[email protected]>
Cc Thomas Petazzoni <[email protected]>
Cc Peter Korsgaard <[email protected]>
---
 package/gcc/arc-2014.08/300-ptrdiff_type_int.patch | 26 ++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 package/gcc/arc-2014.08/300-ptrdiff_type_int.patch

I've applied your patch. However, I had to tweak a bit the commit log, especially the title which wasn't matching the standard titles we use in Buildroot.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com