Skip to content

Commit

Permalink
Merge pull request OpenMathLib#4579 from ChipKerchner/fixInializerPri…
Browse files Browse the repository at this point in the history
…ority

Fix global (static) constructor priority so that OpenBLAS gets initialized before other libraries.  Other unit test AIX fix.
  • Loading branch information
martin-frbg committed Mar 25, 2024
2 parents 4059a75 + 0e0d0bc commit 9af2a9d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion exports/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ so : ../$(LIBSONAME) linktest.c

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

aix.exp :
/usr/bin/nm -X32_64 -PCpgl ../$(LIBNAME) | /usr/bin/awk '{ if ((($$ 2 == "T") \
Expand Down
12 changes: 5 additions & 7 deletions utest/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -63,20 +63,18 @@ endif
all : run_test

ifeq ($(OSNAME), AIX)
ifeq ($(USE_OPENMP), 1)
$(UTESTBIN): $(OBJS)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ ../$(LIBNAME) $(EXTRALIB)

$(UTESTEXTBIN): $(OBJS_EXT)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ ../$(LIBNAME) $(EXTRALIB)
else
$(UTESTBIN): $(OBJS)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ ../$(LIBNAME) $(EXTRALIB) $(FEXTRALIB)
endif
else
$(UTESTBIN): $(OBJS)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ ../$(LIBNAME) $(EXTRALIB) $(FEXTRALIB)
endif

$(UTESTEXTBIN): $(OBJS_EXT)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ ../$(LIBNAME) $(EXTRALIB) $(FEXTRALIB)
endif

run_test: $(UTESTBIN) $(UTESTEXTBIN)
ifneq ($(CROSS), 1)
Expand All @@ -88,4 +86,4 @@ clean:
-rm -f *.o $(UTESTBIN) $(UTESTEXTBIN)
-rm -f $(DIR_EXT)/*.o

libs:
libs:

0 comments on commit 9af2a9d

Please sign in to comment.