daily update
[deliverable/binutils-gdb.git] / gold / Makefile.am
index df8dcb52017a6e7f6ebaf181030f6ccaceb65c0f..8e2fff102746621e54034a23498ff96d1dd8d3b4 100644 (file)
@@ -1,6 +1,7 @@
 ## Process this file with automake to generate Makefile.in
 #
-#   Copyright 2012 Free Software Foundation
+#  Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013
+#  Free Software Foundation, Inc.
 #
 # This file is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -37,7 +38,7 @@ AM_CPPFLAGS = \
 LIBIBERTY = ../libiberty/libiberty.a
 
 if PLUGINS
-LIBDL = -ldl
+LIBDL = @DLOPEN_LIBS@
 endif
 
 if THREADS
@@ -268,7 +269,7 @@ ld2_LDFLAGS = -Bgcctestdir2/
 bootstrap-test: ld2
        rm -f $@
        echo "#!/bin/sh" > $@
-       echo "cmp ld1 ld2" > $@
+       echo "cmp ld1 ld2" >> $@
        chmod +x $@
 
 libgold-1-r.o: gcctestdir1/ld libgold.a
@@ -295,11 +296,68 @@ ld2_r_LDFLAGS = -Bgcctestdir2-r/
 bootstrap-test-r: ld2-r
        rm -f $@
        echo "#!/bin/sh" > $@
-       echo "cmp ld1-r ld2-r" > $@
+       echo "cmp ld1-r ld2-r" >> $@
        chmod +x $@
 
 check_PROGRAMS = ld1 ld2 ld1-r ld2-r
 TESTS = bootstrap-test bootstrap-test-r
 
+# Verify that changing the number of threads doesn't change the
+# treehash computation, by building ld1 and ld3 the same way except
+# for the number of threads.  However, the build ID should change if
+# we change the chunk size for --build-id=tree, so ld4 should be
+# different.  We run the latter test even if multithreading is unavailable,
+# because the treehash can still operate in that mode.
+check_PROGRAMS += ld4
+TESTS += bootstrap-test-treehash-chunksize
+
+gcctestdir3/ld: ld-new
+       test -d gcctestdir3 || mkdir -p gcctestdir3
+       rm -f gcctestdir3/ld
+       (cd gcctestdir3 && $(LN_S) ../ld-new ld)
+
+ld3_SOURCES = $(sources_var)
+ld3_DEPENDENCIES = $(deps_var) gcctestdir3/ld
+ld3_LDADD = $(ldadd_var)
+ld3_LDFLAGS = -Bgcctestdir3/
+
+gcctestdir4/ld: ld-new
+       test -d gcctestdir4 || mkdir -p gcctestdir4
+       rm -f gcctestdir4/ld
+       (cd gcctestdir4 && $(LN_S) ../ld-new ld)
+
+ld4_SOURCES = $(sources_var)
+ld4_DEPENDENCIES = $(deps_var) gcctestdir4/ld
+ld4_LDADD = $(ldadd_var)
+ld4_LDFLAGS = -Bgcctestdir4/
+
+ld1_LDFLAGS += -Wl,--build-id=tree -Wl,--build-id-chunk-size-for-treehash=12345 -Wl,--build-id-min-file-size-for-treehash=0
+ld2_LDFLAGS += -Wl,--build-id=tree -Wl,--build-id-chunk-size-for-treehash=12345 -Wl,--build-id-min-file-size-for-treehash=0
+ld3_LDFLAGS += -Wl,--build-id=tree -Wl,--build-id-chunk-size-for-treehash=12345 -Wl,--build-id-min-file-size-for-treehash=0
+ld4_LDFLAGS += -Wl,--build-id=tree -Wl,--build-id-chunk-size-for-treehash=12346 -Wl,--build-id-min-file-size-for-treehash=0
+
+if THREADS
+
+ld1_LDFLAGS += -Wl,--thread-count=3
+ld2_LDFLAGS += -Wl,--thread-count=3
+ld3_LDFLAGS += -Wl,--thread-count=13
+ld4_LDFLAGS += -Wl,--thread-count=3
+check_PROGRAMS += ld3
+TESTS += bootstrap-test-treehash-chunksize
+
+bootstrap-test-treehash: ld1 ld3
+       rm -f $@
+       echo "#!/bin/sh" > $@
+       echo "cmp ld1 ld3" >> $@
+       chmod +x $@
+
+endif
+
+bootstrap-test-treehash-chunksize: ld1 ld4
+       rm -f $@
+       echo "#!/bin/sh" > $@
+       echo "cmp ld1 ld4 | grep ." >> $@
+       chmod +x $@
+
 endif
 endif
This page took 0.02376 seconds and 4 git commands to generate.