Skip to content

Commit 9af2a9d

Browse files
authored
Merge pull request #4579 from ChipKerchner/fixInializerPriority
Fix global (static) constructor priority so that OpenBLAS gets initialized before other libraries. Other unit test AIX fix.
2 parents 4059a75 + 0e0d0bc commit 9af2a9d

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

exports/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ so : ../$(LIBSONAME) linktest.c
266266

267267
../$(LIBSONAME) : aix.exp
268268
$(CC) $(CFLAGS) $(LDFLAGS) -shared -o ../$(LIBSONAME) \
269-
-Wl,-bE:aix.exp -Wl,-bbigtoc ../$(LIBNAME) $(EXTRALIB)
269+
-Wl,-bcdtors:all:-2147481648:s,-bE:aix.exp -Wl,-bbigtoc ../$(LIBNAME) $(EXTRALIB)
270270

271271
aix.exp :
272272
/usr/bin/nm -X32_64 -PCpgl ../$(LIBNAME) | /usr/bin/awk '{ if ((($$ 2 == "T") \

utest/Makefile

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,20 +63,18 @@ endif
6363
all : run_test
6464

6565
ifeq ($(OSNAME), AIX)
66-
ifeq ($(USE_OPENMP), 1)
6766
$(UTESTBIN): $(OBJS)
6867
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ ../$(LIBNAME) $(EXTRALIB)
68+
69+
$(UTESTEXTBIN): $(OBJS_EXT)
70+
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ ../$(LIBNAME) $(EXTRALIB)
6971
else
7072
$(UTESTBIN): $(OBJS)
7173
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ ../$(LIBNAME) $(EXTRALIB) $(FEXTRALIB)
72-
endif
73-
else
74-
$(UTESTBIN): $(OBJS)
75-
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ ../$(LIBNAME) $(EXTRALIB) $(FEXTRALIB)
76-
endif
7774

7875
$(UTESTEXTBIN): $(OBJS_EXT)
7976
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ ../$(LIBNAME) $(EXTRALIB) $(FEXTRALIB)
77+
endif
8078

8179
run_test: $(UTESTBIN) $(UTESTEXTBIN)
8280
ifneq ($(CROSS), 1)
@@ -88,4 +86,4 @@ clean:
8886
-rm -f *.o $(UTESTBIN) $(UTESTEXTBIN)
8987
-rm -f $(DIR_EXT)/*.o
9088

91-
libs:
89+
libs:

0 commit comments

Comments
 (0)