linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fix build failure when CONFIG_NLS is set to 'm' by allmodconfig
@ 2011-02-23 12:54 Narendra_K
  2011-02-23 13:17 ` Matthew Garrett
  2011-04-19  6:06 ` [PATCH] " Ingo Molnar
  0 siblings, 2 replies; 27+ messages in thread
From: Narendra_K @ 2011-02-23 12:54 UTC (permalink / raw)
  To: viro, jbarnes
  Cc: mjg, sfr, linux-kernel, linux-next, Shyam_Iyer, Matt_Domsch,
	Charles_Rose, Jordan_Hargrave

Hello,

This patch fixes the build breakage as described in the post
http://marc.info/?l=linux-next&m=129478755528194&w=2 while compiling the
patch - http://marc.info/?l=linux-netdev&m=129846468529049&w=2 ([PATCH
V3] Export ACPI _DSM provided firmware instance number and string name
to sysfs).

Hi Al,

If this patch is acceptable, please consider for inclusion.

From: Narendra K <narendra_k@dell.com>
Subject: [PATCH] Fix build failure when CONFIG_NLS is set to 'm' by allmodconfig

This patch fixes the following build breakage introduced by the patch
'[PATCH V3] Export ACPI _DSM provided firmware instance number and string to
sysfs'.

drivers/built-in.o: In function `T.647':
pci-label.c:(.text+0x28514): undefined reference to `utf16s_to_utf8s'

This happens because 'make allmodconfig' sets CONFIG_NLS=m and makes
'utf16s_to_utf8s` unavailable to drivers/pci/pci-label.o which is built
into vmlinux.

This is fixed by making fs/nls/nls_base.c compile conditionally into
vmlinux by introducing a new config option CONFIG_NLS_BASE which is
selected by (ACPI || DMI || NLS).

Signed-off-by: Narendra K <narendra_k@dell.com>
---
 fs/Makefile     |    2 +-
 fs/nls/Kconfig  |   14 ++++++++++++++
 fs/nls/Makefile |    2 +-
 3 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/fs/Makefile b/fs/Makefile
index a7f7cef..1e78b9b 100644
--- a/fs/Makefile
+++ b/fs/Makefile
@@ -86,7 +86,7 @@ obj-$(CONFIG_NFS_FS)		+= nfs/
 obj-$(CONFIG_EXPORTFS)		+= exportfs/
 obj-$(CONFIG_NFSD)		+= nfsd/
 obj-$(CONFIG_LOCKD)		+= lockd/
-obj-$(CONFIG_NLS)		+= nls/
+obj-y				+= nls/
 obj-$(CONFIG_SYSV_FS)		+= sysv/
 obj-$(CONFIG_CIFS)		+= cifs/
 obj-$(CONFIG_NCP_FS)		+= ncpfs/
diff --git a/fs/nls/Kconfig b/fs/nls/Kconfig
index a39edc4..2fb92e5 100644
--- a/fs/nls/Kconfig
+++ b/fs/nls/Kconfig
@@ -4,6 +4,7 @@
 
 menuconfig NLS
 	tristate "Native language support"
+	select NLS_BASE
 	---help---
 	  The base Native Language Support. A number of filesystems
 	  depend on it (e.g. FAT, JOLIET, NT, BEOS filesystems), as well
@@ -17,6 +18,19 @@ menuconfig NLS
 
 if NLS
 
+config NLS_BASE
+	bool "Base NLS functions"
+	depends on ACPI || DMI
+	default y
+	---help---
+	  The base NLS support functions which handle unicode traslations.
+
+	  If unsure, say Y.
+
+	  This config option is selected by ACPI && DMI && NLS as the
+	  functions defined here are needed in vmlinux and if built as
+	  module cause build issues.
+
 config NLS_DEFAULT
 	string "Default NLS Option"
 	default "iso8859-1"
diff --git a/fs/nls/Makefile b/fs/nls/Makefile
index f499dd7..dde741f 100644
--- a/fs/nls/Makefile
+++ b/fs/nls/Makefile
@@ -2,7 +2,7 @@
 # Makefile for native language support
 #
 
-obj-$(CONFIG_NLS)		+= nls_base.o
+obj-$(CONFIG_NLS_BASE)		+= nls_base.o
 
 obj-$(CONFIG_NLS_CODEPAGE_437)	+= nls_cp437.o
 obj-$(CONFIG_NLS_CODEPAGE_737)	+= nls_cp737.o
-- 
1.7.3.1

With regards,
Narendra K

^ permalink raw reply related	[flat|nested] 27+ messages in thread
* CONFIG_NLS=m resulting in undefined reference to utf16s_to_utf8s causing build failure
@ 2011-01-12 20:10 Narendra_K
  2011-01-13  0:02 ` Jesse Barnes
  0 siblings, 1 reply; 27+ messages in thread
From: Narendra_K @ 2011-01-12 20:10 UTC (permalink / raw)
  To: linux-kernel, linux-next, jbarnes, sfr
  Cc: Matt_Domsch, Charles_Rose, Surya_Prabhakar

Hello,

As described in the post http://marc.info/?l=linux-next&m=129478755528194&w=2
setting CONFIG_NLS=m (generated by 'make allmodconfig) is causing a build
failure on linux-next as following while compiling the patch 
http://marc.info/?l=linux-pci&m=129313294112736&w=1 ([PATCH V2] Export
ACPI _DSM provided firmware instance number and string to sysfs)

drivers/built-in.o: In function `dsm_label_utf16s_to_utf8s':
/usr/src/Linux-Next/linux-next/drivers/pci/pci-label.c:195: undefined reference to `utf16s_to_utf8s'
make: *** [.tmp_vmlinux1] Error 1

The drivers/pci/pci-label.c is compiled as part of vmlinux as defined by
the makefile drivers/pci/Makefile. 

#
# ACPI Related PCI FW Functions
# ACPI _DSM provided firmware instance and string name
#
obj-$(CONFIG_ACPI)    += pci-acpi.o pci-label.o

# SMBIOS provided firmware instance and labels
obj-$(CONFIG_DMI)    += pci-label.o

This could be prevented by one of the following methods -

* forcing CONFIG_NLS=y if CONFIG_PCI=y 
* move `utf16s_to_utf8s' out of nls_base.c to a new file to be always
built into vmlinux

Please correct me if i missed something here and let me know what would be the right
way to fix this build failure.

With regards,
Narendra K

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2011-04-19 16:25 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-23 12:54 [PATCH] Fix build failure when CONFIG_NLS is set to 'm' by allmodconfig Narendra_K
2011-02-23 13:17 ` Matthew Garrett
2011-03-04 18:15   ` Jesse Barnes
2011-03-28 15:02     ` Randy Dunlap
2011-03-28 16:17       ` Jesse Barnes
2011-03-28 19:14       ` Shyam_Iyer
2011-03-28 20:22         ` Randy Dunlap
2011-03-29  1:55           ` OGAWA Hirofumi
2011-03-29 16:18             ` Randy Dunlap
2011-03-29 16:23               ` Jesse Barnes
2011-03-29 16:39               ` OGAWA Hirofumi
2011-03-29 16:45                 ` [PATCH] pci-label: " Randy Dunlap
2011-03-29 16:55                   ` Jesse Barnes
2011-03-31  9:27                     ` Narendra_K
2011-04-19  6:06 ` [PATCH] " Ingo Molnar
2011-04-19  8:43   ` Narendra_K
2011-04-19 16:25     ` Jesse Barnes
  -- strict thread matches above, loose matches on Subject: below --
2011-01-12 20:10 CONFIG_NLS=m resulting in undefined reference to utf16s_to_utf8s causing build failure Narendra_K
2011-01-13  0:02 ` Jesse Barnes
2011-01-13  3:23   ` Len Brown
2011-01-13 15:55     ` Jesse Barnes
2011-01-13 16:03       ` Narendra_K
2011-01-14 15:22         ` [PATCH] Fix build failure when CONFIG_NLS is set to 'm' by allmodconfig Narendra_K
2011-01-14 15:29           ` Sedat Dilek
2011-01-14 16:06             ` Narendra_K
2011-01-14 21:09           ` Stephen Rothwell
2011-01-17 19:28             ` Narendra_K
2011-01-20 18:41               ` Narendra_K
2011-01-28 15:30                 ` Narendra_K
2011-01-28 16:45                   ` Jesse Barnes
2011-02-01 16:28                     ` Narendra_K
2011-02-01 16:59                     ` Narendra_K

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).