Current versions of the ld.hugetlbfs wrapper script rightly warn if
you use the old, broken linker-script based method of building a
hugepage binary.  However, we still have to build things with this
mode to test them.  It's kind of nasty having a dozen or so warnings
spewing out on a perfectly full and correct build of the testsuite.

Therefore, this patch provides an environment variable to suppress
those warnings, and uses it from the testsuite makefile to get rid of
them in this case.

Signed-off-by: David Gibson <[email protected]>

Index: libhugetlbfs/ld.hugetlbfs
===================================================================
--- libhugetlbfs.orig/ld.hugetlbfs      2009-08-24 15:31:01.000000000 +1000
+++ libhugetlbfs/ld.hugetlbfs   2009-08-24 15:31:28.000000000 +1000
@@ -40,8 +40,10 @@ while [ -n "$1" ]; do
            fi
            ;;
        --hugetlbfs-link=*)
-            echo -n "ld.hugetlbfs: --hugetlbfs-link is deprecated. " 1>&2
-            echo "Migrate to --hugetlbfs-align." 1>&2
+           if [ -z "$HUGETLB_DEPRECATED_LINK" ]; then
+               echo -n "ld.hugetlbfs: --hugetlbfs-link is deprecated. " 1>&2
+               echo "Migrate to --hugetlbfs-align." 1>&2
+           fi
            HTLB_LINK="${arg#--hugetlbfs-link=}"
            ;;
        --hugetlbfs-script-path=*)
Index: libhugetlbfs/tests/Makefile
===================================================================
--- libhugetlbfs.orig/tests/Makefile    2009-08-24 15:31:42.000000000 +1000
+++ libhugetlbfs/tests/Makefile 2009-08-24 15:34:29.000000000 +1000
@@ -175,25 +175,25 @@ obj32/xB.%: $(SCRIPTS32).xB $(HUGETLBFS_
        @$(VECHO) LD32 "(xB test)" $@
        @mkdir -p obj32
        @ln -sf ../$(HUGETLBFS_LD) obj32/ld
-       $(CC32) -B./obj32  $(LDFLAGS) $(LDFLAGS32) -o $@ $(LDLIBS) 
-Wl,--hugetlbfs-link=B $(filter %.o,$^)
+       HUGETLB_DEPRECATED_LINK=1 $(CC32) -B./obj32  $(LDFLAGS) $(LDFLAGS32) -o 
$@ $(LDLIBS) -Wl,--hugetlbfs-link=B $(filter %.o,$^)
 
 obj64/xB.%: $(SCRIPTS64).xB $(HUGETLBFS_LD) obj64/%.o obj64/testutils.o
        @$(VECHO) LD64 "(xB test)" $@
        @mkdir -p obj64
        @ln -sf ../$(HUGETLBFS_LD) obj64/ld
-       $(CC64) -B./obj64 $(LDFLAGS) $(LDFLAGS64) -o $@ $(LDLIBS) 
-Wl,--hugetlbfs-link=B $(filter %.o,$^)
+       HUGETLB_DEPRECATED_LINK=1 $(CC64) -B./obj64 $(LDFLAGS) $(LDFLAGS64) -o 
$@ $(LDLIBS) -Wl,--hugetlbfs-link=B $(filter %.o,$^)
 
 obj32/xBDT.%: $(SCRIPTS32).xBDT $(HUGETLBFS_LD) obj32/%.o obj32/testutils.o
        @$(VECHO) LD32 "(xBDT test)" $@
        @mkdir -p obj32
        @ln -sf ../$(HUGETLBFS_LD) obj32/ld
-       $(CC32) -B./obj32 $(LDFLAGS) $(LDFLAGS32) -o $@ $(LDLIBS) 
-Wl,--hugetlbfs-link=BDT $(filter %.o,$^)
+       HUGETLB_DEPRECATED_LINK=1 $(CC32) -B./obj32 $(LDFLAGS) $(LDFLAGS32) -o 
$@ $(LDLIBS) -Wl,--hugetlbfs-link=BDT $(filter %.o,$^)
 
 obj64/xBDT.%: $(SCRIPTS64).xBDT $(HUGETLBFS_LD) obj64/%.o obj64/testutils.o
        @$(VECHO) LD64 "(xBDT test)" $@
        @mkdir -p obj64
        @ln -sf ../$(HUGETLBFS_LD) obj64/ld
-       $(CC64) -B./obj64 $(LDFLAGS) $(LDFLAGS64) -o $@ $(LDLIBS) 
-Wl,--hugetlbfs-link=BDT $(filter %.o,$^)
+       HUGETLB_DEPRECATED_LINK=1 $(CC64) -B./obj64 $(LDFLAGS) $(LDFLAGS64) -o 
$@ $(LDLIBS) -Wl,--hugetlbfs-link=BDT $(filter %.o,$^)
 
 $(HELPERS:%=obj32/%): %: %.o
        @$(VECHO) LD32 "(helper)" $@


-- 
David Gibson                    | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
                                | _way_ _around_!
http://www.ozlabs.org/~dgibson

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Libhugetlbfs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel

Reply via email to