blob: bae8c81cc726139f6c2c05498b19a502d6b3137d [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001# Copyright (C) 2018 Khem Raj <raj.khem@gmail.com>
2# Released under the MIT license (see COPYING.MIT for the terms)
3
4SUMMARY = "Minimal libssp_nonshared.a must needed for ssp to work with gcc on musl"
5LICENSE = "GPL-3.0-with-GCC-exception"
6LIC_FILES_CHKSUM = "file://ssp-local.c;beginline=1;endline=32;md5=c06d391208c0cfcbc541a6728ed65cc4"
7SECTION = "libs"
8
9SRC_URI = "file://ssp-local.c"
10
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080011INHIBIT_DEFAULT_DEPS = "1"
12
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080013DEPENDS = "virtual/${TARGET_PREFIX}binutils \
Brad Bishop19323692019-04-05 15:28:33 -040014 virtual/${TARGET_PREFIX}gcc \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080015"
16
17do_configure[noexec] = "1"
18
19S = "${WORKDIR}"
20
21do_compile() {
22 ${CC} ${CPPFLAGS} ${CFLAGS} -fPIE -c ssp-local.c -o ssp-local.o
23 ${AR} r libssp_nonshared.a ssp-local.o
24}
25do_install() {
26 install -Dm 0644 ${B}/libssp_nonshared.a ${D}${base_libdir}/libssp_nonshared.a
27}
28#
29# We will skip parsing for non-musl systems
30#
31COMPATIBLE_HOST = ".*-musl.*"
32RDEPENDS_${PN}-staticdev = ""
33RDEPENDS_${PN}-dev = ""
34RRECOMMENDS_${PN}-dbg = "${PN}-staticdev (= ${EXTENDPKGV})"