From: Bruno Haible Date: Thu, 18 Sep 2025 18:57:26 +0000 (+0200) Subject: stack-trace: Add support for Oracle DeveloperStudio cc. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=153cf1abe67b48479dd8c40deb0f49a3b45db8ac;p=thirdparty%2Fgnulib.git stack-trace: Add support for Oracle DeveloperStudio cc. * m4/stack-trace.m4 (gl_STACK_TRACE_EARLY): Use option '-Wl,-export-dynamic' instead of '-rdynamic'. --- diff --git a/ChangeLog b/ChangeLog index 74d54e24b4..503732632e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2025-09-18 Bruno Haible + + stack-trace: Add support for Oracle DeveloperStudio cc. + * m4/stack-trace.m4 (gl_STACK_TRACE_EARLY): Use option + '-Wl,-export-dynamic' instead of '-rdynamic'. + 2025-09-18 Pádraig Brady localcharset: fix macOS build diff --git a/m4/stack-trace.m4 b/m4/stack-trace.m4 index abf6fc21b4..b8c8297abd 100644 --- a/m4/stack-trace.m4 +++ b/m4/stack-trace.m4 @@ -1,5 +1,5 @@ # stack-trace.m4 -# serial 4 +# serial 5 dnl Copyright (C) 2024-2025 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -71,10 +71,13 @@ AC_DEFUN([gl_STACK_TRACE_EARLY], if test $CAN_PRINT_STACK_TRACE = 1; then dnl Link all programs in such a way that the stack trace includes dnl the function names. - dnl '-rdynamic' is equivalent to '-Wl,-export-dynamic'. + dnl gcc supports '-rdynamic' as an option equivalent to + dnl '-Wl,-export-dynamic'. But cc from Oracle DeveloperStudio 12.6 + dnl converts '-rdynamic' into a linker option '-dynamic', which the + dnl linker does not understand. So better avoid '-rdynamic'. case "$host_os" in *-gnu* | gnu* | openbsd*) - LDFLAGS="$LDFLAGS -rdynamic" + LDFLAGS="$LDFLAGS -Wl,-export-dynamic" ;; esac fi