Re: Support for gcc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>> BTW, when I tried to use bpf-gcc in godbolt.org, I did not add any
>> additional compile options, and it reported an error:
>>
>> /opt/compiler-explorer/bpf/gcc-trunk-20221225/bpf-unknown-none/lib/gcc/bpf-unknown-none/13.0.0/../../../../bpf-unknown-none/bin/ld:
>> -pie not supported
>> collect2: error: ld returned 1 exit status
>> Compiler returned: 1
>
> Hmm, I just tried and it didn't add -pie to the command line options.  I
> think that somehow godbolt.org remembers and re-uses the settings used
> by the last user.  At least when it comes to select the cross compiler.
> Maybe it is the same with the compilation options...

Hi,

Happened to find this discussion and am taking the liberty to reply,
hope that's ok :)

Compiler-Explorer does not reuse anything from another user. It may
reuse something you've used in a previous session stored in your local
browser, but then this will show in the "Compiler Options...." text
field.

Here's my findings about this pie. By default, we only emit
assembly (so you won't see any ld error). But if you ask for linking to
a binary (Output >> Compile to binary), you will get this error:

https://godbolt.org/z/za3sbr5qn

Looks like our toolchain defaults to PIE. I'll look into that
(https://github.com/compiler-explorer/compiler-explorer/issues/4517).

You can use -fno-pie or uncheck "compile to binary" in the meantime.

Thanks,
Marc

PS: If you think you have a bug in compiler-explorer, click the "share"
menu (top right) and provide us with a link (short or full, both work,
but short will be easier to share in a mail).



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux