lupyuen commented on issue #10594:
URL: https://github.com/apache/nuttx/issues/10594#issuecomment-1722717425

   @no1wudi I found this message under xPack v12.1.0.2, does it mean that 
`-mcmodel=medany` is already selected?
   
   
https://xpack.github.io/blog/2022/05/18/riscv-none-elf-gcc-v12-1-0-2-released/#-mcmodelmedany
   
   > The libraries are compiled with `-O2 -mcmodel=medany`. The nano version is 
compiled with `-Os -mcmodel=medany`.
   
   > Important: It is mandatory for the applications to be compiled with 
`-mcmodel=medany`, otherwise the link might fail.
   
   > ![Screenshot 2023-09-18 at 11 46 37 
AM](https://github.com/apache/nuttx/assets/9960133/322d1c45-dec3-4296-83ed-402388c939a2)
   
   It doesn't appear in the binary though:
   
   ```text
   → ./riscv-none-elf-gcc  --verbose
   Using built-in specs.
   COLLECT_GCC=./riscv-none-elf-gcc
   
COLLECT_LTO_WRAPPER=/private/tmp/xpack-riscv-none-elf-gcc-12.1.0-2/bin/../libexec/gcc/riscv-none-elf/12.1.0/lto-wrapper
   Target: riscv-none-elf
   Configured with: 
/Users/ilg/Work/riscv-none-elf-gcc-12.1.0-2/darwin-x64/sources/gcc-12.1.0/configure
     
--prefix=/Users/ilg/Work/riscv-none-elf-gcc-12.1.0-2/darwin-x64/install/riscv-none-elf-gcc
     
--prefix=/Users/ilg/Work/riscv-none-elf-gcc-12.1.0-2/darwin-x64/install/riscv-none-elf-gcc
     
--infodir=/Users/ilg/Work/riscv-none-elf-gcc-12.1.0-2/darwin-x64/install/riscv-none-elf-gcc/share/doc/info
     
--mandir=/Users/ilg/Work/riscv-none-elf-gcc-12.1.0-2/darwin-x64/install/riscv-none-elf-gcc/share/doc/man
     
--htmldir=/Users/ilg/Work/riscv-none-elf-gcc-12.1.0-2/darwin-x64/install/riscv-none-elf-gcc/share/doc/html
     
--pdfdir=/Users/ilg/Work/riscv-none-elf-gcc-12.1.0-2/darwin-x64/install/riscv-none-elf-gcc/share/doc/pdf
     --build=x86_64-apple-darwin17.7.0
     --host=x86_64-apple-darwin17.7.0
     --target=riscv-none-elf
     --disable-nls
     --disable-shared
     --disable-threads
     --disable-tls
     --enable-checking=release
     --enable-languages=c,c++,fortran
     
--with-gmp=/Users/ilg/Work/riscv-none-elf-gcc-12.1.0-2/darwin-x64/install/libs
     --with-newlib
     --with-pkgversion='xPack GNU RISC-V Embedded GCC x86_64'
     --with-system-zlib
     --with-abi=ilp32
     --with-arch=rv32imac
     --enable-multilib
   Thread model: single
   Supported LTO compression algorithms: zlib
   gcc version 12.1.0 (xPack GNU RISC-V Embedded GCC x86_64)
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to