From 1ef22d21e5581ac9f2b80b7de6183f8c77e8a56e Mon Sep 17 00:00:00 2001 From: Tony Kelman Date: Sun, 19 Oct 2014 07:27:59 -0700 Subject: [PATCH] Patch openblas to add 64_ suffix when using 64 bit ints objconv cannot do in-place modification of files dont overwrite static library with objcopy on freebsd either fix linking of arpack and suitesparse with 64_ blas suffix the patched xlahqr2 was using UPPERCASE function names, and the probes during arpack configure were using the C compiler, sgemm_ and cheev_ need to enable c preprocessor, and disable syntax error on long lines SPQR also needed -DSUN64 --- deps/Makefile | 38 +++- deps/openblas-symbol-rename.patch | 333 ++++++++++++++++++++++++++++++ 2 files changed, 366 insertions(+), 5 deletions(-) create mode 100644 deps/openblas-symbol-rename.patch diff --git a/deps/Makefile b/deps/Makefile index 81363f2584b6f..6f26dca633328 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -829,7 +829,10 @@ endif # 64-bit BLAS interface ifeq ($(USE_BLAS64), 1) -OPENBLAS_BUILD_OPTS += INTERFACE64=1 +OPENBLAS_BUILD_OPTS += INTERFACE64=1 SYMBOLSUFFIX="64_" +ifeq ($(OS),Darwin) +OPENBLAS_BUILD_OPTS += OBJCONV=$(JULIAHOME)/deps/objconv/objconv +endif endif # Decide whether to build for 32-bit or 64-bit arch @@ -864,6 +867,7 @@ endif mkdir -p openblas-$(OPENBLAS_VER) && \ $(TAR) -C openblas-$(OPENBLAS_VER) --strip-components 1 -xf $< perl -i -ple 's/^\s*(EXTRALIB\s*\+=\s*-lSystemStubs)\s*$$/# $$1/g' openblas-$(OPENBLAS_VER)/Makefile.system + cd openblas-$(OPENBLAS_VER) && patch -p1 < ../openblas-symbol-rename.patch echo 1 > $@ $(OPENBLAS_OBJ_SOURCE): openblas-$(OPENBLAS_VER)/config.status $(MAKE) -C openblas-$(OPENBLAS_VER) $(OPENBLAS_BUILD_OPTS) || (echo "*** Clean the OpenBLAS build with 'make -C deps clean-openblas'. Rebuild with 'make OPENBLAS_USE_THREAD=0 if OpenBLAS had trouble linking libpthread.so, and with 'make OPENBLAS_TARGET_ARCH=NEHALEM' if there were errors building SandyBridge support. Both these options can also be used simultaneously. ***" && false) @@ -1026,12 +1030,28 @@ install-lapack: $(LAPACK_OBJ_TARGET) ## ARPACK ## ARPACK_FFLAGS = $(GFORTBLAS_FFLAGS) +ARPACK_CFLAGS = ifeq ($(USE_BLAS64), 1) ifeq ($(USEIFC),1) ARPACK_FFLAGS += -i8 else ARPACK_FFLAGS += -fdefault-integer-8 +ifeq ($(USE_SYSTEM_BLAS), 0) +ifneq ($(USE_INTEL_MKL), 1) +ARPACK_FFLAGS += -cpp -ffixed-line-length-none +ARPACK_OPENBLASFCNS1 = axpy copy gemv geqr2 lacpy lahqr lanhs larnv lartg lascl laset scal trevc trmm trsen +ARPACK_OPENBLASFCNS2 = dot ger labad laev2 lamch lanst lanv2 lapy2 larf larfg lasr nrm2 orm2r rot steqr swap +ARPACK_OPENBLASFCNS3 = dotc geru unm2r +ARPACK_OPENBLASFCNS4 = COPY LABAD LAMCH LANHS LANV2 LARFG ROT +ARPACK_FFLAGS += $(foreach fcn, $(ARPACK_OPENBLASFCNS1) $(ARPACK_OPENBLASFCNS2), -Ds$(fcn)=s$(fcn)_64 -Dd$(fcn)=d$(fcn)_64) +ARPACK_FFLAGS += $(foreach fcn, $(ARPACK_OPENBLASFCNS1) $(ARPACK_OPENBLASFCNS3), -Dc$(fcn)=c$(fcn)_64 -Dz$(fcn)=z$(fcn)_64) +ARPACK_FFLAGS += $(foreach fcn, $(ARPACK_OPENBLASFCNS4), -DS$(fcn)=S$(fcn)_64 -DD$(fcn)=D$(fcn)_64) +ARPACK_FFLAGS += -Dscnrm2=scnrm2_64 -Ddznrm2=dznrm2_64 -Dcsscal=csscal_64 -Dzdscal=zdscal_64 +# CFLAGS are for the configure checks +ARPACK_CFLAGS += -Dsgemm_=sgemm_64_ -Dcheev_=cheev_64_ +endif +endif endif endif @@ -1044,7 +1064,7 @@ ARPACK_OBJ_TARGET = $(build_shlibdir)/libarpack.$(SHLIB_EXT) ARPACK_MFLAGS = F77="$(FC)" MPIF77="$(FC)" ARPACK_FFLAGS += $(FFLAGS) $(JFFLAGS) -ARPACK_FLAGS = --with-blas="$(LIBBLAS)" --with-lapack="$(LIBLAPACK)" --disable-mpi --enable-shared FFLAGS="$(ARPACK_FFLAGS)" +ARPACK_FLAGS = --with-blas="$(LIBBLAS)" --with-lapack="$(LIBLAPACK)" --disable-mpi --enable-shared FFLAGS="$(ARPACK_FFLAGS)" CFLAGS="$(ARPACK_CFLAGS)" ifneq ($(OS),WINNT) ARPACK_FLAGS += LDFLAGS="$(LDFLAGS) -Wl,-rpath,'$(build_libdir)'" endif @@ -1287,8 +1307,16 @@ SUITESPARSE_OBJ_SOURCE = SuiteSparse-$(SUITESPARSE_VER)/UMFPACK/Lib/libumfpack.a SUITESPARSE_OBJ_TARGET = $(build_shlibdir)/libspqr.$(SHLIB_EXT) ifeq ($(USE_BLAS64), 1) -UMFPACK_CONFIG = -DLONGBLAS='long long' -CHOLMOD_CONFIG = -DLONGBLAS='long long' +UMFPACK_CONFIG = -DLONGBLAS='long long' +CHOLMOD_CONFIG = -DLONGBLAS='long long' +SPQR_CONFIG = -DLONGBLAS='long long' +ifeq ($(USE_SYSTEM_BLAS), 0) +ifneq ($(USE_INTEL_MKL), 1) +UMFPACK_CONFIG += -DSUN64 +CHOLMOD_CONFIG += -DSUN64 +SPQR_CONFIG += -DSUN64 +endif +endif endif SUITE_SPARSE_LIB = -lm @@ -1302,7 +1330,7 @@ SUITE_SPARSE_LIB += -Wl,-rpath,'$(build_libdir)' endif SUITESPARSE_MFLAGS = CC="$(CC)" CXX="$(CXX)" F77="$(FC)" AR="$(AR)" RANLIB="$(RANLIB)" BLAS="$(LIBBLAS)" LAPACK="$(LIBLAPACK)" \ INSTALL_LIB="$(build_libdir)" INSTALL_INCLUDE="$(build_includedir)" LIB="$(SUITE_SPARSE_LIB)" \ - UMFPACK_CONFIG="$(UMFPACK_CONFIG)" CHOLMOD_CONFIG="$(CHOLMOD_CONFIG)" + UMFPACK_CONFIG="$(UMFPACK_CONFIG)" CHOLMOD_CONFIG="$(CHOLMOD_CONFIG)" SPQR_CONFIG="$(SPQR_CONFIG)" SuiteSparse-$(SUITESPARSE_VER).tar.gz: $(JLDOWNLOAD) $@ http://faculty.cse.tamu.edu/davis/SuiteSparse/$@ diff --git a/deps/openblas-symbol-rename.patch b/deps/openblas-symbol-rename.patch new file mode 100644 index 0000000000000..c5ed9a1b85cf8 --- /dev/null +++ b/deps/openblas-symbol-rename.patch @@ -0,0 +1,333 @@ +diff --git a/Makefile.system b/Makefile.system +index d2ff741..ec6339d 100644 +--- a/Makefile.system ++++ b/Makefile.system +@@ -186,6 +186,8 @@ LD = $(CROSS_SUFFIX)ld + RANLIB = $(CROSS_SUFFIX)ranlib + NM = $(CROSS_SUFFIX)nm + DLLWRAP = $(CROSS_SUFFIX)dllwrap ++OBJCOPY = $(CROSS_SUFFIX)objcopy ++OBJCONV = $(CROSS_SUFFIX)objconv + + # + # OS dependent settings +@@ -845,6 +847,14 @@ else + LIBPREFIX = libopenblas_$(LIBNAMESUFFIX) + endif + ++ifndef SYMBOLPREFIX ++SYMBOLPREFIX = ++endif ++ ++ifndef SYMBOLSUFFIX ++SYMBOLSUFFIX = ++endif ++ + KERNELDIR = $(TOPDIR)/kernel/$(ARCH) + + include $(TOPDIR)/Makefile.$(ARCH) +diff --git a/exports/Makefile b/exports/Makefile +index c798bc7..f2f6881 100644 +--- a/exports/Makefile ++++ b/exports/Makefile +@@ -88,12 +88,18 @@ dll : ../$(LIBDLLNAME) + -Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive $(FEXTRALIB) $(EXTRALIB) + + libopenblas.def : gensymbol +- perl ./gensymbol win2k $(ARCH) dummy $(EXPRECISION) $(NO_CBLAS) $(NO_LAPACK) $(NO_LAPACKE) $(NEED2UNDERSCORES) $(ONLY_CBLAS) > $(@F) ++ perl ./gensymbol win2k $(ARCH) dummy $(EXPRECISION) $(NO_CBLAS) $(NO_LAPACK) $(NO_LAPACKE) $(NEED2UNDERSCORES) $(ONLY_CBLAS) "$(SYMBOLPREFIX)" "$(SYMBOLSUFFIX)" > $(@F) + + libgoto_hpl.def : gensymbol +- perl ./gensymbol win2khpl $(ARCH) dummy $(EXPRECISION) $(NO_CBLAS) $(NO_LAPACK) $(NO_LAPACKE) $(NEED2UNDERSCORES) $(ONLY_CBLAS) > $(@F) ++ perl ./gensymbol win2khpl $(ARCH) dummy $(EXPRECISION) $(NO_CBLAS) $(NO_LAPACK) $(NO_LAPACKE) $(NEED2UNDERSCORES) $(ONLY_CBLAS) "$(SYMBOLPREFIX)" "$(SYMBOLSUFFIX)" > $(@F) + ++ifeq (, $(SYMBOLPREFIX)$(SYMBOLSUFFIX)) + $(LIBDYNNAME) : ../$(LIBNAME) osx.def ++else ++../$(LIBNAME).renamed : ../$(LIBNAME) objconv.def ++ $(OBJCONV) @objconv.def ../$(LIBNAME) ../$(LIBNAME).renamed ++$(LIBDYNNAME) : ../$(LIBNAME).renamed osx.def ++endif + $(FC) $(FFLAGS) -all_load -headerpad_max_install_names -install_name $(CURDIR)/../$(LIBDYNNAME) -dynamiclib -o ../$(LIBDYNNAME) $< -Wl,-exported_symbols_list,osx.def $(FEXTRALIB) + + dllinit.$(SUFFIX) : dllinit.c +@@ -103,16 +109,22 @@ ifeq ($(OSNAME), Linux) + + so : ../$(LIBSONAME) + ++ifeq (, $(SYMBOLPREFIX)$(SYMBOLSUFFIX)) + ../$(LIBSONAME) : ../$(LIBNAME) linktest.c ++else ++../$(LIBNAME).renamed : ../$(LIBNAME) objcopy.def ++ $(OBJCOPY) --redefine-syms objcopy.def ../$(LIBNAME) ../$(LIBNAME).renamed ++../$(LIBSONAME) : ../$(LIBNAME).renamed linktest.c ++endif + ifneq ($(C_COMPILER), LSB) + $(CC) $(CFLAGS) $(LDFLAGS) -shared -o ../$(LIBSONAME) \ +- -Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive \ ++ -Wl,--whole-archive $< -Wl,--no-whole-archive \ + -Wl,-soname,$(LIBPREFIX).so.$(MAJOR_VERSION) $(EXTRALIB) + $(CC) $(CFLAGS) $(LDFLAGS) -w -o linktest linktest.c ../$(LIBSONAME) $(FEXTRALIB) && echo OK. + else + #for LSB + env LSBCC_SHAREDLIBS=gfortran $(CC) $(CFLAGS) $(LDFLAGS) -shared -o ../$(LIBSONAME) \ +- -Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive \ ++ -Wl,--whole-archive $< -Wl,--no-whole-archive \ + -Wl,-soname,$(LIBPREFIX).so.$(MAJOR_VERSION) $(EXTRALIB) + $(FC) $(CFLAGS) $(LDFLAGS) -w -o linktest linktest.c ../$(LIBSONAME) $(FEXTRALIB) && echo OK. + endif +@@ -125,9 +137,15 @@ ifeq ($(OSNAME), $(filter $(OSNAME),FreeBSD NetBSD)) + + so : ../$(LIBSONAME) + ++ifeq (, $(SYMBOLPREFIX)$(SYMBOLSUFFIX)) + ../$(LIBSONAME) : ../$(LIBNAME) linktest.c ++else ++../$(LIBNAME).renamed : ../$(LIBNAME) objcopy.def ++ $(OBJCOPY) --redefine-syms objcopy.def ../$(LIBNAME) ../$(LIBNAME).renamed ++../$(LIBSONAME) : ../$(LIBNAME).renamed linktest.c ++endif + $(CC) $(CFLAGS) $(LDFLAGS) -shared -o ../$(LIBSONAME) \ +- -Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive \ ++ -Wl,--whole-archive $< -Wl,--no-whole-archive \ + $(FEXTRALIB) $(EXTRALIB) + $(CC) $(CFLAGS) $(LDFLAGS) -w -o linktest linktest.c ../$(LIBSONAME) $(FEXTRALIB) && echo OK. + rm -f linktest +@@ -178,17 +196,23 @@ static : ../$(LIBNAME) + rm -f goto.$(SUFFIX) + + osx.def : gensymbol ../Makefile.system ../getarch.c +- perl ./gensymbol osx $(ARCH) $(BU) $(EXPRECISION) $(NO_CBLAS) $(NO_LAPACK) $(NO_LAPACKE) $(NEED2UNDERSCORES) $(ONLY_CBLAS) > $(@F) ++ perl ./gensymbol osx $(ARCH) $(BU) $(EXPRECISION) $(NO_CBLAS) $(NO_LAPACK) $(NO_LAPACKE) $(NEED2UNDERSCORES) $(ONLY_CBLAS) "$(SYMBOLPREFIX)" "$(SYMBOLSUFFIX)" > $(@F) + + aix.def : gensymbol ../Makefile.system ../getarch.c +- perl ./gensymbol aix $(ARCH) $(BU) $(EXPRECISION) $(NO_CBLAS) $(NO_LAPACK) $(NO_LAPACKE) $(NEED2UNDERSCORES) $(ONLY_CBLAS) > $(@F) ++ perl ./gensymbol aix $(ARCH) $(BU) $(EXPRECISION) $(NO_CBLAS) $(NO_LAPACK) $(NO_LAPACKE) $(NEED2UNDERSCORES) $(ONLY_CBLAS) "$(SYMBOLPREFIX)" "$(SYMBOLSUFFIX)" > $(@F) ++ ++objcopy.def : gensymbol ../Makefile.system ../getarch.c ++ perl ./gensymbol objcopy $(ARCH) $(BU) $(EXPRECISION) $(NO_CBLAS) $(NO_LAPACK) $(NO_LAPACKE) $(NEED2UNDERSCORES) $(ONLY_CBLAS) "$(SYMBOLPREFIX)" "$(SYMBOLSUFFIX)" > $(@F) ++ ++objconv.def : gensymbol ../Makefile.system ../getarch.c ++ perl ./gensymbol objconv $(ARCH) $(BU) $(EXPRECISION) $(NO_CBLAS) $(NO_LAPACK) $(NO_LAPACKE) $(NEED2UNDERSCORES) $(ONLY_CBLAS) "$(SYMBOLPREFIX)" "$(SYMBOLSUFFIX)" > $(@F) + + test : linktest.c + $(CC) $(CFLAGS) $(LDFLAGS) -w -o linktest linktest.c ../$(LIBSONAME) -lm && echo OK. + rm -f linktest + + linktest.c : gensymbol ../Makefile.system ../getarch.c +- perl ./gensymbol linktest $(ARCH) $(BU) $(EXPRECISION) $(NO_CBLAS) $(NO_LAPACK) $(NO_LAPACKE) $(NEED2UNDERSCORES) $(ONLY_CBLAS) > linktest.c ++ perl ./gensymbol linktest $(ARCH) $(BU) $(EXPRECISION) $(NO_CBLAS) $(NO_LAPACK) $(NO_LAPACKE) $(NEED2UNDERSCORES) $(ONLY_CBLAS) "$(SYMBOLPREFIX)" "$(SYMBOLSUFFIX)" > linktest.c + + clean :: + @rm -f *.def *.dylib __.SYMDEF* +diff --git a/exports/gensymbol b/exports/gensymbol +index bcea836..8bd2f17 100644 +--- a/exports/gensymbol ++++ b/exports/gensymbol +@@ -2784,22 +2784,26 @@ $bu = $ARGV[2]; + + $bu = "" if (($bu eq "0") || ($bu eq "1")); + ++$symbolprefix = $ARGV[9]; ++ ++$symbolsuffix = $ARGV[10]; ++ + if ($ARGV[0] eq "osx"){ + + @underscore_objs = (@underscore_objs, @misc_common_objs); + @no_underscore_objs = (@no_underscore_objs, @misc_common_objs); + + foreach $objs (@underscore_objs) { +- print "_", $objs, $bu, "\n"; ++ print "_", $symbolprefix, $objs, $bu, $symbolsuffix, "\n"; + } + + foreach $objs (@need_2underscore_objs) { +- print "_", $objs, $bu, $bu, "\n"; ++ print "_", $symbolprefix, $objs, $bu, $bu, $symbolsuffix, "\n"; + } + + # if ($ARGV[4] == 0) { + foreach $objs (@no_underscore_objs) { +- print "_", $objs, "\n"; ++ print "_", $symbolprefix, $objs, $symbolsuffix, "\n"; + } + # } + exit(0); +@@ -2811,16 +2815,58 @@ if ($ARGV[0] eq "aix"){ + @no_underscore_objs = (@no_underscore_objs, @misc_common_objs); + + foreach $objs (@underscore_objs) { +- print $objs, $bu, "\n"; ++ print $symbolprefix, $objs, $bu, $symbolsuffix, "\n"; ++ } ++ ++ foreach $objs (@need_2underscore_objs) { ++ print $symbolprefix, $objs, $bu, $bu, $symbolsuffix, "\n"; ++ } ++ ++# if ($ARGV[4] == 0) { ++ foreach $objs (@no_underscore_objs) { ++ print $symbolprefix, $objs, $symbolsuffix, "\n"; ++ } ++# } ++ exit(0); ++} ++ ++if ($ARGV[0] eq "objcopy"){ ++ ++ @underscore_objs = (@underscore_objs, @misc_common_objs); ++ @no_underscore_objs = (@no_underscore_objs, @misc_common_objs); ++ ++ foreach $objs (@underscore_objs) { ++ print $objs, $bu, " ", $symbolprefix, $objs, $bu, $symbolsuffix, "\n"; ++ } ++ ++ foreach $objs (@need_2underscore_objs) { ++ print $objs, $bu, $bu, " ", $symbolprefix, $objs, $bu, $bu, $symbolsuffix, "\n"; ++ } ++ ++# if ($ARGV[4] == 0) { ++ foreach $objs (@no_underscore_objs) { ++ print $objs, " ", $symbolprefix, $objs, $symbolsuffix, "\n"; ++ } ++# } ++ exit(0); ++} ++ ++if ($ARGV[0] eq "objconv"){ ++ ++ @underscore_objs = (@underscore_objs, @misc_common_objs); ++ @no_underscore_objs = (@no_underscore_objs, @misc_common_objs); ++ ++ foreach $objs (@underscore_objs) { ++ print "-nr:_", $objs, $bu, ":_", $symbolprefix, $objs, $bu, $symbolsuffix, "\n"; + } + + foreach $objs (@need_2underscore_objs) { +- print $objs, $bu, $bu, "\n"; ++ print "-nr:_", $objs, $bu, $bu, ":_", $symbolprefix, $objs, $bu, $bu, $symbolsuffix, "\n"; + } + + # if ($ARGV[4] == 0) { + foreach $objs (@no_underscore_objs) { +- print $objs, "\n"; ++ print "-nr:_", $objs, ":_", $symbolprefix, $objs, $symbolsuffix, "\n"; + } + # } + exit(0); +@@ -2835,22 +2881,22 @@ if ($ARGV[0] eq "win2k"){ + foreach $objs (@underscore_objs) { + $uppercase = $objs; + $uppercase =~ tr/[a-z]/[A-Z]/; +- print "\t$objs=$objs","_ \@", $count, "\n"; ++ print "\t",$symbolprefix, $objs, $symbolsuffix, "=$objs","_ \@", $count, "\n"; + $count ++; +- print "\t",$objs, "_=$objs","_ \@", $count, "\n"; ++ print "\t",$symbolprefix, $objs, "_", $symbolsuffix, "=$objs","_ \@", $count, "\n"; + $count ++; +- print "\t$uppercase=$objs", "_ \@", $count, "\n"; ++ print "\t",$symbolprefix, $uppercase, $symbolsuffix, "=$objs", "_ \@", $count, "\n"; + $count ++; + } + + foreach $objs (@need_2underscore_objs) { + $uppercase = $objs; + $uppercase =~ tr/[a-z]/[A-Z]/; +- print "\t$objs=$objs","__ \@", $count, "\n"; ++ print "\t",$symbolprefix, $objs, $symbolsuffix, "=$objs","__ \@", $count, "\n"; + $count ++; +- print "\t",$objs, "__=$objs","__ \@", $count, "\n"; ++ print "\t",$symbolprefix, $objs, "__", $symbolsuffix, "=$objs","__ \@", $count, "\n"; + $count ++; +- print "\t$uppercase=$objs", "__ \@", $count, "\n"; ++ print "\t",$symbolprefix, $uppercase, $symbolsuffix, "=$objs", "__ \@", $count, "\n"; + $count ++; + } + +@@ -2859,15 +2905,15 @@ if ($ARGV[0] eq "win2k"){ + + $uppercase = $objs; + $uppercase =~ tr/[a-z]/[A-Z]/; +- print "\t",$objs, "_=$objs","_ \@", $count, "\n"; ++ print "\t",$symbolprefix, $objs, "_", $symbolsuffix, "=$objs","_ \@", $count, "\n"; + $count ++; +- print "\t$uppercase=$objs", "_ \@", $count, "\n"; ++ print "\t",$symbolprefix, $uppercase, $symbolsuffix, "=$objs", "_ \@", $count, "\n"; + $count ++; + } + + + foreach $objs (@no_underscore_objs) { +- print "\t",$objs,"=$objs"," \@", $count, "\n"; ++ print "\t",$symbolprefix,$objs,$symbolsuffix,"=$objs"," \@", $count, "\n"; + $count ++; + } + +@@ -2880,11 +2926,11 @@ if ($ARGV[0] eq "win2khpl"){ + foreach $objs (@hplobjs) { + $uppercase = $objs; + $uppercase =~ tr/[a-z]/[A-Z]/; +- print "\t$objs=$objs","_ \@", $count, "\n"; ++ print "\t",$symbolprefix, $objs, $symbolsuffix, "=$objs","_ \@", $count, "\n"; + $count ++; +- print "\t",$objs, "_=$objs","_ \@", $count, "\n"; ++ print "\t",$symbolprefix, $objs, "_", $symbolsuffix, "=$objs","_ \@", $count, "\n"; + $count ++; +- print "\t$uppercase=$objs", "_ \@", $count, "\n"; ++ print "\t",$symbolprefix, $uppercase, $symbolsuffix, "=$objs", "_ \@", $count, "\n"; + $count ++; + } + +@@ -2905,24 +2951,24 @@ if ($ARGV[0] eq "microsoft"){ + foreach $objs (@underscore_objs) { + $uppercase = $objs; + $uppercase =~ tr/[a-z]/[A-Z]/; +- print "\t$objs = $objs","_\n"; ++ print "\t",$symbolprefix, $objs, $symbolsuffix, " = $objs","_\n"; + $count ++; +- print "\t$objs\_ = $objs","_\n"; ++ print "\t",$symbolprefix, $objs, "\_", $symbolsuffix, " = $objs","_\n"; + $count ++; +- print "\t$uppercase = $objs","_\n"; ++ print "\t",$symbolprefix, $uppercase, $symbolsuffix, " = $objs","_\n"; + $count ++; +- print "\t$uppercase\_ = $objs","_\n"; ++ print "\t",$symbolprefix, $uppercase, "\_", $symbolsuffix, " = $objs","_\n"; + $count ++; + } + + foreach $objs (@need_2underscore_objs) { + $uppercase = $objs; + $uppercase =~ tr/[a-z]/[A-Z]/; +- print "\t$objs=$objs","__ \@", $count, "\n"; ++ print "\t",$symbolprefix, $objs, $symbolsuffix, "=$objs","__ \@", $count, "\n"; + $count ++; +- print "\t",$objs, "__=$objs","__ \@", $count, "\n"; ++ print "\t",$symbolprefix, $objs, "__", $symbolsuffix, "=$objs","__ \@", $count, "\n"; + $count ++; +- print "\t$uppercase=$objs", "__ \@", $count, "\n"; ++ print "\t",$symbolprefix, $uppercase, $symbolsuffix, "=$objs", "__ \@", $count, "\n"; + $count ++; + } + +@@ -2936,16 +2982,16 @@ if ($ARGV[0] eq "linktest"){ + + print "int main(void){\n"; + foreach $objs (@underscore_objs) { +- print $objs, $bu, "();\n" if $objs ne "xerbla"; ++ print $symbolprefix, $objs, $bu, $symbolsuffix, "();\n" if $objs ne "xerbla"; + } + + foreach $objs (@need_2underscore_objs) { +- print $objs, $bu, $bu, "();\n"; ++ print $symbolprefix, $objs, $bu, $bu, $symbolsuffix, "();\n"; + } + + # if ($ARGV[4] == 0) { + foreach $objs (@no_underscore_objs) { +- print $objs, "();\n"; ++ print $symbolprefix, $objs, $symbolsuffix, "();\n"; + } + # } +