summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@amd.com>2023-02-23 13:58:23 -0800
committerMark Hatle <mark.hatle@amd.com>2023-04-10 09:03:22 -0700
commit7c3878fa4563342be8f4989e8059c630fa102963 (patch)
tree18c3b19b26291f3cefecf7d3733538877eccff8c
parent5471eb8ec8123938efbb4f149b9a4ff7a5e2fa96 (diff)
downloadmeta-xilinx-7c3878fa4563342be8f4989e8059c630fa102963.tar.gz
gcc: Remove multilib standalones configs
Standalone multilibs are only needed when building a PetaLinux specific toolchain. So remove this from the general bbappends. Signed-off-by: Mark Hatle <mark.hatle@amd.com>
-rw-r--r--meta-xilinx-standalone/recipes-devtools/gcc/gcc-12/additional-microblaze-multilibs.patch86
-rw-r--r--meta-xilinx-standalone/recipes-devtools/gcc/gcc-cross-canadian_%.bbappend7
-rw-r--r--meta-xilinx-standalone/recipes-devtools/gcc/gcc-cross_%.bbappend4
-rw-r--r--meta-xilinx-standalone/recipes-devtools/gcc/gcc-runtime_%.bbappend34
-rw-r--r--meta-xilinx-standalone/recipes-devtools/gcc/gcc-source_12.%.bbappend14
-rw-r--r--meta-xilinx-standalone/recipes-devtools/gcc/gcc-xilinx-standalone.inc9
-rwxr-xr-xmeta-xilinx-standalone/recipes-devtools/gcc/mb-convert-head.sh16
-rwxr-xr-xmeta-xilinx-standalone/recipes-devtools/gcc/mb-convert.sh60
8 files changed, 0 insertions, 230 deletions
diff --git a/meta-xilinx-standalone/recipes-devtools/gcc/gcc-12/additional-microblaze-multilibs.patch b/meta-xilinx-standalone/recipes-devtools/gcc/gcc-12/additional-microblaze-multilibs.patch
deleted file mode 100644
index 3d520d0f..00000000
--- a/meta-xilinx-standalone/recipes-devtools/gcc/gcc-12/additional-microblaze-multilibs.patch
+++ /dev/null
@@ -1,86 +0,0 @@
1Change the multilib settings to match the expectations of Vitis and related.
2
3The multilib list is as follows:
4
5.;
6le;@mlittle-endian
7bs;@mxl-barrel-shift
8p;@mxl-pattern-compare
9m;@mno-xl-soft-mul
10fpd;@mhard-float
11m/fpd;@mno-xl-soft-mul@mhard-float
12p/m;@mxl-pattern-compare@mno-xl-soft-mul
13p/fpd;@mxl-pattern-compare@mhard-float
14p/m/fpd;@mxl-pattern-compare@mno-xl-soft-mul@mhard-float
15bs/p;@mxl-barrel-shift@mxl-pattern-compare
16bs/m;@mxl-barrel-shift@mno-xl-soft-mul
17bs/fpd;@mxl-barrel-shift@mhard-float
18bs/m/fpd;@mxl-barrel-shift@mno-xl-soft-mul@mhard-float
19bs/p/m;@mxl-barrel-shift@mxl-pattern-compare@mno-xl-soft-mul
20bs/p/fpd;@mxl-barrel-shift@mxl-pattern-compare@mhard-float
21bs/p/m/fpd;@mxl-barrel-shift@mxl-pattern-compare@mno-xl-soft-mul@mhard-float
22le/m64;@mlittle-endian@m64
23le/bs;@mlittle-endian@mxl-barrel-shift
24le/p;@mlittle-endian@mxl-pattern-compare
25le/m;@mlittle-endian@mno-xl-soft-mul
26le/fpd;@mlittle-endian@mhard-float
27le/m/fpd;@mlittle-endian@mno-xl-soft-mul@mhard-float
28le/p/m;@mlittle-endian@mxl-pattern-compare@mno-xl-soft-mul
29le/p/fpd;@mlittle-endian@mxl-pattern-compare@mhard-float
30le/p/m/fpd;@mlittle-endian@mxl-pattern-compare@mno-xl-soft-mul@mhard-float
31le/bs/p;@mlittle-endian@mxl-barrel-shift@mxl-pattern-compare
32le/bs/m;@mlittle-endian@mxl-barrel-shift@mno-xl-soft-mul
33le/bs/fpd;@mlittle-endian@mxl-barrel-shift@mhard-float
34le/bs/m/fpd;@mlittle-endian@mxl-barrel-shift@mno-xl-soft-mul@mhard-float
35le/bs/p/m;@mlittle-endian@mxl-barrel-shift@mxl-pattern-compare@mno-xl-soft-mul
36le/bs/p/fpd;@mlittle-endian@mxl-barrel-shift@mxl-pattern-compare@mhard-float
37le/bs/p/m/fpd;@mlittle-endian@mxl-barrel-shift@mxl-pattern-compare@mno-xl-soft-mul@mhard-float
38le/m64/bs;@mlittle-endian@m64@mxl-barrel-shift
39le/m64/p;@mlittle-endian@m64@mxl-pattern-compare
40le/m64/m;@mlittle-endian@m64@mno-xl-soft-mul
41le/m64/fpd;@mlittle-endian@m64@mhard-float
42le/m64/m/fpd;@mlittle-endian@m64@mno-xl-soft-mul@mhard-float
43le/m64/p/m;@mlittle-endian@m64@mxl-pattern-compare@mno-xl-soft-mul
44le/m64/p/fpd;@mlittle-endian@m64@mxl-pattern-compare@mhard-float
45le/m64/p/m/fpd;@mlittle-endian@m64@mxl-pattern-compare@mno-xl-soft-mul@mhard-float
46le/m64/bs/p;@mlittle-endian@m64@mxl-barrel-shift@mxl-pattern-compare
47le/m64/bs/m;@mlittle-endian@m64@mxl-barrel-shift@mno-xl-soft-mul
48le/m64/bs/fpd;@mlittle-endian@m64@mxl-barrel-shift@mhard-float
49le/m64/bs/m/fpd;@mlittle-endian@m64@mxl-barrel-shift@mno-xl-soft-mul@mhard-float
50le/m64/bs/p/m;@mlittle-endian@m64@mxl-barrel-shift@mxl-pattern-compare@mno-xl-soft-mul
51le/m64/bs/p/fpd;@mlittle-endian@m64@mxl-barrel-shift@mxl-pattern-compare@mhard-float
52le/m64/bs/p/m/fpd;@mlittle-endian@m64@mxl-barrel-shift@mxl-pattern-compare@mno-xl-soft-mul@mhard-float
53
54As part of this the order of the multilibs was changes from upstream to make
55it easier to avoid big-endian m64, which is not supported by the toolchain.
56
57Signed-off-by: Mark Hatle <mark.hatle@xilinx.com>
58
59Index: gcc-9.2.0/gcc/config/microblaze/t-microblaze
60===================================================================
61--- gcc-9.2.0.orig/gcc/config/microblaze/t-microblaze
62+++ gcc-9.2.0/gcc/config/microblaze/t-microblaze
63@@ -1,17 +1,11 @@
64-MULTILIB_OPTIONS = m64 mxl-barrel-shift mlittle-endian mno-xl-soft-mul mxl-multiply-high
65-#MULTILIB_DIRNAMES = m64 bs le m mh
66-MULTILIB_DIRNAMES = . . . . .
67-MULTILIB_EXCEPTIONS = *m64/mxl-multiply-high mxl-multiply-high
68-MULTILIB_EXCEPTIONS += *m64
69-MULTILIB_EXCEPTIONS += *m64/mxl-barrel-shift
70-MULTILIB_EXCEPTIONS += *m64/mno-xl-soft-mul
71-MULTILIB_EXCEPTIONS += *m64/mxl-barrel-shift/mno-xl-soft-mul
72-MULTILIB_EXCEPTIONS += *m64/mno-xl-soft-mul
73-MULTILIB_EXCEPTIONS += *m64/mxl-barrel-shift/mno-xl-soft-mul/mxl-multiply-high
74-MULTILIB_EXCEPTIONS += *m64/mno-xl-soft-mul/mxl-multiply-high
75+MULTILIB_OPTIONS = mlittle-endian m64 mxl-barrel-shift mxl-pattern-compare mno-xl-soft-mul mhard-float
76+MULTILIB_DIRNAMES = le m64 bs p m fpd
77+MULTILIB_EXCEPTIONS = mxl-multiply-high
78 MULTILIB_EXCEPTIONS += *mxl-barrel-shift/mxl-multiply-high mxl-multiply-high
79 MULTILIB_EXCEPTIONS += *mlittle-endian/mxl-multiply-high mxl-multiply-high
80-MULTILIB_EXCEPTIONS += *m64/mxl-barrel-shift/mlittle-endian/mxl-multiply-high
81+MULTILIB_EXCEPTIONS += *mxl-pattern-compare*/*mxl-multiply-high*
82+# Big endian m64 is not supported
83+MULTILIB_EXCEPTIONS += m64*
84
85 # Extra files
86 microblaze-c.o: $(srcdir)/config/microblaze/microblaze-c.c \
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 b4fffe6a..449db177 100644
--- a/meta-xilinx-standalone/recipes-devtools/gcc/gcc-cross-canadian_%.bbappend
+++ b/meta-xilinx-standalone/recipes-devtools/gcc/gcc-cross-canadian_%.bbappend
@@ -1,13 +1,6 @@
1require gcc-configure-xilinx-standalone.inc 1require gcc-configure-xilinx-standalone.inc
2require gcc-xilinx-standalone.inc 2require gcc-xilinx-standalone.inc
3 3
4# We want to use the stock multilib configs, when available
5EXTRACONFFUNCS:xilinx-standalone = ""
6
7EXTRA_OECONF:append:xilinx-standalone = " \
8 --enable-multilib \
9"
10
11# Temporary hack to build gcc cross canadian for tclibc-newlib as --with-sysroot=/not/exist 4# Temporary hack to build gcc cross canadian for tclibc-newlib as --with-sysroot=/not/exist
12# has been removed from TARGET_OS for elf and eabi in gcc-cross-canadian.inc 5# has been removed from TARGET_OS for elf and eabi in gcc-cross-canadian.inc
13 6
diff --git a/meta-xilinx-standalone/recipes-devtools/gcc/gcc-cross_%.bbappend b/meta-xilinx-standalone/recipes-devtools/gcc/gcc-cross_%.bbappend
index 43d6be73..69782d71 100644
--- a/meta-xilinx-standalone/recipes-devtools/gcc/gcc-cross_%.bbappend
+++ b/meta-xilinx-standalone/recipes-devtools/gcc/gcc-cross_%.bbappend
@@ -1,6 +1,2 @@
1require gcc-configure-xilinx-standalone.inc 1require gcc-configure-xilinx-standalone.inc
2require gcc-xilinx-standalone.inc 2require gcc-xilinx-standalone.inc
3
4# We want to use the stock multilib configs, when available
5EXTRACONFFUNCS:xilinx-standalone = ""
6
diff --git a/meta-xilinx-standalone/recipes-devtools/gcc/gcc-runtime_%.bbappend b/meta-xilinx-standalone/recipes-devtools/gcc/gcc-runtime_%.bbappend
index cbf43008..3a7d1395 100644
--- a/meta-xilinx-standalone/recipes-devtools/gcc/gcc-runtime_%.bbappend
+++ b/meta-xilinx-standalone/recipes-devtools/gcc/gcc-runtime_%.bbappend
@@ -16,16 +16,6 @@ EXTRA_OECONF:append:xilinx-standalone:aarch64:class-target = " \
16 --with-arch=armv8-a \ 16 --with-arch=armv8-a \
17 " 17 "
18 18
19# Both arm and armv7r/armv8r overrides are set w/ cortex r5
20# So only set rmprofile if armv*r is defined.
21ARM_PROFILE = "aprofile"
22ARM_PROFILE:armv7r = "rmprofile"
23ARM_PROFILE:armv8r = "rmprofile"
24
25EXTRA_OECONF:append:xilinx-standalone:arm:class-target = " \
26 --with-multilib-list=${ARM_PROFILE} \
27 "
28
29EXTRA_OECONF:append:xilinx-standalone:armv7r:class-target = " \ 19EXTRA_OECONF:append:xilinx-standalone:armv7r:class-target = " \
30 --disable-tls \ 20 --disable-tls \
31 --disable-decimal-float \ 21 --disable-decimal-float \
@@ -48,30 +38,6 @@ RUNTIMETARGET:xilinx-standalone:class-target = "libstdc++-v3"
48do_install:append:xilinx-standalone:class-target() { 38do_install:append:xilinx-standalone:class-target() {
49 # Fixup what gcc-runtime normally would do, we don't want linux directories! 39 # Fixup what gcc-runtime normally would do, we don't want linux directories!
50 rm -rf ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux 40 rm -rf ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux
51
52 # The multilibs have different headers, so stop combining them!
53 if [ "${TARGET_VENDOR_MULTILIB_ORIGINAL}" != "" -a "${TARGET_VENDOR}" != "${TARGET_VENDOR_MULTILIB_ORIGINAL}" ]; then
54 rm -rf ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-${TARGET_OS}
55 fi
56
57 # link the C++ header into the place that multilib gcc expects
58 # C++ compiler looks at usr/include/c++/version/canonical-arch/mlib
59 if [ "${TARGET_SYS_MULTILIB_ORIGINAL}" != "" -a "${TARGET_SYS_MULTILIB_ORIGINAL}" != "${TARGET_SYS}" ]; then
60 mlib=${BASE_LIB:tune-${DEFAULTTUNE}}
61 mlib=${mlib##lib/}
62
63 link_name=${D}${includedir}/c++/${BINV}/${TARGET_SYS_MULTILIB_ORIGINAL}/${mlib}
64 target=${D}${includedir}/c++/${BINV}/${TARGET_SYS}
65
66 echo mkdir -p $link_name
67 mkdir -p $link_name
68 for each in bits ext ; do
69 relpath=$(python3 -c "import os.path; print(os.path.relpath('$target/$each', '$(dirname $link_name/$each)'))")
70
71 echo ln -s $relpath $link_name/$each
72 ln -s $relpath $link_name/$each
73 done
74 fi
75} 41}
76 42
77FILES:${PN}-dbg:append:xilinx-standalone:class-target = "\ 43FILES:${PN}-dbg:append:xilinx-standalone:class-target = "\
diff --git a/meta-xilinx-standalone/recipes-devtools/gcc/gcc-source_12.%.bbappend b/meta-xilinx-standalone/recipes-devtools/gcc/gcc-source_12.%.bbappend
index c0ccc3c3..0d824324 100644
--- a/meta-xilinx-standalone/recipes-devtools/gcc/gcc-source_12.%.bbappend
+++ b/meta-xilinx-standalone/recipes-devtools/gcc/gcc-source_12.%.bbappend
@@ -1,15 +1 @@
1COMPATIBLE_HOST = "${HOST_SYS}" COMPATIBLE_HOST = "${HOST_SYS}"
2
3# Add MicroBlaze Patches (only when using MicroBlaze)
4FILESEXTRAPATHS:append:microblaze:xilinx-standalone := ":${THISDIR}/gcc-12"
5SRC_URI:append:microblaze:xilinx-standalone = " \
6 file://additional-microblaze-multilibs.patch \
7"
8
9CHECK_FOR_MICROBLAZE:microblaze = "1"
10
11python() {
12 if d.getVar('CHECK_FOR_MICROBLAZE') == '1':
13 if 'xilinx-microblaze' not in d.getVar('BBFILE_COLLECTIONS').split():
14 bb.fatal('You must include the meta-microblaze layer to build for this configuration.')
15}
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 ca14529c..2faf7a4b 100644
--- a/meta-xilinx-standalone/recipes-devtools/gcc/gcc-xilinx-standalone.inc
+++ b/meta-xilinx-standalone/recipes-devtools/gcc/gcc-xilinx-standalone.inc
@@ -12,15 +12,6 @@ EXTRA_OECONF:append:xilinx-standalone:aarch64 = " \
12 --with-arch=armv8-a \ 12 --with-arch=armv8-a \
13 " 13 "
14 14
15# Both arm and armv*r overrides are set w/ cortex r5
16# So only set rmprofile if armv*r is defined.
17ARM_PROFILE = "aprofile"
18ARM_PROFILE:armv7r = "rmprofile"
19ARM_PROFILE:armv8r = "rmprofile"
20EXTRA_OECONF:append:xilinx-standalone:arm = " \
21 --with-multilib-list=${ARM_PROFILE} \
22 "
23
24EXTRA_OECONF:append:xilinx-standalone:armv7r = " \ 15EXTRA_OECONF:append:xilinx-standalone:armv7r = " \
25 --disable-tls \ 16 --disable-tls \
26 --disable-decimal-float \ 17 --disable-decimal-float \
diff --git a/meta-xilinx-standalone/recipes-devtools/gcc/mb-convert-head.sh b/meta-xilinx-standalone/recipes-devtools/gcc/mb-convert-head.sh
deleted file mode 100755
index b59dff1e..00000000
--- a/meta-xilinx-standalone/recipes-devtools/gcc/mb-convert-head.sh
+++ /dev/null
@@ -1,16 +0,0 @@
1#! /bin/bash
2
3# Call using:
4#../microblaze/sysroots/x86_64-oesdk-linux/usr/bin/microblaze-xilinx-elf/microblaze-xilinx-elf-gcc -print-multi-lib | mb-convert-head.sh
5
6# Then copy the output into the special microblaze-tc BSP
7
8sed -e 's,;, ,' |
9 while read mlib args ; do
10 if [ $mlib = '.' ]; then
11 continue
12 fi
13 multilib="libmb$(echo $mlib | sed -e 's,/,,g')"
14
15 echo 'MULTILIBS += "multilib:'${multilib}'"'
16 done
diff --git a/meta-xilinx-standalone/recipes-devtools/gcc/mb-convert.sh b/meta-xilinx-standalone/recipes-devtools/gcc/mb-convert.sh
deleted file mode 100755
index ab689444..00000000
--- a/meta-xilinx-standalone/recipes-devtools/gcc/mb-convert.sh
+++ /dev/null
@@ -1,60 +0,0 @@
1#! /bin/bash
2
3# Call using:
4#../microblaze/sysroots/x86_64-oesdk-linux/usr/bin/microblaze-xilinx-elf/microblaze-xilinx-elf-gcc -print-multi-lib | mb-convert.sh
5
6# Then copy the output into the special microblaze-tc BSP
7
8mlib_to_feature() {
9 feature_base="microblaze"
10 feature_endian=" bigendian"
11 feature_barrel=""
12 feature_pattern=""
13 feature_multiply=""
14 feature_multiplyhigh=""
15 feature_sixtyfour=""
16 feature_math=""
17 while read feature ; do
18 case $feature in
19 le) feature_endian="";;
20 bs) feature_barrel=" barrel-shift";;
21 p) feature_pattern=" pattern-compare";;
22 m) if [ -z ${feature_multiplyhigh} ]; then feature_multiply=" multiply-low" ; fi ;;
23 mh) feature_multiply="" ; feature_multiplyhigh=" multiply-high";;
24 m64) feature_sixtyfour=" 64-bit";;
25 fpd) feature_math=" fpu-hard";;
26 *) echo "UNKNOWN $feature";;
27 esac
28 done
29 echo "${feature_base}${feature_sixtyfour}${feature_endian}${feature_barrel}${feature_pattern}${feature_multiply}${feature_multiplyhigh}${feature_math}"
30}
31
32sed -e 's,;, ,' |
33 while read mlib args ; do
34 if [ $mlib = '.' ]; then
35 echo '# Base configuration'
36 echo '# CFLAGS:'
37 echo 'DEFAULTTUNE = "microblaze"'
38 echo
39 echo 'AVAILTUNES += "microblaze"'
40 echo 'BASE_LIB:tune-microblaze = "lib"'
41 echo 'TUNE_FEATURES:tune-microblaze = "microblaze bigendian"'
42 echo 'PACKAGE_EXTRA_ARCHS:tune-microblaze = "${TUNE_PKGARCH}"'
43 continue
44 fi
45
46 cflags=$(echo $args | sed -e 's,@, -,g')
47 multilib="libmb$(echo $mlib | sed -e 's,/,,g')"
48 tune="microblaze$(echo $mlib | sed -e 's,m64,64,' -e 's,/,,g')"
49 features=$(echo $mlib | sed -e 's,/, ,g' | xargs -n 1 echo | mlib_to_feature)
50 echo
51 echo
52 echo "# $mlib"
53 echo "# CFLAGS:${cflags}"
54 echo "DEFAULTTUNE:virtclass-multilib-$multilib = \"$tune\""
55 echo
56 echo "AVAILTUNES += \"$tune\""
57 echo "BASE_LIB:tune-$tune = \"lib/$mlib\""
58 echo "TUNE_FEATURES:tune-$tune = \"${features}\""
59 echo "PACKAGE_EXTRA_ARCHS:tune-$tune = \"\${TUNE_PKGARCH}\""
60 done