PATCH: Remove -DNOT_IN_libc from locale-CPPFLAGS

H.J. Lu hongjiu.lu@intel.com
Mon Aug 15 15:10:00 GMT 2011


locale-CPPFLAGS is also used to compile locale/uselocale.c which is
the part of libc.  -DNOT_IN_libc on locale/uselocale.c caused compiling
failure:

uselocale.c: In function ‘__uselocale’:
uselocale.c:66:1: error: ‘__libc_tsd_CTYPE_B_data’ undeclared (first use
in this function)
uselocale.c:66:1: note: each undeclared identifier is reported only once
for each function it appears in
uselocale.c:68:1: error: ‘__libc_tsd_CTYPE_TOLOWER_data’ undeclared
(first use in this function)
uselocale.c:70:1: error: ‘__libc_tsd_CTYPE_TOUPPER_data’ undeclared
(first use in this function)
make[3]: ***
[/export/build/gnu/glibc/build-x86_64-linux/locale/uselocale.o] Error 1
make[3]: *** Waiting for unfinished jobs....

locale/Makefile has

# This makes sure -DNOT_IN_libc is passed for all these modules.
cpp-srcs-left := $(addsuffix .c,$(localedef-modules) $(localedef-aux) \
				$(locale-modules) $(lib-modules))
				lib := nonlib
				include $(patsubst
				%,$(..)cppflags-iterator.mk,$(cpp-srcs-left))

We shouldn't add -DNOT_IN_libc to locale-CPPFLAGS.


H.J.
----
2011-08-14  H.J. Lu  <hongjiu.lu@intel.com>
 
 	* locale/Makefile (locale-CPPFLAGS): Remove -DNOT_IN_libc.

diff --git a/locale/Makefile b/locale/Makefile
index 87c29a5..9c00eb7 100644
--- a/locale/Makefile
+++ b/locale/Makefile
@@ -97,7 +97,7 @@ locale-CPPFLAGS := -DLOCALE_PATH='$(localepath)' \
 		   -DCHARMAP_PATH='"$(i18ndir)/charmaps"' \
 		   -DREPERTOIREMAP_PATH='"$(i18ndir)/repertoiremaps"' \
 		   -DLOCSRCDIR='"$(i18ndir)/locales"' -DHAVE_CONFIG_H \
-		   -Iprograms -DNOT_IN_libc
+		   -Iprograms
 
 CFLAGS-charmap.c = -Wno-write-strings -Wno-char-subscripts
 CFLAGS-locfile.c = -Wno-write-strings -Wno-char-subscripts



More information about the Libc-alpha mailing list