From owner-freebsd-chromium@FreeBSD.ORG Wed May 30 11:41:35 2012 Return-Path: Delivered-To: chromium@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id ED75A1065670 for ; Wed, 30 May 2012 11:41:35 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 248418FC08 for ; Wed, 30 May 2012 11:41:34 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id OAA15910; Wed, 30 May 2012 14:41:32 +0300 (EEST) (envelope-from avg@FreeBSD.org) Message-ID: <4FC6076C.5040600@FreeBSD.org> Date: Wed, 30 May 2012 14:41:32 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120503 Thunderbird/12.0.1 MIME-Version: 1.0 To: George Liaskos References: <4FC47CF8.7020909@FreeBSD.org> <4FC5F236.1020809@FreeBSD.org> <4FC60327.7050607@FreeBSD.org> In-Reply-To: <4FC60327.7050607@FreeBSD.org> X-Enigmail-Version: 1.5pre Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: chromium@FreeBSD.org Subject: Re: chromium-19.0.1084.52 build failed with gcc 4.6 on amd 10h cpu X-BeenThere: freebsd-chromium@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD-specific Chromium issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 May 2012 11:41:36 -0000 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