Carmelo AMOROSO wrote:
I've now figure out that I was looking at the previous version of
string.h where all the hidden_proto
were guarded by the UCLIBC_INTERNAL.. that now is changed again.
SO my previous suggested fixed doesn't work.. so probably the only
solution is as Bernd suggested.
I've quickly hacked something up (for test/ only); patch below. Does
this look like a good approach? It installs headers from include/ into
install-include. CFLAGS are no longer inherited by test/Makefile, so
libc-symbols.h is also no longer included by the test programs and
search paths under libpthread/ aren't added.
As with all my Makefile patches, I'll be happy to have them modified by
people with more expertise (e.g. - is there a better way to recursively
find all .h files in include/?)
Bernd
--
This footer brought to you by insane German lawmakers.
Analog Devices GmbH Wilhelm-Wagenfeld-Str. 6 80807 Muenchen
Sitz der Gesellschaft Muenchen, Registergericht Muenchen HRB 40368
Geschaeftsfuehrer Thomas Wessel, William A. Martin, Margaret Seif
Index: test/Rules.mak
===================================================================
--- test/Rules.mak (revision 22287)
+++ test/Rules.mak (working copy)
@@ -79,7 +79,13 @@ endif
XWARNINGS := $(subst ",, $(strip $(WARNINGS))) -Wstrict-prototypes
XARCH_CFLAGS := $(subst ",, $(strip $(ARCH_CFLAGS))) $(CPU_CFLAGS)
XCOMMON_CFLAGS := -D_GNU_SOURCE -I$(top_builddir)test
-CFLAGS += $(XWARNINGS) $(OPTIMIZATION) $(XCOMMON_CFLAGS) $(XARCH_CFLAGS) -I$(top_builddir)include $(PTINC)
+CFLAGS := $(XWARNINGS) $(OPTIMIZATION) $(XCOMMON_CFLAGS) $(XARCH_CFLAGS) -nostdinc -I$(top_builddir)install_include $(PTINC)
+
+#CFLAGS += -iwithprefix include-fixed -iwithprefix include
+CC_IPREFIX:=$(shell $(CC) --print-file-name=include)
+CFLAGS += -I$(dir $(CC_IPREFIX))/include-fixed -I$(CC_IPREFIX)
+CFLAGS += -I$(KERNEL_HEADERS)
+
HOST_CFLAGS += $(XWARNINGS) $(OPTIMIZATION) $(XCOMMON_CFLAGS)
LDFLAGS := $(CPU_LDFLAGS)
Index: Makefile.in
===================================================================
--- Makefile.in (revision 22287)
+++ Makefile.in (working copy)
@@ -136,6 +136,8 @@ headers-y += $(target-headers-sysdep)
headers: include/bits/uClibc_config.h
$(Q)$(if $(UCLIBC_HAS_LOCALE),$(MAKE) -C extra/locale locale_headers)
+local-install-headers: $(patsubst include/%.h,install_include/%.h,$(headers-y) $(wildcard include/*.h) $(wildcard include/*/*.h))
+
pregen: include/bits/sysnum.h headers
include/bits/sysnum.h: $(top_srcdir)extra/scripts/gen_bits_syscall_h.sh
@@ -161,6 +163,11 @@ RUNTIME_PREFIX_LIB_FROM_DEVEL_PREFIX_LIB
$(top_builddir)extra/scripts/unifdef: $(top_srcdir)extra/scripts/unifdef.c
$(hcompile.u)
+install_include/%.h: include/%.h $(top_builddir)extra/scripts/unifdef
+ $(INSTALL) -d $(dir $@)
+ $(top_builddir)/extra/scripts/unifdef -UUCLIBC_INTERNAL $< \
+ | grep -v '^libc_hidden_proto[ ]*([a-zA-Z0-9_]*)$$' > $@
+
# Installs kernel header files (linux/*, asm/*, asm-generic/*).
install_kernel_headers: headers
top_builddir=$(top_builddir) \
@@ -479,5 +486,5 @@ dist release:
$(TAR) cjf ../uClibc-$(VERSION).tar.bz2 -C .. uClibc-$(VERSION)
du -b ../uClibc-$(VERSION).tar.bz2
-test check:
+test check: local-install-headers
$(Q)$(MAKE) -C test
_______________________________________________
uClibc mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/uclibc