mailing list of musl libc
 help / color / mirror / code / Atom feed
From: "Matúš Olekšák" <oleksak.matus@gmail.com>
To: musl@lists.openwall.com
Subject: Re: shmctl not found when compiling compiler-rt
Date: Tue, 13 Feb 2018 15:30:45 +0100	[thread overview]
Message-ID: <CAG6b3Eoiahd8H1zK70wvx_=PWDrHGaQsjQ=Q_w_L8NV9Mt6cWQ@mail.gmail.com> (raw)
In-Reply-To: <20180213141524.GZ4418@port70.net>


[-- Attachment #1.1: Type: text/plain, Size: 1099 bytes --]

Try this patch to correctly link compiler-rt.

2018-02-13 15:15 GMT+01:00 Szabolcs Nagy <nsz@port70.net>:

> * Dmitry Golovin <dima@golovin.in> [2018-02-13 15:34:34 +0200]:
> > I'm trying to compile compiler-rt with musl and it used to be fine, but
> I can't succeed with recent versions of compiler-rt.
> >
> > The compilation fails because of the lack of real_shmctl while musl
> clearly has shmctl: http://git.musl-libc.org/cgit/
> musl/tree/src/ipc/shmctl.c
> >
> > Here is the complete output:
> >
> >     llvm/projects/compiler-rt/lib/msan/msan_interceptors.cc:1446:15:
> error: no member named 'real_shmctl' in namespace '__interception'; did you
> mean 'real_ioctl'?
> >         int res = REAL(shmctl)(shmid, shmctl_ipc_stat, &ds);
> >                   ^~~~~~~~~~~~
>
> there should be a
>
> DECLARE_REAL(int, shmctl, int shmid, int cmd, void *buf)
>
> in that file which defines __interception::real_shmctl.
>
> > To compile without glibc on linux using this patch:
> > https://github.com/tpimh/ngtc/blob/alpine/patch/compiler-rt-
> 01-sanitizer-nongnu.patch
> >
> > Regards,
> > Dmitry
>

[-- Attachment #1.2: Type: text/html, Size: 1913 bytes --]

[-- Attachment #2: compiler-rt.patch --]
[-- Type: application/octet-stream, Size: 519 bytes --]

--- a/configure
+++ b/configure
@@ -597,7 +597,8 @@
 
 # Find compiler runtime library
 test -z "$LIBCC" && tryldflag LIBCC -lgcc && tryldflag LIBCC -lgcc_eh
-test -z "$LIBCC" && tryldflag LIBCC -lcompiler_rt
+test -z "$LIBCC" && try_libcc=`$CC -print-libgcc-file-name 2>/dev/null` \
+                 && tryldflag LIBCC "$try_libcc"
 test -z "$LIBCC" && try_libcc=`$CC -print-file-name=libpcc.a 2>/dev/null` \
                  && tryldflag LIBCC "$try_libcc"
 printf "using compiler runtime libraries: %s\n" "$LIBCC"

  reply	other threads:[~2018-02-13 14:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-13 13:34 Dmitry Golovin
2018-02-13 14:15 ` Szabolcs Nagy
2018-02-13 14:30   ` Matúš Olekšák [this message]
2018-02-13 14:33     ` Szabolcs Nagy
2018-02-13 14:33     ` Dmitry Golovin
2018-02-13 14:36       ` Matúš Olekšák
2018-02-13 14:51         ` Matúš Olekšák
2018-02-13 16:32   ` Julien Ramseier
2018-02-14 15:29   ` Dmitry Golovin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAG6b3Eoiahd8H1zK70wvx_=PWDrHGaQsjQ=Q_w_L8NV9Mt6cWQ@mail.gmail.com' \
    --to=oleksak.matus@gmail.com \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).