ccrelocationcray

Craycc equivalent for "mcmodel"


I am trying to compile a C code under craycc. Compilation fails with the error "relocation truncated to fit: R_X86_64_32". Under Intel or GNU I can get past this error with the "mcmodel" flag. But craycc does not recognize this flag. Does anyone know of an equivalent flag/approach under craycc? I looked in the craycc man page, but couldn't find any discussion of this issue.


Solution

  • In case anyone is ever interested, the flag -h pic gets the Cray compiler past the problem and produces a running executable. I don't know how exact the equivalence is between this flag and the -mcmodel=medium flag, but that's what was needed to solve this particular problem.