On 5 Oct 2007 at 9:17, Kern Sibbald wrote:

> On Friday 05 October 2007 04:44, Dan Langille wrote:
> > Is there an easy way to tell Bacula (specifically the regression
> > tests) to use a different gcc than gcc?  In short, I have installed
> > gcc32 on FreeBSD 7.x and I want to compile Bacula with gcc32 instead
> > of the base system gcc.
> >
> > I see lots of these:
> >
> > build/src/lib/Makefile:CC = gcc
> >
> > I could change them all.... just for testing...
> 
> You could probably do that, but it might not work.  Bacula uses g++
> pretty much everywhere.  Most of Bacula's files are .c, but written in
> C++, so you probably need to change CC to point to the right gcc *and*
> CXX to point to the right g++.
> 
> You could make the change in autoconf/Make.common.in or probably
> better in autoconf/Make.common, which is where all the common defines
> are, if you change Make.common.in, you must redo the ./configure.  If
> you change Make.common, you will not want to do a ./configure because
> it overwrites Make.common, but instead you would do a "make Makefiles"
> rather than the ./configure. 
> 
> Anyway, the above should allow you to change the value in one place
> and have the normal build do the right thing.
> 
> You may also be able to do:
> 
> CC=gcc32; CXX=g++32; ./configure
> 
> but I am not sure that will work.

My solution: amend scripts/regress-config and append this to the 
configure command:

    CC=/usr/local/bin/gcc34 \
    CPP=/usr/local/bin/cpp34 \
    CXX=/usr/local/bin/g++34

My alterations to autoconf/Make.common* did not affect the build 
process.  But now I have:

  Man directory:              
/usr/home/dan/src/BaculaRegressionTesting/bin
  Data directory:             /usr/share
  C Compiler:                 /usr/local/bin/gcc34 3.4.6
  C++ Compiler:               /usr/local/bin/g++34 3.4.6
  Compiler flags:              -g -O2 -Wall
  Linker flags:                -O
  Libraries:                  -lpthread


Regression tests have started.  Let's see if we get any cores this 
time.  NOTE: the problem might be with libc, which was compiled with 
gcc4... in fact, all of FreeBSD 7.x was compiled with gcc4... :)

The next step is to recompile FreeBSD 7.x with gcc3, install it, and 
try the above again. 

-- 
Dan Langille - http://www.langille.org/
Available for hire: http://www.freebsddiary.org/dan_langille.php



-------------------------------------------------------------------------
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/
_______________________________________________
Bacula-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-devel

Reply via email to