jwillikers has quit [Remote host closed the connection]
geist has joined #riscv
mahmutov has joined #riscv
mahmutov_ has quit [Ping timeout: 252 seconds]
mahmutov has quit [Ping timeout: 258 seconds]
mahmutov has joined #riscv
mahmutov has quit [Ping timeout: 252 seconds]
mahmutov has joined #riscv
adjtm has quit [Ping timeout: 272 seconds]
<meowray>
jrtc27: http://lists.infradead.org/pipermail/opensbi/2021-July/001325.html hmm, i think --target=riscv64 for bare-metal stuff is fine to emphasize that the compile mode follows the "generic ELF" (whatever this is defined in the compiler). not using linux-gnu should be fine for such stuff.
<jrtc27>
the main thing I want to do is make sure people don't blindly add on -linux-gnu to the riscv64
<jrtc27>
and instead ensure they see a full triple
<jrtc27>
to stop the insanity that is using OS triples for firmware
<jrtc27>
at least for LLVM; for GNU stuff they can do what they like to work around the user-unfriendly nature of GNU tools only supporting one OS per build
<meowray>
i saw a linkg from Bin Meng. i don't know what opensbi is. just looking at these threads from a non-gnu toolchain perspective. "error: unknown emulation: elf64lriscv_lp64" :(
<jrtc27>
no clue, I hate mailing list workflows for anything other than fire-and-forget patches
<meowray>
nit: --target= is slightly preferred to -target
<jrtc27>
hmm, all the tests use -target though :P
<jrtc27>
(and is what I habitually use...)
<jrtc27>
I can switch it over though; I think the Linux kernel uses --target= so it'd be consistent with that
Tranmi has joined #riscv
Tranmi has quit [Remote host closed the connection]
<meowray>
(i habitually use -target b/c it is slightly easy to type, but space separated options are just uncommon for driver options)
<jrtc27>
ah is this a driver vs cc1 thing?
<meowray>
clang-built-linux there is recent discussion on removing CROSS_COMPILE= for LLVM=1 but i guess it may still be needed for riscv64-linux-gnu-* users
<jrtc27>
when would you ever want it to not be --target=riscvXLEN-linux-gnu?
<meowray>
many traditional clang cc1 options use Separate (space-separated) but most driver options are Joined
<meowray>
--target=riscvXLEN when it absolutely doesn't need executables/libraries found from an existing riscvXLEN_linux-gnu-gcc installation and you don't need compile mode defaults from linux-gnu
<meowray>
the executables mainly include as (normally not needed because of -fintegrated-as default), objcopy (you don't use split dwarf|some gpu quirk), ld (if you have ld.lld)
adjtm has joined #riscv
<meowray>
the -pie -N mode is indeed weird. don't know what it means
<jrtc27>
I think "whatever that combination of internal options happens to do" ...
<jrtc27>
an ET_EXEC with relocations is surely not something anyone ever thought of and intended to happen...
<jrtc27>
that's what -static-pie (or maybe -static -pie?) is for
<jrtc27>
(the fact that -static-pie is the GNU option name makes me sad...)
<meowray>
(i made me sad too) -static-pie should have been -static -pie; but (1) GNU ld has a default dynamic linker so they need --no-dynamic-linker to cancel it (2) GNU ld normally tries to guess dynamic linking vs static linking and makes some weird decisions), and --no-dynamic-linker can be re-used to encode the "static linking" intention
<meowray>
then there is the unfortunate gcc driver->ld translation code. hjl probably didn't want to test the combination of -static -pie so just added a new mode
<jrtc27>
one of these years we'll tear this whole thing down and replace it with something saner that isn't filled with 30 years of legacy crud...
<jrtc27>
maybe 2030
vagrantc has joined #riscv
freakazoid333 has quit [Read error: Connection reset by peer]