0

My issues here led to the solution/new problem that I naively built the external library I am using for my host machine.

Thus of course arm-none-eabi-gcc compiler throws a fit when it meets elf32-i386 object files.

I originally built the library using:

./configure
make && make check
make install

So, now I thought I might be able to simply do:

make clean
./configure --host=arm-none-eabi
make && make check
make install

to fix it. Sadly mistaken.

I also tried --build=x86 but it seems this is auto-detected anyway.

CC=arm-none-eabi also seemed to have no effect.


What do I need to do in order to be able to build this library for linking when compiling with arm-none-eabi-gcc?

Community
  • 1
  • 1
OJFord
  • 10,522
  • 8
  • 64
  • 98
  • I am not sure your question and answer are helpful without noting the package. Each configure/make may have different needs. For instance, some projects build programs meant to run on the host. – artless noise Jul 04 '14 at 16:42
  • You are not even telling what the problem is, besides "it does not work". – PlasmaHH Jul 04 '14 at 19:45
  • @PlasmaHH Yes, I did. `elf32-i386` is obviously not desired to compile for `arm-none-eabi`. – OJFord Jul 04 '14 at 19:49
  • @OllieFord: "throws a fit" is not really a good error description, is it? – PlasmaHH Jul 04 '14 at 19:52
  • @PlasmaHH What more is necessary? I didn't need to be told why I was getting that error. I knew why: the object files were for `elf32-i386`. The question was to how to properly build the library for the target arch. "Throws a fit" would be bad if I then said "why?", but I didn't, I said "because:". – OJFord Jul 04 '14 at 19:54

2 Answers2

1

I was able to get this working with a couple of extra options specific to that configure script.

Though I didn't realise at the time of asking the question, these vary, so some familiarity or trial and error with the specific options available (./configure --help should always list those available) is required.

I should also note that make check will always fail on the build system, so isn't worthwhile.

OJFord
  • 10,522
  • 8
  • 64
  • 98
0

You using wrong cross compiler .

arm-none-eabi is used for bare metal programs.

Instead use arm-none-linux-gnueabi-gcc which will contain library to solve undefined behaviours.

Have a look @ Cross compile error "arm-none-eabi-g++ cannot find entry symbol"

Community
  • 1
  • 1
vinay hunachyal
  • 3,781
  • 2
  • 20
  • 31