From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jim Paris Subject: Re: [RFC] let kvm be compiled with gcc4 and prevent users to shoot themselves in the foot while doing so (was Re: [ kvm-Bugs-1807620 ] KVM's --disable-gcc-check doesn't work) Date: Sun, 7 Oct 2007 18:18:27 -0400 Message-ID: <20071007221827.GA25232@jim.sh> References: <470515DA.9080606@bppiac.hu> <1191516896.5019.83.camel@ghaskins-t60p.haskins.net> <47052269.80501@bppiac.hu> <1191519749.5019.99.camel@ghaskins-t60p.haskins.net> <470543AC.50901@bppiac.hu> <1191530370.5019.108.camel@ghaskins-t60p.haskins.net> <20071007212054.GA26380@tapir> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel , Discussion about the virtualization on CentOS To: Carlo Marcelo Arenas Belon Return-path: Content-Disposition: inline In-Reply-To: <20071007212054.GA26380@tapir> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org Carlo Marcelo Arenas Belon wrote: > And considering also there might be other yet unknown bugs because of gcc4, it > is most likely better to stick to use gcc-3.x, unless there is really no other > option. > > For cases where no compat-gcc package is provided (like in OpenSUSE) then the > following is IMHO the next best approach to force users to get gcc-3.x > compiler installed from source just to be able to compile kvm. This will probably become more of a problem over time. GCC 3 is slated to be removed from the next Debian release: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=440425 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=440430 > PS. please let me know what you think about it and if interested so I can > provide the 3 patches (or more if more changes are needed) in a [PATCH] > series for easy git-am'ing > > + if test $check_gcc = "no" ; then > + if gcc -v 2>&1 | grep -q 'gcc *version *4\.[0-3]\.[0-9]'; then > + echo "#define USE_GCC4 1" >> $config_h > + fi > + fi Something like #if __GNUC__ >= 4 in the code would be simpler. -jim ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/