Andy Skinner wrote:
> Hi. We try to compile all 3^rd party libraries that we use with the
> same flags and everything with which we compile our own code. I’m
> trying to build Mesa with our flags. We build 3^rd party libraries from
> a makefile that tries to handle a particular library’s own build system
> (whether straight make, CMake, ant, etc). In this case, I’d love to
> build Mesa with all our flags, all specified from this one makefile. We
> have our own CXXFLAGS, for example, and would like to get that into the
> Mesa build.
> I don’t think I’ll be able to, though. It doesn’t look like there is a
> way to append anything to CFLAGS or CXXFLAGS after they are set in a
> config file and before they are used in other Makefiles.
> For regular compilation, it looks like I can set CFLAGS, CXXFLAGS, etc
> in a config file. One option is to edit the ones we’re closest to
> (appending our own flags to the given lists). Another is to add new,
> in-house config files that include the closest existing ones and then +=
> the variables we want to amend. Then the only existing Mesa file I’d
> have to edit would be the top level Makefile. Any opinions on this or
> whether there is another way? Even if there is an existing config file
> that comes close to matching ours, I’d like it such that any change to
> our own flags automatically gets into the Mesa build.
Here's two options:
1. If you can find a nice, clean way to import CFLAGS/CXXFLAGS into
Mesa's config files, I'd accept a patch to do so.
2. If you want to write your own Mesa config file, I could add it to the
Mesa tree if you send it to me. It should be possible to set whatever
flags you want. If there's a problem with any Mesa Makefiles preventing
that, send patches to fix them.
> Linker flags are another issue. mklib has an –archopts flag, but it
> looks to me like it is only applied in the case of Darwin. Is that right?
Looks like it. If you need to pass additional -archopt flags for other
platforms, go ahead and implement it and send me a patch for mklib.