Skip to content

Commit d3e4725

Browse files
authored
Merge pull request #2020 from martin-frbg/issue1956
With the Intel compiler on Linux, prefer ifort for the final link step
2 parents cd5a59b + adb419e commit d3e4725

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

exports/Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,14 @@ else
141141
$(OBJCOPY) --redefine-syms objcopy.def ../$(LIBNAME) ../$(LIBNAME).renamed
142142
../$(LIBSONAME) : ../$(LIBNAME).renamed linktest.c
143143
endif
144+
145+
ifeq ($(F_COMPILER), INTEL)
146+
$(FC) $(FFLAGS) $(LDFLAGS) -shared -o ../$(LIBSONAME) \
147+
-Wl,--whole-archive $< -Wl,--no-whole-archive \
148+
-Wl,-soname,$(INTERNALNAME) $(EXTRALIB)
149+
$(CC) $(CFLAGS) $(LDFLAGS) -w -o linktest linktest.c ../$(LIBSONAME) $(FEXTRALIB) && echo OK.
150+
else
151+
144152
ifneq ($(C_COMPILER), LSB)
145153
$(CC) $(CFLAGS) $(LDFLAGS) -shared -o ../$(LIBSONAME) \
146154
-Wl,--whole-archive $< -Wl,--no-whole-archive \
@@ -152,6 +160,7 @@ else
152160
-Wl,--whole-archive $< -Wl,--no-whole-archive \
153161
-Wl,-soname,$(INTERNALNAME) $(EXTRALIB)
154162
$(FC) $(CFLAGS) $(LDFLAGS) -w -o linktest linktest.c ../$(LIBSONAME) $(FEXTRALIB) && echo OK.
163+
endif
155164
endif
156165
rm -f linktest
157166

0 commit comments

Comments
 (0)