diff mbox series

libcxxabi: fix compilation under the SDK

Message ID 20200910032244.21726-1-rosenp@gmail.com
State Superseded
Headers show
Series libcxxabi: fix compilation under the SDK | expand

Commit Message

Rosen Penev Sept. 10, 2020, 3:22 a.m. UTC
Under the SDK, the path for base packages is different.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 package/libs/libcxxabi/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jo-Philipp Wich Sept. 10, 2020, 8:22 a.m. UTC | #1
Hi,

> +	$(MAKE) -C $(TOPDIR)/$(if $(CONFIG_IN_SDK),feeds/base/)package/libs/libcxx prepare

this looks like an ugly hack, also the feed is not guaranteed to reside in
feeds/base/ - the user can theoretically change the name of the base feed.

Why does this package need to trigger an prepare in a foreign package anyway?
Isn't it enough to PKG_BUILD_DEPEND on base-files?

~ Jo
Rosen Penev Sept. 10, 2020, 8:41 a.m. UTC | #2
On Thu, Sep 10, 2020 at 1:25 AM Jo-Philipp Wich <jo@mein.io> wrote:
>
> Hi,
>
> > +     $(MAKE) -C $(TOPDIR)/$(if $(CONFIG_IN_SDK),feeds/base/)package/libs/libcxx prepare
>
> this looks like an ugly hack,
Yes it is.
> also the feed is not guaranteed to reside in
> feeds/base/ - the user can theoretically change the name of the base feed.
>
> Why does this package need to trigger an prepare in a foreign package anyway?
> Isn't it enough to PKG_BUILD_DEPEND on base-files?
It's a circular dependency. Rather, libcxxabi depends on headers
provided by libcxx. But libcxx itself depends on libcxxabi.
>
> ~ Jo
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
diff mbox series

Patch

diff --git a/package/libs/libcxxabi/Makefile b/package/libs/libcxxabi/Makefile
index 90547561b2..e663fafc8e 100644
--- a/package/libs/libcxxabi/Makefile
+++ b/package/libs/libcxxabi/Makefile
@@ -58,7 +58,7 @@  TARGET_CXXFLAGS += -flto
 TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
 
 define Build/Prepare
-	$(MAKE) -C $(TOPDIR)/package/libs/libcxx prepare
+	$(MAKE) -C $(TOPDIR)/$(if $(CONFIG_IN_SDK),feeds/base/)package/libs/libcxx prepare
 	$(call Build/Prepare/Default)
 endef