This all started while trying to build EPIA and finding it was now failing.
The problem began with the cpufixup.h code. This code did things like this:
#if defined(k8) #define cpufixup() k8_cpufixup() #elif defined(k7)
etc.
First, this is about the only code that doesn't test a value, but instead tests a variable being defined. Second, in the Makefile.settings we found: -Dk8=
OK, so k8 is defined, but has no value. the "#if define(k8)" code succeeds as k8 is defined, and #defines cpufixup to k8_cpufixup. The Epia, which is not a K8, fails to build as it does not have k8_cpufixup symbol defined, which makes sense as it is not a K8.
So we changed the cpufixup.h to this: #if (k8 == 1) etc.
which is much more in the way linuxbios has used defines for the last 3 years or so (Eric, you being the person who pushed us in that direction) :-)
So we were testing for k8 == 1, and the Makefile.settings had set k8 to nothing.
Unfortunately, in gcc, if you define a variable but don't set its value, the preprocessor sets it to 1. So Epia builds still failed as #if (k8 == 1)
still succeeded..
So more looking. Turns out that in src/config/Options.lb, the variable k8 is defined as - default none - export always
which means that even if k8 is never set, it is always exported. In other words, a config variable with value 'none' is exported to Makefile.settings, which is just plain wrong. The value should be defined before it is exported.
Greg knows the full set of changes, but basically it is no longer allowed to export a variable whose value is 'none'. You have to set it if it gets exported.
This will fix the Epia build. It may not break any other builds; Greg explained to me that he has things worked out and I am being too pessimistic.
We'll see tomorow for our builds and we'll let you know.
ron