On Mon, Apr 14, 2014 at 6:03 AM, Ryan Harkin <ryan.harkin@linaro.org> wrote:
I'll be changing uefi-build.sh soon so that it uses the bare-metal toolchains.  I haven't pushed the change yet because I'm still testing stuff.

Once I make the change, you will need to have the bare-metal toolchain installed or you won't be able to build any more.

So let me know if this will be a problem!

I think I'll also put a check into the script to test if you actually have the toolchain on your path and give an error if not.  At the moment, it will just try to build and fail later on.

I believe the latest version that ARM have used/tested is 13.11.  I am yet to find out if 14.03 works or not...

Some background:

OK, so I have to confess that I've been using the wrong toolchain for quite some time now.

I already have the linux-gnu- toolchain installed and it's always worked, so I've been generally happy to keep using it.  Whenever I get something new from ARM (UEFI, TF, ...), it usually tells me to use the bare-metal toolchain.  I follow the instructions first time, then repeat with my "normal" toolchain.

However, I've now come across a problem where building for an AArch64 platform with the linux-gnu- platform toolchain doesn't boot, whereas using the bare-metal toolchain is fine.

Of course, I have never really known what the difference between the two is.  Enter the toolchain FAQ:

https://wiki.linaro.org/WorkingGroups/ToolChain/FAQ

"The bare-metal ABI will assume a different C library (newlib for example) - or even no C library to the Linux ABI (which assumes glibc). Therefore, the compiler may make different function calls depending on what it believes is available above and beyond the Standard C library.

Also the bare-metal ABI and Linux ABI for the 32-bit Instruction sets make different assumptions about the storage size of enums and wchar_t which you have to be careful of (not a complete list). And the difference between the 32-bit and 64-bit ABIs are also numerous and subtle (the obvious example being pointer sizes)."

... ooops!


​I'm wondering how this will affect the use of boot-time and run-time services?  Currently we have been using the same toolchain or Linux and UEFI, and calling directly into boot time/runtime services without worrying about ABI differences.  It seems like this change may break some of these assumptions regarding the ABI.

Roy


 


_______________________________________________
Linaro-uefi mailing list
Linaro-uefi@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-uefi