Skip to content

toolchain: arcmwdt: compiler_set_linker_properties breaks causing build failure #94984

@laurenmurphyx64

Description

@laurenmurphyx64

Describe the bug

compiler_set_linker_properties is a function added recently in cmake/compiler/target_template.cmake that runs by default if not overriden by one of the toolchain target.cmakes. It works fine for GCC, but for ARC MWDT, get_filename_component fails because the preceding command returns an empty string into library_path as --print-libgcc-file-name is not a flag for CCAC.

    execute_process(
      COMMAND ${CMAKE_C_COMPILER} ${TOOLCHAIN_C_FLAGS} ${COMPILER_OPTIMIZATION_FLAG} ${simple_options}
      --print-libgcc-file-name
      OUTPUT_VARIABLE library_path
      OUTPUT_STRIP_TRAILING_WHITESPACE
      )

    # Compute the library directory name

    get_filename_component(library_dir ${library_path} DIRECTORY)

Regression, introduced by d77b58a.

Regression

  • This is a regression.

Steps to reproduce

west build -p -b nsim/nsim_vpx5 samples/hello_world

Relevant log output

CMake Error at /home/laurenmu/intel-zephyrproject/zephyr/cmake/compiler/target_template.cmake:94 (get_filename_component):
  get_filename_component called with incorrect number of arguments

Impact

Showstopper - in that it prevents us from building anything

Annoyance - we can always put in a patch in our fork while waiting

Environment

  • OS: Ubuntu 24.04
  • Toolchain: ARC MetaWare Design
  • 23e0d30

Additional Context

No response

Metadata

Metadata

Assignees

Labels

RegressionSomething, which was working, does not anymorearea: ToolchainsToolchainsbugThe issue is a bug, or the PR is fixing a bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions