mirror of
https://github.com/openjdk/jdk.git
synced 2026-07-28 11:53:09 +00:00
8146638: Only use compiler option files if they are really supported by the toolchain
Reviewed-by: erikj
This commit is contained in:
parent
e460d3500b
commit
561f477e25
@ -128,6 +128,26 @@ AC_DEFUN_ONCE([FLAGS_SETUP_INIT_FLAGS],
|
||||
else
|
||||
COMPILER_TARGET_BITS_FLAG="-m"
|
||||
COMPILER_COMMAND_FILE_FLAG="@"
|
||||
|
||||
# The solstudio linker does not support @-files.
|
||||
if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
COMPILER_COMMAND_FILE_FLAG=
|
||||
fi
|
||||
|
||||
# Check if @file is supported by gcc
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
AC_MSG_CHECKING([if @file is supported by gcc])
|
||||
# Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
|
||||
$ECHO "" "--version" > command.file
|
||||
if $CXX @command.file 2>&AS_MESSAGE_LOG_FD >&AS_MESSAGE_LOG_FD; then
|
||||
AC_MSG_RESULT(yes)
|
||||
COMPILER_COMMAND_FILE_FLAG="@"
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
COMPILER_COMMAND_FILE_FLAG=
|
||||
fi
|
||||
rm -rf command.file
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(COMPILER_TARGET_BITS_FLAG)
|
||||
AC_SUBST(COMPILER_COMMAND_FILE_FLAG)
|
||||
|
||||
@ -4801,7 +4801,7 @@ VS_SDK_PLATFORM_NAME_2013=
|
||||
#CUSTOM_AUTOCONF_INCLUDE
|
||||
|
||||
# Do not change or remove the following line, it is needed for consistency checks:
|
||||
DATE_WHEN_GENERATED=1450277321
|
||||
DATE_WHEN_GENERATED=1452242585
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
@ -45930,6 +45930,29 @@ $as_echo "$tool_specified" >&6; }
|
||||
else
|
||||
COMPILER_TARGET_BITS_FLAG="-m"
|
||||
COMPILER_COMMAND_FILE_FLAG="@"
|
||||
|
||||
# The solstudio linker does not support @-files.
|
||||
if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
COMPILER_COMMAND_FILE_FLAG=
|
||||
fi
|
||||
|
||||
# Check if @file is supported by gcc
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
|
||||
$as_echo_n "checking if @file is supported by gcc... " >&6; }
|
||||
# Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
|
||||
$ECHO "" "--version" > command.file
|
||||
if $CXX @command.file 2>&5 >&5; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
COMPILER_COMMAND_FILE_FLAG="@"
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
COMPILER_COMMAND_FILE_FLAG=
|
||||
fi
|
||||
rm -rf command.file
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
||||
@ -783,13 +783,13 @@ define SetupNativeCompilationBody
|
||||
|
||||
$1_LD_OBJ_ARG := $$($1_ALL_OBJS)
|
||||
|
||||
# If there are many object files, use an @-file.
|
||||
# If there are many object files, use an @-file...
|
||||
ifneq ($$(word 17, $$($1_ALL_OBJS)), )
|
||||
$1_OBJ_FILE_LIST := $$($1_OBJECT_DIR)/_$1_objectfilenames.txt
|
||||
ifneq ($(TOOLCHAIN_TYPE),solstudio)
|
||||
ifneq ($(COMPILER_COMMAND_FILE_FLAG),)
|
||||
$1_LD_OBJ_ARG := $(COMPILER_COMMAND_FILE_FLAG)$$($1_OBJ_FILE_LIST)
|
||||
else
|
||||
# The solstudio linker does not support @-files.
|
||||
# ...except for toolchains which don't support them.
|
||||
$1_LD_OBJ_ARG := `cat $$($1_OBJ_FILE_LIST)`
|
||||
endif
|
||||
endif
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user