Summary: | mysql_config wrongly retains too much info from CFLAGS | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | SpanKY <vapier> |
Component: | Current packages | Assignee: | Gentoo Linux MySQL bugs team <mysql-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | j_gentoo, tristan, zak.kipling |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | 105_all_mysql_config_cleanup.patch |
Description
SpanKY
2006-11-26 06:18:08 UTC
*** Bug 157429 has been marked as a duplicate of this bug. *** I've applied changes suggested in bug #157429, (pratically reverted changeset 1.34). actually /usr/bin/mysql_config is a bash script, it simply do cycle and sed the the content of $cflags for remove in DDBUG_OFF DSAFEMALLOC USAFEMALLOC DSAFE_MUTEX \ DPEDANTIC_SAFEMALLOC DUNIV_MUST_NOT_INLINE DFORCE_INIT_OF_VARS \ DEXTRA_DEBUG DHAVE_purify O 'O[0-9]' 'xO[0-9]' 'W[-A-Za-z]*' \ Xa xstrconst "xc99=none" \ unroll2 ip mp restrict do cflags=`echo "$cflags"|sed -e "s/ -$remove */ /g"` done easy to add "-pipe" and "-march" here but prior to do so, can you suggest a bigger list to strip from the flags ? thanks the only thing the mysql config script *should* have are CPPFLAGS ... that means things that begin with -I or -D ... i'd punt everything else not sure if you even want to keep -D -D needs to be kept as some of the mysql headers exclude/include specific things. -L may also be important given the stuff that goes into /usr/lib/mysql/ Don't the -L options belong in LDFLAGS / "mysql_config --libs" instead? Robin wanna manage this thing? As you know my "c" and linkage skills are absent, then i can port it to all versions we have in portage and do the testing, Thanks ... in advance as Zak pointed out, -L belongs only in the --libs output, not the --cflags Created attachment 105428 [details, diff]
105_all_mysql_config_cleanup.patch
extrapolating from various comments here is the replacement code for the previous sed loop, will be added to the tree very soon.
</code>
# Remove some options that a client doesn't have to care about
tmpcflags=""
for f in $cflags
do
case "${f}" in
-DDBUG_OFF) f="" ;;
-DSAFEMALLOC) f="" ;;
-USAFEMALLOC) f="" ;;
-DSAFE_MUTEX) f="" ;;
-DPEDANTIC_SAFEMALLOC) f="" ;;
-DUNIV_MUST_NOT_INLINE) f="" ;;
-DFORCE_INIT_OF_VARS) f="" ;;
-DEXTRA_DEBUG) f="" ;;
-DHAVE_purify) f="" ;;
-[ID]*) tmpcflags="${tmpcflags} ${f}" ;;
-[Ll]*)
libs="${libs} ${f}"
libs_r="${libs_r} ${f}"
embedded_libs="${embedded_libs} ${f}"
;;
esac
done
cflags="${tmpcflags# }"
</code>
Thanks everyone for the patience
in cvs *** Bug 165511 has been marked as a duplicate of this bug. *** |