On Wed, Nov 18, 2015 at 05:05:23PM +0000, Phil Blundell wrote: > On Wed, 2015-11-18 at 17:51 +0100, Martin Jansa wrote: > > On Wed, Nov 18, 2015 at 04:38:34PM +0000, Phil Blundell wrote: > > > On Tue, 2015-11-17 at 11:58 +0100, Martin Jansa wrote: > > > > * be aware that this -march value is available only in gcc-4.9 > > > > and > > > > newer: > > > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57907 > > > > > > > > > > Can you clarify why this is an improvement? The previous patch > > > already > > > changed cortex-a15.inc to use -mcpu=cortexa15, which effectively > > > implies -march=armv7ve already (and works on all gcc versions) so > > > I'm > > > not entirely sure what this second patch really buys you. > > > > Because -mcpu=cortexa15 and -march=armv7a conflict each other, so we > > either have to stop putting -march in default CCARGS or at least set > > compatible one like this patch does. > > Ah right, got it. I think it would be better to just stop passing > -march= in cases where we are using -mcpu=. It seems a bit silly to > create another huge maze of tune variables which all boil down to > essentially a no-op.
The problem with this is that currently all the tunes are at least a bit
hierarchical, in this case
tune-cortexa15 was including
openembedded-core/meta/conf/machine/include/arm/arch-armv7a.inc
Which adds -march for anything with armv7a in TUNE_FEATURES:
TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "armv7a",
"-march=armv7-a", "", d)}"
and as bonus adds MACHINEOVERRIDES:
MACHINEOVERRIDES =. "${@bb.utils.contains("TUNE_FEATURES", "armv7a",
"armv7a:", "" ,d)}"
Then cortexa15 just uses tune features from "upper" tune-armv7a + just
cortexa15, e.g.:
TUNE_FEATURES_tune-cortexa15 = "${TUNE_FEATURES_tune-armv7a} cortexa15"
So to get rid of -march we'll have to either
1) check in arch-armv7a.inc if TUNE_FEATURES also contains some TUNE_FEATURE
which will append -mcpu
2) don't include armv7a TUNE_FEATURE in TUNE_FEATURES_tune-cortexa15t,
but the MACHINEOVERRIDES is still useful in many cases
3) use TUNE_CCARGS_remove to remove -march when adding -mcpu
4) rework whole tune files even more (probably by introducing another
variable which will hold just one of -march,-mcpu,-mtune and gets
appended to TUNE_CCARGS).
--
Martin 'JaMa' Jansa jabber: [email protected]
signature.asc
Description: Digital signature
-- _______________________________________________ Openembedded-core mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-core
