[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen staging-4.16] stubdom: Fix newlib build with GCC-14



commit fcc6e8d554eec477a56b54a3b7a27bc3a5bd84fd
Author:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Tue Oct 29 16:39:22 2024 +0100
Commit:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Mon Nov 11 16:41:46 2024 +0000

    stubdom: Fix newlib build with GCC-14
    
    Based on a fix from OpenSUSE, but adjusted to be Clang-compatible too.  Pass
    -Wno-implicit-function-declaration library-wide rather than using local GCC
    pragmas.
    
    Fix of copy_past_newline() to avoid triggering -Wstrict-prototypes.
    
    Link: https://build.opensuse.org/request/show/1178775
    Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Reviewed-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
    master commit: 444cb9350f2c1cc202b6b86176ddd8e57525e2d9
    master date: 2024-10-03 10:07:25 +0100
---
 stubdom/Makefile                           |  2 ++
 stubdom/newlib-fix-copy_past_newline.patch | 10 ++++++++++
 2 files changed, 12 insertions(+)

diff --git a/stubdom/Makefile b/stubdom/Makefile
index 8c5c6ad6b9..08221676ff 100644
--- a/stubdom/Makefile
+++ b/stubdom/Makefile
@@ -97,10 +97,12 @@ newlib-$(NEWLIB_VERSION): newlib-$(NEWLIB_VERSION).tar.gz
        patch -d $@ -p1 < newlib-disable-texinfo.patch
        patch -d $@ -p1 < newlib-cygmon-gmon.patch
        patch -d $@ -p1 < newlib-makedoc.patch
+       patch -d $@ -p1 < newlib-fix-copy_past_newline.patch
        find $@ -type f | xargs perl -i.bak \
                -pe 's/\b_(tzname|daylight|timezone)\b/$$1/g'
        touch $@
 
+NEWLIB_CFLAGS += -Wno-implicit-function-declaration
 NEWLIB_STAMPFILE=$(CROSS_ROOT)/$(GNU_TARGET_ARCH)-xen-elf/lib/libc.a
 .PHONY: cross-newlib
 cross-newlib: $(NEWLIB_STAMPFILE)
diff --git a/stubdom/newlib-fix-copy_past_newline.patch 
b/stubdom/newlib-fix-copy_past_newline.patch
new file mode 100644
index 0000000000..f8452480bc
--- /dev/null
+++ b/stubdom/newlib-fix-copy_past_newline.patch
@@ -0,0 +1,10 @@
+--- newlib-1.16.0/newlib/doc/makedoc.c.orig
++++ newlib-1.16.0/newlib/doc/makedoc.c
+@@ -798,6 +798,7 @@ DEFUN( iscommand,(ptr, idx),
+ }
+
+
++static unsigned int
+ DEFUN(copy_past_newline,(ptr, idx, dst),
+       string_type *ptr AND
+       unsigned int idx AND
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.16



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.