Apache OpenOffice (AOO) Bugzilla – Issue 4176
remove hardcoded gcc and g++
Last modified: 2003-02-24 14:11:09 UTC
Normally, when using autoconf it is possible to specify which C and C++ compilers should be used using a command such as: CC=/path/to/my/gcc ./configure However, these values are not passed through to set_soenv.1, which can therefore not create environment variables for these. The first patch, 012_set_compiler_vars, adds two extra command line arguments, the paths of the C and C++ compiler, so the call to set_soenv.1, and patches set_soenv.1 to place these variables into the enviroment file. Normally, autoconf uses CC for the C compiler and CXX for the C++ compiler. But in OOo, CC is used in the makefiles as the name of the C++ compiler, so I called the variables COMPCC and COMPCXX instead. The second patch, 013_use_compiler_vars, uses these variables in the makefile includes for Linux Intel (gcc2.95 and gcc3) and PPC builds, which are the architectures we are currently building for Debian. It should be trivial to do the same thing for other architectures.
Created attachment 1422 [details] 012_set_compiler_vars - define C and C++ compiler (COMPCC and COMPCXX) in config_office
Created attachment 1423 [details] 013_use_compiler_vars - use CCCOMP and CXXCOMP in Linux Intel/PPC builds
ok, looks good - but I need signoff from Kevin Hendricks on linux/ppc and i think it would in general be nice to do the change for all gcc (or similar) using platforms at once.
Hi, No sign-off from me until AFTER OOo 1.0 for one reason: LINK=g++ does not do *exactly* the same thing as LINK=gcc under all conditions (you will get differnt link errors and issues when wrappering C++ functions like alloc, at least with gcc 2.95.X). Once 1.0 has gone out, I would be happy to make the conversion and track down any bugs related to the slight changes in linking. Hope this makes sense to everyone. Thanks, Kevin
Well, you can change the LINK line to use gcc instead of g++ again for your platform; should be no problem at all. I only changed that because of a message on the mailing list saying it was necessary for GCC3.1, but since you're concerned with GCC2.95 it probably makes more sense to link with the C compiler (CCCOMP) instead. So change: LINK=$(CXXCOMP) to LINK=$(CCCOMP) in unxlngppc.mk, and it should be solved. (BTW, we already have a good build on PPC for Debian using this patch)
Hi, Glad to hear all of our work to get all of the PPC specific patches into OOo has helped. Again since there is only one compiler for PPC Linux (gcc 2.95.X) and since it does change things right before 1.0, I will not be committing this patch to unxlngppc.mk until after I release OOo 1.0. So please be patient. Thanks, Kevin
Concerning NetBSD (unxbsd{i,s,ppc}): The patch should be the same here (and as I've started with the linux files, it should just apply cleanly, but I haven't tested it yet). For the "LINK=..." line I think we should go for a solution for OOO_STABLE_1 that has in the end no functional changes against the current way, i.e. LINK=CCCOMP. But setting the compiler would be _really_ useful to have in 1.0. Sander, do you need patches for NetBSD, or can you just extrapolate them from the linux ones?
similar to 3660. Sander, will we see this in OOo 1.0?
similar to 3660. Sander, will we see this in OOo 1.0.1?
porting -> tools
config_office/configure.in -r1.44.2.4 config_office/configure -r1.27.2.3 config_office/set_soenv.1 -r1.71.2.3
Will investigate the LINK= variable properly. It is currently not used although it is set in patches to 3660.
This issue is either applied to 642c and srx643_OO or is a duplicate of patches (and slightly different) in 3660. Resolving this issue in favour of 3660.
Verified was released in 1.0.2; closing