This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Cross compiled GCC wrongly builds dynamic executables


On Fri, Aug 19, 2016 at 1:35 PM, Alastair Hughes
<hobbitalastair@yandex.com> wrote:
> Hi all!
>
> I am cross compiling GCC to produce a compiler to run on the target machine (ie --build="${_local_triplet}" --host="${_target_triplet}" --target="${_target_triplet}"). The target system is a simple *statically linked* musl-libc based system.
> After a recent upgrade to binutils 2.27, the cross compiled cc1 and cc1plus executables where generated as *dynamically linked*, due to a combination of the -rdynamic flag to GCC during the build, and a recent change in binutils (https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=bf89386a862ace008f0152bca8bddf996d3993c8, https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=9c1d7a087682074d585253ad38719ec2363eb2b7 - the first commit being problematic).
>
> I am unsure as to whether this is an issue with the GCC build, something that I have configured, or a bug in binutils. Why is -rdynamic being passed when building cc1 and cc1plus? Is that what should be happening, a bug, or a problem with how I have configured GCC?
>
> I've also CC'd the committer in case he can explain.
>

It is for GCC plugin.  Does your compiler support GCC plugin?
If not, you should configure your GCC with --disable-plugin.

-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]