newlib.inc 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. SUMMARY = "Newlib is a C library intended for use on embedded systems"
  2. HOMEPAGE = "https://sourceware.org/newlib/"
  3. DESCRIPTION = "C library intended for use on embedded systems. It is a conglomeration of several library parts, all under free software licenses that make them easily usable on embedded products."
  4. SECTION = "libs"
  5. LICENSE = "GPL-2.0-only & LGPL-3.0-only & GPL-3.0-only & LGPL-2.0-only & BSD-2-Clause & BSD-3-Clause & TCL & Apache-2.0-with-LLVM-exception"
  6. LIC_FILES_CHKSUM = " \
  7. file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
  8. file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \
  9. file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \
  10. file://COPYING.LIBGLOSS;md5=faa6f6ad545714df2a7d1276ed899f15 \
  11. file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
  12. file://COPYING.NEWLIB;md5=61255563bbcda142f581b94591b6a589 \
  13. file://newlib/libc/posix/COPYRIGHT;md5=103468ff1982be840fdf4ee9f8b51bbf \
  14. "
  15. BASEVER = "4.5.0"
  16. PV = "${BASEVER}+git"
  17. SRC_URI = "git://sourceware.org/git/newlib-cygwin.git;protocol=https;branch=main"
  18. SRCREV = "5e5e51f1dc56a99eb4648c28e00d73b6ea44a8b0"
  19. INHIBIT_DEFAULT_DEPS = "1"
  20. DEPENDS = "virtual/cross-cc"
  21. B = "${WORKDIR}/build"
  22. ## disable stdlib
  23. TARGET_CC_ARCH:append = " -nostdlib"
  24. # Both the C library and the application should share the same mcmodel.
  25. # Use the medium-any code model for the RISC-V 64 bit implementation,
  26. # since medlow can only access addresses below 0x80000000 and RAM
  27. # starts at 0x80000000 on RISC-V 64
  28. # Keep RISC-V 32 using -mcmodel=medlow (symbols lie between -2GB:2GB)
  29. TARGET_CFLAGS:append:qemuriscv64 = " -mcmodel=medany"
  30. EXTRA_OECONF = " \
  31. --build=${BUILD_SYS} \
  32. --target=${TARGET_SYS} \
  33. --host=${HOST_SYS} \
  34. --prefix=${prefix} \
  35. --exec-prefix=${exec_prefix} \
  36. --bindir=${bindir} \
  37. --libdir=${libdir} \
  38. --includedir=${includedir} \
  39. --enable-languages=c \
  40. --with-newlib \
  41. --with-gnu-as \
  42. --with-gnu-ld \
  43. --disable-multilib \
  44. --disable-newlib-supplied-syscalls \
  45. "
  46. do_configure[cleandirs] = "${B}"
  47. # We need a dummy limits.h to pass preprocessor checks
  48. do_configure:append(){
  49. install -d ${STAGING_INCDIR}
  50. touch ${STAGING_INCDIR}/limits.h
  51. }
  52. do_install() {
  53. oe_runmake install DESTDIR='${D}'
  54. }
  55. COMPATIBLE_HOST:libc-musl:class-target = "null"
  56. COMPATIBLE_HOST:libc-glibc:class-target = "null"