On Tue, Oct 20, 2009 at 08:59:17AM +0000, rhabarber1848 wrote:
>Am Mon, 12 Oct 2009 19:38:07 +0200 schrieb Bernhard Reutner-Fischer:
>
>> Please test the 0.9.30 branch on your favourite arch and report back ยน)!
>
>Hi,
>
>after the MAP_FAILED fix I continued to build my cross-compiler stuff.
>During this I found another problem resonating from a gcc-locale patch I
>need to use (gcc-3.4.6, ppc).
>
>In February there were already some problems which were fixed for uClib
>0.9.30.1:
>http://lists.uclibc.org/pipermail/uclibc/2009-February/042031.html
>
>Eight days ago this commit was made:
>"Do not install libc-XXXX.h files in "make install". glibc does not have
>them, so should be safe."
>http://git.uclibc.org/uClibc/commit/?h=0_9_30&id=a307183723bdafba8e3aad25fc0c215c5c3bf05b
>
>The commit includes:
>
>- "$top_builddir/extra/scripts/unifdef" -UUCLIBC_INTERNAL "$1/$filename" \
>+ "$top_builddir/extra/scripts/unifdef" -UUCLIBC_INTERNAL -U_LIBC
>"$1/$filename" \
>
>The added "-U_LIBC" parameter removes
>
>extern struct __uclibc_locale_struct * __global_locale;
>
>from uClibc_locale.h while the gcc-locale patch needs __global_locale.
>More details about that patch can be found here:
>https://bugs.busybox.net/show_bug.cgi?id=53
>
>Is it possible to include this patch into git?
>It solves the compilation problems for me.

Could you try something like the attached?
diff --git a/Makefile.in b/Makefile.in
index 5e97011..186de75 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -205,9 +205,10 @@ install_headers: headers $(top_builddir)extra/scripts/unifdef
 	$(INSTALL) -d $(PREFIX)$(DEVEL_PREFIX)include
 	top_builddir=$(top_builddir) \
 	$(top_srcdir)extra/scripts/install_headers.sh include $(PREFIX)$(DEVEL_PREFIX)include
-	# Disabled. If libc-internal.h is needed, document here why!
-	#printf '#ifndef _LIBC_INTERNAL_H\n#define _LIBC_INTERNAL_H 1\n#endif\n' >$(PREFIX)$(DEVEL_PREFIX)include/libc-internal.h
-	echo '/* Dont use _syscall#() macros; use the syscall() function */' > \
+	# Ugly hack for old locale impl in gcc
+	printf '#ifndef _LIBC_INTERNAL_H\n#define _LIBC_INTERNAL_H 1\n#endif\n' > \
+		$(PREFIX)$(DEVEL_PREFIX)include/libc-internal.h
+	echo '/* Do not use _syscall#() macros; use the syscall() function */' > \
 		$(PREFIX)$(DEVEL_PREFIX)include/bits/syscalls.h
 	$(RM) $(PREFIX)$(DEVEL_PREFIX)include/dl-osinfo.h
 	$(RM) $(PREFIX)$(DEVEL_PREFIX)include/_lfs_64.h
diff --git a/Rules.mak b/Rules.mak
index 37e65ea..73290ae 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -46,7 +46,7 @@ AWK        = awk
 
 STRIP_FLAGS ?= -x -R .note -R .comment
 
-UNIFDEF := $(top_builddir)extra/scripts/unifdef -UUCLIBC_INTERNAL
+UNIFDEF := $(top_builddir)extra/scripts/unifdef
 
 # Select the compiler needed to build binaries for your development system
 HOSTCC     = gcc
@@ -505,9 +505,6 @@ ifeq ($(TARGET_ARCH),arm)
 endif
 endif
 
-# Please let us see private headers' parts
-CFLAGS += -DUCLIBC_INTERNAL
-
 # We need this to be checked within libc-symbols.h
 ifneq ($(HAVE_SHARED),y)
 CFLAGS += -DSTATIC
diff --git a/extra/scripts/install_headers.sh b/extra/scripts/install_headers.sh
index 748f13e..bb68ec5 100755
--- a/extra/scripts/install_headers.sh
+++ b/extra/scripts/install_headers.sh
@@ -43,15 +43,11 @@ while read -r filename; do
 		mkdir -p "$2/$filename" 2>/dev/null
 		continue
 	fi
-	if test x"${filename##libc-*.h}" = x""; then
-		# Do not install libc-XXXX.h files
-		continue
-	fi
 	# NB: unifdef exits with 1 if output is not
 	# exactly the same as input. That's ok.
 	# Do not abort the script if unifdef "fails"!
 	# NB2: careful with sed command arguments, they contain tab character
-	"$top_builddir/extra/scripts/unifdef" -UUCLIBC_INTERNAL -U_LIBC "$1/$filename" \
+	"$top_builddir/extra/scripts/unifdef" -U_LIBC "$1/$filename" \
 	| sed -e '/^rtld_hidden_proto[ 	]*([a-zA-Z0-9_]*)$/d' \
 	| sed -e '/^lib\(c\|m\|resolv\|dl\|intl\|rt\|nsl\|util\|crypt\|pthread\)_hidden_proto[ 	]*([a-zA-Z0-9_]*)$/d' \
 	>"$2/$filename"
diff --git a/include/printf.h b/include/printf.h
index 72dffaa..ccd2bdd 100644
--- a/include/printf.h
+++ b/include/printf.h
@@ -41,7 +41,7 @@ __BEGIN_DECLS
  * need to support bitfields since that's what glibc made visible to users.
  * So, we take
  * advantage of how gcc lays out bitfields to create an appropriate
- * mapping.  Inside uclibc (UCLIBC_INTERNAL is defined) we access the
+ * mapping.  Inside uclibc (_LIBC is defined) we access the
  * bitfields using bitmasks in a single flag variable.
  *
  * WARNING -- This may very well fail if built with -fpack-struct!!!
@@ -61,7 +61,7 @@ struct printf_info {
   int spec;
 #endif
 
-#ifndef UCLIBC_INTERNAL
+#ifndef _LIBC
 
 #if __BYTE_ORDER == __LITTLE_ENDIAN
   unsigned int space:1;         /* Space flag.  */
@@ -95,7 +95,7 @@ struct printf_info {
 #error unsupported byte order!
 #endif
 
-#else  /* UCLIBC_INTERNAL */
+#else  /* _LIBC */
 
   uint32_t _flags;	/* non-gnu */
 #define __PRINT_INFO_FLAG_space                 (1<<0)
@@ -121,7 +121,7 @@ struct printf_info {
 #define PRINT_INFO_SET_extra(INFO_PTR,VAL) \
 	((INFO_PTR)->_flags |= (((INFO_PTR)->_flags & ~1) | ((VAL) & 1)))
 
-#endif /* UCLIBC_INTERNAL */
+#endif /* _LIBC */
 
 #ifdef __UCLIBC_HAS_WCHAR__
   wchar_t pad;                  /* Padding character.  */
diff --git a/include/strings.h b/include/strings.h
index 550f4ab..7f3a456 100644
--- a/include/strings.h
+++ b/include/strings.h
@@ -91,7 +91,7 @@ extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n)
 __END_DECLS
 
 
-#ifdef UCLIBC_INTERNAL
+#ifdef _LIBC
 #error "<strings.h> should not be included from libc."
 #endif
 
diff --git a/include/time.h b/include/time.h
index f6863ed..88c5b0d 100644
--- a/include/time.h
+++ b/include/time.h
@@ -434,7 +434,7 @@ extern int getdate_r (__const char *__restrict __string,
 __END_DECLS
 
 
-#ifdef UCLIBC_INTERNAL
+#ifdef _LIBC
 /* Experiment. Grep for 'libc_hidden_proto(time)' if need to revert */
 libc_hidden_proto(time)
 #endif
diff --git a/include/unistd.h b/include/unistd.h
index 3efcf18..9664872 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -1113,7 +1113,7 @@ extern char *ctermid (char *__s) __THROW;
 __END_DECLS
 
 
-#ifdef UCLIBC_INTERNAL
+#ifdef _LIBC
 #ifndef smallint_type /* if arch didn't override it in bits/wordsize.h */
 #define smallint_type int
 #endif
diff --git a/libc/sysdeps/linux/i386/bits/wordsize.h b/libc/sysdeps/linux/i386/bits/wordsize.h
index 7c3cd9c..f4c2144 100644
--- a/libc/sysdeps/linux/i386/bits/wordsize.h
+++ b/libc/sysdeps/linux/i386/bits/wordsize.h
@@ -18,7 +18,7 @@
 
 #define __WORDSIZE	32
 
-#ifdef UCLIBC_INTERNAL
+#ifdef _LIBC
 #ifndef smallint_type
 #define smallint_type char
 #endif
_______________________________________________
uClibc mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/uclibc

Reply via email to