Commit 9f9ecc06 authored by unknown's avatar unknown

MDEV-135: work-around a GCC bug seen on Debian 5 "lenny" 64-bit.

parent 72321511
...@@ -66,7 +66,7 @@ endif ...@@ -66,7 +66,7 @@ endif
( test -d $(builddir) || mkdir $(builddir) ) && cd $(builddir) && \ ( test -d $(builddir) || mkdir $(builddir) ) && cd $(builddir) && \
sh -c 'PATH=$${MYSQL_BUILD_PATH:-"/bin:/usr/bin:/usr/local/bin"} \ sh -c 'PATH=$${MYSQL_BUILD_PATH:-"/bin:/usr/bin:/usr/local/bin"} \
CC=$${MYSQL_BUILD_CC:-gcc} \ CC=$${MYSQL_BUILD_CC:-gcc} \
CFLAGS=$${MYSQL_BUILD_CFLAGS:-"-O2 -fno-omit-frame-pointer -g -pipe -Wall -Wno-uninitialized"} \ CFLAGS=$${MYSQL_BUILD_CFLAGS:-"-O2 -fno-omit-frame-pointer -g -pipe -Wall -Wno-uninitialized $$(case `lsb_release -sc` in (lenny) echo -DWORKAROUND_GCC_4_3_2_BUG ;; esac)"} \
CXX=$${MYSQL_BUILD_CXX:-g++} \ CXX=$${MYSQL_BUILD_CXX:-g++} \
CXXFLAGS=$${MYSQL_BUILD_CXXFLAGS:-"-O2 -fno-omit-frame-pointer -g -pipe -Wall -Wno-uninitialized"} \ CXXFLAGS=$${MYSQL_BUILD_CXXFLAGS:-"-O2 -fno-omit-frame-pointer -g -pipe -Wall -Wno-uninitialized"} \
cmake .. \ cmake .. \
......
...@@ -1647,7 +1647,7 @@ double Item_sum_avg::val_real() ...@@ -1647,7 +1647,7 @@ double Item_sum_avg::val_real()
my_decimal *Item_sum_avg::val_decimal(my_decimal *val) my_decimal *Item_sum_avg::val_decimal(my_decimal *val)
{ {
my_decimal sum_buff, cnt; my_decimal cnt;
const my_decimal *sum_dec; const my_decimal *sum_dec;
DBUG_ASSERT(fixed == 1); DBUG_ASSERT(fixed == 1);
if (aggr) if (aggr)
......
...@@ -2293,7 +2293,11 @@ static int do_div_mod(const decimal_t *from1, const decimal_t *from2, ...@@ -2293,7 +2293,11 @@ static int do_div_mod(const decimal_t *from1, const decimal_t *from2,
DBUG_ASSERT(buf0 < to->buf + to->len); DBUG_ASSERT(buf0 < to->buf + to->len);
*buf0=(dec1)guess; *buf0=(dec1)guess;
} }
#ifdef WORKAROUND_GCC_4_3_2_BUG
dcarry= *(volatile dec1 *)start1;
#else
dcarry= *start1; dcarry= *start1;
#endif
start1++; start1++;
} }
if (mod) if (mod)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment