Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 250527 - sys-libs/glibc should not filter -march, only add it if it is missing
Summary: sys-libs/glibc should not filter -march, only add it if it is missing
Status: RESOLVED DUPLICATE of bug 199334
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-10 17:32 UTC by Xake
Modified: 2008-12-10 18:51 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Xake 2008-12-10 17:32:49 UTC
I played around some and did notice that common.eblit filters -march and then substitutes it with -march=i686 at least for x86.
I also saw bugreport #185404 and as far as I can tell from it for x86 there were no breakage except if -march was missing.
The problem with this is that "man gcc" says that as -march implies -mtune and does not need to be set. I think (and have on the forums seen) a lot of people only is using march becouse of this.

For me this manifested itself at least as a failing iconvdata/tst-table in glibc testsuit.
It also results in an unoptimized version of glibc.

We could if -mtune not set convert -march to -mtune before filtering -march.
Or we could do the following change to common.eblit:
--- /var/portage/sys-libs/glibc/files/eblits/common.eblit	2008-06-22 16:07:13.000000000 +0200
+++ common.eblit	2008-12-10 18:28:57.940730341 +0100
@@ -74,8 +74,7 @@
 			local t=${CTARGET_OPT:-${CTARGET}}
 			t=${t%%-*}
 			if ! echo "" | $(tc-getCC) ${CFLAGS} -E -dD - | grep -qs __${t}__ ; then
-				filter-flags '-march=*'
-				export CFLAGS="-march=${t} ${CFLAGS}"
+				[[ "${CFLAGS}" =~ 'march' ]] || filter-flags '-march=*' && export CFLAGS="-march=${t} ${CFLAGS}"
 			fi
 		;;
 		amd64)
Comment 1 SpanKY gentoo-dev 2008-12-10 18:51:40 UTC
your analysis is incorrect ... there is still breakage possible

*** This bug has been marked as a duplicate of bug 199334 ***