riscv-software-src / riscv-software-src/opensbi

Makefile: -fuse-ld argument is not resulting in the linker provided by the 'LD' environment variable being used

Open
#303 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
1.5k
Forks
712
PR merge metrics
No merged PRs in 30d

Description

If an external linker is provided with the 'LD' environment flag, the Makefile will only guess if it is LLD or BFD type, rather than passing the linker to the -fuse-ld argument. If cross compiling this might result in the host linker being used which might not support risc-v.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the Makefile logic that handles the LD environment variable and constructs the -fuse-ld argument. Reproduce or inspect the cross-compilation linker selection, then verify that the linker supplied through LD is passed to -fuse-ld rather than being reduced to an LLD or BFD guess.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
build-system, compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.