Newlib build fails

Keith Clifford kclifford@tranaptic.ca
Fri Jun 23 23:57:41 GMT 2023


Hi,

I am building newlib for a MinGW cross compiler tool chain for ARM, M68K,
and PowerPC. The build fails in all cases and I've included a patch that
allows me to get the build to work.

 

The pertinent details are:

Newlib version:  4.3.0

Build system: CYGWIN_NT-10.0-19045 Keith-PC 3.4.6-1.x86_64 2023-02-14 13:23
UTC x86_64 Cygwin

Host: MinGW

Target: arm-eabi, m68k-elf, and powerpc-eabi   (see ${TARGET} below)

Configure parameters: --target=${TARGET} --prefix=${PREFIX}

 

The -print-multi-lib option for the respective built gcc generates output
for which the end of line is "\r\n" and config-ml.in leaves the '\r' in the
"flags" variable, in the following patch, confusing subsequent processing. 

 

PATCH FILE STARTS:

>From cac29dd969f33e9cfb1b24c0e3ba28ea499d96e6 Mon Sep 17 00:00:00 2001

From: kclifford <kclifford@tranaptic.ca>

Date: Fri, 16 Jun 2023 17:57:54 +0100

Subject: [PATCH] Patches to get gcc version 13.1.0 to build successfully.

 

---

config-ml.in | 4 ++--

1 file changed, 2 insertions(+), 2 deletions(-)

 

diff --git a/config-ml.in b/config-ml.in

index 5e519942b..0ae4b1cea 100644

--- a/config-ml.in

+++ b/config-ml.in

@@ -502,7 +502,7 @@ multi-do:

                     true; \

                   else \

                     if [ -d ../$${dir}/$${lib} ]; then \

-                              flags=`echo $$i | sed -e 's/^[^;]*;//' -e
's/@/ -/g'`; \

+                              flags=`echo $$i | sed -e 's/^[^;]*;//' -e
's/@/ -/g' -e 's/\r//g'`; \

                               if (cd ../$${dir}/$${lib}; $(MAKE)
$(FLAGS_TO_PASS) \

 
CFLAGS="$(CFLAGS) $${flags}" \

 
CCASFLAGS="$(CCASFLAGS) $${flags}" \

@@ -742,7 +742,7 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ];
then

     for i in `${CC-gcc} --print-multi-lib 2>/dev/null`; do

       dir=`echo $i | sed -e 's/;.*$//'`

       if [ "${dir}" = "${ml_dir}" ]; then

-        flags=`echo $i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`

+        flags=`echo $i | sed -e 's/^[^;]*;//' -e 's/@/ -/g' -e 's/\r//g'`

         break

       fi

     done

-- 

2.34.1.windows.1

 

 

Regards,

Keith

 

Keith Clifford

Cell: 250 888-4558

Email: kclifford@tranaptic.ca

Web:  <https://www.tranaptic.ca> https://www.tranaptic.ca

 



 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 2651 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/newlib/attachments/20230623/f0efe992/attachment.jpg>


More information about the Newlib mailing list