mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
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@citrix.com> Reviewed-by: Anthony PERARD <anthony.perard@vates.tech>
This commit is contained in:
1 parent
41190d2ceb
commit
444cb9350f
2 files changed
+12
No files matched your search
@@ -97,10 +97,12 @@ newlib-$(NEWLIB_VERSION): newlib-$(NEWLIB_VERSION).tar.gz
|
|||||||
patch -d $@ -p1 < newlib-disable-texinfo.patch
|
patch -d $@ -p1 < newlib-disable-texinfo.patch
|
||||||
patch -d $@ -p1 < newlib-cygmon-gmon.patch
|
patch -d $@ -p1 < newlib-cygmon-gmon.patch
|
||||||
patch -d $@ -p1 < newlib-makedoc.patch
|
patch -d $@ -p1 < newlib-makedoc.patch
|
||||||
|
patch -d $@ -p1 < newlib-fix-copy_past_newline.patch
|
||||||
find $@ -type f | xargs perl -i.bak \
|
find $@ -type f | xargs perl -i.bak \
|
||||||
-pe 's/\b_(tzname|daylight|timezone)\b/$$1/g'
|
-pe 's/\b_(tzname|daylight|timezone)\b/$$1/g'
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
|
NEWLIB_CFLAGS += -Wno-implicit-function-declaration
|
||||||
NEWLIB_STAMPFILE=$(CROSS_ROOT)/$(GNU_TARGET_ARCH)-xen-elf/lib/libc.a
|
NEWLIB_STAMPFILE=$(CROSS_ROOT)/$(GNU_TARGET_ARCH)-xen-elf/lib/libc.a
|
||||||
.PHONY: cross-newlib
|
.PHONY: cross-newlib
|
||||||
cross-newlib: $(NEWLIB_STAMPFILE)
|
cross-newlib: $(NEWLIB_STAMPFILE)
|
||||||
|
|||||||
@@ -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
|
||||||