From: Ian R. <id...@us...> - 2004-09-27 16:58:42
|
Ronny V. Vindenes wrote: > Which C standard is Mesa/DRI supposed to follow? Some of the old linux > targets say ansi others C99. My personal opinion is that additions in the C99 spec are useful enough and common enough to rely on. At the very least, DRI code (i.e., the stuff in src/mesa/drivers/dri) can rely on C99. For all practical purposes, it only builds on systems with fairly recent GCC, so this is safe. The rest of the code may need to only rely on C89. I'll defer to Brian's opinion on that. If we want to decide that core Mesa code can only use C89 features, then we should go in and fix the places that already rely on either C99 or GCC-specific features. >>We'd have to come up with a naming convention so that we could filter >>out the base configs. > > A lot of the linux-$arch targets are no-ops or near no-ops just slightly > changing the gcc cpu tuning options. I'm not sure if this is intentional > or just a case of bitrot. I suspect most can be removed as gcc should > use sane options by default, which leaves the basic scenarios: > > * generic linux{,-{dri,solo}} > * linux{,-{dri,solo}} with arch specific asm > * linux{,-{dri,solo}} with bi-arch support (or other fun with libraries) > * compiling with a different compiler > * compiling static libs > * compiling with full debugging (-DDEBUG -DMESA_DEBUG) > > A quick look at the other configs seems to indicate that they can all be > broken up and inherit from the same bases if we're a little careful. > I'll take a closer look, and try to think about the best way to group > the various options later in the week. > > I don't know what's preferred; lots of configs that include the needed > bits like now or some sort of structured base configs and some make- > magic that builds the complete config from the command line? I thought it would be interesting to have a set of *-mybox targets that would check the user's system and determine which compiler switches to give GCC. So, if the user has a Pentium 4, pass '-mcpu=pentium4 -mfpmath=sse -momit-leaf-frame-pointer -Os'. If the user has a Opteron, pass '-mcpu=opteron ...", etc. It seemed like a cool idea, but it also seemed like a fair amount of work, so it never got past the cool idea stage. :) |