Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
74 user(s) are online (63 user(s) are browsing Forums)

Members: 1
Guests: 73

Raziel, more...

Headlines

Report message:*
 

Cmake and adtools

Subject: Cmake and adtools
by alfkil on 2021/8/26 15:24:27

When configuring a minimal cmake project using an AmigaOS toolchain file, you get this:

Quote:

-- The CXX compiler identification is GNU 11.1.0
System is unknown to cmake, create:
Platform/AmigaOS to use this system, please post your config file on discourse.cmake.org so it can be added to cmake
-- Check for working C compiler: /opt/adtools/bin/ppc-amigaos-gcc
System is unknown to cmake, create: Platform/AmigaOS to use this system, please post your config file on discourse.cmake.org so it can be added to cmake CMake
Error: Generator: execution of make failed. Make command was: cmTC_7bd00/fast &&
-- Check for working C compiler: /opt/adtools/bin/ppc-amigaos-gcc
-- broken CMake Error at /usr/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:60 (message):
The C compiler

"/opt/adtools/bin/ppc-amigaos-gcc"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: /home/alfkil/cmake-mini/build/CMakeFiles/CMakeTmp

Run Build Command(s): cmTC_7bd00/fast && No such file or directory Generator: execution of make failed. Make command was: cmTC_7bd00/fast &&

CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:3 (project)

-- Configuring incomplete, errors occurred!
See also "/home/alfkil/cmake-mini/build/CMakeFiles/CMakeOutput.log".
See also "/home/alfkil/cmake-mini/build/CMakeFiles/CMakeError.log". a



Toolchain file:

Quote:

# this one is important
SET(CMAKE_SYSTEM_NAME AmigaOS)
#this one not so much
SET(CMAKE_SYSTEM_VERSION 1)

# specify the cross compiler
SET(CMAKE_C_COMPILER ppc-amigaos-gcc)
SET(CMAKE_CXX_COMPILER ppc-amigaos-g++)
SET(CMAKE_MAKE_PROGRAM make)
SET(CMAKE_ASM_COMPILER ppc-amigaos-as)

#compiler flags
#SET(GCC_COVERAGE_COMPILE_FLAGS "-mcrt=newlib") #SET(GCC_COVERAGE_LINK_FLAGS "-mcrt=newlib")

SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_COVERAGE_COMPILE_FLAGS}")
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${GCC_COVERAGE_LINK_FLAGS}")

# where is the target environment
SET(CMAKE_FIND_ROOT_PATH /opt/adtools)
# search for programs in the build host directories
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)

# for libraries and headers in the target directories SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -athread=native")


Setup has been tested with adtools build of gcc 8 and 11. Both fail.

Is there any knowhow on how to make cmake work together with the Amiga compiler? Or maybe an idea for a patch...

According to a related google search the issue might be with escape characters and how they are handled by the compiler. Relating to my experiential memory of building cmake natively on AmigaOS, i'd say it's a likely explanation.


Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project