mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Yuseok <jys0710@gmail.com>
To: musl@lists.openwall.com
Subject: [musl] Build error with -flto option
Date: Tue, 3 Mar 2020 15:25:47 -0500	[thread overview]
Message-ID: <CAEPWFNzeRR9jB3y_o+O_sz7S7aGzsd_kmaOcfSh3-Y3j4XFffA@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1227 bytes --]

Hi all,

I got a below error message during building the musl with clang and -flto
option.
- my build option was ./configure CC=clang CFLAGS="-fPIC -flto -O2".
- I also tried building with "CFLAGS="-flto -O2". However, the result was
the same.
- I used clang 9.

This was my error message.

> ...................................
> j/src/unistd/setuid.o obj/src/unistd/setxid.o obj/src/unistd/sleep.o
> obj/src/unistd/symlink.o obj/src/unistd/symlinkat.o obj/src/unistd/sync.o
> obj/src/unistd/tcgetpgrp.o obj/src/unistd/tcsetpgrp.o
> obj/src/unistd/truncate.o obj/src/unistd/ttyname.o
> obj/src/unistd/ttyname_r.o obj/src/unistd/ualarm.o obj/src/unistd/unlink.o
> obj/src/unistd/unlinkat.o obj/src/unistd/usleep.o obj/src/unistd/write.o
> obj/src/unistd/writev.o
> ranlib lib/libc.a
>
> */usr/bin/ld: error: /tmp/lto-llvm-200919.o: requires dynamic
> R_X86_64_PC32 reloc against '__dls2' which may overflow at runtime;
> recompile with -fPIC*/tmp/lto-llvm-200919.o:ld-temp.o:function
> _dlstart_c: error: undefined reference to '__dls2'
> clang: error: linker command failed with exit code 1 (use -v to see
> invocation)
> make: *** [Makefile:161: lib/libc.so] Error 1


Could you please advise how I should handle this error?

[-- Attachment #2: Type: text/html, Size: 1538 bytes --]

             reply	other threads:[~2020-03-03 20:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-03 20:25 Yuseok [this message]
2020-03-03 20:51 ` Rich Felker

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=CAEPWFNzeRR9jB3y_o+O_sz7S7aGzsd_kmaOcfSh3-Y3j4XFffA@mail.gmail.com \
    --to=jys0710@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).