[v2] newlib: fix sys headers installation path

Message ID 2eb2ce08c76b7716f6581d7545a9f8190e5cbf69.camel@espressif.com
State New
Headers
Series [v2] newlib: fix sys headers installation path |

Commit Message

Alexey Lapshin Sept. 11, 2023, 12:53 p.m. UTC
  ---
 newlib/Makefile.am | 2 +-
 newlib/Makefile.in | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

-- 
2.34.1
  

Comments

Sebastian Huber Sept. 11, 2023, 1:09 p.m. UTC | #1
On 11.09.23 14:53, Alexey Lapshin wrote:
> ---
>   newlib/Makefile.am | 2 +-
>   newlib/Makefile.in | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/newlib/Makefile.am b/newlib/Makefile.am
> index e29607ccd..47f0be288 100644
> --- a/newlib/Makefile.am
> +++ b/newlib/Makefile.am
> @@ -334,7 +334,7 @@ install-data-local: install-toollibLIBRARIES install-multi $(INSTALL_DATA_LOCAL)
>   	    else true; fi ; \
>   	  done ; \
>   	  for i in $(call rwildcard,$(srcdir)/libc/sys/$(sys_dir)/include/,*.h); do \
> -	    f=`echo $$i | sed s:^$(srcdir)/libc/sys/$(sys_dir)/include/::`; \
> +	    f=`echo $$i | sed s:^$(srcdir)/libc/sys/$(sys_dir)/::`; \
>   	    $(MKDIR_P) $(DESTDIR)$(tooldir)/`dirname $$f`; \
>   	    $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/`dirname $$f`; \
>   	  done ; \
> diff --git a/newlib/Makefile.in b/newlib/Makefile.in
> index c3052acb9..5dc9dcc8d 100644
> --- a/newlib/Makefile.in
> +++ b/newlib/Makefile.in
> @@ -50500,7 +50500,7 @@ install-data-local: install-toollibLIBRARIES install-multi $(INSTALL_DATA_LOCAL)
>   	    else true; fi ; \
>   	  done ; \
>   	  for i in $(call rwildcard,$(srcdir)/libc/sys/$(sys_dir)/include/,*.h); do \
> -	    f=`echo $$i | sed s:^$(srcdir)/libc/sys/$(sys_dir)/include/::`; \
> +	    f=`echo $$i | sed s:^$(srcdir)/libc/sys/$(sys_dir)/::`; \
>   	    $(MKDIR_P) $(DESTDIR)$(tooldir)/`dirname $$f`; \
>   	    $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/`dirname $$f`; \
>   	  done ; \

This patch fixes the header install problem for RTEMS. Why did the 
xtensa port work without this fix? This seems to be a generic issue.
  
Alexey Lapshin Sept. 11, 2023, 1:26 p.m. UTC | #2
> This patch fixes the header install problem for RTEMS. Why did the
> xtensa port work without this fix? This seems to be a generic issue.


This because of files from "newlib/libc/sys/xtensa/include/" used mostly while newlib build.

While build applications used chip specific core-isa.h file.. E.g. https://github.com/espressif/esp-idf/blob/master/components/xtensa/esp32/include/xtensa/config/core-isa.h

That's the reason why I did not catch the issue.
  
Sebastian Huber Sept. 13, 2023, 6:11 a.m. UTC | #3
On 11.09.23 15:26, Alexey Lapshin wrote:
>> This patch fixes the header install problem for RTEMS. Why did the
>> xtensa port work without this fix? This seems to be a generic issue.
> 
> This because of files from "newlib/libc/sys/xtensa/include/" used mostly while newlib build.
> 
> While build applications used chip specific core-isa.h file.. E.g.https://github.com/espressif/esp-idf/blob/master/components/xtensa/esp32/include/xtensa/config/core-isa.h
> 
> That's the reason why I did not catch the issue.

Thanks for the explanation. May I check in the patch?
  
Alexey Lapshin Sept. 13, 2023, 1:37 p.m. UTC | #4
> Thanks for the explanation. May I check in the patch?

Yes, that's would be nice, thanks!
  
Sebastian Huber Sept. 18, 2023, 12:22 p.m. UTC | #5
On 13.09.23 15:37, Alexey Lapshin wrote:
>> Thanks for the explanation. May I check in the patch?
> 
> Yes, that's would be nice, thanks!

I need permission from Corinna or Jeff to do this.
  
Jeff Johnston Sept. 18, 2023, 3:47 p.m. UTC | #6
Please go ahead.

-- Jeff J.

On Mon, Sep 18, 2023 at 8:22 AM Sebastian Huber <
sebastian.huber@embedded-brains.de> wrote:

> On 13.09.23 15:37, Alexey Lapshin wrote:
> >> Thanks for the explanation. May I check in the patch?
> >
> > Yes, that's would be nice, thanks!
>
> I need permission from Corinna or Jeff to do this.
>
> --
> embedded brains GmbH
> Herr Sebastian HUBER
> Dornierstr. 4
> 82178 Puchheim
> Germany
> email: sebastian.huber@embedded-brains.de
> phone: +49-89-18 94 741 - 16
> fax:   +49-89-18 94 741 - 08
>
> Registergericht: Amtsgericht München
> Registernummer: HRB 157899
> Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
> Unsere Datenschutzerklärung finden Sie hier:
> https://embedded-brains.de/datenschutzerklaerung/
>
>
  

Patch

diff --git a/newlib/Makefile.am b/newlib/Makefile.am
index e29607ccd..47f0be288 100644
--- a/newlib/Makefile.am
+++ b/newlib/Makefile.am
@@ -334,7 +334,7 @@  install-data-local: install-toollibLIBRARIES install-multi $(INSTALL_DATA_LOCAL)
 	    else true; fi ; \
 	  done ; \
 	  for i in $(call rwildcard,$(srcdir)/libc/sys/$(sys_dir)/include/,*.h); do \
-	    f=`echo $$i | sed s:^$(srcdir)/libc/sys/$(sys_dir)/include/::`; \
+	    f=`echo $$i | sed s:^$(srcdir)/libc/sys/$(sys_dir)/::`; \
 	    $(MKDIR_P) $(DESTDIR)$(tooldir)/`dirname $$f`; \
 	    $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/`dirname $$f`; \
 	  done ; \
diff --git a/newlib/Makefile.in b/newlib/Makefile.in
index c3052acb9..5dc9dcc8d 100644
--- a/newlib/Makefile.in
+++ b/newlib/Makefile.in
@@ -50500,7 +50500,7 @@  install-data-local: install-toollibLIBRARIES install-multi $(INSTALL_DATA_LOCAL)
 	    else true; fi ; \
 	  done ; \
 	  for i in $(call rwildcard,$(srcdir)/libc/sys/$(sys_dir)/include/,*.h); do \
-	    f=`echo $$i | sed s:^$(srcdir)/libc/sys/$(sys_dir)/include/::`; \
+	    f=`echo $$i | sed s:^$(srcdir)/libc/sys/$(sys_dir)/::`; \
 	    $(MKDIR_P) $(DESTDIR)$(tooldir)/`dirname $$f`; \
 	    $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/`dirname $$f`; \
 	  done ; \