Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Adam Duskett <aduskett@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] Add BR2_TOOLCHAIN_HAS_FTS config option
Date: Thu,  6 Jul 2017 11:23:45 -0400	[thread overview]
Message-ID: <20170706152346.30242-1-aduskett@codeblue.com> (raw)

Currently there are a few packages in buildroot that are set to not
be selectable unless the user wishes to use glibc specifically because
the package uses fts.h.

uClibc actually does have a fts implimentation, and it's selectable in
uclib-menuconfig.  However; this has two issues with it:

1) Most users wouldn't know that there is even a uClibc-menuconfig
2) Even if the user does select fts support in uClibc-menuconfig, the
   packages that would now compile and work would still not be selectable
   because they explicitly require BR2_TOOLCHAIN_USES_GLIBC.

This patch does the following:

- Create a BR2_TOOLCHAIN_HAS_FTS configuration option in uclibc/Config.in
  and automatically set the kconfig during the configure stage.
- when glibc is selected, BR2_TOOLCHAIN_HAS_FTS is now selected.

This will allow for packages that require glibc only because of fts.h to now
depend on BR2_TOOLCHAIN_HAS_FTS instead of BR2_TOOLCHAIN_USES_GLIBC.

Signed-off-by: Adam Duskett <aduskett@codeblue.com>
---
 package/glibc/Config.in  |  1 +
 package/uclibc/Config.in |  8 ++++++++
 package/uclibc/uclibc.mk | 10 ++++++++++
 3 files changed, 19 insertions(+)

diff --git a/package/glibc/Config.in b/package/glibc/Config.in
index 57a2e83..a20244f 100644
--- a/package/glibc/Config.in
+++ b/package/glibc/Config.in
@@ -5,5 +5,6 @@ config BR2_PACKAGE_GLIBC
 	default y
 	select BR2_PACKAGE_LINUX_HEADERS
 	select BR2_TOOLCHAIN_HAS_SSP
+	select BR2_TOOLCHAIN_HAS_FTS
 
 endif
diff --git a/package/uclibc/Config.in b/package/uclibc/Config.in
index b0b0b01..21a7ff0 100644
--- a/package/uclibc/Config.in
+++ b/package/uclibc/Config.in
@@ -79,6 +79,12 @@ config BR2_TOOLCHAIN_BUILDROOT_USE_SSP
 	  See http://www.linuxfromscratch.org/hints/downloads/files/ssp.txt
 	  for details.
 
+config BR2_TOOLCHAIN_HAS_FTS
+	bool "Support the fts interface."
+	help
+	  The fts functions are provided for traversing UNIX file
+	  hierarchies. This adds around 7.5k to the build.
+
 config BR2_UCLIBC_INSTALL_UTILS
 	bool "Compile and install uClibc utilities"
 	default y
diff --git a/package/uclibc/uclibc.mk b/package/uclibc/uclibc.mk
index f22d078..c7e5bc9 100644
--- a/package/uclibc/uclibc.mk
+++ b/package/uclibc/uclibc.mk
@@ -356,6 +356,15 @@ endef
 endif
 
 #
+# fts
+#
+ifeq ($(BR2_TOOLCHAIN_HAS_FTS),y)
+UCLIBC_FTS_CONFIG = $(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_FTS,$(@D)/.config)
+else
+UCLIBC_FTS_CONFIG = $(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_FTS,$(@D)/.config)
+endif
+
+#
 # wchar
 #
 
@@ -419,6 +428,7 @@ define UCLIBC_KCONFIG_FIXUP_CMDS
 	$(UCLIBC_LOCALE_CONFIG)
 	$(UCLIBC_WCHAR_CONFIG)
 	$(UCLIBC_SHARED_LIBS_CONFIG)
+	$(UCLIBC_FTS_CONFIG)
 endef
 
 define UCLIBC_BUILD_CMDS
-- 
2.9.4

             reply	other threads:[~2017-07-06 15:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-06 15:23 Adam Duskett [this message]
2017-07-06 15:23 ` [Buildroot] [PATCH 2/2] selinux packages: change glibc check to fts check Adam Duskett
2017-07-06 15:37 ` [Buildroot] [PATCH 1/1] Add BR2_TOOLCHAIN_HAS_FTS config option Thomas Petazzoni
2017-07-06 15:47   ` Adam Duskett
2017-07-06 17:18 ` Waldemar Brodkorb

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170706152346.30242-1-aduskett@codeblue.com \
    --to=aduskett@gmail.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox