This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] ARM: Use different linker path for hardfloat ABI
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: dann frazier <dann dot frazier at canonical dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, "cross-distro at lists dot linaro dot org" <cross-distro at lists dot linaro dot org>
- Date: Fri, 30 Mar 2012 18:52:34 +0100
- Subject: Re: [PATCH] ARM: Use different linker path for hardfloat ABI
- References: <20120329193401.GA14860@dannf.org>
On 29/03/12 20:34, dann frazier wrote:
> This is an updated version of a patch Debian and Ubuntu are using to
> use an alternate linker path for hardfloat binaries. The difference
> with this one is that it covers the case where no float flag
> was passed in, defaulting to the softfloat path.
>
> 2012-03-29 dann frazier <dann.frazier@canonical.com>
>
> * config/arm/linux-elf.h: Use alternate linker path
> for hardfloat ABI
>
> Index: gcc/config/arm/linux-elf.h
> ===================================================================
> --- gcc/config/arm/linux-elf.h (revision 185708)
> +++ gcc/config/arm/linux-elf.h (working copy)
> @@ -59,14 +59,21 @@
>
> #define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc"
>
> -#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
> +#define LINUX_DYNAMIC_LINKER_SF "/lib/ld-linux.so.3"
> +#define LINUX_DYNAMIC_LINKER_HF "/lib/arm-linux-gnueabihf/ld-linux.so.3"
>
> #define LINUX_TARGET_LINK_SPEC "%{h*} \
> %{static:-Bstatic} \
> %{shared:-shared} \
> %{symbolic:-Bsymbolic} \
> %{rdynamic:-export-dynamic} \
> - -dynamic-linker " GNU_USER_DYNAMIC_LINKER " \
> + %{msoft-float:-dynamic-linker " LINUX_DYNAMIC_LINKER_SF "} \
> + %{mfloat-abi=soft*:-dynamic-linker " LINUX_DYNAMIC_LINKER_SF "} \
> + %{mhard-float:-dynamic-linker " LINUX_DYNAMIC_LINKER_HF "} \
> + %{mfloat-abi=hard:-dynamic-linker " LINUX_DYNAMIC_LINKER_HF "} \
> + %{!mfloat-abi: \
> + %{!msoft-float: \
> + %{!mhard-float:-dynamic-linker " LINUX_DYNAMIC_LINKER_SF "}}} \
> -X \
> %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
> SUBTARGET_EXTRA_LINK_SPEC
>
Looks to me as though this will break the old Linux ABI. While we've
marked that as deprecated, it hasn't been removed as yet. So I think
this patch either needs to wait until that removal has taken place, or
provide the relevant updates to maintain the old ABI support.
R.