[Buildroot] [PATCH v6 03/10] package/newlib-bare-metal: new package
Frager, Neal
neal.frager at amd.com
Thu Nov 16 10:20:43 UTC 2023
Hi Yann,
> I finally got the time to get back on this, but there appears to be another issue.
> When I use the following for installing the newlib in the sysroot staging area:
> NEWLIB_BARE_METAL_INSTALL_STAGING_OPTS = \
> DESTDIR=$(HOST_GCC_BARE_METAL_SYSROOT) \
> Install
> I get the following error message:
> /usr/bin/install: cannot create regular file
> '/buildroot/output/host/microblazeel-xilinx-elf/sysroot/usr/microblaze
> el-xilinx-elf/lib': No such file or directory
> I had a very quick glance at the newlib Makefile, and it seems it might not be totally parallel-safe, especially for installation, so maybe:
> NEWLIB_BARE_METAL_MAKE = $(MAKE1)
> Can you try that, please?
Yes, you were right. newlib has an issue with parallel installation.
Using $(MAKE1) or "make -j1" solves the problem.
Now I am encountering another issue.
newlib is installing correctly to the /buildroot/output/host/microblazeel-xilinx-elf/sysroot directory.
However, gcc does not seem to be able to find it when building, as I am getting the following build error:
/buildroot/output/host/lib/gcc/microblazeel-xilinx-elf/13.2.0/include/stdint.h:9:16: fatal error: stdint.h: No such file or directory
When installing newlib as a host package, the stdint.h can be found here:
/buildroot/output/host/microblazeel-xilinx-elf/include/stdint.h
And the microblaze gcc finds it.
When installing newlib to the gcc sysroot as a target package, the stdint.h is found here:
/buildroot/output/host/microblazeel-xilinx-elf/sysroot/usr/microblazeel-xilinx-elf/include/stdint.h
And the microblaze gcc does not find it.
If I simply create the following symbolic links:
/buildroot/output/host/microblazeel-xilinx-elf/sysroot/usr/include -> /buildroot/output/host/microblazeel-xilinx-elf/sysroot/usr/microblazeel-xilinx-elf/include
/buildroot/output/host/microblazeel-xilinx-elf/sysroot/usr/lib -> /buildroot/output/host/microblazeel-xilinx-elf/sysroot/usr/microblazeel-xilinx-elf/lib
Then everything works, and I can build correctly.
How would you recommend I solve this?
Should I be creating these symbolic links or is there a way to install to
'sysroot/usr/include' and 'sysroot/usr/lib' without the 'microblazeel-xilinx-elf' directory?
Thank you for your help!
Best regards,
Neal Frager
AMD
More information about the buildroot
mailing list