Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEPWFNzeRR9jB3y_o+O_sz7S7aGzsd_kmaOcfSh3-Y3j4XFffA@mail.gmail.com>
Date: Tue, 3 Mar 2020 15:25:47 -0500
From: Yuseok <jys0710@...il.com>
To: musl@...ts.openwall.com
Subject: Build error with -flto option

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?

Content of type "text/html" skipped

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.