Skip to content

Refine Makefile.am and Makefile.in#265

Open
zongbox wants to merge 1 commit intomasterfrom
fix_two_trap
Open

Refine Makefile.am and Makefile.in#265
zongbox wants to merge 1 commit intomasterfrom
fix_two_trap

Conversation

@zongbox
Copy link
Contributor

@zongbox zongbox commented May 29, 2020

There are two trap.S in the list, if we use '-Wl,--whole-archive' to link libmetal.a, it causes the error of multiple definition.

The error messages as follows:
/scratch/zongl/toolchain/riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-linux-ubuntu14/bin/../lib/gcc/riscv64-unknown-elf/8.3.0/../../../../riscv64-unknown-elf/bin/ld: /scratch/zongl/tmp/freedom-e-sdk/bsp/freedom-e31
0-arty/install/lib/debug//libmetal.a(trap.o): in function .L0 ': /scratch/zongl/tmp/freedom-e-sdk/freedom-metal/src/trap.S:20: multiple definition of _metal_trap'; /scratch/zongl/tmp/freedom-e-sdk/bsp/freedom-e310-arty/install/lib/debug//libmetal.a(trap.o):/scratch/zongl/tmp/free
dom-e-sdk/freedom-metal/src/trap.S:20: first defined here
/scratch/zongl/toolchain/riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-linux-ubuntu14/bin/../lib/gcc/riscv64-unknown-elf/8.3.0/../../../../riscv64-unknown-elf/bin/ld: /scratch/zongl/tmp/freedom-e-sdk/bsp/freedom-e31
0-arty/install/lib/debug//libmetal.a(trap.o): in function .L0 ': /scratch/zongl/tmp/freedom-e-sdk/freedom-metal/src/trap.S:64: multiple definition of early_trap_vector'; /scratch/zongl/tmp/freedom-e-sdk/bsp/freedom-e310-arty/install/lib/debug//libmetal.a(trap.o):/scratch/zongl/tm
p/freedom-e-sdk/freedom-metal/src/trap.S:64: first defined here

There are two trap.S in the list, if we use '-Wl,--whole-archive' to
link libmetal.a, it causes the error of multiple definition.

Signed-off-by: Zong Li <zong.li@sifive.com>
Reported-by: Jerry Shih <jerry.shih@sifive.com>
zongbox pushed a commit that referenced this pull request Jun 14, 2021
Add make target to open local documentation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant