On 15.03.2007 [12:27:54 -0700], Nishanth Aravamudan wrote:
> Make the elflink.o and direct_syscall targets depend on ELF32 or ELF64
> being defined.
> IA64 will not be able to pass tests that rely on MAP_FIXED semantics for
> hugepages, which the LIB_TESTS_64 tests all do. So don't build them on
> that arch (requires an extra export). run_tests.sh says no such
> file, but won't FAIL now.
> Make LDSCRIPT_TESTS depend on the existence of ELF32 or ELF64 (that is,
> on the existence of linker scripts), just like the relinking tests.
> 
> Signed-off-by: Nishanth Aravamudan <[EMAIL PROTECTED]>
> ---
>  Makefile       |   14 ++++++++++----
>  tests/Makefile |    7 +++++--
>  2 files changed, 15 insertions(+), 6 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index d3150ea..f74da43 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1,6 +1,6 @@
>  PREFIX = /usr/local
>  
> -LIBOBJS = hugeutils.o version.o elflink.o morecore.o debug.o
> +LIBOBJS = hugeutils.o version.o morecore.o debug.o
>  INSTALL_OBJ_LIBS = libhugetlbfs.so libhugetlbfs.a
>  LDSCRIPT_TYPES = B BDT
>  LDSCRIPT_DIST_ELF = elf32ppclinux elf64ppc elf_i386 elf_x86_64
> @@ -71,9 +71,14 @@ ifdef CC64
>  OBJDIRS +=  obj64
>  endif
>  
> -LIBOBJS32 = $(LIBOBJS:%=obj32/%) obj32/$(ELF32).o
> -LIBOBJS64 = $(LIBOBJS:%=obj64/%) obj64/$(ELF64).o
> -
> +LIBOBJS32 = $(LIBOBJS:%=obj32/%)
> +LIBOBJS64 = $(LIBOBJS:%=obj64/%)
> +ifdef ELF32
> +LIBOBJS32 += obj32/elflink.o obj32/$(ELF32).o
> +endif
> +ifdef ELF64
> +LIBOBJS64 += obj64/elflink.o obj64/$(ELF64).o
> +endif

Ok, this is disgusting. We have an implicit ordering dependency here
that "just worked up until now". elflink.o needs to be built before
debug.o. Otherwise HUGETLB_VERBOSE=99 stops working.

So, this patch should be (not the order is changed):

Make the elflink.o and direct_syscall targets depend on ELF32 or ELF64
being defined.
IA64 will not be able to pass tests that rely on MAP_FIXED semantics for
hugepages, which the LIB_TESTS_64 tests all do. So don't build them on
that arch (requires an extra export). run_tests.sh says no such
file, but won't FAIL now.
Make LDSCRIPT_TESTS depend on the existence of ELF32 or ELF64 (that is,
on the existence of linker scripts), just like the relinking tests.

Signed-off-by: Nishanth Aravamudan <[EMAIL PROTECTED]>
---
 Makefile       |   14 ++++++++++----
 tests/Makefile |    7 +++++--
 2 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/Makefile b/Makefile
index d3150ea..f74da43 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 PREFIX = /usr/local
 
-LIBOBJS = hugeutils.o version.o elflink.o morecore.o debug.o
+LIBOBJS = hugeutils.o version.o morecore.o debug.o
 INSTALL_OBJ_LIBS = libhugetlbfs.so libhugetlbfs.a
 LDSCRIPT_TYPES = B BDT
 LDSCRIPT_DIST_ELF = elf32ppclinux elf64ppc elf_i386 elf_x86_64
@@ -71,9 +71,14 @@ ifdef CC64
 OBJDIRS +=  obj64
 endif
 
-LIBOBJS32 = $(LIBOBJS:%=obj32/%) obj32/$(ELF32).o
-LIBOBJS64 = $(LIBOBJS:%=obj64/%) obj64/$(ELF64).o
-
+ifdef ELF32
+LIBOBJS32 = obj32/elflink.o obj32/$(ELF32).o
+endif
+ifdef ELF64
+LIBOBJS64 = obj64/elflink.o obj64/$(ELF64).o
+endif
+LIBOBJS32 += $(LIBOBJS:%=obj32/%)
+LIBOBJS64 += $(LIBOBJS:%=obj64/%)
 
 LIBDIR32 = $(PREFIX)/$(LIB32)
 LIBDIR64 = $(PREFIX)/$(LIB64)
@@ -99,6 +104,7 @@ endif
 
 DEPFILES = $(LIBOBJS:%.o=%.d)
 
+export ARCH
 export OBJDIRS
 export CC32
 export CC64
diff --git a/tests/Makefile b/tests/Makefile
index cccb5c8..06f2ddc 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -22,12 +22,15 @@ LDFLAGS32 = -L../obj32
 LDFLAGS64 = -L../obj64
 INSTALL = install
 
-TESTS = $(LIB_TESTS) $(NOLIB_TESTS) $(LDSCRIPT_TESTS) $(STRESS_TESTS)
+TESTS = $(LIB_TESTS) $(NOLIB_TESTS) $(STRESS_TESTS)
 ifneq ($(or $(ELF32),$(ELF64)),)
-TESTS += $(HUGELINK_TESTS) $(HUGELINK_TESTS:%=xB.%) $(HUGELINK_TESTS:%=xBDT.%)
+TESTS += $(LDSCRIPT_TESTS) $(HUGELINK_TESTS) $(HUGELINK_TESTS:%=xB.%) \
+       $(HUGELINK_TESTS:%=xBDT.%)
 endif
 
+ifneq ($(ARCH),ia64)
 TESTS_64 = $(LIB_TESTS_64)
+endif
 
 SCRIPTS=../ldscripts
 SCRIPTS32 = $(SCRIPTS)/$(ELF32)
-- 
1.4.4.3.gc902c


-- 
Nishanth Aravamudan <[EMAIL PROTECTED]>
IBM Linux Technology Center

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Libhugetlbfs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel

Reply via email to