From 9fef19abd91821bf275bec7aaea256b47a3a7259 Mon Sep 17 00:00:00 2001 From: Thomas A Date: Sat, 26 Sep 2020 22:25:24 -0700 Subject: [PATCH] Use Generic Target --- cctools/ar/CMakeLists.txt | 6 +++--- cctools/as/CMakeLists.txt | 4 ++-- cctools/ld64/src/CMakeLists.txt | 6 +++--- cctools/misc/CMakeLists.txt | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cctools/ar/CMakeLists.txt b/cctools/ar/CMakeLists.txt index b2d72c9e..e9618adb 100644 --- a/cctools/ar/CMakeLists.txt +++ b/cctools/ar/CMakeLists.txt @@ -15,7 +15,7 @@ add_definitions(-U__APPLE__ -U__APPLE__ -U_DARWIN_C_SOURCE -U_POSIX_C_SOURCE - -DPROGRAM_PREFIX="x86_64-apple-darwin11-" + -DPROGRAM_PREFIX="${APPLE_TARGET_TRIPLET_PRIMARY}-" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -Du_short=uint16_t -Du_int=uint32_t -D__USE_MISC) @@ -52,7 +52,7 @@ set(ar_sources ../libstuff/allocate.c ) -add_executable(x86_64-apple-darwin11-ar ${ar_sources}) +add_executable(${APPLE_TARGET_TRIPLET_PRIMARY}-ar ${ar_sources}) set(ranlib_sources ../misc/libtool.c @@ -60,5 +60,5 @@ set(ranlib_sources ) add_executable(ranlib ${ranlib_sources}) set_property(TARGET ranlib APPEND_STRING PROPERTY COMPILE_FLAGS " -DRANLIB") -set_target_properties(ranlib PROPERTIES OUTPUT_NAME "x86_64-apple-darwin11-ranlib") +set_target_properties(ranlib PROPERTIES OUTPUT_NAME "${APPLE_TARGET_TRIPLET_PRIMARY}-ranlib") diff --git a/cctools/as/CMakeLists.txt b/cctools/as/CMakeLists.txt index 7655ac6a..996c861b 100644 --- a/cctools/as/CMakeLists.txt +++ b/cctools/as/CMakeLists.txt @@ -22,7 +22,7 @@ add_compile_definitions( NeXT_MOD __DARWIN_UNIX03 __LITTLE_ENDIAN__ - PROGRAM_PREFIX="x86_64-apple-darwin11-" + PROGRAM_PREFIX="${APPLE_TARGET_TRIPLET_PRIMARY}-" PACKAGE_NAME="cctools-darling" PACKAGE_VERSION="949.0.1" __STDC_LIMIT_MACROS=1 @@ -118,4 +118,4 @@ elseif(TARGET_ARM64) list(APPEND AS_SOURCES arm.c) endif() -add_executable(x86_64-apple-darwin11-as ${AS_SOURCES}) +add_executable(${APPLE_TARGET_TRIPLET_PRIMARY}-as ${AS_SOURCES}) diff --git a/cctools/ld64/src/CMakeLists.txt b/cctools/ld64/src/CMakeLists.txt index a1a32ec3..f2b1e139 100644 --- a/cctools/ld64/src/CMakeLists.txt +++ b/cctools/ld64/src/CMakeLists.txt @@ -23,7 +23,7 @@ add_definitions(-U__APPLE__ -D__STDC_CONSTANT_MACROS=1 -DHAVE_EXECINFO_H=1 -D__DARWIN_UNIX03 - -DPROGRAM_PREFIX="x86_64-apple-darwin11-" + -DPROGRAM_PREFIX="${APPLE_TARGET_TRIPLET_PRIMARY}-" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -Du_short=uint16_t) @@ -83,6 +83,6 @@ set(ld64_sources ./ld/debugline.c ) -add_executable(x86_64-apple-darwin11-ld ${ld64_sources}) -target_link_libraries(x86_64-apple-darwin11-ld -lpthread -ldl) +add_executable(${APPLE_TARGET_TRIPLET_PRIMARY}-ld ${ld64_sources}) +target_link_libraries(${APPLE_TARGET_TRIPLET_PRIMARY}-ld -lpthread -ldl) diff --git a/cctools/misc/CMakeLists.txt b/cctools/misc/CMakeLists.txt index 9e197794..0ea57829 100644 --- a/cctools/misc/CMakeLists.txt +++ b/cctools/misc/CMakeLists.txt @@ -17,7 +17,7 @@ add_definitions(-U__APPLE__ -U__APPLE__ -U_DARWIN_C_SOURCE -U_POSIX_C_SOURCE - -DPROGRAM_PREFIX="x86_64-apple-darwin11-" + -DPROGRAM_PREFIX="${APPLE_TARGET_TRIPLET_PRIMARY}-" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -Du_short=uint16_t -Du_int=uint32_t -DPACKAGE_NAME="lipo"