]>
Commit | Line | Data |
---|---|---|
1b4558c1 RM |
1 | GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. |
2 | ||
3 | dnl The standard hppa assembler uses `;' to start comments and `!' | |
4 | dnl as a line separator. | |
1b4558c1 RM |
5 | AC_CACHE_CHECK(for assembler line separator, |
6 | libc_cv_asm_line_sep, [dnl | |
7 | cat > conftest.s <<EOF | |
8 | nop ; is_old_puffin | |
9 | EOF | |
10 | if AC_TRY_COMMAND(${CC-cc} -c $ASFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then | |
11 | libc_cv_asm_line_sep='!' | |
12 | else | |
13 | if test -z "$enable_hacker_mode"; then | |
14 | echo "*** You need a newer assembler to compile glibc" | |
15 | rm -f conftest* | |
16 | exit 1 | |
17 | fi | |
18 | libc_cv_asm_line_sep=';' | |
19 | fi | |
20 | rm -f conftest*]) | |
21 | AC_DEFINE_UNQUOTED(ASM_LINE_SEP, $libc_cv_asm_line_sep) | |
c053fa34 CD |
22 | |
23 | # Check for support of thread-local storage handling in assembler and | |
24 | # linker. | |
25 | AC_CACHE_CHECK(for hppa TLS support, libc_cv_hppa_tls, [dnl | |
26 | cat > conftest.s <<\EOF | |
27 | ; Setup tls data | |
28 | .section ".tdata","awT",@progbits | |
5556231d | 29 | foo: .data 32 |
c053fa34 CD |
30 | .text |
31 | ; Test general dyanmic relocations | |
32 | test0: | |
5556231d | 33 | addil LT'foo-$tls_gdidx$, %r19 |
c053fa34 CD |
34 | ldo RT'foo-$tls_gdidx$(%r1), %r26 |
35 | b __tls_get_addr | |
36 | nop | |
37 | ; Test local dynamic relocations | |
38 | test1: | |
39 | addil LT'foo-$tls_ldidx$, %r19 | |
40 | b __tls_get_addr | |
41 | ldo RT'foo-$tls_ldidx$(%r1), %r26 | |
42 | ldo RR'foo-$tls_dtpoff$(%r1), %r25 | |
43 | ; More variables can be loaded... | |
44 | ; Test initial exec reloctiosn | |
45 | test2: | |
46 | mfctl %cr27, %r26 | |
47 | addil LT'foo-$tls_ieoff$, %r19 | |
48 | ldw RT'foo-$tls_ieoff$(%r1), %r25 | |
49 | add %r26, %r25, %r24 | |
50 | ; Test local exec relocations | |
51 | test3: | |
52 | mfctl %cr27, %r26 | |
5556231d | 53 | addil LR'foo-$tls_leoff$, %r26 |
c053fa34 CD |
54 | ldo RR'foo-$tls_leoff$(%r1), %r25 |
55 | ; Done all the TLS tests. | |
56 | EOF | |
57 | dnl | |
58 | if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then | |
59 | libc_cv_hppa_tls=yes | |
60 | else | |
61 | libc_cv_hppa_tls=no | |
62 | fi | |
63 | rm -f conftest*]) | |
64 | if test $libc_cv_hppa_tls = no; then | |
65 | AC_MSG_ERROR([the assembler must support TLS]) | |
66 | fi |