Comments (11)
Having LTO on by default with a way to easily turn it off seems like a good plan. If LTO is off by default, it will just end up bit rotting until it no longer works.
from litex.
I have a WIP branch at https://github.com/mithro/litex/tree/enable-lto?files=1
from litex.
It is unclear why we have to link against libgcc when the symbols should be provided by libcompiler_rt
. It seems to be because GCC is generating function calls itself (rather than being in the code) which cause lto to not understand that the symbols are used.
from litex.
This has been integrated with #401. For now it's enabled with for all processors except LM32. If this is causing issue with others configurations, we'll add a parameter be able to disable LTO when needed.
from litex.
LTO has been reverted in 979f98e since seems to cause subtle issues on some configurations. We'll have to test it more before enabling it.
from litex.
from litex.
In case it helps, the link issue I had (in #417) with litex-buildenv
was with the "stub firmware" in litex-buildenv
, which uses the auto-generated litex
compiler/linker/flags/etc, but has its own Makefile
. So (copying from my comment on #417 (comment)), " updating the definition of $(LD) in common.mak
instead of changing it locally in just the BIOS Makefile
" might make these changes more robust (/consistent) for anything else that uses the litex
generated compiler/linker/flags, etc. (It looks like that Makefile
suffered from trying to use ld
with flags intended for gcc
, via $(CPUFLAGS)
, on lm32
....)
Also (as I said in the same comment) maybe having a build time option to "force LTO off" would help anyone thinking their target is suffering from bad LTO handling.
In general I think it'd be a great idea to have LTO available as a build option, and probably even on by default.
Ewen
from litex.
I'm also ok with that, we just need to work a bit more on it before integrating it.
from litex.
I just found this issue, should I close #682 which is a duplicate of this?
* [ ] Have to link against libgcc
This is not necessary. It was required because libcompiler_rt was optimized out.
from litex.
should I close #682 which is a duplicate of this?
@DurandA It looks to me like #682 is much more active now. I'd probably lean towards closing this issue (which was already closed once, then reopened when the patch was reverted), with a comment like "LTO (re-)implementation work moved to #682"...
(Looks like @mithro or @enjoy-digital digital would have to be the ones to close this specific older issue.)
Ewen
from litex.
Let's keep #682 and close this one.
from litex.
Related Issues (20)
- The non-ASCII character "…" in README.md may cause failure in setup HOT 1
- Upgrade of the CV32E40P to the openhwgroup repo ? HOT 2
- Failed to modify “boot.c” and the riscv64-unknown-elf/bin/ld report an error “undefined reference to `__heap_start'” HOT 4
- WSL2 Debian Gowin Toolchain Path HOT 2
- Missing VCCIO settings for ECP5 when using diamond toolchain
- Html doc not generating for TUL PYNQ Z2 HOT 2
- Make Error *** No rule to make target 'boot-helper.o', needed by 'bios.elf'. Stop. Neorv32 core TUL PYNQ Z2 HOT 1
- Wishbone bus high latency in read on Vexriscv CPU "minimal" variant and read/write on others CPU. HOT 3
- Help with LiteScope and jtagbone HOT 5
- No serial output on tang 9k when selecting other sys-clk-freq HOT 11
- [Feature request] Support to run WebAssembly on FPGA HOT 1
- LiteScope: more help needed HOT 5
- tang Nano 9k no uart out HOT 2
- [Feature request] Support of pmem / Non Volatile Memory HOT 1
- Clock domain crossing for peripherals HOT 3
- vexriscv_smp: only 32 CSR locations supported with current mem_mam HOT 4
- Unexpected behaviour of printf HOT 9
- Windows based build cannot find toolchain support HOT 3
- NuttX + LiteEth: Potential regression when using Hybrid Etherbone/Ethernet. HOT 8
- Allow CSR paging 0x400 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from litex.