On 29.03.2010 12:44, Joerg Mayer wrote:
On Mon, Mar 29, 2010 at 06:50:20AM +0200, Carl-Daniel Hailfinger wrote:
+__attribute__ ((noinline)) void myusec_delay(int usecs)
Is this supported on all supported compilers? If not, maybe create a #define for that and use this instead of the explicit __attribute__((noinline)).
Hm. It is compatible with clang/LLVM, gcc and IBM XL C/C++.
Apparently MSVC (which can be tested for with _MSC_VER) wants |__declspec(noinline)
|Then again, I don't think anyone ever compiled and ran flashrom with a non-gcc compiler. Heck, without my delay loop fix flashrom won't work on clang.
If you have other compilers available to test compilation or even execution of flashrom, please report your test results to the list. I'm willing to fix anything that comes up and doesn't require major surgery. It should be possible to compile flashrom on any platform without hardware support with the following: make distclean make CONFIG_INTERNAL=no CONFIG_SERPROG=no CONFIG_SATASII=no CONFIG_DRKAISER=no CONFIG_NIC3COM=no CONFIG_BUSPIRATESPI=no CONFIG_FT2232SPI=no CONFIG_DEDIPROG=no CONFIG_DUMMY=yes
Regards, Carl-Daniel