Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

README suggestion #14

Open
wasd003 opened this issue Jun 14, 2023 · 2 comments
Open

README suggestion #14

wasd003 opened this issue Jun 14, 2023 · 2 comments

Comments

@wasd003
Copy link

wasd003 commented Jun 14, 2023

I'm trying to use riscv toolchain to compile this project, but encouter following error:

libgcc.a: can't link double-float modules with soft-float modules

I compiled my toolchain using riscv-gnu-toolchain: 2023.06.09 with default configuration. It turns out that the ABI in libgcc.a was set to double-float, whereas the Makefile specified soft-float.

I strongly recommend that the README include instructions for configuring the riscv-gnu-toolchain compilation settings. Below is the configuration that allowed me to successfully compile this repository.

./configure --prefix=${RISCV_TOOLCHAIN_PATH} --disable-multilib --with-cmodel=medany --with-arch=rv64i --with-abi=lp64

Moreover, I also modified Makefile from (1) to (2) to support zicsr

GENERIC_FLAGS += -march=rv64imac -mabi=lp64 -g3 -mcmodel=medany -O3 $(inc_dirs) (1)
GENERIC_FLAGS += -march=rv64imac_zicsr -mabi=lp64 -g3 -mcmodel=medany -O3 $(inc_dirs) (2)

It would be helpful if the README included the above information to assist others in leveraging the repository smoothly.

@josecm
Copy link
Owner

josecm commented Jun 16, 2023

Thanks for the suggestions @wasd003. I don't have much time to maintain this repo, but if you send your suggestions as a PR, I'll gladly accept it.

@robert-hz
Copy link

@wasd003 , I encountered same issue, your info is helpful to me, thanks.
BTW, have you any idea on configuration on riscv-gnu-toolchain for this riscv-hyp-tests Makefile like this, i.e. to use mabi of lp64d:

ifdef GCCVERSION
GENERIC_FLAGS += -march=rv64imafdc_zicsr
else
GENERIC_FLAGS += -march=rv64imafdc
endif

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

No branches or pull requests

3 participants