diff options
author | Mark Hatle <mark.hatle@xilinx.com> | 2020-01-28 16:08:11 -0800 |
---|---|---|
committer | Mark Hatle <mark.hatle@xilinx.com> | 2020-01-31 15:56:00 -0800 |
commit | 9eef527d26394a917224187350765ab1b46e13a8 (patch) | |
tree | 711ccb7ada414bf1fd48ac55e9f7bf90c2ffde2d /meta-xilinx-standalone/recipes-devtools | |
parent | 7c6ee7c2e9c9e45bb7e9480b50cd61dc009d530d (diff) | |
download | meta-xilinx-9eef527d26394a917224187350765ab1b46e13a8.tar.gz |
Enable multilib baremetal toolchains
Distro Changes:
When building a multilib, we need to disable configsite cache. Otherwise
the system will fail to generate the SDK as there are no configsite entries
due to newlib based multilibs.
Recipe Changes:
gcc - globally disable multilib configuration
- Disable Linux specific configurations (EXTRACONFFUNCS)
gcc-cross-canadian - enable multilib on a recipe specific basis
libgcc - add a noop override to do_multilib_install to avoid Linux specific
multilib processing
newlib - arm/v6+m/nofp and arm/v8-m.base/nofp do not have newlib trap
implementations. libgloss contains these, workaround by
disabling builtin trap syscall handler.
- misc workarounds for multilib installs
libgloss - Allow MLPREFIX for newlib dependencies
meta-toolchain - adjust to install only the items we want/need
packagegroup-newlib-standalone-sdk-target - new pkggroup for the
custom baremetal SDK to select the right set of packages
Signed-off-by: Mark Hatle <mark.hatle@xilinx.com>
Diffstat (limited to 'meta-xilinx-standalone/recipes-devtools')
5 files changed, 45 insertions, 24 deletions
diff --git a/meta-xilinx-standalone/recipes-devtools/gcc/gcc-cross-canadian_%.bbappend b/meta-xilinx-standalone/recipes-devtools/gcc/gcc-cross-canadian_%.bbappend index 822891be..90dbae9a 100644 --- a/meta-xilinx-standalone/recipes-devtools/gcc/gcc-cross-canadian_%.bbappend +++ b/meta-xilinx-standalone/recipes-devtools/gcc/gcc-cross-canadian_%.bbappend | |||
@@ -1,5 +1,12 @@ | |||
1 | require gcc-xilinx-standalone.inc | 1 | require gcc-xilinx-standalone.inc |
2 | 2 | ||
3 | # We want to use the stock multilib configs, when available | ||
4 | EXTRACONFFUNCS_xilinx-standalone = "" | ||
5 | |||
6 | EXTRA_OECONF_append_xilinx-standalone = " \ | ||
7 | --enable-multilib \ | ||
8 | " | ||
9 | |||
3 | # Temporary hack to build gcc cross canadian for tclibc-newlib as --with-sysroot=/not/exist | 10 | # Temporary hack to build gcc cross canadian for tclibc-newlib as --with-sysroot=/not/exist |
4 | # has been removed from TARGET_OS for elf and eabi in gcc-cross-canadian.inc | 11 | # has been removed from TARGET_OS for elf and eabi in gcc-cross-canadian.inc |
5 | 12 | ||
diff --git a/meta-xilinx-standalone/recipes-devtools/gcc/gcc-cross_%.bbappend b/meta-xilinx-standalone/recipes-devtools/gcc/gcc-cross_%.bbappend index 19862cb9..dd810a12 100644 --- a/meta-xilinx-standalone/recipes-devtools/gcc/gcc-cross_%.bbappend +++ b/meta-xilinx-standalone/recipes-devtools/gcc/gcc-cross_%.bbappend | |||
@@ -1 +1,5 @@ | |||
1 | require gcc-xilinx-standalone.inc | 1 | require gcc-xilinx-standalone.inc |
2 | |||
3 | # We want to use the stock multilib configs, when available | ||
4 | EXTRACONFFUNCS_xilinx-standalone = "" | ||
5 | |||
diff --git a/meta-xilinx-standalone/recipes-devtools/gcc/gcc-runtime_%.bbappend b/meta-xilinx-standalone/recipes-devtools/gcc/gcc-runtime_%.bbappend index cc99009c..873f83ea 100644 --- a/meta-xilinx-standalone/recipes-devtools/gcc/gcc-runtime_%.bbappend +++ b/meta-xilinx-standalone/recipes-devtools/gcc/gcc-runtime_%.bbappend | |||
@@ -9,7 +9,6 @@ EXTRA_OECONF_append_xilinx-standalone_class-target = " \ | |||
9 | --enable-plugins \ | 9 | --enable-plugins \ |
10 | --with-gnu-as \ | 10 | --with-gnu-as \ |
11 | --disable-libitm \ | 11 | --disable-libitm \ |
12 | --enable-multilib \ | ||
13 | " | 12 | " |
14 | 13 | ||
15 | EXTRA_OECONF_append_xilinx-standalone_aarch64_class-target = " \ | 14 | EXTRA_OECONF_append_xilinx-standalone_aarch64_class-target = " \ |
@@ -45,28 +44,19 @@ EXTRA_OECONF_append_xilinx-standalone_microblaze_class-target = " \ | |||
45 | 44 | ||
46 | # Changes local to gcc-runtime... | 45 | # Changes local to gcc-runtime... |
47 | 46 | ||
48 | # Due to multilibs, we need to clear the default TUNE_CCARGS on arm | ||
49 | TUNE_CCARGS_xilinx-standalone_arm_class-target = "" | ||
50 | |||
51 | # Configure fails on multilib when using a cache file, this re-sets it to nothing | ||
52 | EXTRA_OECONF_append_xilinx-standalone_class-target = " --cache-file=" | ||
53 | |||
54 | # Dont build libitm, etc. | 47 | # Dont build libitm, etc. |
55 | RUNTIMETARGET_xilinx-standalone_class-target = "libstdc++-v3" | 48 | RUNTIMETARGET_xilinx-standalone_class-target = "libstdc++-v3" |
56 | 49 | ||
57 | # Recursve 5 levels due to the several combinations of multilibs built | 50 | do_install_append_xilinx-standalone_class-target() { |
58 | FILES_libstdc++-staticdev_append_xilinx-standalone_class-target = " \ | 51 | # Fixup what gcc-runtime normally would do, we don't want linux directories! |
59 | ${libdir}/libsupc++.a* \ | 52 | rm -rf ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux |
60 | ${libdir}/libstdc++*.a* \ | ||
61 | ${libdir}/**/libsupc++.a* \ | ||
62 | ${libdir}/**/libstdc++*.a* \ | ||
63 | ${libdir}/**/**/libsupc++.a* \ | ||
64 | ${libdir}/**/**/libstdc++*.a* \ | ||
65 | ${libdir}/**/**/**/libsupc++.a* \ | ||
66 | ${libdir}/**/**/**/libstdc++*.a* \ | ||
67 | ${libdir}/**/**/**/**/libsupc++.a* \ | ||
68 | ${libdir}/**/**/**/**/libstdc++*.a* \ | ||
69 | ${libdir}/**/**/**/**/**/libsupc++.a* \ | ||
70 | ${libdir}/**/**/**/**/**/libstdc++*.a* \ | ||
71 | " | ||
72 | 53 | ||
54 | # The multilibs have different headers, so stop combining them! | ||
55 | if [ "${TARGET_VENDOR_MULTILIB_ORIGINAL}" != "" -a "${TARGET_VENDOR}" != "${TARGET_VENDOR_MULTILIB_ORIGINAL}" ]; then | ||
56 | rm -rf ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-${TARGET_OS} | ||
57 | fi | ||
58 | } | ||
59 | |||
60 | FILES_${PN}-dbg_append_xilinx-standalone_class-target = "\ | ||
61 | ${libdir}/libstdc++.a-gdb.py \ | ||
62 | " | ||
diff --git a/meta-xilinx-standalone/recipes-devtools/gcc/gcc-xilinx-standalone.inc b/meta-xilinx-standalone/recipes-devtools/gcc/gcc-xilinx-standalone.inc index 6e3fca0c..21d30361 100644 --- a/meta-xilinx-standalone/recipes-devtools/gcc/gcc-xilinx-standalone.inc +++ b/meta-xilinx-standalone/recipes-devtools/gcc/gcc-xilinx-standalone.inc | |||
@@ -1,5 +1,4 @@ | |||
1 | # Any changes to this file should be synced with gcc-runtime_%.bbappend | 1 | # Any changes to this file should be synced with gcc-runtime_%.bbappend |
2 | |||
3 | LINKER_HASH_STYLE_xilinx-standalone = "" | 2 | LINKER_HASH_STYLE_xilinx-standalone = "" |
4 | SYMVERS_CONF_xilinx-standalone = "" | 3 | SYMVERS_CONF_xilinx-standalone = "" |
5 | 4 | ||
@@ -10,7 +9,6 @@ EXTRA_OECONF_append_xilinx-standalone = " \ | |||
10 | --enable-plugins \ | 9 | --enable-plugins \ |
11 | --with-gnu-as \ | 10 | --with-gnu-as \ |
12 | --disable-libitm \ | 11 | --disable-libitm \ |
13 | --enable-multilib \ | ||
14 | " | 12 | " |
15 | 13 | ||
16 | EXTRA_OECONF_append_xilinx-standalone_aarch64 = " \ | 14 | EXTRA_OECONF_append_xilinx-standalone_aarch64 = " \ |
diff --git a/meta-xilinx-standalone/recipes-devtools/gcc/libgcc_%.bbappend b/meta-xilinx-standalone/recipes-devtools/gcc/libgcc_%.bbappend new file mode 100644 index 00000000..e6801c2f --- /dev/null +++ b/meta-xilinx-standalone/recipes-devtools/gcc/libgcc_%.bbappend | |||
@@ -0,0 +1,22 @@ | |||
1 | python do_multilib_install_xilinx-standalone_class-target () { | ||
2 | pass | ||
3 | } | ||
4 | |||
5 | standalone_fixup () { | ||
6 | ( | ||
7 | cd ${D}${libdir} | ||
8 | for each in ${TARGET_SYS}/*/* ; do | ||
9 | ln -s $each $(basename $each) | ||
10 | done | ||
11 | ) | ||
12 | } | ||
13 | |||
14 | FIXUP_FUNCTION = "" | ||
15 | FIXUP_FUNCTION_xilinx-standalone_class-target = " standalone_fixup" | ||
16 | |||
17 | do_install[postfuncs] .= "${FIXUP_FUNCTION}" | ||
18 | |||
19 | FILES_${PN}-dev_append_xilinx-standalone_class-target = " \ | ||
20 | ${libdir}/*.a \ | ||
21 | ${libdir}/*.o \ | ||
22 | " | ||