Newlib build fails

"Keith Clifford" <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>
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 <[email protected]>

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: [email protected]

Web:  <https://www.tranaptic.ca> https://www.tranaptic.ca
image001.jpg (image/jpeg, 2.6 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.