diff options
| author | Jaewon Lee <jaewon.lee@xilinx.com> | 2020-01-08 16:53:32 -0800 |
|---|---|---|
| committer | Jaewon Lee <jaewon.lee@xilinx.com> | 2020-01-09 10:52:54 -0800 |
| commit | f980dd217719273a45d8ebfe5fbd95e2245472d4 (patch) | |
| tree | d3b4f6abb80536ccfd417977ef760a5a21118222 /meta-xilinx-standalone | |
| parent | 12340fc54183aedf9eaa91688628fb1bddbcf450 (diff) | |
| download | meta-xilinx-f980dd217719273a45d8ebfe5fbd95e2245472d4.tar.gz | |
gcc-cross-canadian_%.bbappend:temporary hack to build gcc cross canadian
This is a TEMPORARY HACK to build gcc-cross-canadian toolchain for the
xilinx-standalone distro.
xilinx-standalone.conf will set TCLIB as newlib which will pull in
tclibc-newlib.inc which sets TARGET_OS to eabi for arm and elf for
everything else. In gcc-cross-canadian.inc (upstream) there is
a _remove('--with-sysroot=/not/exist') for TARGET_OS overrides(elf and
eabi) which fixes baremetal toolchain builds by preventing the compiler
from looking in nonexistent sysroot directories
e.g. https://github.com/riscv/meta-riscv/issues/117
But that flag is needed when building for newlib as that is what will
specify the path in the arch specific sysroots to look for the header
files that were generated.
Without setting --with-sysroot the following error would
occur:
fatal error: stdio.h: No such file or directory
1 | #include <stdio.h>
Signed-off-by: Jaewon Lee <jaewon.lee@xilinx.com>
Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com>
Diffstat (limited to 'meta-xilinx-standalone')
| -rw-r--r-- | meta-xilinx-standalone/recipes-standalone/gcc/gcc-cross-canadian_%.bbappend | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/meta-xilinx-standalone/recipes-standalone/gcc/gcc-cross-canadian_%.bbappend b/meta-xilinx-standalone/recipes-standalone/gcc/gcc-cross-canadian_%.bbappend index 66c1f557..9143434a 100644 --- a/meta-xilinx-standalone/recipes-standalone/gcc/gcc-cross-canadian_%.bbappend +++ b/meta-xilinx-standalone/recipes-standalone/gcc/gcc-cross-canadian_%.bbappend | |||
| @@ -33,3 +33,13 @@ EXTRA_OECONF_pn-gcc-cross-canadian-${TARGET_ARCH}_xilinx-standalone_append_zynqm | |||
| 33 | EXTRA_OECONF_pn-gcc-cross-canadian-${TARGET_ARCH}_xilinx-standalone_append_zc702-zynq7 = " \ | 33 | EXTRA_OECONF_pn-gcc-cross-canadian-${TARGET_ARCH}_xilinx-standalone_append_zc702-zynq7 = " \ |
| 34 | ${GCC_CONFIGURE_A9} \ | 34 | ${GCC_CONFIGURE_A9} \ |
| 35 | " | 35 | " |
| 36 | |||
| 37 | # Temporary hack to build gcc cross canadian for tclibc-newlib as --with-sysroot=/not/exist | ||
| 38 | # has been removed from TARGET_OS for elf and eabi in gcc-cross-canadian.inc | ||
| 39 | |||
| 40 | python() { | ||
| 41 | extraoeconfgcc = d.getVar('EXTRA_OECONF') | ||
| 42 | extraoeconfgcc += " --with-sysroot=/not/exist" | ||
| 43 | d.delVar('EXTRA_OECONF') | ||
| 44 | d.setVar('EXTRA_OECONF', extraoeconfgcc) | ||
| 45 | } | ||
