Skip to content

Conversation

@galak
Copy link
Contributor

@galak galak commented Feb 1, 2019

No description provided.

@galak
Copy link
Contributor Author

galak commented Feb 1, 2019

Part of my reasoning for this is this will allow us to build test / regress the vega board and openisa_rv32m1 soc/drivers with the standard Zephyr toolchain (once 0.10.0) is official.

@codecov-io
Copy link

codecov-io commented Feb 1, 2019

Codecov Report

Merging #12980 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #12980   +/-   ##
=======================================
  Coverage   48.63%   48.63%           
=======================================
  Files         313      313           
  Lines       46436    46436           
  Branches    10710    10710           
=======================================
  Hits        22585    22585           
  Misses      19395    19395           
  Partials     4456     4456

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fd0a437...4caee3f. Read the comment docs.

Copy link
Contributor

@mbolivar mbolivar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a reasonable thing to do. Users of toolchains with ISA extensions are going to be setting ZEPHYR_TOOLCHAIN_VARIANT to cross-compile in practice.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another variant:

config RISCV_GENERIC_TOOLCHAIN
	bool
	default "$(ZEPHYR_TOOLCHAIN_VARIANT)" = "zephyr"

Or this:

config RISCV_GENERIC_TOOLCHAIN
	def_bool "$(ZEPHYR_TOOLCHAIN_VARIANT)" = "zephyr"

The value for default, etc., can be any expression.

@galak
Copy link
Contributor Author

galak commented Feb 5, 2019

@SebastianBoe can you take a look

galak added 2 commits February 5, 2019 08:49
Expose ZEPHYR_TOOLCHAIN_VARIANT so that Kconfig can make choices based
on how its set.  For example we RISCV_GENERIC_TOOLCHAIN if the variant
is 'zephyr'.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The 0.10 version of the Zephyr toolchain supports building on the
openisa_rv32m1 SoC.  So if the ZEPHYR_TOOLCHAIN_VARIANT is 'zephyr'
than select RISCV_GENERIC_TOOLCHAIN.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
@galak galak force-pushed the kconfig-toolchain branch from 4c7504f to 4caee3f Compare February 5, 2019 14:49
@carlescufi carlescufi merged commit 128d2e2 into zephyrproject-rtos:master Feb 6, 2019
Copy link
Contributor

@SebastianBoe SebastianBoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is broken. You forgot

set(ENV{ZEPHYR_TOOLCHAIN_VARIANT} ${ZEPHYR_TOOLCHAIN_VARIANT})

@galak
Copy link
Contributor Author

galak commented Feb 7, 2019

set(ENV{ZEPHYR_TOOLCHAIN_VARIANT} ${ZEPHYR_TOOLCHAIN_VARIANT})

I think its not needed since its already coming from the env.

@galak galak deleted the kconfig-toolchain branch February 7, 2019 15:36
@SebastianBoe
Copy link
Contributor

Aha, then it is pretty close.

But it is valid (and has precedence) to set ZEPHYR_TOOLCHAIN_VARIANT as cmake -DZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Build System area: RISCV RISCV Architecture (32-bit & 64-bit) area: Toolchains Toolchains

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants