Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/gcc: add patch to fix gcc 11 build warning
@ 2024-05-10 22:07 Brandon Maier via buildroot
  2024-05-11  6:57 ` Thomas Petazzoni via buildroot
  2024-06-08  7:44 ` Peter Korsgaard
  0 siblings, 2 replies; 3+ messages in thread
From: Brandon Maier via buildroot @ 2024-05-10 22:07 UTC (permalink / raw)
  To: buildroot; +Cc: Giulio Benetti, Brandon Maier, Romain Naour, Thomas Petazzoni

When building GCC 11 with GCC 14 the following error occurs

> ../../../libiberty/simple-object-mach-o.c:1231:17: error: passing argument 1 of 'set_32' from incompatible pointer type [-Wincompatible-pointer-types]

This was fixed upstream in GCC12[1]. It is applied to the GCC 11 release
branch[2], but has not been officially released yet.

[1] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=38757aa88735ab2e511bc428e2407a5a5e9fa0be
[2] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=02cd761eb1198df50453b2e39653f48053609ffc

Signed-off-by: Brandon Maier <brandon.maier@collins.com>
---
 ...libiberty-Darwin-Fix-a-build-warning.patch | 37 +++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 package/gcc/11.4.0/0009-libiberty-Darwin-Fix-a-build-warning.patch

diff --git a/package/gcc/11.4.0/0009-libiberty-Darwin-Fix-a-build-warning.patch b/package/gcc/11.4.0/0009-libiberty-Darwin-Fix-a-build-warning.patch
new file mode 100644
index 0000000000..3c694a89fa
--- /dev/null
+++ b/package/gcc/11.4.0/0009-libiberty-Darwin-Fix-a-build-warning.patch
@@ -0,0 +1,37 @@
+From d1fc3505cc09d0ee02abbb732eafc91967c3ac07 Mon Sep 17 00:00:00 2001
+From: Iain Sandoe <iain@sandoe.co.uk>
+Date: Mon, 23 Aug 2021 17:34:43 +0100
+Subject: [PATCH] libiberty, Darwin: Fix a build warning.
+
+r12-3005-g220c410162ebece4f missed a cast for the set_32 call.
+Fixed thus.
+
+Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
+
+libiberty/ChangeLog:
+
+	* simple-object-mach-o.c (simple_object_mach_o_write_segment):
+	Cast the first argument to set_32 as needed.
+
+Upstream: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=38757aa88735ab2e511bc428e2407a5a5e9fa0be
+Signed-off-by: Brandon Maier <brandon.maier@collins.com>
+---
+ libiberty/simple-object-mach-o.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libiberty/simple-object-mach-o.c b/libiberty/simple-object-mach-o.c
+index 72b69d19c21..a8869e7c639 100644
+--- a/libiberty/simple-object-mach-o.c
++++ b/libiberty/simple-object-mach-o.c
+@@ -1228,7 +1228,7 @@ simple_object_mach_o_write_segment (simple_object_write *sobj, int descriptor,
+       /* Swap the indices, if required.  */
+ 
+       for (i = 0; i < (nsects_in * 4); ++i)
+-	set_32 (&index[i], index[i]);
++	set_32 ((unsigned char *) &index[i], index[i]);
+ 
+       sechdr_offset += sechdrsize;
+ 
+-- 
+2.45.0
+
-- 
2.45.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH] package/gcc: add patch to fix gcc 11 build warning
  2024-05-10 22:07 [Buildroot] [PATCH] package/gcc: add patch to fix gcc 11 build warning Brandon Maier via buildroot
@ 2024-05-11  6:57 ` Thomas Petazzoni via buildroot
  2024-06-08  7:44 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-05-11  6:57 UTC (permalink / raw)
  To: Brandon Maier via buildroot; +Cc: Giulio Benetti, Romain Naour, Brandon Maier

On Fri, 10 May 2024 22:07:04 +0000
Brandon Maier via buildroot <buildroot@buildroot.org> wrote:

> When building GCC 11 with GCC 14 the following error occurs
> 
> > ../../../libiberty/simple-object-mach-o.c:1231:17: error: passing argument 1 of 'set_32' from incompatible pointer type [-Wincompatible-pointer-types]  
> 
> This was fixed upstream in GCC12[1]. It is applied to the GCC 11 release
> branch[2], but has not been officially released yet.
> 
> [1] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=38757aa88735ab2e511bc428e2407a5a5e9fa0be
> [2] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=02cd761eb1198df50453b2e39653f48053609ffc
> 
> Signed-off-by: Brandon Maier <brandon.maier@collins.com>
> ---
>  ...libiberty-Darwin-Fix-a-build-warning.patch | 37 +++++++++++++++++++
>  1 file changed, 37 insertions(+)
>  create mode 100644 package/gcc/11.4.0/0009-libiberty-Darwin-Fix-a-build-warning.patch

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH] package/gcc: add patch to fix gcc 11 build warning
  2024-05-10 22:07 [Buildroot] [PATCH] package/gcc: add patch to fix gcc 11 build warning Brandon Maier via buildroot
  2024-05-11  6:57 ` Thomas Petazzoni via buildroot
@ 2024-06-08  7:44 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2024-06-08  7:44 UTC (permalink / raw)
  To: Brandon Maier via buildroot
  Cc: Thomas Petazzoni, Giulio Benetti, Romain Naour, Brandon Maier

>>>>> "Brandon" == Brandon Maier via buildroot <buildroot@buildroot.org> writes:

 > When building GCC 11 with GCC 14 the following error occurs
 >> ../../../libiberty/simple-object-mach-o.c:1231:17: error: passing
 > argument 1 of 'set_32' from incompatible pointer type
 > [-Wincompatible-pointer-types]

 > This was fixed upstream in GCC12[1]. It is applied to the GCC 11 release
 > branch[2], but has not been officially released yet.

 > [1] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=38757aa88735ab2e511bc428e2407a5a5e9fa0be
 > [2] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=02cd761eb1198df50453b2e39653f48053609ffc

 > Signed-off-by: Brandon Maier <brandon.maier@collins.com>

Committed to 2024.02.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-06-08  7:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-10 22:07 [Buildroot] [PATCH] package/gcc: add patch to fix gcc 11 build warning Brandon Maier via buildroot
2024-05-11  6:57 ` Thomas Petazzoni via buildroot
2024-06-08  7:44 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox