libopencm3-examples icon indicating copy to clipboard operation
libopencm3-examples copied to clipboard

Optimise flags

Open paulfertser opened this issue 6 years ago • 4 comments

I assume many libopencm3 users are taking rules.mk from these examples.

BTW, is there any reason to not enable LTO by default for libopencm3 itself? An LTO-enabled library can be used for both LTO ond non-LTO builds equally well, it just takes up a bit more space on host computer storage.

paulfertser avatar Dec 18 '17 08:12 paulfertser

I have backported these changes from my current job project, haven't really tested examples themselves.

paulfertser avatar Dec 18 '17 08:12 paulfertser

IIRC; At the time, LTO enabled didn't work for LTO and non-lto builds, if it can be turned on now safely for all (using "fat" lto obs I presume?) I'm all for it.

karlp avatar Dec 18 '17 11:12 karlp

gdb3 change looks good, no reason not to do that. I've just kinda been ignoring the examples repo, have been hoping to almost wholesale replace it, but that's reaching for too much maybe

karlp avatar Dec 18 '17 11:12 karlp

I've pulled the gdb3 and cross ref in. For LTO, I'd like to see something done in conjunction with the lib itself, not just something hidden behind a make variable here.

rtti/exceptions are interesting enough, but without a way to turn them on, we're making the rules out to ban portions of c++ without a way back. I think that should get looked at separately from just "optimize flags"

karlp avatar Dec 18 '17 12:12 karlp