This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: ARM fix for big endian linux-elf targets
> > > + %{mbig-endian:-EB}" \
> >
> > But conditional here?
>
> I have just copied that part from linux-elf.h
In that case I suggest the original is wrong, and you shouldn't be copying it.
> > Also, I don't see any differences between this definition and the one in
> > linux-elf.h
>
> The complete definition is:
>
> #define LINUX_TARGET_LINK_SPEC "%{h*} %{version:-v} \
> %{b} \
> %{static:-Bstatic} \
> %{shared:-shared} \
> %{symbolic:-Bsymbolic} \
> %{rdynamic:-export-dynamic} \
> %{!dynamic-linker:-dynamic-linker " LINUX_TARGET_INTERPRETER "} \
> -X \
> %{mbig-endian:-EB}" \
> SUBTARGET_EXTRA_LINK_SPEC
>
> and SUBTARGET_EXTRA_LINK_SPEC is modified to another value than in
> linux-elf.h:
>
> #define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
> vs.
> #define SUBTARGET_EXTRA_LINK_SPEC " -m armelfb_linux -p"
>
> linux-elf.h is included before linux-elfb.h and thus we have to
> redefine LINUX_TARGET_LINK_SPEC with the new value for
> SUBTARGET_EXTRA_LINK_SPEC.
These are all C proprocessor macros so order of definition is irelevant. What
matters is the values when they are used.
Paul