mirror of
https://github.com/ruby/ruby.git
synced 2026-10-28 08:25:20 +08:00
Disable PIE on Haiku by default
Every `have_func` check against `libruby-static.a` failed on Haiku, because its linker builds the conftest program as a shared object and rejects the TLS relocations in `-fPIE` objects. Without `-fPIE` the compiler generates PIC there, which links both ways. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7cceceae94
commit
7910db23ad
1 file changed
+6
Notes:
git
2026-10-12 02:16:19 +00:00
@@ -3689,6 +3689,12 @@ AS_CASE("$enable_shared", [yes], [
|
||||
AC_ARG_ENABLE(pie,
|
||||
AS_HELP_STRING([--disable-pie], [disable PIE feature]),
|
||||
[pie=$enableval], [pie=])
|
||||
AS_CASE(["$target_os:$pie"], [haiku*:], [
|
||||
# Haiku links every executable as a shared object, which rejects
|
||||
# the local-exec TLS relocations in -fPIE objects. The compiler
|
||||
# generates PIC there by default.
|
||||
pie=no
|
||||
])
|
||||
AS_IF([test "$GCC" = yes -a -z "$EXTSTATIC" -a "x$pie" != xno], [
|
||||
RUBY_TRY_CFLAGS(-fPIE, [pie=yes], [pie=no])
|
||||
AS_IF([test "$pie" = yes], [
|
||||
|
||||
Reference in new issue
Block a user