Comment 16 for bug 532722

Revision history for this message
Dave Martin (dave-martin-arm) wrote : RE: [Bug 532722] Re: [armel] fio fails to build with ARMv7 optimizations

> Some small suggestions on the shell script:
> - mktemp /tmp/"$me-XXXXXX" => mktemp -t "$me-XXXXXXXX"

Hmmm, I learn something every day :) However, man mktemp says -t is
deprecated.

But mktemp -p /tmp "$me-XXXXXXXX" would work equally well.

> - instead of echo -n + final echo, why not just accumulate
> defines in a string which you output? e.g. DEFINES="",
> DEFINES="$DEFINES -DFOO" and echo "CFLAGS += $DEFINES"

Sure, that's a bit nicer.

> - you could eval this from make instead of generating an
> intermediate make, but that's a bit harder to read I guess
> (avoids the chicken and egg between the include being missing
> before it's generated though)

Sure, although the tests will get re-run every time you type "make" that
way, which might annoy some people.

I am looking into generating some more useful predefines for the information
suppiled by __ARM_ARCH_* --- this is more cumbersome though and really needs
to be a separate script, but it has potential to simplify all the #if
defined(this) || defined(that) || defined(the other) || ... and reduce the
maintenance effort.

> - I personally do the tests directly in make, but you could
> also consider autoconf itself I guess

Sure. I'm still too scared of autoconf to set it up from scratch though :O