Andrew Geissler | a9ff2b3 | 2020-10-16 10:11:54 -0500 | [diff] [blame^] | 1 | Microblaze Mulitlib hack |
| 2 | |
| 3 | Based on the patch: |
| 4 | |
| 5 | From c2081c51db589471ea713870c72f13999abda815 Mon Sep 17 00:00:00 2001 |
| 6 | From: Khem Raj <raj.khem@gmail.com> |
| 7 | Date: Fri, 29 Mar 2013 09:10:06 +0400 |
| 8 | Subject: [PATCH 04/36] 64-bit multilib hack. |
| 9 | |
| 10 | GCC has internal multilib handling code but it assumes a very specific rigid directory |
| 11 | layout. The build system implementation of multilib layout is very generic and allows |
| 12 | complete customisation of the library directories. |
| 13 | |
| 14 | This patch is a partial solution to allow any custom directories to be passed into gcc |
| 15 | and handled correctly. It forces gcc to use the base_libdir (which is the current |
| 16 | directory, "."). We need to do this for each multilib that is configured as we don't |
| 17 | know which compiler options may be being passed into the compiler. Since we have a compiler |
| 18 | per mulitlib at this point that isn't an issue. |
| 19 | |
| 20 | The one problem is the target compiler is only going to work for the default multlilib at |
| 21 | this point. Ideally we'd figure out which multilibs were being enabled with which paths |
| 22 | and be able to patch these entries with a complete set of correct paths but this we |
| 23 | don't have such code at this point. This is something the target gcc recipe should do |
| 24 | and override these platform defaults in its build config. |
| 25 | |
| 26 | Do same for riscv64 and aarch64 |
| 27 | |
| 28 | RP 15/8/11 |
| 29 | |
| 30 | Upstream-Status: Inappropriate[OE-Specific] |
| 31 | |
| 32 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 33 | Signed-off-by: Elvis Dowson <elvis.dowson@gmail.com> |
| 34 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> |
| 35 | Signed-off-by: Mark Hatle <mark.hatle@xilinx.com> |
| 36 | |
| 37 | Index: gcc-9.2.0/gcc/config/microblaze/t-microblaze |
| 38 | =================================================================== |
| 39 | --- gcc-9.2.0.orig/gcc/config/microblaze/t-microblaze |
| 40 | +++ gcc-9.2.0/gcc/config/microblaze/t-microblaze |
| 41 | @@ -1,5 +1,6 @@ |
| 42 | MULTILIB_OPTIONS = m64 mxl-barrel-shift mlittle-endian mno-xl-soft-mul mxl-multiply-high |
| 43 | -MULTILIB_DIRNAMES = m64 bs le m mh |
| 44 | +#MULTILIB_DIRNAMES = m64 bs le m mh |
| 45 | +MULTILIB_DIRNAMES = . . . . . |
| 46 | MULTILIB_EXCEPTIONS = *m64/mxl-multiply-high mxl-multiply-high |
| 47 | MULTILIB_EXCEPTIONS += *m64 |
| 48 | MULTILIB_EXCEPTIONS += *m64/mxl-barrel-shift |
| 49 | Index: gcc-9.2.0/gcc/config/microblaze/t-microblaze-linux |
| 50 | =================================================================== |
| 51 | --- gcc-9.2.0.orig/gcc/config/microblaze/t-microblaze-linux |
| 52 | +++ gcc-9.2.0/gcc/config/microblaze/t-microblaze-linux |
| 53 | @@ -1,3 +1,4 @@ |
| 54 | MULTILIB_OPTIONS = mxl-barrel-shift mno-xl-soft-mul mxl-multiply-high |
| 55 | -MULTILIB_DIRNAMES = bs m mh |
| 56 | +#MULTILIB_DIRNAMES = bs m mh |
| 57 | +MULTILIB_DIRNAMES = . . . |
| 58 | MULTILIB_EXCEPTIONS = *mxl-barrel-shift/mxl-multiply-high mxl-multiply-high |