[LEDE-DEV] Dependency issues on custom packages and USE_MUSL visibility
yszhou4tech at gmail.com
Wed Oct 19 23:34:23 PDT 2016
On 10 October 2016 at 04:03, Carlos Ferreira <carlosmf.pt at gmail.com> wrote:
> I'm having some issues regarding the implementation of new package
> options, due to their peculiar dependencies.
> I'm trying to implement a configuration option, which should exist
> only if the package libbz2 is selected. I understand that to do this,
> I should have something like this:
> config new-option-with-libbz2-dependency
> depends on PACKAGE_libbz2
> bool "Optional support for libbz2."
> default n
> Now, the thing is, the building system is not building libbz2 before
> the package, as a result of being a dependency, it is only hiding the
> option until libbz2 is selected in the menuconfig.
> Also, if I add:
> select PACKAGE_libz2
> it will only select the package but not build it as a dependency.
> How can I force the compilation of libbz2 before the package is
> compiled, when my new option is selected?
Try using +new-option-with-libbz2-dependency:libbz2 . See
package makefile of dnsmasq for details
> Also, I would like to know how can I use the USE_MUSL symbol to add
> values to the TARGET_LDFLAGS variable. The following example seems not
> to work:
> TARGET_LDFLAGS += \
> $(if $(@USE_MUSL), -pthread -lrt,) \
> What am I doing wrong?
Check `CONFIG_USE_MUSL` in Makefile. It's not the same as the those
in `DEPENDS` and mconf, though related.
> Carlos Miguel Ferreira
> Researcher at Telecommunications Institute
> Aveiro - Portugal
> Work E-mail - cmf at av.it.pt
> Skype & GTalk -> carlosmf.pt at gmail.com
> LinkedIn -> http://www.linkedin.com/in/carlosmferreira
> Lede-dev mailing list
> Lede-dev at lists.infradead.org
More information about the Lede-dev