[meta-xilinx] [PATCH] gcc-source_5.3: Fix MicroBlaze musl libc support

Nathan Rossi nathan at nathanrossi.com
Fri Jan 15 01:03:04 PST 2016


On Wed, Jan 6, 2016 at 11:21 PM, Nathan Rossi <nathan at nathanrossi.com> wrote:
> Backport the patch from GCC to handle musl libc for MicroBlaze, this
> patch sets up the correct path for ld.

Applied.

Regards,
Nathan

>
> Signed-off-by: Nathan Rossi <nathan at nathanrossi.com>
> ---
>  .../gcc/files/microblaze-musl-support.patch        | 44 ++++++++++++++++++++++
>  recipes-microblaze/gcc/gcc-source_5.3.bbappend     |  1 +
>  2 files changed, 45 insertions(+)
>  create mode 100644 recipes-microblaze/gcc/files/microblaze-musl-support.patch
>
> diff --git a/recipes-microblaze/gcc/files/microblaze-musl-support.patch b/recipes-microblaze/gcc/files/microblaze-musl-support.patch
> new file mode 100644
> index 0000000..08370c1
> --- /dev/null
> +++ b/recipes-microblaze/gcc/files/microblaze-musl-support.patch
> @@ -0,0 +1,44 @@
> +From: nsz <nsz at 138bc75d-0d04-0410-961f-82ee72b054a4>
> +Date: Thu, 15 Oct 2015 19:12:15 +0000
> +Subject: [PATCH] microblaze musl support
> +
> +       * config/microblaze/linux.h (MUSL_DYNAMIC_LINKER): Define.
> +       (DYNAMIC_LINKER): Renamed to ...
> +       (GLIBC_DYNAMIC_LINKER): This.
> +       (SUBTARGET_EXTRA_SPECS): Use GNU_USER_DYNAMIC_LINKER.
> +
> +Upstream-Status: Backport
> +---
> + gcc/config/microblaze/linux.h | 14 ++++++++++++--
> + 1 file changed, 12 insertions(+), 2 deletions(-)
> +
> +diff --git a/gcc/config/microblaze/linux.h b/gcc/config/microblaze/linux.h
> +index 655a70f..a8a3f3e 100644
> +--- a/gcc/config/microblaze/linux.h
> ++++ b/gcc/config/microblaze/linux.h
> +@@ -28,10 +28,20 @@
> + #undef TLS_NEEDS_GOT
> + #define TLS_NEEDS_GOT 1
> +
> +-#define DYNAMIC_LINKER "/lib/ld.so.1"
> ++#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
> ++
> ++#if TARGET_BIG_ENDIAN_DEFAULT == 0 /* LE */
> ++#define MUSL_DYNAMIC_LINKER_E "%{mbig-endian:;:el}"
> ++#else
> ++#define MUSL_DYNAMIC_LINKER_E "%{mlittle-endian:el}"
> ++#endif
> ++
> ++#undef MUSL_DYNAMIC_LINKER
> ++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-microblaze" MUSL_DYNAMIC_LINKER_E ".so.1"
> ++
> + #undef  SUBTARGET_EXTRA_SPECS
> + #define SUBTARGET_EXTRA_SPECS \
> +-  { "dynamic_linker", DYNAMIC_LINKER }
> ++  { "dynamic_linker", GNU_USER_DYNAMIC_LINKER }
> +
> + #undef LINK_SPEC
> + #define LINK_SPEC "%{shared:-shared} \
> +--
> +2.6.4
> +
> diff --git a/recipes-microblaze/gcc/gcc-source_5.3.bbappend b/recipes-microblaze/gcc/gcc-source_5.3.bbappend
> index 50075f0..63681d1 100644
> --- a/recipes-microblaze/gcc/gcc-source_5.3.bbappend
> +++ b/recipes-microblaze/gcc/gcc-source_5.3.bbappend
> @@ -3,5 +3,6 @@
>  FILESEXTRAPATHS_append := "${THISDIR}/files:"
>  SRC_URI_append = " \
>                 file://microblaze.md-Improve-adddi3-and-subdi3-insn-definit.patch \
> +               file://microblaze-musl-support.patch \
>                 "
>
> --
> 2.6.4
>



More information about the meta-xilinx mailing list