-
Enhancement
-
Resolution: Unresolved
-
P4
-
11.0.12, 17, 18
-
Fix Understood
-
linux
When compiling to the static-libs-image target and configuring native debug symbols to "external" (--with-native-debug-symbols=external) then object files for the static libraries - usually using target folder libfoo/static - aren't compiled with debug symbols at all. I.e. missing the -g switch for GCC based builds. Object files of the shared library (e.g. *.so files), don't have this problem.
Consider e_acos.c from fdlibm.
Static library compile command for e_acos.c:
----------------------------------
/usr/bin/gcc -MMD -MF /disk/openjdk/upstream-sources/git/jdk-jdk/build/linux-x86_64-server-release/support/native/java.base/libfdlibm/static/e_acos.d.tmp -I/disk/openjdk/upstream-sources/git/jdk-jdk/build/linux-x86_64-server-release/support/modules_include/java.base -I/disk/openjdk/upstream-sources/git/jdk-jdk/build/linux-x86_64-server-release/support/modules_include/java.base/linux -I/disk/openjdk/upstream-sources/git/jdk-jdk/src/java.base/share/native/libjava -I/disk/openjdk/upstream-sources/git/jdk-jdk/src/java.base/unix/native/libjava -I/disk/openjdk/upstream-sources/git/jdk-jdk/src/hotspot/share/include -I/disk/openjdk/upstream-sources/git/jdk-jdk/src/hotspot/os/posix/include -pipe -fstack-protector -DLIBC=gnu -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DLINUX -DNDEBUG -fmacro-prefix-map=/disk/openjdk/upstream-sources/git/jdk-jdk/= -std=c99 -fno-strict-aliasing -Wall -Wextra -Wformat=2 -Wpointer-arith -Wsign-compare -Wunused-function -Wundef -Wunused-value -Wreturn-type -Wtrampolines -m64 -D_LITTLE_ENDIAN -DARCH='"amd64"' -Damd64 -D_LP64=1 -fno-omit-frame-pointer -fno-delete-null-pointer-checks -fno-lifetime-dse -fPIC -fvisibility=hidden -I/disk/openjdk/upstream-sources/git/jdk-jdk/src/java.base/share/native/libfdlibm -ffp-contract=off -DSTATIC_BUILD=1 -ffunction-sections -fdata-sections -DJNIEXPORT='__attribute__((visibility("hidden")))' -Xassembler -mrelax-relocations=no -DLIBRARY_NAME=fdlibm -Wno-unused-parameter -Wno-unused -Wno-sign-compare -Wno-misleading-indentation -Wno-array-bounds -O2 -c -o /disk/openjdk/upstream-sources/git/jdk-jdk/build/linux-x86_64-server-release/support/native/java.base/libfdlibm/static/e_acos.o
----------------------------------
Shared library compile command for e_acos.c:
----------------------------------
/usr/bin/gcc -MMD -MF /disk/openjdk/upstream-sources/git/jdk-jdk/build/linux-x86_64-server-release/support/native/java.base/libfdlibm/e_acos.d.tmp -I/disk/openjdk/upstream-sources/git/jdk-jdk/build/linux-x86_64-server-release/support/modules_include/java.base -I/disk/openjdk/upstream-sources/git/jdk-jdk/build/linux-x86_64-server-release/support/modules_include/java.base/linux -I/disk/openjdk/upstream-sources/git/jdk-jdk/src/java.base/share/native/libjava -I/disk/openjdk/upstream-sources/git/jdk-jdk/src/java.base/unix/native/libjava -I/disk/openjdk/upstream-sources/git/jdk-jdk/src/hotspot/share/include -I/disk/openjdk/upstream-sources/git/jdk-jdk/src/hotspot/os/posix/include -pipe -fstack-protector -DLIBC=gnu -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DLINUX -DNDEBUG -fmacro-prefix-map=/disk/openjdk/upstream-sources/git/jdk-jdk/= -std=c99 -fno-strict-aliasing -Wall -Wextra -Wformat=2 -Wpointer-arith -Wsign-compare -Wunused-function -Wundef -Wunused-value -Wreturn-type -Wtrampolines -m64 -D_LITTLE_ENDIAN -DARCH='"amd64"' -Damd64 -D_LP64=1 -fno-omit-frame-pointer -fno-delete-null-pointer-checks -fno-lifetime-dse -fPIC -fvisibility=hidden -I/disk/openjdk/upstream-sources/git/jdk-jdk/src/java.base/share/native/libfdlibm -ffp-contract=off -g -DLIBRARY_NAME=fdlibm -Wno-unused-parameter -Wno-unused -Wno-sign-compare -Wno-misleading-indentation -Wno-array-bounds -O2 -c -o /disk/openjdk/upstream-sources/git/jdk-jdk/build/linux-x86_64-server-release/support/native/java.base/libfdlibm/e_acos.o /disk/openjdk/upstream-sources/git/jdk-jdk/src/java.base/share/native/libfdlibm/e_acos.c
----------------------------------
Consider e_acos.c from fdlibm.
Static library compile command for e_acos.c:
----------------------------------
/usr/bin/gcc -MMD -MF /disk/openjdk/upstream-sources/git/jdk-jdk/build/linux-x86_64-server-release/support/native/java.base/libfdlibm/static/e_acos.d.tmp -I/disk/openjdk/upstream-sources/git/jdk-jdk/build/linux-x86_64-server-release/support/modules_include/java.base -I/disk/openjdk/upstream-sources/git/jdk-jdk/build/linux-x86_64-server-release/support/modules_include/java.base/linux -I/disk/openjdk/upstream-sources/git/jdk-jdk/src/java.base/share/native/libjava -I/disk/openjdk/upstream-sources/git/jdk-jdk/src/java.base/unix/native/libjava -I/disk/openjdk/upstream-sources/git/jdk-jdk/src/hotspot/share/include -I/disk/openjdk/upstream-sources/git/jdk-jdk/src/hotspot/os/posix/include -pipe -fstack-protector -DLIBC=gnu -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DLINUX -DNDEBUG -fmacro-prefix-map=/disk/openjdk/upstream-sources/git/jdk-jdk/= -std=c99 -fno-strict-aliasing -Wall -Wextra -Wformat=2 -Wpointer-arith -Wsign-compare -Wunused-function -Wundef -Wunused-value -Wreturn-type -Wtrampolines -m64 -D_LITTLE_ENDIAN -DARCH='"amd64"' -Damd64 -D_LP64=1 -fno-omit-frame-pointer -fno-delete-null-pointer-checks -fno-lifetime-dse -fPIC -fvisibility=hidden -I/disk/openjdk/upstream-sources/git/jdk-jdk/src/java.base/share/native/libfdlibm -ffp-contract=off -DSTATIC_BUILD=1 -ffunction-sections -fdata-sections -DJNIEXPORT='__attribute__((visibility("hidden")))' -Xassembler -mrelax-relocations=no -DLIBRARY_NAME=fdlibm -Wno-unused-parameter -Wno-unused -Wno-sign-compare -Wno-misleading-indentation -Wno-array-bounds -O2 -c -o /disk/openjdk/upstream-sources/git/jdk-jdk/build/linux-x86_64-server-release/support/native/java.base/libfdlibm/static/e_acos.o
----------------------------------
Shared library compile command for e_acos.c:
----------------------------------
/usr/bin/gcc -MMD -MF /disk/openjdk/upstream-sources/git/jdk-jdk/build/linux-x86_64-server-release/support/native/java.base/libfdlibm/e_acos.d.tmp -I/disk/openjdk/upstream-sources/git/jdk-jdk/build/linux-x86_64-server-release/support/modules_include/java.base -I/disk/openjdk/upstream-sources/git/jdk-jdk/build/linux-x86_64-server-release/support/modules_include/java.base/linux -I/disk/openjdk/upstream-sources/git/jdk-jdk/src/java.base/share/native/libjava -I/disk/openjdk/upstream-sources/git/jdk-jdk/src/java.base/unix/native/libjava -I/disk/openjdk/upstream-sources/git/jdk-jdk/src/hotspot/share/include -I/disk/openjdk/upstream-sources/git/jdk-jdk/src/hotspot/os/posix/include -pipe -fstack-protector -DLIBC=gnu -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DLINUX -DNDEBUG -fmacro-prefix-map=/disk/openjdk/upstream-sources/git/jdk-jdk/= -std=c99 -fno-strict-aliasing -Wall -Wextra -Wformat=2 -Wpointer-arith -Wsign-compare -Wunused-function -Wundef -Wunused-value -Wreturn-type -Wtrampolines -m64 -D_LITTLE_ENDIAN -DARCH='"amd64"' -Damd64 -D_LP64=1 -fno-omit-frame-pointer -fno-delete-null-pointer-checks -fno-lifetime-dse -fPIC -fvisibility=hidden -I/disk/openjdk/upstream-sources/git/jdk-jdk/src/java.base/share/native/libfdlibm -ffp-contract=off -g -DLIBRARY_NAME=fdlibm -Wno-unused-parameter -Wno-unused -Wno-sign-compare -Wno-misleading-indentation -Wno-array-bounds -O2 -c -o /disk/openjdk/upstream-sources/git/jdk-jdk/build/linux-x86_64-server-release/support/native/java.base/libfdlibm/e_acos.o /disk/openjdk/upstream-sources/git/jdk-jdk/src/java.base/share/native/libfdlibm/e_acos.c
----------------------------------
- links to
-
Review openjdk/jdk/4876