Skip to content

Commit d0fe8f7

Browse files
committed
8368312: Move CC_OUT_OPTION out of spec.gmk
Reviewed-by: erikj
1 parent 9f7b988 commit d0fe8f7

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

make/Hsdis.gmk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ ifeq ($(HSDIS_BACKEND), binutils)
114114
TOOLCHAIN_TYPE := gcc
115115
OPENJDK_TARGET_OS := linux
116116
OPENJDK_TARGET_OS_TYPE := unix
117-
CC_OUT_OPTION := -o$(SPACE)
118117
GENDEPS_FLAGS := -MMD -MF
119118
CFLAGS_DEBUG_SYMBOLS := -g
120119
DISABLED_WARNINGS :=

make/autoconf/flags.m4

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved.
33
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
#
55
# This code is free software; you can redistribute it and/or modify it
@@ -319,16 +319,10 @@ AC_DEFUN_ONCE([FLAGS_PRE_TOOLCHAIN],
319319
AC_DEFUN([FLAGS_SETUP_TOOLCHAIN_CONTROL],
320320
[
321321
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
322-
CC_OUT_OPTION=-Fo
323322
if test "x$OPENJDK_TARGET_CPU" != xaarch64; then
324323
AS_NON_ASM_EXTENSION_OPTION=-Ta
325324
fi
326-
else
327-
# The option used to specify the target .o,.a or .so file.
328-
# When compiling, how to specify the to be created object file.
329-
CC_OUT_OPTION='-o$(SPACE)'
330325
fi
331-
AC_SUBST(CC_OUT_OPTION)
332326
AC_SUBST(AS_NON_ASM_EXTENSION_OPTION)
333327
334328
# Generate make dependency files

make/autoconf/spec.gmk.template

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,6 @@ CXX_VERSION_NUMBER := @CXX_VERSION_NUMBER@
491491
# Legacy support
492492
HOTSPOT_TOOLCHAIN_TYPE := @HOTSPOT_TOOLCHAIN_TYPE@
493493

494-
CC_OUT_OPTION := @CC_OUT_OPTION@
495494
AS_NON_ASM_EXTENSION_OPTION := @AS_NON_ASM_EXTENSION_OPTION@
496495

497496
# Flags used for overriding the default opt setting for a C/C++ source file.

make/common/native/CompileFile.gmk

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,14 @@ DEPENDENCY_TARGET_SED_PATTERN := \
9393
-e 's/$$$$/ :/' \
9494
#
9595

96+
################################################################################
97+
# Setup compiler-specific argument to specify output file
98+
ifeq ($(call isCompiler, microsoft), true)
99+
CC_OUT_OPTION := -Fo
100+
else
101+
CC_OUT_OPTION := -o$(SPACE)
102+
endif
103+
96104
################################################################################
97105
# Create the recipe needed to compile a single native source file.
98106
#
@@ -334,7 +342,7 @@ define CreateWindowsResourceFile
334342
$$(call LogInfo, Compiling resource $$(notdir $$($1_VERSIONINFO_RESOURCE)) (for $$($1_BASENAME)))
335343
$$(call MakeDir, $$(@D) $$($1_OBJECT_DIR))
336344
$$(call ExecuteWithLog, $$@, $$(call MakeCommandRelative, \
337-
$$($1_RC) $$($1_RCFLAGS) $$($1_SYSROOT_CFLAGS) $(CC_OUT_OPTION)$$@ \
345+
$$($1_RC) $$($1_RCFLAGS) $$($1_SYSROOT_CFLAGS) -Fo$$@ \
338346
$$($1_VERSIONINFO_RESOURCE) 2>&1 ))
339347
# Windows RC compiler does not support -showIncludes, so we mis-use CL
340348
# for this. Filter out RC specific arguments that are unknown to CL.
@@ -344,7 +352,7 @@ define CreateWindowsResourceFile
344352
$$(call ExecuteWithLog, $$($1_RES_DEPS_FILE)$(OBJ_SUFFIX), \
345353
$$($1_CC) $$(filter-out -l%, $$($1_RCFLAGS)) \
346354
$$($1_SYSROOT_CFLAGS) -showIncludes -nologo -TC \
347-
$(CC_OUT_OPTION)$$($1_RES_DEPS_FILE)$(OBJ_SUFFIX) -P -Fi$$($1_RES_DEPS_FILE).pp \
355+
-Fo$$($1_RES_DEPS_FILE)$(OBJ_SUFFIX) -P -Fi$$($1_RES_DEPS_FILE).pp \
348356
$$($1_VERSIONINFO_RESOURCE)) 2>&1 \
349357
| $(TR) -d '\r' | $(GREP) -v -e "^Note: including file:" \
350358
-e "^$$(notdir $$($1_VERSIONINFO_RESOURCE))$$$$" || test "$$$$?" = "1" ; \

0 commit comments

Comments
 (0)