create new toolset XCODE15 for Sonoma'

Signed-off-by: Slice <sergey.slice@gmail.com>
This commit is contained in:
Slice 2023-09-10 20:41:01 +03:00
parent 0ea0020c48
commit fcead07069
4 changed files with 101 additions and 15 deletions

View File

@ -2844,6 +2844,83 @@ RELEASEMACOS_XCODE14_X64_DLINK_FLAGS = -arch x86_64 -nostdlib -Wl,-u,_$(IMA
*_XCODE14_*_DTCPP_FLAGS = DEF(GCC_DTCPP_FLAGS)
*_XCODE14_*_APP_FLAGS = DEF(GCC_PP_FLAGS)
#
# XCODE15 support
#
*_XCODE15_*_*_FAMILY = GCC
*_XCODE15_*_*_BUILDRULEFAMILY = XCODE
*_XCODE15_*_*_BUILDRULEORDER = nasm S s
*_XCODE15_*_MTOC_PATH = ENV(MTOC_PREFIX)mtoc.NEW_jief
*_XCODE15_*_MAKE_PATH = make
*_XCODE15_*_DSYMUTIL_PATH = /usr/bin/dsymutil
DEBUG_XCODE15_*_MTOC_FLAGS = -align 0x20 -d $(DEBUG_DIR)/$(MODULE_NAME).dll
NOOPT_XCODE15_*_MTOC_FLAGS = -align 0x20 -d $(DEBUG_DIR)/$(MODULE_NAME).dll
RELEASE_XCODE15_*_MTOC_FLAGS = -align 0x20
#
# use xcode-select to change Xcode version of command line tools
#
*_XCODE15_*_CC_PATH = clang
*_XCODE15_*_SLINK_PATH = libtool
*_XCODE15_*_DLINK_PATH = clang
*_XCODE15_*_ASM_PATH = clang
*_XCODE15_*_PP_PATH = clang
*_XCODE15_*_VFRPP_PATH = clang
*_XCODE15_*_ASL_PATH = DEF(UNIX_IASL_BIN)
*_XCODE15_*_ASLCC_PATH = clang
*_XCODE15_*_ASLPP_PATH = clang
*_XCODE15_*_ASLDLINK_PATH = clang
*_XCODE15_*_NASM_PATH = ENV(NASM_PREFIX)nasm
##################
# X64 definitions
##################
DEBUG_XCODE15_X64_DLINK_FLAGS = -arch x86_64 -nostdlib -Wl,-u,_$(IMAGE_ENTRY_POINT),-e,_$(IMAGE_ENTRY_POINT),-preload,-segalign,0x20,-pie,-all_load,-dead_strip,-seg1addr,0x260,-object_path_lto,$(DEST_DIR_DEBUG)/$(BASE_NAME).o,-map,$(DEST_DIR_DEBUG)/$(BASE_NAME).map
DEBUGMACOS_XCODE15_X64_DLINK_FLAGS = -arch x86_64 -nostdlib -Wl,-u,_$(IMAGE_ENTRY_POINT),-e,_$(IMAGE_ENTRY_POINT),-preload,-segalign,0x20,-pie,-all_load,-dead_strip,-seg1addr,0x800,-map,$(DEST_DIR_DEBUG)/$(BASE_NAME).map
RELEASE_XCODE15_X64_DLINK_FLAGS = -arch x86_64 -nostdlib -Wl,-u,_$(IMAGE_ENTRY_POINT),-e,_$(IMAGE_ENTRY_POINT),-preload,-segalign,0x20,-pie,-all_load,-dead_strip,-seg1addr,0x260,-map,$(DEST_DIR_DEBUG)/$(BASE_NAME).map
RELEASEMACOS_XCODE15_X64_DLINK_FLAGS = -arch x86_64 -nostdlib -Wl,-u,_$(IMAGE_ENTRY_POINT),-e,_$(IMAGE_ENTRY_POINT),-preload,-segalign,0x20,-pie,-all_load,-dead_strip,-seg1addr,0x800,-map,$(DEST_DIR_DEBUG)/$(BASE_NAME).map
*_XCODE15_X64_SLINK_FLAGS = -static -no_warning_for_no_symbols -o
DEBUG_XCODE15_X64_ASM_FLAGS = -c -x assembler -arch x86_64 -g
DEBUGMACOS_XCODE15_X64_ASM_FLAGS = -c -x assembler -arch x86_64 -g
RELEASE_XCODE15_X64_ASM_FLAGS = -c -x assembler -arch x86_64
RELEASEMACOS_XCODE15_X64_ASM_FLAGS = -c -x assembler -arch x86_64
*_XCODE15_X64_NASM_FLAGS = -f macho64
*_XCODE15_*_PP_FLAGS = DEF(GCC_PP_FLAGS)
*_XCODE15_*_VFRPP_FLAGS = -x c -E -P -DVFRCOMPILE -include $(DEST_DIR_DEBUG)/$(MODULE_NAME)StrDefs.h
# -mno-implicit-float
# -Wno-varargs
# -Wno-unused-const-variable
DEFINE XCODE15_COMMON_FLAGS = -nostdinc -c -Wall -Wextra -include AutoGen.h -fno-ms-extensions -fno-stack-protector -fno-builtin -fshort-wchar -mms-bitfields -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings -mno-red-zone -fno-common -fdata-sections -ffreestanding -ffunction-sections -fno-asynchronous-unwind-tables -m64 -mabi=ms -mcmodel=small -DNO_MSABI_VA_FUNCS -fno-strict-aliasing -Wno-unused-parameter -Wno-unused-but-set-variable -Wno-deprecated-non-prototype -Wno-unused-command-line-argument
DEBUG_XCODE15_X64_CC_FLAGS = -g3 -gdwarf -O0 DEF(XCODE15_COMMON_FLAGS) -target x86_64-pc-win32-macho "-DEFIAPI=__attribute__((ms_abi))"
DEBUGMACOS_XCODE15_X64_CC_FLAGS = -g3 -gdwarf -O0 DEF(XCODE15_COMMON_FLAGS)
RELEASE_XCODE15_X64_CC_FLAGS = -Os DEF(XCODE15_COMMON_FLAGS) -target x86_64-pc-win32-macho "-DEFIAPI=__attribute__((ms_abi))" -Werror
RELEASEMACOS_XCODE15_X64_CC_FLAGS = -Os DEF(XCODE15_COMMON_FLAGS)
DEBUG_XCODE15_X64_CXX_FLAGS = -g3 -gdwarf -O0 DEF(XCODE15_COMMON_FLAGS) -target x86_64-pc-win32-macho "-DEFIAPI=__attribute__((ms_abi))"
DEBUGMACOS_XCODE15_X64_CXX_FLAGS = -g3 -gdwarf -O0 DEF(XCODE15_COMMON_FLAGS)
RELEASE_XCODE15_X64_CXX_FLAGS = -Os DEF(XCODE15_COMMON_FLAGS) -target x86_64-pc-win32-macho "-DEFIAPI=__attribute__((ms_abi))" -Werror
RELEASEMACOS_XCODE15_X64_CXX_FLAGS = -Os DEF(XCODE15_COMMON_FLAGS)
*_XCODE15_*_ASLCC_FLAGS = -x c -save-temps -g -O0 -fshort-wchar -fno-strict-aliasing -Wall -Werror -c -include AutoGen.h
*_XCODE15_*_ASLDLINK_FLAGS = -nostdlib -Wl,-e,_ReferenceAcpiTable,-preload,-segalign,0x20,-pie,-seg1addr,0x260,-read_only_relocs,suppress,-map,$(DEST_DIR_DEBUG)/$(BASE_NAME).map
*_XCODE15_*_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS)
*_XCODE15_*_ASL_FLAGS =
*_XCODE15_*_ASL_OUTFLAGS = DEF(IASL_OUTFLAGS)
*_XCODE15_*_DTCPP_FLAGS = DEF(GCC_DTCPP_FLAGS)
*_XCODE15_*_APP_FLAGS = DEF(GCC_PP_FLAGS)
####################################################################################
#
# RVCT Common

View File

@ -15,7 +15,7 @@ all: $(PROG)
$(PROG): $(SRC)
@echo "\t[CXX] $(PROGRAM)"
@cc -o $(PROGRAM) $(PROGRAM).c -framework CoreFoundation -framework IOKit -Wall >/dev/null
#@cc -o $(PROGRAM) $(PROGRAM).c -framework CoreFoundation -framework IOKit -Wall >/dev/null
@mv $(PROGRAM) $(UTILSDIR)
install-local: $(PROG)

View File

@ -242,14 +242,16 @@ usage() {
print_option_help "-v, --version" "print the version information and exit"
echo
echo "Toolchain:"
print_option_help "-clang" "use XCode Clang toolchain"
print_option_help "-llvm" "use LLVM toolchain"
print_option_help "-gcc49" "use GCC 4.9 toolchain"
# print_option_help "-clang" "use XCode Clang toolchain"
# print_option_help "-llvm" "use LLVM toolchain"
# print_option_help "-gcc49" "use GCC 4.9 toolchain"
print_option_help "-gcc53" "use GCC 5.3 toolchain"
print_option_help "-unixgcc" "use UNIXGCC toolchain"
# print_option_help "-unixgcc" "use UNIXGCC toolchain"
print_option_help "-xcode" "use XCode 3.2 toolchain"
print_option_help "-xcode5" "use XCode 5-7 toolchain "
print_option_help "-xcode8" "use XCode 8 toolchain [Default]"
print_option_help "-xcode14" "use XCode 14 toolchain"
print_option_help "-xcode15" "use XCode 15 toolchain"
print_option_help "-t TOOLCHAIN, --tagname=TOOLCHAIN" "force to use a specific toolchain"
echo
echo "Target:"
@ -266,16 +268,17 @@ usage() {
print_option_help "--vbios-patch-cloverefi" "activate vbios patch in CloverEFI"
print_option_help "--only-sata0" "activate only SATA0 patch"
print_option_help "--std-ebda" "ebda offset dont shift to 0x88000"
print_option_help "--genpage" "dynamically generate page table under ebda"
# print_option_help "--genpage" "dynamically generate page table under ebda"
print_option_help "--no-usb" "disable USB support"
print_option_help "--no-lto" "disable Link Time Optimisation"
print_option_help "--ext-pre" "deprecated option"
print_option_help "--ext-co" "deprecated option"
print_option_help "--ext-build" "deprecated option"
print_option_help "--edk2shell <MinimumShell|FullShell>" "copy edk2 Shell to EFI tools dir"
# print_option_help "--ext-pre" "deprecated option"
# print_option_help "--ext-co" "deprecated option"
# print_option_help "--ext-build" "deprecated option"
# print_option_help "--edk2shell <MinimumShell|FullShell>" "copy edk2 Shell to EFI tools dir"
echo
echo "build options:"
print_option_help "-fr, --force-rebuild" "force rebuild all targets"
print_option_help "-mc, --x64-mcp" " generate boot7 file with drivers using legacy BIOS functions"
print_option_help "-nb, --no-bootfiles" "don't generate boot files"
echo
echo "Report bugs to https://github.com/CloverHackyColor/CloverBootloader/issues"
@ -303,6 +306,8 @@ checkCmdlineArguments() {
-clang | --clang) TOOLCHAIN=XCLANG ; CLANG=1 ;;
-xcode5 | --xcode5 ) TOOLCHAIN=XCODE5 ; CLANG=1 ;;
-xcode8 | --xcode8 ) TOOLCHAIN=XCODE8 ; CLANG=1 ;;
-xcode14 | --xcode14 ) TOOLCHAIN=XCODE14 ; CLANG=1 ;;
-xcode15 | --xcode15 ) TOOLCHAIN=XCODE15 ; CLANG=1 ;;
-GCC49 | --GCC49) TOOLCHAIN=GCC49 ;;
-gcc49 | --gcc49) TOOLCHAIN=GCC49 ;;
-GCC53 | --GCC53) TOOLCHAIN=GCC53 ;;

View File

@ -244,15 +244,17 @@ usage() {
print_option_help "-v, --version" "print the version information and exit"
echo
echo "Toolchain:"
print_option_help "-clang" "use XCode Clang toolchain"
print_option_help "-llvm" "use LLVM toolchain"
print_option_help "-gcc49" "use GCC 4.9 toolchain"
# print_option_help "-clang" "use XCode Clang toolchain"
# print_option_help "-llvm" "use LLVM toolchain"
# print_option_help "-gcc49" "use GCC 4.9 toolchain"
print_option_help "-gcc53" "use GCC 5.3 toolchain, including gcc-11"
print_option_help "-gcc131" "use GCC 13.1 toolchain"
print_option_help "-unixgcc" "use UNIXGCC toolchain, unsupported"
print_option_help "-xcode" "use XCode 3.2 toolchain"
# print_option_help "-unixgcc" "use UNIXGCC toolchain, unsupported"
# print_option_help "-xcode" "use XCode 3.2 toolchain"
print_option_help "-xcode5" "use XCode 5 toolchain, "
print_option_help "-xcode8" "use XCode 8 toolchain [Default]"
print_option_help "-xcode14" "use XCode 14 toolchain"
print_option_help "-xcode15" "use XCode 15 toolchain"
print_option_help "-t TOOLCHAIN, --tagname=TOOLCHAIN" "force to use a specific toolchain"
echo
echo "Target:"
@ -306,6 +308,8 @@ checkCmdlineArguments() {
-clang | --clang) TOOLCHAIN=XCLANG ; CLANG=1 ;;
-xcode5 | --xcode5 ) TOOLCHAIN=XCODE5 ; CLANG=1 ;;
-xcode8 | --xcode8 ) TOOLCHAIN=XCODE8 ; CLANG=1 ;;
-xcode14 | --xcode14 ) TOOLCHAIN=XCODE14 ; CLANG=1 ;;
-xcode15 | --xcode15 ) TOOLCHAIN=XCODE15 ; CLANG=1 ;;
-GCC49 | --GCC49) TOOLCHAIN=GCC49 ;;
-gcc49 | --gcc49) TOOLCHAIN=GCC49 ;;
-GCC53 | --GCC53) TOOLCHAIN=GCC53 ;;