[OpenWrt-Devel] Dependency issues on custom packages and USE_MUSL visibility

Carlos Ferreira carlosmf.pt at gmail.com
Sun Oct 9 08:27:21 EDT 2016


Hello!
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?


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?


-- 

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20161009/703cae36/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list