Skip to content

Commit ba2c5b4

Browse files
authored
When building with flang, use it also for the final link step to get dependencies right
1 parent f07a803 commit ba2c5b4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

exports/Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,12 @@ ifeq ($(F_COMPILER), INTEL)
155155
-Wl,--whole-archive $< -Wl,--no-whole-archive \
156156
-Wl,-soname,$(INTERNALNAME) $(EXTRALIB)
157157
$(CC) $(CFLAGS) $(LDFLAGS) -w -o linktest linktest.c ../$(LIBSONAME) $(FEXTRALIB) && echo OK.
158+
else ifeq ($(F_COMPILER), FLANG)
159+
$(FC) $(FFLAGS) $(LDFLAGS) -shared -o ../$(LIBSONAME) \
160+
-Wl,--whole-archive $< -Wl,--no-whole-archive \
161+
-Wl,-soname,$(INTERNALNAME) $(EXTRALIB)
162+
$(CC) $(CFLAGS) $(LDFLAGS) -w -o linktest linktest.c ../$(LIBSONAME) $(FEXTRALIB) && echo OK.
158163
else
159-
160164
ifneq ($(C_COMPILER), LSB)
161165
$(CC) $(CFLAGS) $(LDFLAGS) -shared -o ../$(LIBSONAME) \
162166
-Wl,--whole-archive $< -Wl,--no-whole-archive \

0 commit comments

Comments
 (0)