OpenXiangShan / XiangShan-doc

Documentation for XiangShan
https://xiangshan-doc.readthedocs.io
Creative Commons Attribution 4.0 International
346 stars 133 forks source link

doc, tools: Use `make clean-all` before change NEMU config #115

Closed forever043 closed 1 month ago

forever043 commented 1 month ago

The NEMU was built as standalone binary w/o -fPIC in early section "Run workload using NEMU emulator". And in the following section "Run workload on Xiangshan core simulator", the NEMU was built as shared library, in which the -fPIC flag was requried.

But the default make clean target did not cleanup the build output file resource/softfloat/build/softfloat.a, which cause the linker report following error:

+ ccache g++ /home/xiangshan/xs-env/NEMU/build/riscv64-nemu-interpreter-so
/usr/bin/ld: resource/softfloat/build/softfloat.a(s_mulAddF64.o): warning: relocation against `softfloat_roundingMode' in read-only section `.text'
/usr/bin/ld: resource/softfloat/build/softfloat.a(f16_sqrt.o): relocation R_X86_64_PC32 against symbol `softfloat_approxRecipSqrt_1k0s' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status

So, change make clean to make clean-all to cleanup all outputs that may be in-compatible between builds.

cebarobot commented 1 month ago

Currently, make clean would also clean softfloat. This is added in NEMU#278.

Also, we should bump repos in xs-env.

forever043 commented 1 month ago

Currently, make clean would also clean softfloat. This is added in NEMU#278.

Also, we should bump repos in xs-env.

got it, PR closed