diff options
author | Matt Turner <mattst88@gmail.com> | 2013-01-30 11:50:55 -0800 |
---|---|---|
committer | Matt Turner <mattst88@gmail.com> | 2013-02-04 09:35:45 -0800 |
commit | 2db1f73849260cf8e5a7e390d04f5f26141a0b37 (patch) | |
tree | 5c61b5ff725e7b330f5f83eef3d406fb16d3a598 | |
parent | 805cf07dc3a3438abd81dde330daf382cc3a8844 (diff) | |
download | external_mesa3d-2db1f73849260cf8e5a7e390d04f5f26141a0b37.zip external_mesa3d-2db1f73849260cf8e5a7e390d04f5f26141a0b37.tar.gz external_mesa3d-2db1f73849260cf8e5a7e390d04f5f26141a0b37.tar.bz2 |
builtin_compiler/build: Don't use *_FOR_BUILD when not cross compiling
Previously we were relying on CFLAGS_FOR_BUILD to be the same as CFLAGS
when not cross compiling, but this assumption didn't take into
consideration 32-bit builds on 64-bit systems. More generally, not
honoring CFLAGS is bad.
Automake is evidently too stupid to accept
if CROSS_COMPILING
CC = @CC_FOR_BUILD@
...
else
CC = @CC@
endif
without warning that CC has been already defined. The warnings are
harmless, but I'd prefer to avoid future reports about them, so define
proxy variables, which are assigned inside the conditional and then
unconditionally assigned to CC et al.
NOTE: This is a candidate for the 9.1 branch.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59737
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=60038
-rw-r--r-- | src/glsl/builtin_compiler/Makefile.am | 43 |
1 files changed, 32 insertions, 11 deletions
diff --git a/src/glsl/builtin_compiler/Makefile.am b/src/glsl/builtin_compiler/Makefile.am index 9766408..e11a17f 100644 --- a/src/glsl/builtin_compiler/Makefile.am +++ b/src/glsl/builtin_compiler/Makefile.am @@ -20,23 +20,44 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. -CC = @CC_FOR_BUILD@ -CFLAGS = @CFLAGS_FOR_BUILD@ -CPP = @CPP_FOR_BUILD@ -CPPFLAGS = @CPPFLAGS_FOR_BUILD@ -CXX = @CXX_FOR_BUILD@ -CXXFLAGS = @CXXFLAGS_FOR_BUILD@ -LD = @LD_FOR_BUILD@ -LDFLAGS = @LDFLAGS_FOR_BUILD@ - AM_CFLAGS = \ -I $(top_srcdir)/include \ -I $(top_srcdir)/src/mapi \ -I $(top_srcdir)/src/mesa \ -I $(GLSL_SRCDIR) \ -I $(GLSL_SRCDIR)/glcpp \ - -I $(GLSL_BUILDDIR) \ - $(DEFINES_FOR_BUILD) + -I $(GLSL_BUILDDIR) + +if CROSS_COMPILING +proxyCC = @CC_FOR_BUILD@ +proxyCFLAGS = @CFLAGS_FOR_BUILD@ +proxyCPP = @CPP_FOR_BUILD@ +proxyCPPFLAGS = @CPPFLAGS_FOR_BUILD@ +proxyCXX = @CXX_FOR_BUILD@ +proxyCXXFLAGS = @CXXFLAGS_FOR_BUILD@ +proxyLD = @LD_FOR_BUILD@ +proxyLDFLAGS = @LDFLAGS_FOR_BUILD@ +AM_CFLAGS += $(DEFINES_FOR_BUILD) +else +proxyCC = @CC@ +proxyCFLAGS = @CFLAGS@ +proxyCPP = @CPP@ +proxyCPPFLAGS = @CPPFLAGS@ +proxyCXX = @CXX@ +proxyCXXFLAGS = @CXXFLAGS@ +proxyLD = @LD@ +proxyLDFLAGS = @LDFLAGS@ +AM_CFLAGS += $(DEFINES) +endif + +CC = $(proxyCC) +CFLAGS = $(proxyCFLAGS) +CPP = $(proxyCPP) +CPPFLAGS = $(proxyCPPFLAGS) +CXX = $(proxyCXX) +CXXFLAGS = $(proxyCXXFLAGS) +LD = $(proxyLD) +LDFLAGS = $(proxyLDFLAGS) AM_CXXFLAGS = $(AM_CFLAGS) |