From c937090121258e1b85f80af5c87c092d8283ffaa Mon Sep 17 00:00:00 2001 From: Zhang Xianyi Date: Tue, 22 Oct 2013 13:24:47 +0800 Subject: [PATCH] Added gfortran dependency for LSB/lsbcc. --- Makefile.system | 2 -- exports/Makefile | 9 ++++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Makefile.system b/Makefile.system index 858160fc4..1e9248a6d 100644 --- a/Makefile.system +++ b/Makefile.system @@ -470,10 +470,8 @@ CCOMMON_OPT += -DF_INTERFACE_GFORT FCOMMON_OPT += -Wall #Don't include -lgfortran, when NO_LAPACK=1 or lsbcc ifneq ($(NO_LAPACK), 1) -ifneq ($(C_COMPILER), LSB) EXTRALIB += -lgfortran endif -endif ifdef NO_BINARY_MODE ifeq ($(ARCH), mips64) ifdef BINARY64 diff --git a/exports/Makefile b/exports/Makefile index 0bc9ec6e0..780b0dcf8 100644 --- a/exports/Makefile +++ b/exports/Makefile @@ -124,14 +124,17 @@ ifeq ($(OSNAME), Linux) so : ../$(LIBSONAME) ../$(LIBSONAME) : ../$(LIBNAME) linux.def linktest.c +ifneq ($(C_COMPILER), LSB) $(CC) $(CFLAGS) $(LDFLAGS) -shared -o ../$(LIBSONAME) \ -Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive \ -Wl,-soname,$(LIBPREFIX).so.$(MAJOR_VERSION) $(EXTRALIB) -ifneq ($(C_COMPILER), LSB) $(CC) $(CFLAGS) $(LDFLAGS) -w -o linktest linktest.c ../$(LIBSONAME) $(FEXTRALIB) && echo OK. else -#Use FC on LSB - $(FC) $(FFLAGS) $(LDFLAGS) -w -o linktest linktest.c ../$(LIBSONAME) $(FEXTRALIB) && echo OK. +#for LSB + env LSBCC_SHAREDLIBS=gfortran $(CC) $(CFLAGS) $(LDFLAGS) -shared -o ../$(LIBSONAME) \ + -Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive \ + -Wl,-soname,$(LIBPREFIX).so.$(MAJOR_VERSION) $(EXTRALIB) + $(FC) $(CFLAGS) $(LDFLAGS) -w -o linktest linktest.c ../$(LIBSONAME) $(FEXTRALIB) && echo OK. endif rm -f linktest