diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 9e7e8bf48..ef0d0b3d8 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -70,45 +70,3 @@ jobs: with: files: build_x86_64/coverage/coverage.info verbose: true - -# build_osx: -# runs-on: macos-latest -# steps: -# - name: get code -# uses: actions/checkout@v3 -# -# - name: setup toolchain -# shell: bash -# run: | -# brew install x86_64-elf-gcc -# brew tap riscv-software-src/riscv -# brew install riscv-tools -# -# - name: make build dir -# shell: bash -# run: | -# mkdir ${{github.workspace}}/build -# -# - name: osx-i386 -# shell: bash -# working-directory: ${{github.workspace}}/build -# run: | -# cmake -DTOOLCHAIN_PREFIX=x86_64-elf- -DCMAKE_C_COMPILER=x86_64-elf-gcc -DCMAKE_CXX_COMPILER=x86_64-elf-g++ -DARCH=i386 -DCMAKE_BUILD_TYPE=RELEASE -DHAVE_FLAG_SEARCH_PATHS_FIRST=0 .. -# make -# rm -rf ./* -# -# - name: osx-x86_64 -# shell: bash -# working-directory: ${{github.workspace}}/build -# run: | -# cmake -DTOOLCHAIN_PREFIX=x86_64-elf- -DCMAKE_C_COMPILER=x86_64-elf-gcc -DCMAKE_CXX_COMPILER=x86_64-elf-g++ -DARCH=x86_64 -DCMAKE_BUILD_TYPE=RELEASE -DHAVE_FLAG_SEARCH_PATHS_FIRST=0 .. -# make -# rm -rf ./* -# -# - name: osx-riscv64 -# shell: bash -# working-directory: ${{github.workspace}}/build -# run: | -# cmake -DTOOLCHAIN_PREFIX=riscv64-unknown-elf- -DCMAKE_C_COMPILER=riscv64-unknown-elf-gcc -DCMAKE_CXX_COMPILER=riscv64-unknown-elf-g++ -DARCH=riscv64 -DCMAKE_BUILD_TYPE=RELEASE -DHAVE_FLAG_SEARCH_PATHS_FIRST=0 .. -# make -# rm -rf ./* diff --git a/cmake/x86_64-aarch64-gcc.cmake b/cmake/x86_64-aarch64-gcc.cmake index d42448b89..076e868d4 100644 --- a/cmake/x86_64-aarch64-gcc.cmake +++ b/cmake/x86_64-aarch64-gcc.cmake @@ -9,29 +9,9 @@ set(CMAKE_SYSTEM_NAME Generic) # 目标架构 set(CMAKE_SYSTEM_PROCESSOR aarch64) -# @todo mac 测试 if (APPLE) - message(STATUS "Now is Apple system.") - # GCC - find_program(Compiler_gcc aarch64-linux-gnu-g++) - if (NOT Compiler_gcc) - message(FATAL_ERROR "aarch64-linux-gnu-g++ not found.\n" - "Run `brew install x86_64-elf-g++` to install.") - else () - message(STATUS "Found aarch64-linux-gnu-g++ ${Compiler_gcc}") - endif () - - set(TOOLCHAIN_PREFIX aarch64-linux-gnu-) - set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}gcc) - set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}g++) - set(CMAKE_READELF ${TOOLCHAIN_PREFIX}readelf) - set(CMAKE_AR ${TOOLCHAIN_PREFIX}ar) - set(CMAKE_LINKER ${TOOLCHAIN_PREFIX}ld) - set(CMAKE_NM ${TOOLCHAIN_PREFIX}nm) - set(CMAKE_OBJDUMP ${TOOLCHAIN_PREFIX}objdump) - set(CMAKE_RANLIB ${TOOLCHAIN_PREFIX}ranlib) + message(FATAL_ERROR "NOT support OSX, Please use linux") elseif (UNIX) - message(STATUS "Now is UNIX-like OS's.") # GCC find_program(Compiler_gcc aarch64-linux-gnu-g++) if (NOT Compiler_gcc) diff --git a/cmake/x86_64-riscv64-gcc.cmake b/cmake/x86_64-riscv64-gcc.cmake index ce86a5a29..f4e5fa4f8 100644 --- a/cmake/x86_64-riscv64-gcc.cmake +++ b/cmake/x86_64-riscv64-gcc.cmake @@ -9,29 +9,9 @@ set(CMAKE_SYSTEM_NAME Generic) # 目标架构 set(CMAKE_SYSTEM_PROCESSOR riscv64) -# @todo mac 测试 if (APPLE) - message(STATUS "Now is Apple systens.") - # GCC - find_program(Compiler_gcc riscv64-unknown-elf-g++) - if (NOT Compiler_gcc) - message(FATAL_ERROR "riscv64-unknown-elf-g++ not found.\n" - "Following https://github.com/riscv-software-src/homebrew-riscv to install.") - else () - message(STATUS "Found riscv64-unknown-elf-g++ ${Compiler_gcc}") - endif () - - set(TOOLCHAIN_PREFIX riscv64-unknown-elf-) - set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}gcc) - set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}g++) - set(CMAKE_READELF ${TOOLCHAIN_PREFIX}readelf) - set(CMAKE_AR ${TOOLCHAIN_PREFIX}ar) - set(CMAKE_LINKER ${TOOLCHAIN_PREFIX}ld) - set(CMAKE_NM ${TOOLCHAIN_PREFIX}nm) - set(CMAKE_OBJDUMP ${TOOLCHAIN_PREFIX}objdump) - set(CMAKE_RANLIB ${TOOLCHAIN_PREFIX}ranlib) + message(FATAL_ERROR "NOT support OSX, Please use linux") elseif (UNIX) - message(STATUS "Now is UNIX-like OS's.") # GCC find_program(Compiler_gcc riscv64-linux-gnu-g++) if (NOT Compiler_gcc) diff --git a/cmake/x86_64-x86_64-gcc.cmake b/cmake/x86_64-x86_64-gcc.cmake index e232d3f55..7d9e02322 100644 --- a/cmake/x86_64-x86_64-gcc.cmake +++ b/cmake/x86_64-x86_64-gcc.cmake @@ -9,31 +9,8 @@ set(CMAKE_SYSTEM_NAME Generic) # 目标架构 set(CMAKE_SYSTEM_PROCESSOR x86_64) -# @todo mac 测试 if (APPLE) - message(STATUS "Now is Apple system.") - # GCC - find_program(Compiler_gcc x86_64-elf-g++) - if (NOT Compiler_gcc) - message(FATAL_ERROR "x86_64-elf-g++ not found.\n" - "Run `brew install x86_64-elf-g++` to install.") - else () - message(STATUS "Found x86_64-elf-g++ ${Compiler_gcc}") - endif () - - set(TOOLCHAIN_PREFIX x86_64-elf-) - set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}gcc) - set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}g++) - set(CMAKE_READELF ${TOOLCHAIN_PREFIX}readelf) - set(CMAKE_AR ${TOOLCHAIN_PREFIX}ar) - set(CMAKE_LINKER ${TOOLCHAIN_PREFIX}ld) - set(CMAKE_NM ${TOOLCHAIN_PREFIX}nm) - set(CMAKE_OBJDUMP ${TOOLCHAIN_PREFIX}objdump) - set(CMAKE_RANLIB ${TOOLCHAIN_PREFIX}ranlib) - - # 跳过编译器检查 - set(CMAKE_C_COMPILER_FORCED TRUE) - set(CMAKE_CXX_COMPILER_FORCED TRUE) + message(FATAL_ERROR "NOT support OSX, Please use linux") elseif (UNIX) message(STATUS "Now is UNIX-like OS's.") # GCC