<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 5 Aug 2017, at 2:25 PM, via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">On 8/4/17 4:29 PM, Goran Mekić wrote:</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">On Fri, Aug 04, 2017 at 04:03:35PM -0600, Jonathan Roelofs wrote:<br class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><blockquote type="cite" class="">1) Pick a directory as your sysroot<br class=""></blockquote>~/arm-sysroot<br class=""><br class=""><blockquote type="cite" class="">2) Install the libc headers there (without having built it)<br class=""></blockquote>What I did was mv musl-*/include ~/arm-sysroot/usr/include.<br class=""></blockquote>I think you need to copy them, not move them.<br class=""></blockquote>On a new directories and fresh untar of musl, I don't think there's a difference<br class=""></blockquote><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">I was assuming you'd want to build it from the same sources later...</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""></div></blockquote></div><div class=""><br class=""></div><div class="">Copying the includes directory is not sufficient for musl as the musl build system assembles the arch specific bits directories from arch/${ARCH} and it constructs the syscalls.h headers at built time. It uses the ${ARCH} variable to meld directories together in the install target and there should be a valid config.mak or ARCH=aarch64 should be passed on the make command line.</div><div class=""><br class=""></div><div class="">To make the header directory install to ${SYSROOT}/usr/include you need to do something like this:</div><div class=""><br class=""></div><div class="">  cd musl</div><div class="">  echo ARCH=aarch64 > config.mak</div><div class="">  echo prefix=/usr >> config.mak</div><div class="">  make DESTDIR=${SYSROOT} install-headers<br class=""><br class=""></div><div class="">You can build and install only the static libs like this:</div><div class=""><br class=""></div><div class="">  make DESTDIR=${SYSROOT} SHARED_LIBS= install-libs<br class=""><br class=""></div><div class="">You can build and install the dynamic and static libs like this:</div><div class=""><br class=""></div><div class="">  make DESTDIR=${SYSROOT} install-libs<br class=""><br class=""></div></body></html>