Skip to content

Commit

Permalink
8265666: Enable AIX build platform to make external debug symbols
Browse files Browse the repository at this point in the history
Reviewed-by: erikj, mdoerr
  • Loading branch information
Andrew Leonard committed Apr 29, 2021
1 parent dd8286e commit 84b52db
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 @@ -978,6 +978,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

3 comments on commit 84b52db

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

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

@RealCLanger
Copy link
Contributor

Choose a reason for hiding this comment

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

/backport jdk16u

@openjdk
Copy link

@openjdk openjdk bot commented on 84b52db May 3, 2021

Choose a reason for hiding this comment

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

@RealCLanger the backport was successfully created on the branch RealCLanger-backport-84b52db9 in my personal fork of openjdk/jdk16u. To create a pull request with this backport targeting openjdk/jdk16u:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

this pull request contains a backport of commit 84b52db9 from the openjdk/jdk repository.

The commit being backported was authored by Andrew Leonard on 29 Apr 2021 and was reviewed by Erik Joelsson and Martin Doerr.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk16u:

$ git fetch https://github.com/openjdk-bots/jdk16u RealCLanger-backport-84b52db9:RealCLanger-backport-84b52db9
$ git checkout RealCLanger-backport-84b52db9
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk16u RealCLanger-backport-84b52db9

Please sign in to comment.