meson: add option to build debugcc as a dynamically linked binary#39
Conversation
|
|
||
| executable('debugcc', | ||
| debugcc_srcs, | ||
| link_args: ['-static','-static-libgcc'], |
There was a problem hiding this comment.
open to allowing this to be set at build-time with a variable.
There was a problem hiding this comment.
We defaulted to static builds because debugcc is often used in e.g. ramdisks without a "real" rootfs. I'm not super confident packaging debugcc in distro repositories is of much use though, given it requires CONFIG_IO_STRICT_DEVMEM=n which is not a great default
There was a problem hiding this comment.
Sure, how would you feel if I changed the patch to default to a static build && add a variable to be able to change to dynamic build ?
I use debugcc with custom kernel & upstream rootfs, so I still think there's some value in having it in the distro for me at least :-)
There was a problem hiding this comment.
Something like -Ddynamic-linking sounds fine
5acc39d to
9b35001
Compare
debugcc is currently linked statically using -static and -static-libgcc. This can cause issues for distributions that prefer dynamically linked binaries (e.g. larger binaries and duplicated runtime code which could otherwise be shared). Add a Meson boolean option `dynamic-linking` which when enabled removes the explicit static link flags so that debugcc is built as a dynamically linked binary using the default toolchain behaviour. The default for this option is false so that existing builds continue to get a statically linked binary unless they opt in to dynamic linking. Signed-off-by: Christopher Obbard <christopher.obbard@linaro.org>
9b35001 to
73b135d
Compare
No description provided.