diff options
author | Ian Lance Taylor <ian@airs.com> | 2008-04-17 07:12:00 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 2008-04-17 07:12:00 +0000 |
commit | 155a0dd76368c9a61a2d640df534d25216963e86 (patch) | |
tree | 862282bb64498a494f4f5109d9e2175e643bb203 /gold/testsuite/Makefile.am | |
parent | 32b769e114e262a41fcbb64d8c1f891b19bc09f1 (diff) | |
download | gdb-155a0dd76368c9a61a2d640df534d25216963e86.zip gdb-155a0dd76368c9a61a2d640df534d25216963e86.tar.gz gdb-155a0dd76368c9a61a2d640df534d25216963e86.tar.bz2 |
* common.cc (Symbol_table::allocate_commons): Remove options
parameter. Change caller.
(Symbol_table::do_allocate_commons): Remove options parameter.
Change caller. Just call do_allocate_commons_list twice.
(Symbol_table::do_allocate_commons_list): New function, broken out
of do_allocate_commons.
* common.h (class Allocate_commons_task): Remove options_ field.
Update constructor.
* symtab.cc (Symbol_table::Symbol_table): Initialize
tls_commons_.
(Symbol_table::add_from_object): Put TLS common symbols on
tls_commons_ list.
(Symbol_table::sized_finalize_symbol): Handle STT_TLS symbols
which are IN_OUTPUT_DATA.
* symtab.h (class Symbol_table): Add tls_commons_ field. Update
allocate_commons and do_allocate_commons declarations. Declare
do_allocate_commons_list.
* gold.cc (queue_middle_tasks): Update creation of
Allocate_commons_task to not pass options.
* testsuite/Makefile.am (INCLUDES): Add -I.. .
(TLS_TEST_C_FLAGS): New variable.
(tls_test_c_pic.o): New target.
(tls_test_shared.so): Link in tls_test_c_pic.o.
(tls_test_c_pic_ie.o): New target.
(tls_test_ie_shared.so): Link in tls_test_c_pic_ie.o.
(tls_test_DEPENDENCIES, tls_test_LDADD): Add tls_test_c.o.
(tls_test_c.o): New target.
(tls_pic_test_DEPENDENCIES): Add tls_test_c_pic.o.
(tls_pic_test_LDADD): Likewise.
(tls_shared_gd_to_ie_test_DEPENDENCIES): Add tls_test_c_pic.o.
(tls_shared_gd_to_ie_test_LDADD): Likewise.
(tls_test_c_gnu2.o): New target.
(tls_shared_gnu2_gd_to_ie_test_DEPENDENCIES): Add
tls_test_c_gnu2.o.
(tls_shared_gnu2_gd_to_ie_test_LDADD): Likewise.
(tls_test_gnu2_shared.so): Link in tls_test_c_gnu2.o.
(tls_test_shared_nonpic.so): Link in tls_test_c.o.
* testsuite/tls_test.cc: Include "config.h".
(t_last): Call t11_last.
* testsuite/tls_test.h (t11, t11_last): Declare.
* testsuite/tls_test_c.c: New file.
* testsuite/tls_test_main.cc (thread_routine): Call t11.
* configure.ac: Check for OpenMP support.
* configure, config.in, Makefile.in: Rebuild.
* testsuite/Makefile.in: Rebuild.
Diffstat (limited to 'gold/testsuite/Makefile.am')
-rw-r--r-- | gold/testsuite/Makefile.am | 52 |
1 files changed, 35 insertions, 17 deletions
diff --git a/gold/testsuite/Makefile.am b/gold/testsuite/Makefile.am index 5f8c7bf..fc4e78b 100644 --- a/gold/testsuite/Makefile.am +++ b/gold/testsuite/Makefile.am @@ -13,7 +13,7 @@ AM_CXXFLAGS = $(WARN_CXXFLAGS) $(LFS_CFLAGS) -fmerge-constants INCLUDES = \ -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../../include \ - -I$(srcdir)/../../elfcpp \ + -I$(srcdir)/../../elfcpp -I.. \ -DLOCALEDIR="\"$(datadir)/locale\"" \ @INCINTL@ @@ -26,6 +26,10 @@ if THREADS THREADSLIB = -lpthread endif +if OMP_SUPPORT +TLS_TEST_C_CFLAGS = -fopenmp +endif + # 'make clean' is good about deleting some intermediate files (such as # .o's), but not all of them (such as .so's and .err files). We # improve on that here. automake-1.9 info docs say "mostlyclean" is @@ -433,8 +437,10 @@ tls_test_pic.o: tls_test.cc $(CXXCOMPILE) -c -fpic -o $@ $< tls_test_file2_pic.o: tls_test_file2.cc $(CXXCOMPILE) -c -fpic -o $@ $< -tls_test_shared.so: tls_test_pic.o tls_test_file2_pic.o gcctestdir/ld - $(CXXLINK) -Bgcctestdir/ -shared tls_test_pic.o tls_test_file2_pic.o +tls_test_c_pic.o: tls_test_c.c + $(COMPILE) -c -fpic $(TLS_TEST_C_CFLAGS) -o $@ $< +tls_test_shared.so: tls_test_pic.o tls_test_file2_pic.o tls_test_c_pic.o gcctestdir/ld + $(CXXLINK) -Bgcctestdir/ -shared tls_test_pic.o tls_test_file2_pic.o tls_test_c_pic.o tls_test_shared2.so: tls_test_file2_pic.o gcctestdir/ld $(CXXLINK) -Bgcctestdir/ -shared tls_test_file2_pic.o @@ -442,18 +448,24 @@ tls_test_pic_ie.o: tls_test.cc $(CXXCOMPILE) -c -fpic -ftls-model=initial-exec -o $@ $< tls_test_file2_pic_ie.o: tls_test_file2.cc $(CXXCOMPILE) -c -fpic -ftls-model=initial-exec -o $@ $< -tls_test_ie_shared.so: tls_test_pic_ie.o tls_test_file2_pic_ie.o gcctestdir/ld - $(CXXLINK) -Bgcctestdir/ -shared tls_test_pic_ie.o tls_test_file2_pic_ie.o +tls_test_c_pic_ie.o: tls_test_c.c + $(COMPILE) -c -fpic -ftls-model=initial-exec $(TLS_TEST_C_CFLAGS) -o $@ $< +tls_test_ie_shared.so: tls_test_pic_ie.o tls_test_file2_pic_ie.o tls_test_c_pic_ie.o gcctestdir/ld + $(CXXLINK) -Bgcctestdir/ -shared tls_test_pic_ie.o tls_test_file2_pic_ie.o tls_test_c_pic_ie.o tls_test_SOURCES = tls_test.cc tls_test_file2.cc tls_test_main.cc tls_test.h -tls_test_DEPENDENCIES = gcctestdir/ld +tls_test_DEPENDENCIES = gcctestdir/ld tls_test_c.o tls_test_LDFLAGS = -Bgcctestdir/ -tls_test_LDADD = -lpthread +tls_test_LDADD = tls_test_c.o -lpthread +tls_test_c.o: tls_test_c.c + $(COMPILE) -c $(TLS_TEST_C_CFLAGS) -o $@ $< tls_pic_test_SOURCES = tls_test_main.cc -tls_pic_test_DEPENDENCIES = gcctestdir/ld tls_test_pic.o tls_test_file2_pic.o +tls_pic_test_DEPENDENCIES = gcctestdir/ld tls_test_pic.o tls_test_file2_pic.o \ + tls_test_c_pic.o tls_pic_test_LDFLAGS = -Bgcctestdir/ -tls_pic_test_LDADD = tls_test_pic.o tls_test_file2_pic.o -lpthread +tls_pic_test_LDADD = tls_test_pic.o tls_test_file2_pic.o tls_test_c_pic.o \ + -lpthread tls_shared_test_SOURCES = tls_test_main.cc tls_shared_test_DEPENDENCIES = gcctestdir/ld tls_test_shared.so @@ -466,9 +478,11 @@ tls_shared_ie_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,. tls_shared_ie_test_LDADD = tls_test_ie_shared.so -lpthread tls_shared_gd_to_ie_test_SOURCES = tls_test_main.cc -tls_shared_gd_to_ie_test_DEPENDENCIES = gcctestdir/ld tls_test_pic.o tls_test_shared2.so +tls_shared_gd_to_ie_test_DEPENDENCIES = gcctestdir/ld tls_test_pic.o \ + tls_test_c_pic.o tls_test_shared2.so tls_shared_gd_to_ie_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,. -tls_shared_gd_to_ie_test_LDADD = tls_test_pic.o tls_test_shared2.so -lpthread +tls_shared_gd_to_ie_test_LDADD = tls_test_pic.o tls_test_c_pic.o \ + tls_test_shared2.so -lpthread if TLS_GNU2_DIALECT @@ -478,20 +492,24 @@ tls_test_gnu2.o: tls_test.cc $(CXXCOMPILE) -c -fpic -mtls-dialect=gnu2 -o $@ $< tls_test_file2_gnu2.o: tls_test_file2.cc $(CXXCOMPILE) -c -fpic -mtls-dialect=gnu2 -o $@ $< +tls_test_c_gnu2.o: tls_test_c.c + $(COMPILE) -c -fpic -mtls-dialect=gnu2 $(TLS_TEST_C_CFLAGS) -o $@ $< tls_test_gnu2_shared2.so: tls_test_file2_gnu2.o gcctestdir/ld $(CXXLINK) -Bgcctestdir/ -shared tls_test_file2_gnu2.o tls_shared_gnu2_gd_to_ie_test_SOURCES = tls_test_main.cc -tls_shared_gnu2_gd_to_ie_test_DEPENDENCIES = gcctestdir/ld tls_test_gnu2.o tls_test_gnu2_shared2.so +tls_shared_gnu2_gd_to_ie_test_DEPENDENCIES = gcctestdir/ld tls_test_gnu2.o \ + tls_test_c_gnu2.o tls_test_gnu2_shared2.so tls_shared_gnu2_gd_to_ie_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,. -tls_shared_gnu2_gd_to_ie_test_LDADD = tls_test_gnu2.o tls_test_gnu2_shared2.so -lpthread +tls_shared_gnu2_gd_to_ie_test_LDADD = tls_test_gnu2.o tls_test_c_gnu2.o \ + tls_test_gnu2_shared2.so -lpthread if TLS_DESCRIPTORS check_PROGRAMS += tls_shared_gnu2_test -tls_test_gnu2_shared.so: tls_test_gnu2.o tls_test_file2_gnu2.o gcctestdir/ld - $(CXXLINK) -Bgcctestdir/ -shared tls_test_gnu2.o tls_test_file2_gnu2.o +tls_test_gnu2_shared.so: tls_test_gnu2.o tls_test_file2_gnu2.o tls_test_c_gnu2.o gcctestdir/ld + $(CXXLINK) -Bgcctestdir/ -shared tls_test_gnu2.o tls_test_file2_gnu2.o tls_test_c_gnu2.o tls_shared_gnu2_test_SOURCES = tls_test_main.cc tls_shared_gnu2_test_DEPENDENCIES = gcctestdir/ld tls_test_gnu2_shared.so @@ -519,8 +537,8 @@ endif if FN_PTRS_IN_SO_WITHOUT_PIC check_PROGRAMS += tls_shared_nonpic_test -tls_test_shared_nonpic.so: tls_test.o tls_test_file2.o gcctestdir/ld - $(CXXLINK) -Bgcctestdir/ -shared tls_test.o tls_test_file2.o +tls_test_shared_nonpic.so: tls_test.o tls_test_file2.o tls_test_c.o gcctestdir/ld + $(CXXLINK) -Bgcctestdir/ -shared tls_test.o tls_test_file2.o tls_test_c.o tls_shared_nonpic_test_SOURCES = tls_test_main.cc tls_shared_nonpic_test_DEPENDENCIES = gcctestdir/ld tls_test_shared_nonpic.so |