Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 549546
Collapse All | Expand All

(-)a/gnatbuild.eclass (+17 lines)
Lines 468-473 Link Here
468
		fi
468
		fi
469
469
470
		export CC="${GNATBOOT}/bin/gnatgcc"
470
		export CC="${GNATBOOT}/bin/gnatgcc"
471
472
		# See bug #549546
473
		# If user has march/mtune/mcpu set to value not suppirted by the requested gnatgcc version
474
		# then checking for C compiler will fail. Therefore, replace with the native architecture.
475
		einfo "Checking for CFLAGS compatibility"
476
		if [[ $(echo "" | ${CC} -fsyntax-only ${CFLAGS} -xc - &> /dev/null) != 0 ]]; then
477
			ewarn "CFLAGS=\"${CFLAGS}\" not supported, replacing with -march|-mtune|-mcpu=native"
478
			replace-flags -march=* -march=native
479
			replace-flags -mtune=* -mtune=native
480
			replace-flags -mcpu=* -mcpu=native
481
			ewarn "New CFLAGS=\"${CFLAGS}\""
482
			ewarn "New CXXFLAGS=\"${CFLAGS}\""
483
		else
484
			export CFLAGS="${CFLAGS}"
485
			export CXXFLAGS="${CFLAGS}"
486
		fi
487
471
		# CPATH is supposed to be applied for any language, thus
488
		# CPATH is supposed to be applied for any language, thus
472
		# superceding either of C/CPLUS/OBJC_INCLUDE_PATHs
489
		# superceding either of C/CPLUS/OBJC_INCLUDE_PATHs
473
		export CPATH="${GNATLIB}/include"
490
		export CPATH="${GNATLIB}/include"

Return to bug 549546