I thought the problem of not being able to statically link when using the medium memory model was fixed as of version 6.0. However I’m still getting the following errors. All the object file and all the files in the library were compiled with the -mcmodel=medium flag.
pgf90 -Bstatic -mcmodel=medium frealign_v8.o frealign_v8.a -o …/bin/frealign_v8.exe
/opt/pgi/linux86-64/8.0-4/libso/libpgf90.a(initpar.o): In function __hpf_initarg': initpar.c:(.text+0x137): relocation truncated to fit: R_X86_64_PC32 against
.bss’
initpar.c:(.text+0x162): relocation truncated to fit: R_X86_64_PC32 against .bss' initpar.c:(.text+0x196): relocation truncated to fit: R_X86_64_PC32 against
.bss’
initpar.c:(.text+0x1a9): relocation truncated to fit: R_X86_64_PC32 against .bss' initpar.c:(.text+0x1c8): relocation truncated to fit: R_X86_64_PC32 against
.bss’
/opt/pgi/linux86-64/8.0-4/libso/libpgf90.a(initpar.o): In function __hpf_getenv': initpar.c:(.text+0x1e5): relocation truncated to fit: R_X86_64_PC32 against
.bss’
/opt/pgi/linux86-64/8.0-4/libso/libpgf90.a(initpar.o): In function __hpf_initopt': initpar.c:(.text+0x24f): relocation truncated to fit: R_X86_64_PC32 against
.bss’
initpar.c:(.text+0x262): relocation truncated to fit: R_X86_64_PC32 against .bss' initpar.c:(.text+0x282): relocation truncated to fit: R_X86_64_PC32 against
.bss’
initpar.c:(.text+0x2e1): relocation truncated to fit: R_X86_64_PC32 against .bss' /opt/pgi/linux86-64/8.0-4/libso/libpgf90.a(initpar.o): In function
__hpf_getopt’:
initpar.c:(.text+0x324): additional relocation overflows omitted from the output1
The make file looks like this:
SHELL = /bin/sh
FFLAGS = -tp=x64 -fastsse -mcmodel=medium -c
CFLAGS = -tp=x64 -fastsse -mcmodel=medium -c
COMP = pgf90
CC = pgcc
LF = -Bstatic -mcmodel=medium
PGM = frealign_v8
LIB = $(PGM).a
.PRECIOUS : $(PGM) $(LIB)
include Makefile.inc
$(PGM) : $(PGM).o $(LIB)
@echo linking $(PGM)
$(COMP) $(LF) $(PGM).o $(LIB) -o …/bin/$(PGM).exe
@\rm $(PGM).o
$(PGM).o : $(PGM).f
$(COMP) $(FFLAGS) -o $(PGM).o $(PGM).f
ioc.o : ioc.c
$(CC) $(CFLAGS) -o ioc.o ioc.c
$(AR) r $(LIB) ioc.o
@\rm ioc.o
$(LIB) : ioc.o $(ELEMENTS)
@echo all object files placed in library
.f.a:
$(COMP) $(FFLAGS) $<
$(AR) r $(LIB) $.o
@\rm $.o
Any ideas?
-Christopher