LoongArch: Further refine the condition to enable static PIE
commita2ef941b2d74bfe47998e5afa29943f2f43642ae
authorXi Ruoyao <xry111@xry111.site>
Mon, 27 Feb 2023 11:08:09 +0000 (27 19:08 +0800)
committercaiyinyu <caiyinyu@loongson.cn>
Thu, 2 Mar 2023 03:17:15 +0000 (2 11:17 +0800)
treebdf2c9ca2b011b9f8fdee56e127524350ca76060
parent0d41182e0e987b0a256d55152c36103c88b35585
LoongArch: Further refine the condition to enable static PIE

Before GCC r13-2728, it would produce a normal dynamic-linked executable
with -static-pie.  I mistakely believed it would produce a static-linked
executable, so failed to detect the breakage.  Then with Binutils 2.40
and (vanilla) GCC 12, libc_cv_static_pie_on_loongarch is mistakenly
enabled and cause a building failure with "undefined reference to
_DYNAMIC".

Fix the issue by disabling static PIE if -static-pie creates something
with a INTERP header.
sysdeps/loongarch/configure
sysdeps/loongarch/configure.ac