blob: 7057a0576fffe975ebb778c8d1b2008033769f6f [file] [log] [blame]
Andrew Geissler84ad7c52020-06-27 00:00:16 -05001require gcc-configure-xilinx-standalone.inc
2
3COMPATIBLE_HOST = "${HOST_SYS}"
4
5EXTRA_OECONF_append_xilinx-standalone_class-target = " \
6 --disable-libstdcxx-pch \
7 --with-newlib \
8 --disable-threads \
9 --enable-plugins \
10 --with-gnu-as \
11 --disable-libitm \
12"
13
14EXTRA_OECONF_append_xilinx-standalone_aarch64_class-target = " \
15 --disable-multiarch \
16 --with-arch=armv8-a \
17 "
18
19# Both arm and armrm overrides are set w/ cortex r5
20# So only set rmprofile if armrm is defined.
21ARM_PROFILE = "aprofile"
22ARM_PROFILE_armrm = "rmprofile"
23
24EXTRA_OECONF_append_xilinx-standalone_arm_class-target = " \
25 --with-multilib-list=${ARM_PROFILE} \
26 "
27
28EXTRA_OECONF_append_xilinx-standalone_armrm_class-target = " \
29 --disable-tls \
30 --disable-decimal-float \
31 "
32
33EXTRA_OECONF_append_xilinx-standalone_microblaze_class-target = " \
34 --enable-target-optspace \
35 --without-long-double-128 \
36 "
37
38# Changes local to gcc-runtime...
39
40# Dont build libitm, etc.
41RUNTIMETARGET_xilinx-standalone_class-target = "libstdc++-v3"
42
43do_install_append_xilinx-standalone_class-target() {
44 # Fixup what gcc-runtime normally would do, we don't want linux directories!
45 rm -rf ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux
46
47 # The multilibs have different headers, so stop combining them!
48 if [ "${TARGET_VENDOR_MULTILIB_ORIGINAL}" != "" -a "${TARGET_VENDOR}" != "${TARGET_VENDOR_MULTILIB_ORIGINAL}" ]; then
49 rm -rf ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-${TARGET_OS}
50 fi
51
52 # link the C++ header into the place that multilib gcc expects
53 # C++ compiler looks at usr/include/c++/version/canonical-arch/mlib
54 if [ "${TARGET_SYS_MULTILIB_ORIGINAL}" != "" -a "${TARGET_SYS_MULTILIB_ORIGINAL}" != "${TARGET_SYS}" ]; then
55 mlib=${BASE_LIB_tune-${DEFAULTTUNE}}
56 mlib=${mlib##lib/}
57
58 link_name=${D}${includedir}/c++/${BINV}/${TARGET_SYS_MULTILIB_ORIGINAL}/${mlib}
59 target=${D}${includedir}/c++/${BINV}/${TARGET_SYS}
60
61 echo mkdir -p $link_name
62 mkdir -p $link_name
63 for each in bits ext ; do
64 relpath=$(python3 -c "import os.path; print(os.path.relpath('$target/$each', '$(dirname $link_name/$each)'))")
65
66 echo ln -s $relpath $link_name/$each
67 ln -s $relpath $link_name/$each
68 done
69 fi
70}
71
72FILES_${PN}-dbg_append_xilinx-standalone_class-target = "\
73 ${libdir}/libstdc++.a-gdb.py \
74"