Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 1 | # Copyright (C) 2018 Khem Raj <raj.khem@gmail.com> |
| 2 | # Released under the MIT license (see COPYING.MIT for the terms) |
| 3 | |
| 4 | SUMMARY = "Minimal libssp_nonshared.a must needed for ssp to work with gcc on musl" |
| 5 | LICENSE = "GPL-3.0-with-GCC-exception" |
| 6 | LIC_FILES_CHKSUM = "file://ssp-local.c;beginline=1;endline=32;md5=c06d391208c0cfcbc541a6728ed65cc4" |
| 7 | SECTION = "libs" |
| 8 | |
| 9 | SRC_URI = "file://ssp-local.c" |
| 10 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 11 | INHIBIT_DEFAULT_DEPS = "1" |
| 12 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 13 | DEPENDS = "virtual/${TARGET_PREFIX}binutils \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 14 | virtual/${TARGET_PREFIX}gcc \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 15 | " |
| 16 | |
| 17 | do_configure[noexec] = "1" |
| 18 | |
| 19 | S = "${WORKDIR}" |
| 20 | |
| 21 | do_compile() { |
| 22 | ${CC} ${CPPFLAGS} ${CFLAGS} -fPIE -c ssp-local.c -o ssp-local.o |
| 23 | ${AR} r libssp_nonshared.a ssp-local.o |
| 24 | } |
| 25 | do_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 | # |
| 31 | COMPATIBLE_HOST = ".*-musl.*" |
| 32 | RDEPENDS_${PN}-staticdev = "" |
| 33 | RDEPENDS_${PN}-dev = "" |
| 34 | RRECOMMENDS_${PN}-dbg = "${PN}-staticdev (= ${EXTENDPKGV})" |