Bernhard Fischer wrote:
On Wed, Jun 11, 2008 at 04:10:23PM +0200, Bernd Schmidt wrote:
Daniel Jacobowitz wrote:
I have no comment on the patch itself, but I like the approach - I've
concluded before that this is the only sane way to test toolchain
pieces, especially compiler or C library. We do all of our testing
after installation here.
My patch doesn't really create a full installation tree that looks
identical to the one created by 'make install'; that might require
somewhat more effort (unless we want to just $(MAKE) install
DESTDIR=somewhere/in/tree for every make test).
A better approach would be to just
test-includes: test/include/bits/uClibc_config.h
$(make) -C $(top_builddir) PREFIX=test/ RUNTIME_PREFIX=test/ \
DEVEL_PREFIX=/ \
HOSTCC="$(HOSTCC)" \
eventual_flags_passing_here \
install_dev
i.e. do a real, full install an no fakery.
_______________________________________________
uClibc mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/uclibc
Hi All,
as I told few week ago, here there is a complete patch based on your inputs.
Just to summarize, the idea is to install the headers and kernel headers
(required by some tests)
into a local directory. I prefer not under test dir, but in the top
directory to be used
by utils too (not yet fixed).
Tests will be built using only as include dir the local install dir
(with -nostdinc ).
This allows by-passing teh issue caused the hidden_proto.
I fixed a bit the clean target too.
Also added a new target in top Rules.mak "test_compile" to build the
tests instead
of directly calling make -C test compile.
There some issues to build nptl and tls tests that need some internal
header files, but this is
another story we are working on.
Comments are welcome.
Carmelo
Fix the test build system by installing headers on a local folder
instead of using internal headers.
Index: test/Rules.mak
===================================================================
--- test/Rules.mak (revision 22609)
+++ test/Rules.mak (working copy)
@@ -79,7 +79,11 @@
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)$(LOCAL_INSTALL_PATH)/usr/include
+
+CC_IPREFIX:=$(shell $(CC) --print-file-name=include)
+CFLAGS += -I$(CC_IPREFIX)
+
HOST_CFLAGS += $(XWARNINGS) $(OPTIMIZATION) $(XCOMMON_CFLAGS)
LDFLAGS := $(CPU_LDFLAGS)
@@ -97,11 +101,12 @@
LDFLAGS += -static
HOST_LDFLAGS += -static
endif
+
LDFLAGS += -B$(top_builddir)lib -Wl,-rpath,$(top_builddir)lib
-Wl,-rpath-link,$(top_builddir)lib
UCLIBC_LDSO_ABSPATH=$(shell pwd)
ifdef TEST_INSTALLED_UCLIBC
LDFLAGS += -Wl,-rpath,./
-UCLIBC_LDSO_ABSPATH=/lib
+UCLIBC_LDSO_ABSPATH=$(SHARED_LIB_LOADER_PREFIX)
endif
ifeq ($(findstring -static,$(LDFLAGS)),)
Index: Rules.mak
===================================================================
--- Rules.mak (revision 22609)
+++ Rules.mak (working copy)
@@ -632,3 +632,5 @@
SHARED_START_FILES:=$(top_builddir)lib/crti.o $(LIBGCC_DIR)crtbeginS.o
SHARED_END_FILES:=$(LIBGCC_DIR)crtendS.o $(top_builddir)lib/crtn.o
endif
+
+LOCAL_INSTALL_PATH := install_dir
Index: Makefile.in
===================================================================
--- Makefile.in (revision 22609)
+++ Makefile.in (working copy)
@@ -66,7 +66,7 @@
ifneq ($(TARGET_SUBARCH),)
HEADERS_BITS_SUBARCH := $(notdir $(wildcard
$(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/bits/$(TARGET_SUBARCH)/*.h))
endif
-HEADERS_BITS_COMMON := $(filter-out $(HEADERS_BITS_ARCH)
$(HEADERS_BITS_SUBARCH),$(HEADERS_BITS_COMMON))
+HEADERS_BITS_COMMON := $(filter-out $(HEADERS_BITS_ARCH)
$(HEADERS_BITS_SUBARCH) $(HEADERS_BITS_PTHREAD),$(HEADERS_BITS_COMMON))
HEADERS_SYS_COMMON := $(notdir $(wildcard
$(top_srcdir)libc/sysdeps/linux/common/sys/*.h))
HEADERS_SYS_ARCH := $(notdir $(wildcard
$(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/sys/*.h))
@@ -152,6 +152,15 @@
mv -f $$tmp include/bits/sysnum.h; \
fi
+$(LOCAL_INSTALL_PATH):
+ $(Q)$(MAKE) PREFIX=$(shell pwd)/ RUNTIME_PREFIX=./ \
+ DEVEL_PREFIX=$(LOCAL_INSTALL_PATH)/usr/ \
+ HOSTCC="$(HOSTCC)" \
+ install_kernel_headers
+ $(Q)$(MAKE) PREFIX=$(shell pwd)/ RUNTIME_PREFIX=./ \
+ DEVEL_PREFIX=$(LOCAL_INSTALL_PATH)/usr/ \
+ HOSTCC="$(HOSTCC)" \
+ install_dev
install: install_runtime install_dev
@@ -451,7 +460,8 @@
$(Q)$(RM) -r lib include/bits
$(RM) ldso/*/*.a libpthread/*/*.a libc/*.a libcrypt/*.a libintl/*.a \
libm/*.a libnsl/*.a libpthread/*.a libresolv/*.a librt/*.a \
- libutil/*.a lib/*.a
+ libutil/*.a lib/*.a \
+ include/fpu_control.h include/dl-osinfo.h include/hp-timing.h
$(MAKE) objclean-y headers_clean-y
$(MAKE) -s -C test clean
$(MAKE) -C utils utils_clean
@@ -466,6 +476,7 @@
fi
@$(RM) include/linux include/asm*
$(RM) $(top_builddir)extra/scripts/unifdef
+ $(RM) -r $(LOCAL_INSTALL_PATH)
distclean: clean
-find . \( -name core -o -name \*.orig -o -name \*~ -o -name .\*.dep \)
-exec $(RM) {} \;
@@ -481,3 +492,6 @@
test check:
$(Q)$(MAKE) -C test
+
+test_compile: $(LOCAL_INSTALL_PATH)
+ $(Q)$(MAKE) -C test compile
_______________________________________________
uClibc mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/uclibc