Skip to content
This repository has been archived by the owner on Sep 2, 2022. It is now read-only.

Commit

Permalink
8265666: Enable AIX build platform to make external debug symbols
Browse files Browse the repository at this point in the history
Backport-of: 84b52db931943db5aa2df7edca7103776f2f2092
  • Loading branch information
RealCLanger committed May 6, 2021
1 parent cb295fb commit 1116b75
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
13 changes: 2 additions & 11 deletions make/autoconf/jdk-options.m4
Expand Up @@ -240,11 +240,7 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS],
[AS_HELP_STRING([--with-native-debug-symbols],
[set the native debug symbol configuration (none, internal, external, zipped) @<:@varying@:>@])],
[
if test "x$OPENJDK_TARGET_OS" = xaix; then
if test "x$withval" = xexternal || test "x$withval" = xzipped; then
AC_MSG_ERROR([AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols])
fi
elif test "x$OPENJDK_TARGET_OS" = xwindows; then
if test "x$OPENJDK_TARGET_OS" = xwindows; then
if test "x$withval" = xinternal; then
AC_MSG_ERROR([Windows does not support the parameter 'internal' for --with-native-debug-symbols])
fi
Expand All @@ -254,12 +250,7 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS],
if test "x$STATIC_BUILD" = xtrue; then
with_native_debug_symbols="none"
else
if test "x$OPENJDK_TARGET_OS" = xaix; then
# AIX doesn't support 'external' so use 'internal' as default
with_native_debug_symbols="internal"
else
with_native_debug_symbols="external"
fi
with_native_debug_symbols="external"
fi
])
AC_MSG_RESULT([$with_native_debug_symbols])
Expand Down
7 changes: 7 additions & 0 deletions make/common/NativeCompilation.gmk
Expand Up @@ -974,6 +974,13 @@ define SetupNativeCompilationBody
$(CD) $$($1_SYMBOLS_DIR) && \
$$($1_OBJCOPY) --add-gnu-debuglink=$$($1_DEBUGINFO_FILES) $$($1_TARGET)

else ifeq ($(call isTargetOs, aix), true)
# AIX does not provide the equivalent of OBJCOPY to extract debug symbols,
# so we copy the compiled object with symbols to the .debuginfo file, which
# happens prior to the STRIP_CMD on the original target object file.
$1_DEBUGINFO_FILES := $$($1_SYMBOLS_DIR)/$$($1_NOSUFFIX).debuginfo
$1_CREATE_DEBUGINFO_CMDS := $(CP) $$($1_TARGET) $$($1_DEBUGINFO_FILES)

else ifeq ($(call isTargetOs, macosx), true)
$1_DEBUGINFO_FILES := \
$$($1_SYMBOLS_DIR)/$$($1_BASENAME).dSYM/Contents/Info.plist \
Expand Down

1 comment on commit 1116b75

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.