libssp-nonshared.bb 1022 B

1234567891011121314151617181920212223242526272829303132333435
  1. # Copyright (C) 2018 Khem Raj <raj.khem@gmail.com>
  2. # Released under the MIT license (see COPYING.MIT for the terms)
  3. SUMMARY = "Minimal libssp_nonshared.a must needed for ssp to work with gcc on musl"
  4. LICENSE = "BSD-3-Clause"
  5. LIC_FILES_CHKSUM = "file://stack_chk.c;beginline=1;endline=30;md5=97e59d9deee678a9332c9ddb2ab6360d"
  6. SECTION = "libs"
  7. # Sourced from https://github.com/intel/linux-sgx/blob/master/sdk/compiler-rt/stack_chk.c
  8. SRC_URI = "file://stack_chk.c"
  9. INHIBIT_DEFAULT_DEPS = "1"
  10. DEPENDS = "virtual/cross-binutils \
  11. virtual/cross-cc \
  12. "
  13. do_configure[noexec] = "1"
  14. S = "${UNPACKDIR}"
  15. do_compile() {
  16. ${CC} ${CPPFLAGS} ${CFLAGS} -fPIE -c stack_chk.c -o stack_chk.o
  17. ${AR} r libssp_nonshared.a stack_chk.o
  18. }
  19. do_install() {
  20. install -Dm 0644 ${B}/libssp_nonshared.a ${D}${base_libdir}/libssp_nonshared.a
  21. }
  22. #
  23. # We will skip parsing for non-musl systems
  24. #
  25. COMPATIBLE_HOST = ".*-musl.*"
  26. RDEPENDS:${PN}-staticdev = ""
  27. DEV_PKG_DEPENDENCY = ""
  28. RRECOMMENDS:${PN}-dbg = "${PN}-staticdev (= ${EXTENDPKGV})"