Date: Wed, 30 May 2012 14:41:32 +0300 From: Andriy Gapon <avg@FreeBSD.org> To: George Liaskos <geo.liaskos@gmail.com> Cc: chromium@FreeBSD.org Subject: Re: chromium-19.0.1084.52 build failed with gcc 4.6 on amd 10h cpu Message-ID: <4FC6076C.5040600@FreeBSD.org> In-Reply-To: <4FC60327.7050607@FreeBSD.org> References: <4FC47CF8.7020909@FreeBSD.org> <CANcjpODFwTL6_5pJ2uvv2vMpsbfV%2BA3qx2Zx0njuV=Ts%2BuObjg@mail.gmail.com> <4FC5F236.1020809@FreeBSD.org> <CANcjpODckwCdMXDdfum37nOVO%2BdFwy-GGMPiJmA7ScQSHWPp9Q@mail.gmail.com> <4FC60327.7050607@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
on 30/05/2012 14:23 Andriy Gapon said the following: > I think that the problem is that -mssse3 must be passed to a compiler when > compiling skia_opts_ssse3 target and then everything would compile as it should. > But for some reason that is not done. > I suspect some problem is the .gyp file or gyp utility or somewhere else. > E.g. if I add an non-existing flag '-favg-avg' in the same cflags list where > '-mssse3' is specified, then the -favg-avg flag appears in the generated > skia/skia_opts_ssse3.target.mk file. But -mssse3 doesn't appear there... > What 'eats' it I don't know yet. I think that this must be it: build/common.gypi has this snippet: > # FreeBSD-specific options; note that most FreeBSD options are set above, > # with Linux. > ['OS=="freebsd"', { > 'target_defaults': { > 'ldflags': [ > '-Wl,--no-keep-memory', > ], > 'ldflags!': [ > '-ldl', > '-pie', > ], > 'libraries!': [ > '-ldl', > ], > 'conditions': [ > ['gcc_version == 42', { > 'cflags!': [ > '-mssse3', > '-fno-signed-zeros', > '-Wno-unused-result', > ], > }], ], }, > }], Note the cflags!: -mssse3 rule under gcc_version == 42 condition. gcc_version is set by build/compiler_version.py, which is executed from build/gyp_chromium. gyp_chromium is executed in do-configure target. The problem is that since this is an override target, then no "usual" environment manipulations are done auto-magically and thus CXX environment variable, if any, doesn't necessarily reflect a real compiler that is selected for the build. E.g. in my case it is unset. So compiler_version.py determines version of the base g++, which is 42! I think that adding ${SETENV} CXX=${CXX} at the start of gyp_chromium command line may fix the problem. Testing now... P.S. Perhaps the simpler fix is to just drop that gcc_version == 42 conditional block. But I think that it makes sense to correctly setup gyp environment in any case. Perhaps it makes sense to reproduce the whole environment setup from the standard do-configure target for gnu configure: > ${SETENV} CC="${CC}" CPP="${CPP}" CXX="${CXX}" \ > CFLAGS="${CFLAGS}" CPPFLAGS="${CPPFLAGS}" CXXFLAGS="${CXXFLAGS}" \ > LDFLAGS="${LDFLAGS}" \ > INSTALL="/usr/bin/install -c ${_BINOWNGRP}" \ > INSTALL_DATA="${INSTALL_DATA}" \ > INSTALL_LIB="${INSTALL_LIB}" \ > INSTALL_PROGRAM="${INSTALL_PROGRAM}" \ > INSTALL_SCRIPT="${INSTALL_SCRIPT}" \ > ${CONFIGURE_ENV} ... But I am not sure about this. -- Andriy Gapon
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4FC6076C.5040600>