mirror of
https://sourceware.org/git/glibc.git
synced 2024-09-20 00:19:57 +00:00
LoongArch: config: Rewrite check on static PIE.
It's better to add "\" before "EOF" and remove "\" before "$".
This commit is contained in:
parent
5000549746
commit
0567edf1b2
14
sysdeps/loongarch/configure
vendored
14
sysdeps/loongarch/configure
vendored
@ -10,14 +10,14 @@ if ${libc_cv_static_pie_on_loongarch+:} false; then :
|
|||||||
$as_echo_n "(cached) " >&6
|
$as_echo_n "(cached) " >&6
|
||||||
else
|
else
|
||||||
|
|
||||||
cat > conftest1.S << EOF
|
cat > conftest1.S <<\EOF
|
||||||
.global _start
|
.global _start
|
||||||
.type _start, @function
|
.type _start, @function
|
||||||
_start:
|
_start:
|
||||||
li.w \$a7, 93
|
li.w $a7, 93
|
||||||
/* This ensures the assembler supports explicit reloc. */
|
/* This ensures the assembler supports explicit reloc. */
|
||||||
pcalau12i \$a0, %pc_hi20(x)
|
pcalau12i $a0, %pc_hi20(x)
|
||||||
ld.w \$a0, \$a0, %pc_lo12(x)
|
ld.w $a0, $a0, %pc_lo12(x)
|
||||||
syscall 0
|
syscall 0
|
||||||
|
|
||||||
.data
|
.data
|
||||||
@ -26,13 +26,13 @@ x:
|
|||||||
/* This should produce an R_LARCH_RELATIVE in the static PIE. */
|
/* This should produce an R_LARCH_RELATIVE in the static PIE. */
|
||||||
.dword _start
|
.dword _start
|
||||||
EOF
|
EOF
|
||||||
cat > conftest2.S << EOF
|
cat > conftest2.S <<\EOF
|
||||||
.global f
|
.global f
|
||||||
.type f, @function
|
.type f, @function
|
||||||
f:
|
f:
|
||||||
/* The linker should be able to handle this and produce a PLT entry. */
|
/* The linker should be able to handle this and produce a PLT entry. */
|
||||||
la.pcrel \$t0, \$t0, external_func
|
la.pcrel $t0, $t0, external_func
|
||||||
jirl \$zero, \$t0, 0
|
jirl $zero, $t0, 0
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
libc_cv_static_pie_on_loongarch=no
|
libc_cv_static_pie_on_loongarch=no
|
||||||
|
@ -13,14 +13,14 @@ dnl satisfy the requirement, but a distro may backport static PIE support into
|
|||||||
dnl earlier GCC or Binutils releases as well.
|
dnl earlier GCC or Binutils releases as well.
|
||||||
AC_CACHE_CHECK([if the toolchain is sufficient to build static PIE on LoongArch],
|
AC_CACHE_CHECK([if the toolchain is sufficient to build static PIE on LoongArch],
|
||||||
libc_cv_static_pie_on_loongarch, [
|
libc_cv_static_pie_on_loongarch, [
|
||||||
cat > conftest1.S << EOF
|
cat > conftest1.S <<\EOF
|
||||||
.global _start
|
.global _start
|
||||||
.type _start, @function
|
.type _start, @function
|
||||||
_start:
|
_start:
|
||||||
li.w \$a7, 93
|
li.w $a7, 93
|
||||||
/* This ensures the assembler supports explicit reloc. */
|
/* This ensures the assembler supports explicit reloc. */
|
||||||
pcalau12i \$a0, %pc_hi20(x)
|
pcalau12i $a0, %pc_hi20(x)
|
||||||
ld.w \$a0, \$a0, %pc_lo12(x)
|
ld.w $a0, $a0, %pc_lo12(x)
|
||||||
syscall 0
|
syscall 0
|
||||||
|
|
||||||
.data
|
.data
|
||||||
@ -29,13 +29,13 @@ x:
|
|||||||
/* This should produce an R_LARCH_RELATIVE in the static PIE. */
|
/* This should produce an R_LARCH_RELATIVE in the static PIE. */
|
||||||
.dword _start
|
.dword _start
|
||||||
EOF
|
EOF
|
||||||
cat > conftest2.S << EOF
|
cat > conftest2.S <<\EOF
|
||||||
.global f
|
.global f
|
||||||
.type f, @function
|
.type f, @function
|
||||||
f:
|
f:
|
||||||
/* The linker should be able to handle this and produce a PLT entry. */
|
/* The linker should be able to handle this and produce a PLT entry. */
|
||||||
la.pcrel \$t0, \$t0, external_func
|
la.pcrel $t0, $t0, external_func
|
||||||
jirl \$zero, \$t0, 0
|
jirl $zero, $t0, 0
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
libc_cv_static_pie_on_loongarch=no
|
libc_cv_static_pie_on_loongarch=no
|
||||||
|
Loading…
Reference in New Issue
Block a user