Skip to content

Commit 1c9a7b9

Browse files
author
Paul Hohensee
committed
8293965: Code signing warnings after JDK-8293550
Backport-of: f91762f56ea7fb27b6fa54d07d3b3b0650bab0bc
1 parent 7aa2455 commit 1c9a7b9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

make/common/NativeCompilation.gmk

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1211,11 +1211,15 @@ define SetupNativeCompilationBody
12111211
$$($1_MT) -nologo -manifest $$($1_MANIFEST) -identity:"$$($1_NAME).exe, version=$$($1_MANIFEST_VERSION)" -outputresource:$$@;#1
12121212
endif
12131213
endif
1214-
# On macosx, optionally run codesign on every binary
1214+
# On macosx, optionally run codesign on every binary.
1215+
# Remove signature explicitly first to avoid warnings if the linker
1216+
# added a default adhoc signature.
12151217
ifeq ($(MACOSX_CODESIGN_MODE), hardened)
1218+
$(CODESIGN) --remove-signature $$@
12161219
$(CODESIGN) -f -s "$(MACOSX_CODESIGN_IDENTITY)" --timestamp --options runtime \
12171220
--entitlements $$(call GetEntitlementsFile, $$@) $$@
12181221
else ifeq ($(MACOSX_CODESIGN_MODE), debug)
1222+
$(CODESIGN) --remove-signature $$@
12191223
$(CODESIGN) -f -s - --entitlements $$(call GetEntitlementsFile, $$@) $$@
12201224
endif
12211225
endif

0 commit comments

Comments
 (0)