Closed loqs closed 9 months ago
Reusing CFLAGS for MPI compilers when compiling utility programs designed to run sequentially can cause problems in the cross-compile environment.
One way to solve the problem in your case is to introduce new environment variables, such as
SEQ_CFLAGS
and SEQ_LDFLAGS
. Will that work for your case? e.g.
./configure SEQ_CC=gcc SEQ_CFLAGS="-Wl,-z,relro,-z,now" SEQ_LDFLAGS="-lc"
New environment variables would work for my use case. Thank you very much for the fast response and explanation of the issue.
Three environment variables SEQ_CFLAGS
, SEQ_LDFLAGS
, and SEQ_LIBS
have
been added in PR #122, which has also been merged into the master branch.
If you would like to give it a try, please let me know if that works.
I have tried #122 and with SEQ_CFLAGS
and SEQ_LDFLAGS
set and the options are being applied. Thank you for the fast fix.
This was partially addressed in https://github.com/Parallel-NetCDF/PnetCDF/commit/5d8cfaab2c7690bcf0aede2516f7c648b6495886 which was reverted in https://github.com/Parallel-NetCDF/PnetCDF/commit/000d67f88266890b9af15a85ff2e090a7bf341a5. I am currently working around this with
SEQ_CC="$CC $CPPFLAGS $CFLAGS $LDFLAGS"
to add hardening such as FULL RELRO to cdfdiff ncoffsets pnetcdf-openmpi ncvalidator. PnetCDF checkpoint.1.12.3 built using: