Message ID | 1408474091-25947-3-git-send-email-gustavo@zacarias.com.ar |
---|---|
State | Superseded |
Headers | show |
On Tue, Aug 19, 2014 at 8:48 PM, Gustavo Zacarias <gustavo@zacarias.com.ar> wrote: > As stated on the list we need to copy static libraries when doing static > targets so add the logic for that. > > Also exclude the wide option for blackfin flat since there seem to be > toolchain issues with that combination - since it's a new feature option > someone interested might look into it later. > > Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> > --- > package/ncurses/Config.in | 2 ++ > package/ncurses/ncurses.mk | 9 +++++++++ > 2 files changed, 11 insertions(+) > > diff --git a/package/ncurses/Config.in b/package/ncurses/Config.in > index b90ec9e..3cc0a37 100644 > --- a/package/ncurses/Config.in > +++ b/package/ncurses/Config.in > @@ -13,6 +13,8 @@ if BR2_PACKAGE_NCURSES > config BR2_PACKAGE_NCURSES_WCHAR > bool "enable wide char support" > depends on BR2_USE_WCHAR > + # Build broken @ curses.priv.h with bad declarations > + depends on !(BR2_bfin && BR2_BINFMT_FLAT) > help > Enable wide char & UTF-8 support in ncurses libraries > > diff --git a/package/ncurses/ncurses.mk b/package/ncurses/ncurses.mk > index bd2aac0..5eb8b98 100644 > --- a/package/ncurses/ncurses.mk > +++ b/package/ncurses/ncurses.mk > @@ -40,12 +40,21 @@ ifeq ($(BR2_PACKAGE_NCURSES_WCHAR),y) > NCURSES_CONF_OPT += --enable-widec > NCURSES_LIB_SUFFIX = w > > +ifeq ($(BR2_PREFER_STATIC_LIB),y) > +define NCURSES_LINK_LIBS > + for lib in $(NCURSES_LIBS-y); do \ > + ln -sf $${lib}$(NCURSES_LIB_SUFFIX).a \ > + $(1)/usr/lib/$${lib}.a; \ > + done > +endef > +else > define NCURSES_LINK_LIBS > for lib in $(NCURSES_LIBS-y); do \ > ln -sf $${lib}$(NCURSES_LIB_SUFFIX).so \ > $(1)/usr/lib/$${lib}.so; \ > done > endef > +endif Here you could also do something like ifeq ($(BR2_PREFER_STATIC_LIB),y) NCURSES_LIB_EXT = .a else NCURSES_LIB_EXT = .so endif define NCURSES_LINK_LIBS for lib in $(NCURSES_LIBS-y); do \ ln -sf $${lib}$(NCURSES_LIB_SUFFIX)$(NCURSES_LIB_EXT) \ $(1)/usr/lib/$${lib}$(NCURSES_LIB_EXT); \ done endef to avoid duplicating the hook content. Best regards, Thomas
Dear Thomas De Schampheleire, On Tue, 19 Aug 2014 21:47:55 +0200, Thomas De Schampheleire wrote: > Here you could also do something like > ifeq ($(BR2_PREFER_STATIC_LIB),y) > NCURSES_LIB_EXT = .a > else > NCURSES_LIB_EXT = .so > endif > define NCURSES_LINK_LIBS > for lib in $(NCURSES_LIBS-y); do \ > ln -sf $${lib}$(NCURSES_LIB_SUFFIX)$(NCURSES_LIB_EXT) \ > $(1)/usr/lib/$${lib}$(NCURSES_LIB_EXT); \ > done > endef > to avoid duplicating the hook content. Except that for now, the semantic is: * BR2_PREFER_STATIC_LIB=y -> install only static libraries * BR2_PREFER_STATIC_LIB undefined -> install *both* static and shared libraries. Thomas
Hi Thomas, On Wed, Aug 20, 2014 at 2:22 PM, Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote: > Dear Thomas De Schampheleire, > > On Tue, 19 Aug 2014 21:47:55 +0200, Thomas De Schampheleire wrote: > >> Here you could also do something like >> ifeq ($(BR2_PREFER_STATIC_LIB),y) >> NCURSES_LIB_EXT = .a >> else >> NCURSES_LIB_EXT = .so >> endif >> define NCURSES_LINK_LIBS >> for lib in $(NCURSES_LIBS-y); do \ >> ln -sf $${lib}$(NCURSES_LIB_SUFFIX)$(NCURSES_LIB_EXT) \ >> $(1)/usr/lib/$${lib}$(NCURSES_LIB_EXT); \ >> done >> endef >> to avoid duplicating the hook content. > > Except that for now, the semantic is: > > * BR2_PREFER_STATIC_LIB=y -> install only static libraries > > * BR2_PREFER_STATIC_LIB undefined -> install *both* static and shared > libraries. Unless I'm missing something that is not what Gustavo's patch does. He explicitly added an else clause. So if STATIC_LIB is not defined, only links for the .so file will be created. Best regards, Thomas
On 08/20/2014 09:34 AM, Thomas De Schampheleire wrote: >> Except that for now, the semantic is: >> >> * BR2_PREFER_STATIC_LIB=y -> install only static libraries >> >> * BR2_PREFER_STATIC_LIB undefined -> install *both* static and shared >> libraries. > > Unless I'm missing something that is not what Gustavo's patch does. He > explicitly added an else clause. So if STATIC_LIB is not defined, only > links for the .so file will be created. Hi, true, i'll respin a new fix to get both done when !static. The spirit was to fix the static case omission, even though it works for dynamic it departs from what it should do. Regards.
diff --git a/package/ncurses/Config.in b/package/ncurses/Config.in index b90ec9e..3cc0a37 100644 --- a/package/ncurses/Config.in +++ b/package/ncurses/Config.in @@ -13,6 +13,8 @@ if BR2_PACKAGE_NCURSES config BR2_PACKAGE_NCURSES_WCHAR bool "enable wide char support" depends on BR2_USE_WCHAR + # Build broken @ curses.priv.h with bad declarations + depends on !(BR2_bfin && BR2_BINFMT_FLAT) help Enable wide char & UTF-8 support in ncurses libraries diff --git a/package/ncurses/ncurses.mk b/package/ncurses/ncurses.mk index bd2aac0..5eb8b98 100644 --- a/package/ncurses/ncurses.mk +++ b/package/ncurses/ncurses.mk @@ -40,12 +40,21 @@ ifeq ($(BR2_PACKAGE_NCURSES_WCHAR),y) NCURSES_CONF_OPT += --enable-widec NCURSES_LIB_SUFFIX = w +ifeq ($(BR2_PREFER_STATIC_LIB),y) +define NCURSES_LINK_LIBS + for lib in $(NCURSES_LIBS-y); do \ + ln -sf $${lib}$(NCURSES_LIB_SUFFIX).a \ + $(1)/usr/lib/$${lib}.a; \ + done +endef +else define NCURSES_LINK_LIBS for lib in $(NCURSES_LIBS-y); do \ ln -sf $${lib}$(NCURSES_LIB_SUFFIX).so \ $(1)/usr/lib/$${lib}.so; \ done endef +endif NCURSES_LINK_TARGET_LIBS = $(call NCURSES_LINK_LIBS, $(TARGET_DIR)) NCURSES_LINK_STAGING_LIBS = $(call NCURSES_LINK_LIBS, $(STAGING_DIR))
As stated on the list we need to copy static libraries when doing static targets so add the logic for that. Also exclude the wide option for blackfin flat since there seem to be toolchain issues with that combination - since it's a new feature option someone interested might look into it later. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> --- package/ncurses/Config.in | 2 ++ package/ncurses/ncurses.mk | 9 +++++++++ 2 files changed, 11 insertions(+)