* [LTP] running LTP on uClinux
@ 2010-08-17 15:58 David Marlin
2010-08-17 16:31 ` Garrett Cooper
0 siblings, 1 reply; 7+ messages in thread
From: David Marlin @ 2010-08-17 15:58 UTC (permalink / raw)
To: ltp-list
I was building LTP to test a uClinux system, but encountered some
problems. As far as I could tell UCLINUX=1 is not being passed to all
testcases when defined at the top level before running make.
export UCLINUX=1
make
I modified the following file and the build proceeded as expected:
--- include/mk/testcases.mk.orig 2010-04-01 01:23:08.000000000 -0500
+++ include/mk/testcases.mk 2010-07-01 17:38:10.240628708 -0500
@@ -53,3 +53,8 @@
$(APICMDS_DIR) $(LIBLTP_DIR) $(abs_top_builddir)/$(TKI_DIR): %:
mkdir -p "$@"
+
+ifeq ($(UCLINUX),1)
+CFLAGS += -D__UCLIBC__ -DUCLINUX
+endif
Has anyone else had to make similar changes in order to build LTP for
uClinux?
d.marlin
------------------------------------------------------------------------------
This SF.net email is sponsored by
Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [LTP] running LTP on uClinux 2010-08-17 15:58 [LTP] running LTP on uClinux David Marlin @ 2010-08-17 16:31 ` Garrett Cooper 2010-08-17 16:42 ` Mike Frysinger 2010-08-17 18:27 ` David Marlin 0 siblings, 2 replies; 7+ messages in thread From: Garrett Cooper @ 2010-08-17 16:31 UTC (permalink / raw) To: dmarlin; +Cc: ltp-list [-- Attachment #1: Type: text/plain, Size: 1114 bytes --] On Tue, Aug 17, 2010 at 8:58 AM, David Marlin <dmarlin@redhat.com> wrote: > > I was building LTP to test a uClinux system, but encountered some > problems. As far as I could tell UCLINUX=1 is not being passed to all > testcases when defined at the top level before running make. > > export UCLINUX=1 > make > > > I modified the following file and the build proceeded as expected: > > --- include/mk/testcases.mk.orig 2010-04-01 01:23:08.000000000 -0500 > +++ include/mk/testcases.mk 2010-07-01 17:38:10.240628708 -0500 > @@ -53,3 +53,8 @@ > > $(APICMDS_DIR) $(LIBLTP_DIR) $(abs_top_builddir)/$(TKI_DIR): %: > mkdir -p "$@" > + > +ifeq ($(UCLINUX),1) > +CFLAGS += -D__UCLIBC__ -DUCLINUX > +endif > > > Has anyone else had to make similar changes in order to build LTP for > uClinux? It should be CPPFLAGS, and the definition should be in env_post.mk; I never had a UCLINUX infrastructure to test with, so this might have fallen between the cracks by accident about 8 months ago. Let me know how this patch works for you. Thanks, -Garrett [-- Attachment #2: fix-ltp-uclinux-compiles.diff --] [-- Type: application/octet-stream, Size: 496 bytes --] diff --git a/include/mk/env_post.mk b/include/mk/env_post.mk index 56aca27..ebaee1f 100644 --- a/include/mk/env_post.mk +++ b/include/mk/env_post.mk @@ -37,6 +37,10 @@ CPPFLAGS += -I$(top_srcdir)/include -I$(top_builddir)/include LDFLAGS += -L$(top_builddir)/lib +ifeq ($(UCLINUX),1) +CPPFLAGS += -D__UCLIBC__ -DUCLINUX +endif + MAKE_TARGETS ?= $(notdir $(patsubst %.c,%,$(wildcard $(abs_srcdir)/*.c))) MAKE_TARGETS := $(filter-out $(FILTER_OUT_MAKE_TARGETS),$(MAKE_TARGETS)) [-- Attachment #3: Type: text/plain, Size: 224 bytes --] ------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev [-- Attachment #4: Type: text/plain, Size: 155 bytes --] _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [LTP] running LTP on uClinux 2010-08-17 16:31 ` Garrett Cooper @ 2010-08-17 16:42 ` Mike Frysinger 2010-08-17 19:51 ` Garrett Cooper 2010-08-17 18:27 ` David Marlin 1 sibling, 1 reply; 7+ messages in thread From: Mike Frysinger @ 2010-08-17 16:42 UTC (permalink / raw) To: Garrett Cooper; +Cc: dmarlin, ltp-list On Tue, Aug 17, 2010 at 12:31 PM, Garrett Cooper wrote: > It should be CPPFLAGS, and the definition should be in env_post.mk; I > never had a UCLINUX infrastructure to test with, so this might have > fallen between the cracks by accident about 8 months ago. building for a nommu target should work even when you're running a mmu toolchain for an mmu target. the testcases simply assume things like fork() wont work and so fall back to ones that work in both places (like vfork). the tests should be able to run & pass even with a mmu. > Let me know how this patch works for you. the logic in lib/Makefile should be unified with this -mike ------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [LTP] running LTP on uClinux 2010-08-17 16:42 ` Mike Frysinger @ 2010-08-17 19:51 ` Garrett Cooper 2010-08-17 19:58 ` Mike Frysinger 0 siblings, 1 reply; 7+ messages in thread From: Garrett Cooper @ 2010-08-17 19:51 UTC (permalink / raw) To: Mike Frysinger; +Cc: dmarlin, ltp-list On Tue, Aug 17, 2010 at 9:42 AM, Mike Frysinger <vapier@gentoo.org> wrote: > On Tue, Aug 17, 2010 at 12:31 PM, Garrett Cooper wrote: >> It should be CPPFLAGS, and the definition should be in env_post.mk; I >> never had a UCLINUX infrastructure to test with, so this might have >> fallen between the cracks by accident about 8 months ago. > > building for a nommu target should work even when you're running a mmu > toolchain for an mmu target. the testcases simply assume things like > fork() wont work and so fall back to ones that work in both places > (like vfork). the tests should be able to run & pass even with a mmu. Ok. >> Let me know how this patch works for you. > > the logic in lib/Makefile should be unified with this lib.mk picks up env_post.mk, so it's already caught there. Or are you referring to how libltp is built and what headers are picked up from include/ ? Thanks! -Garrett ------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [LTP] running LTP on uClinux 2010-08-17 19:51 ` Garrett Cooper @ 2010-08-17 19:58 ` Mike Frysinger 2010-08-17 20:06 ` Garrett Cooper 0 siblings, 1 reply; 7+ messages in thread From: Mike Frysinger @ 2010-08-17 19:58 UTC (permalink / raw) To: Garrett Cooper; +Cc: dmarlin, ltp-list On Tue, Aug 17, 2010 at 3:51 PM, Garrett Cooper wrote: > On Tue, Aug 17, 2010 at 9:42 AM, Mike Frysinger wrote: >> On Tue, Aug 17, 2010 at 12:31 PM, Garrett Cooper wrote: >>> Let me know how this patch works for you. >> >> the logic in lib/Makefile should be unified with this > > lib.mk picks up env_post.mk, so it's already caught there. Or are you > referring to how libltp is built and what headers are picked up from > include/ ? i mean there should not be more than one place in the whole tree which adds -DUCLINUX/etc... if we merge your patch, there will be. i'm not saying your patch is wrong, just that something needs fixing to avoid the aforementioned scenario. -mike ------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [LTP] running LTP on uClinux 2010-08-17 19:58 ` Mike Frysinger @ 2010-08-17 20:06 ` Garrett Cooper 0 siblings, 0 replies; 7+ messages in thread From: Garrett Cooper @ 2010-08-17 20:06 UTC (permalink / raw) To: Mike Frysinger; +Cc: dmarlin, ltp-list On Tue, Aug 17, 2010 at 12:58 PM, Mike Frysinger <vapier@gentoo.org> wrote: > On Tue, Aug 17, 2010 at 3:51 PM, Garrett Cooper wrote: >> On Tue, Aug 17, 2010 at 9:42 AM, Mike Frysinger wrote: >>> On Tue, Aug 17, 2010 at 12:31 PM, Garrett Cooper wrote: >>>> Let me know how this patch works for you. >>> >>> the logic in lib/Makefile should be unified with this >> >> lib.mk picks up env_post.mk, so it's already caught there. Or are you >> referring to how libltp is built and what headers are picked up from >> include/ ? > > i mean there should not be more than one place in the whole tree which > adds -DUCLINUX/etc... if we merge your patch, there will be. i'm not > saying your patch is wrong, just that something needs fixing to avoid > the aforementioned scenario. Sure. I had forgotten whether or not there was still a reference to UCLINUX in lib/Makefile. Thanks for the reminder :). -Garrett ------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [LTP] running LTP on uClinux 2010-08-17 16:31 ` Garrett Cooper 2010-08-17 16:42 ` Mike Frysinger @ 2010-08-17 18:27 ` David Marlin 1 sibling, 0 replies; 7+ messages in thread From: David Marlin @ 2010-08-17 18:27 UTC (permalink / raw) To: Garrett Cooper; +Cc: ltp-list Garrett Cooper wrote: > On Tue, Aug 17, 2010 at 8:58 AM, David Marlin <dmarlin@redhat.com> wrote: >> I was building LTP to test a uClinux system, but encountered some >> problems. As far as I could tell UCLINUX=1 is not being passed to all >> testcases when defined at the top level before running make. >> >> export UCLINUX=1 >> make >> >> >> I modified the following file and the build proceeded as expected: >> >> --- include/mk/testcases.mk.orig 2010-04-01 01:23:08.000000000 -0500 >> +++ include/mk/testcases.mk 2010-07-01 17:38:10.240628708 -0500 >> @@ -53,3 +53,8 @@ >> >> $(APICMDS_DIR) $(LIBLTP_DIR) $(abs_top_builddir)/$(TKI_DIR): %: >> mkdir -p "$@" >> + >> +ifeq ($(UCLINUX),1) >> +CFLAGS += -D__UCLIBC__ -DUCLINUX >> +endif >> >> >> Has anyone else had to make similar changes in order to build LTP for >> uClinux? > > It should be CPPFLAGS, and the definition should be in env_post.mk; I > never had a UCLINUX infrastructure to test with, so this might have > fallen between the cracks by accident about 8 months ago. > > Let me know how this patch works for you. The patch works for me. Thank you. I am now seeing some other UCLINUX related problems/questions with individual testcases, but will follow up in separate emails on those. Thanks again, d.marlin ========== ------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-08-17 20:06 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-08-17 15:58 [LTP] running LTP on uClinux David Marlin 2010-08-17 16:31 ` Garrett Cooper 2010-08-17 16:42 ` Mike Frysinger 2010-08-17 19:51 ` Garrett Cooper 2010-08-17 19:58 ` Mike Frysinger 2010-08-17 20:06 ` Garrett Cooper 2010-08-17 18:27 ` David Marlin
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox