summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <monty@bitch.mysql.fi>2001-08-18 13:11:58 +0300
committerunknown <monty@bitch.mysql.fi>2001-08-18 13:11:58 +0300
commite9ec978e2d58b9fab1871bcb7c223cc9f919a3d7 (patch)
treecc848edf595faefaf9ac88832aa6e8a7e884d36f
parentf6751dd8db31161f6eaa0a80aa8cf1b8f9c930c3 (diff)
downloadmariadb-git-e9ec978e2d58b9fab1871bcb7c223cc9f919a3d7.tar.gz
Fix for bug in the Sun Workshop compiler
BUILD/compile-solaris-sparc-purify: Build for purify, quantify and purecoverage
-rwxr-xr-xBUILD/compile-solaris-sparc-fortre19
-rwxr-xr-xBUILD/compile-solaris-sparc-purify8
-rw-r--r--mysys/hash.c5
3 files changed, 29 insertions, 3 deletions
diff --git a/BUILD/compile-solaris-sparc-fortre b/BUILD/compile-solaris-sparc-fortre
new file mode 100755
index 00000000000..dca0412c979
--- /dev/null
+++ b/BUILD/compile-solaris-sparc-fortre
@@ -0,0 +1,19 @@
+#! /bin/sh
+
+gmake -k clean || true
+/bin/rm -f */.deps/*.P config.cache
+
+aclocal && autoheader && aclocal && automake && autoconf
+(cd bdb/dist && sh s_all)
+(cd innobase && aclocal && autoheader && aclocal && automake && autoconf)
+if [ -d gemini ]
+then
+ (cd gemini && aclocal && autoheader && aclocal && automake && autoconf)
+fi
+
+PATH=/opt/SUNWspro/bin/:$PATH
+CC=cc CFLAGS="-Xa -fast -xO4 -native -xstrconst -mt -D_FORTREC_" \
+CXX=CC CXXFLAGS="-noex -xO4 -mt" \
+./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client
+
+gmake -j 4
diff --git a/BUILD/compile-solaris-sparc-purify b/BUILD/compile-solaris-sparc-purify
index b5c898bff30..91fbbf1ae8d 100755
--- a/BUILD/compile-solaris-sparc-purify
+++ b/BUILD/compile-solaris-sparc-purify
@@ -6,8 +6,12 @@ aclocal && autoheader && aclocal && automake && autoconf
(cd bdb/dist && sh s_all)
(cd innobase && aclocal && autoheader && aclocal && automake && autoconf)
-CFLAGS="-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -DHAVE_purify -DEXTRA_DEBUG -O2" CXX=gcc CXXLD=g++ CXXFLAGS="-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wextern-inline -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -DHAVE_purify -DEXTRA_DEBUG -O2" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-debug=full --with-berkeley-db --with-innodb
+CFLAGS="-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -DHAVE_purify -DEXTRA_DEBUG -O2" CXX=gcc CXXLD=g++ CXXFLAGS="-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wextern-inline -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -DHAVE_purify -DEXTRA_DEBUG -O2" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-berkeley-db --with-innodb
gmake -j 4
-cd sql ; rm mysqld ; make CXXLD="purify -best-effort g++" mysqld
+cd sql ; rm mysqld ;
+make CXXLD="purify -best-effort g++" mysqld ; mv mysqld mysqld-purify
+make CXXLD="quantify -best-effort g++" mysqld ; mv mysqld mysqld-quantify
+make CXXLD="purecov -best-effort g++" mysqld ; mv mysqld mysqld-purecov
+
diff --git a/mysys/hash.c b/mysys/hash.c
index 66fa91811b5..c05379ef4ce 100644
--- a/mysys/hash.c
+++ b/mysys/hash.c
@@ -180,7 +180,10 @@ uint calc_hashnr_caseup(const byte *key, uint len)
#endif
-inline uint rec_hashnr(HASH *hash,const byte *record)
+#ifndef _FORTREC_
+inline
+#endif
+uint rec_hashnr(HASH *hash,const byte *record)
{
uint length;
byte *key=hash_key(hash,record,&length,0);