* [Buildroot] 'ld' gives "unrecognised emulation mode" during make; gcc-3.4.3
@ 2006-11-01 14:14 MikeW
2006-11-02 12:09 ` [Buildroot] 'ld' gives "unrecognised emulation mode" - ARM toolchain unbuildable ?? MikeW
2006-11-02 18:01 ` [Buildroot] 'ld' gives MikeW
0 siblings, 2 replies; 9+ messages in thread
From: MikeW @ 2006-11-01 14:14 UTC (permalink / raw)
To: buildroot
Am using buildroot-20061031 to build arm926t system,
Toolchain options gcc-3.4.3 (-final), ARM, EABI, binutils-2.16.91.0.7
and have set the GNU target suffix to linux-uclibcgnueabi.
[Host system gcc-3.4.6 20060404]
During building libgcc, I get the message
->>
/home/fred/buildroot/build_arm_nofpu/staging_dir/
arm-linux-uclibcgnueabi/b in/ld: unrecognised emulation mode: armelf_linux
Supported emulations: armelf_linux_eabi
collect2: ld returned 1 exit status
make[3]: *** [libgcc/./_udivsi3.oS] Error 1
-<<
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] 'ld' gives "unrecognised emulation mode" - ARM toolchain unbuildable ??
2006-11-01 14:14 [Buildroot] 'ld' gives "unrecognised emulation mode" during make; gcc-3.4.3 MikeW
@ 2006-11-02 12:09 ` MikeW
2006-11-02 18:01 ` [Buildroot] 'ld' gives MikeW
1 sibling, 0 replies; 9+ messages in thread
From: MikeW @ 2006-11-02 12:09 UTC (permalink / raw)
To: buildroot
MikeW <mw_phil@...> writes:
>
> Am using buildroot-20061031 to build arm926t system,
> Toolchain options gcc-3.4.3 (-final), ARM, EABI, binutils-2.16.91.0.7
> and have set the GNU target suffix to linux-uclibcgnueabi.
> [Host system gcc-3.4.6 20060404]
>
> During building libgcc, I get the message
> ->>
> /home/fred/buildroot/build_arm_nofpu/staging_dir/
> arm-linux-uclibcgnueabi/b in/ld: unrecognised emulation mode:
armelf_linux
> Supported emulations: armelf_linux_eabi
> collect2: ld returned 1 exit status
> make[3]: *** [libgcc/./_udivsi3.oS] Error 1
> -<<
>
> From Google, I note that this type of problem is not infrequent
(for other
> target types), but the usual reponse is 'get the latest version'
which seems a bit of
> a cop-out, plus I am currently required to use 3.4.3 so
this does not apply.
>
> a) any ideas to defeat this problem (not involving 3.4.x, x>3 !)
> b) if it's frequent, how come it's not been resolved once & for all
>
> Thanks,
> MikeW
>
This seems to be due to an incompatibility between:
1) toolchain.../gcc-x.x.x/config/arm/linux-elf.h
2) toolchain.../binutils-x.x.x/ld/earmelf_linux_eabi.c
In 1) there is a setting TARGET_LINKER_EMULATION "armelf_linux"
In 2) there is a string (part of a struct initialiser) "armelf_linux_eabi"
so unless I can find matching strings in a version of gcc and ld,
buildroot will never be able to build a toolchain.
But 2) says the file is generated by a shell script, so maybe it's
that script which is to blame !
Or maybe I could just hack 1) to have the correct string.
But that raises the question - how does anyone build an ARM toolchain,
with this incompatibility in place ?
Regards,
MikeW
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] 'ld' gives
2006-11-01 14:14 [Buildroot] 'ld' gives "unrecognised emulation mode" during make; gcc-3.4.3 MikeW
2006-11-02 12:09 ` [Buildroot] 'ld' gives "unrecognised emulation mode" - ARM toolchain unbuildable ?? MikeW
@ 2006-11-02 18:01 ` MikeW
2006-11-21 19:19 ` [Buildroot] 'ld' gives "unrecognised emulation mode" - ARM toolchain unbuildable ?? MikeW
1 sibling, 1 reply; 9+ messages in thread
From: MikeW @ 2006-11-02 18:01 UTC (permalink / raw)
To: buildroot
MikeW <mw_phil@...> writes:
> During building libgcc, I get the message
> ->>
> /home/fred/buildroot/build_arm_nofpu/staging_dir/
> arm-linux-uclibcgnueabi/b in/ld: unrecognised emulation mode: armelf_linux
> Supported emulations: armelf_linux_eabi
> collect2: ld returned 1 exit status
> make[3]: *** [libgcc/./_udivsi3.oS] Error 1
> -<<
Fixed by setting GNU target suffix to 'elf-linux' instead.
Regards,
MikeW
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] 'ld' gives "unrecognised emulation mode" - ARM toolchain unbuildable ??
2006-11-02 18:01 ` [Buildroot] 'ld' gives MikeW
@ 2006-11-21 19:19 ` MikeW
2006-11-21 20:08 ` Michael K. Edwards
0 siblings, 1 reply; 9+ messages in thread
From: MikeW @ 2006-11-21 19:19 UTC (permalink / raw)
To: buildroot
MikeW <mw_phil@...> writes:
>
> MikeW <mw_phil <at> ...> writes:
>
> > During building libgcc, I get the message
> > ->>
> > /home/fred/buildroot/build_arm_nofpu/staging_dir/
> > arm-linux-uclibcgnueabi/b in/ld: unrecognised emulation mode: armelf_linux
> > Supported emulations: armelf_linux_eabi
> > collect2: ld returned 1 exit status
> > make[3]: *** [libgcc/./_udivsi3.oS] Error 1
> > -<<
>
> Fixed by setting GNU target suffix to 'elf-linux' instead.
>
> Regards,
> MikeW
>
Except that objects created by the toolchain have EABI version = 0 !!
I need EABI version = 4 for compatibility :(
So that suggests that I need a target suffix containing '-eabi'.
Any ideas ?
I mean, where is this stuff documented - I've trawled through gcc docs
and not found anything that explains these problems.
I'm presumably not the only person to encounter this issue !
Mike
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] 'ld' gives "unrecognised emulation mode" - ARM toolchain unbuildable ??
2006-11-21 19:19 ` [Buildroot] 'ld' gives "unrecognised emulation mode" - ARM toolchain unbuildable ?? MikeW
@ 2006-11-21 20:08 ` Michael K. Edwards
2006-11-22 9:34 ` MikeW
0 siblings, 1 reply; 9+ messages in thread
From: Michael K. Edwards @ 2006-11-21 20:08 UTC (permalink / raw)
To: buildroot
You probably want to stick to armelf(b)-linux-eabi, since that's
clearly the right thing in later toolchains. EABI on ARM seems to be
better supported in an up-to-date toolchain combination consisting of
gcc 4.1.1, binutils 2.17.50.0.6, and headers from glibc 2.5 and kernel
2.6.16 or later. I used crosstool to build a glibc toolchain first,
and am currently grinding through compiling a full glibc/NPTL
userspace with ptxdist, cleaning up all the non-uClibc-specific
issues. Once I have the kinks worked out of that, I'll be trying a
uClibc version; I'll keep the list posted.
As of gcc 4.1.1, it seems that one still needs this patch to fix up
some include issues:
http://www.kegel.com/crosstool/crosstool-0.42/contrib/2006/crosstool-0.38-add-gcc-4.1-20060210.diff
Also, if your target is big-endian, you need the one-line patch below
so that big-endian is really big-endian.
Cheers,
- Michael
--- gcc-4.1.0/gcc/config/arm/linux-eabi.h 2005-11-15
06:32:13.000000000 -0800
+++ gcc-4.1.0-patched/gcc/config/arm/linux-eabi.h 2006-04-26
22:13:14.000000000 -0700
@@ -48,7 +48,8 @@
#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
#undef SUBTARGET_EXTRA_LINK_SPEC
-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux_eabi"
+#define SUBTARGET_EXTRA_LINK_SPEC \
+ " %{mbig-endian:-m armelfb_linux_eabi} %{mlittle-endian:-m
armelf_linux_eabi} "
/* Use ld-linux.so.3 so that it will be possible to run "classic"
GNU/Linux binaries on an EABI system. */
^ permalink raw reply [flat|nested] 9+ messages in thread* [Buildroot] 'ld' gives "unrecognised emulation mode" - ARM toolchain unbuildable ??
2006-11-21 20:08 ` Michael K. Edwards
@ 2006-11-22 9:34 ` MikeW
2006-11-22 17:08 ` Michael K. Edwards
0 siblings, 1 reply; 9+ messages in thread
From: MikeW @ 2006-11-22 9:34 UTC (permalink / raw)
To: buildroot
Michael K. Edwards <medwards.linux@...> writes:
>
> You probably want to stick to armelf(b)-linux-eabi, since that's
> clearly the right thing in later toolchains. EABI on ARM seems to be
> better supported in an up-to-date toolchain combination consisting of
> gcc 4.1.1, binutils 2.17.50.0.6, and headers from glibc 2.5 and kernel
> 2.6.16 or later. I used crosstool to build a glibc toolchain first,
> and am currently grinding through compiling a full glibc/NPTL
> userspace with ptxdist, cleaning up all the non-uClibc-specific
> issues. Once I have the kinks worked out of that, I'll be trying a
> uClibc version; I'll keep the list posted.
>
> As of gcc 4.1.1, it seems that one still needs this patch to fix up
> some include issues:
>
http://www.kegel.com/crosstool/crosstool-0.42/contrib/2006/crosstool-0.38-add-gcc-4.1-20060210.diff
>
> Also, if your target is big-endian, you need the one-line patch below
> so that big-endian is really big-endian.
>
> Cheers,
> - Michael
Many thanks - but I am unable to configure Buildroot to give an EABI
compatible (version != 0) toolchain.
I have now tried also using the most recent GCC and Binutils in the
Buildroot menuconfig options, this using buildroot-20061031.
What is the required 'GNU target suffix' or other setting to enable
EABI operation ? (Obviously I have set 'Target ABI: EABI')
The only target suffix that appears to give a workable toolchain
(i.e. one that doesn't say 'unrecognised emulation mode')
is 'elf-linux', and that doesn't seem to support EABI (objects built
with it have EABI version 0)
If I use any other target suffix settings in the menuconfig
(e.g. elf-linux-eabi or even tried elf-linux_eabi) I get:
".../bin/ld: unrecognised emulation mode: armelf_linux
Supported emulations: armelf_linux_eabi" ... but I am unable to
obtain that setting :(
Regards,
Mike
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] 'ld' gives "unrecognised emulation mode" - ARM toolchain unbuildable ??
2006-11-22 9:34 ` MikeW
@ 2006-11-22 17:08 ` Michael K. Edwards
2006-11-29 14:58 ` MikeW
0 siblings, 1 reply; 9+ messages in thread
From: Michael K. Edwards @ 2006-11-22 17:08 UTC (permalink / raw)
To: buildroot
Did I say armelf-linux-eabi? Silly me. What's working for me (with
glibc and crosstool) is armelf-linux-gnueabi. I'm almost done
scrubbing cross-configure problems out of my ptxdist userland and will
start banging on uClibc/buildroot today; I'll let you know what I
find.
Cheers,
- Michael
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] 'ld' gives "unrecognised emulation mode" - ARM toolchain unbuildable ??
2006-11-22 17:08 ` Michael K. Edwards
@ 2006-11-29 14:58 ` MikeW
2006-11-29 15:06 ` [Buildroot] 'ld' gives MikeW
0 siblings, 1 reply; 9+ messages in thread
From: MikeW @ 2006-11-29 14:58 UTC (permalink / raw)
To: buildroot
Michael K. Edwards <medwards.linux@...> writes:
>
> Did I say armelf-linux-eabi? Silly me. What's working for me (with
> glibc and crosstool) is armelf-linux-gnueabi. I'm almost done
> scrubbing cross-configure problems out of my ptxdist userland and will
> start banging on uClibc/buildroot today; I'll let you know what I
> find.
>
> Cheers,
> - Michael
>
Even that gets rejected as being 'armelf_linux', not 'armelf_linux_eabi'.
Looks to me as if there's a regexp somewhere picking out the subcomponents
of the string, and it's somehow not getting the final '_eabi' section.
But where ... crosstool ?
Regards,
MikeW
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2006-11-29 15:06 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-01 14:14 [Buildroot] 'ld' gives "unrecognised emulation mode" during make; gcc-3.4.3 MikeW
2006-11-02 12:09 ` [Buildroot] 'ld' gives "unrecognised emulation mode" - ARM toolchain unbuildable ?? MikeW
2006-11-02 18:01 ` [Buildroot] 'ld' gives MikeW
2006-11-21 19:19 ` [Buildroot] 'ld' gives "unrecognised emulation mode" - ARM toolchain unbuildable ?? MikeW
2006-11-21 20:08 ` Michael K. Edwards
2006-11-22 9:34 ` MikeW
2006-11-22 17:08 ` Michael K. Edwards
2006-11-29 14:58 ` MikeW
2006-11-29 15:06 ` [Buildroot] 'ld' gives MikeW
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox