newlib.inc 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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=c0469b6ebb847a75781066be515f032d \
  11. file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
  12. file://COPYING.NEWLIB;md5=4f1a15846ffee91e352418563e1bce27 \
  13. file://newlib/libc/posix/COPYRIGHT;md5=103468ff1982be840fdf4ee9f8b51bbf \
  14. "
  15. BASEVER = "4.4.0"
  16. PV = "${BASEVER}+git"
  17. SRC_URI = "git://sourceware.org/git/newlib-cygwin.git;protocol=https;branch=main"
  18. SRCREV = "ad11e2587f83d61357a32c61c36d72ea4f39315e"
  19. INHIBIT_DEFAULT_DEPS = "1"
  20. DEPENDS = "virtual/cross-cc"
  21. S = "${WORKDIR}/git"
  22. B = "${WORKDIR}/build"
  23. ## disable stdlib
  24. TARGET_CC_ARCH:append = " -nostdlib"
  25. # Both the C library and the application should share the same mcmodel.
  26. # Use the medium-any code model for the RISC-V 64 bit implementation,
  27. # since medlow can only access addresses below 0x80000000 and RAM
  28. # starts at 0x80000000 on RISC-V 64
  29. # Keep RISC-V 32 using -mcmodel=medlow (symbols lie between -2GB:2GB)
  30. TARGET_CFLAGS:append:qemuriscv64 = " -mcmodel=medany"
  31. EXTRA_OECONF = " \
  32. --build=${BUILD_SYS} \
  33. --target=${TARGET_SYS} \
  34. --host=${HOST_SYS} \
  35. --prefix=${prefix} \
  36. --exec-prefix=${exec_prefix} \
  37. --bindir=${bindir} \
  38. --libdir=${libdir} \
  39. --includedir=${includedir} \
  40. --enable-languages=c \
  41. --with-newlib \
  42. --with-gnu-as \
  43. --with-gnu-ld \
  44. --disable-multilib \
  45. --disable-newlib-supplied-syscalls \
  46. "
  47. do_configure[cleandirs] = "${B}"
  48. # We need a dummy limits.h to pass preprocessor checks
  49. do_configure:append(){
  50. install -d ${STAGING_INCDIR}
  51. touch ${STAGING_INCDIR}/limits.h
  52. }
  53. do_install() {
  54. oe_runmake install DESTDIR='${D}'
  55. }
  56. COMPATIBLE_HOST:libc-musl:class-target = "null"
  57. COMPATIBLE_HOST:libc-glibc:class-target = "null"