Issue 4176 - remove hardcoded gcc and g++
Summary: remove hardcoded gcc and g++
Status: CLOSED FIXED
Alias: None
Product: Build Tools
Classification: Code
Component: code (show other issues)
Version: OOo 1.0.0
Hardware: PC Linux, all
: P3 Trivial (vote)
Target Milestone: ---
Assignee: foskey
QA Contact: issues@tools
URL:
Keywords:
Depends on: 3660
Blocks:
  Show dependency tree
 
Reported: 2002-04-22 15:52 UTC by chris
Modified: 2003-02-24 14:11 UTC (History)
3 users (show)

See Also:
Issue Type: PATCH
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
012_set_compiler_vars - define C and C++ compiler (COMPCC and COMPCXX) in config_office (4.03 KB, patch)
2002-04-22 15:54 UTC, chris
no flags Details | Diff
013_use_compiler_vars - use CCCOMP and CXXCOMP in Linux Intel/PPC builds (1.81 KB, patch)
2002-04-22 15:56 UTC, chris
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description chris 2002-04-22 15:52:46 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.
Comment 1 chris 2002-04-22 15:54:55 UTC
Created attachment 1422 [details]
012_set_compiler_vars - define C and C++ compiler (COMPCC and COMPCXX) in config_office
Comment 2 chris 2002-04-22 15:56:17 UTC
Created attachment 1423 [details]
013_use_compiler_vars - use CCCOMP and CXXCOMP in Linux Intel/PPC builds
Comment 3 sander_traveling 2002-04-22 16:05:21 UTC
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.
Comment 4 khendricks 2002-04-22 16:36:46 UTC
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

Comment 5 chris 2002-04-22 16:51:51 UTC
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)
Comment 6 khendricks 2002-04-22 17:27:12 UTC
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

Comment 7 mrauch-openoffice 2002-04-22 21:16:52 UTC
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?
Comment 8 stx123 2002-04-29 10:56:12 UTC
similar to 3660. Sander, will we see this in OOo 1.0?
Comment 9 Martin Hollmichel 2002-07-03 06:34:21 UTC
similar to 3660. Sander, will we see this in OOo 1.0.1?

Comment 10 sander_traveling 2002-08-06 14:25:12 UTC
porting -> tools
Comment 11 foskey 2002-08-20 01:01:26 UTC
config_office/configure.in   -r1.44.2.4
config_office/configure -r1.27.2.3
config_office/set_soenv.1 -r1.71.2.3
Comment 12 foskey 2002-08-28 06:49:17 UTC
Will investigate the LINK= variable properly.  It is currently not
used although it is set in patches to 3660.
Comment 13 foskey 2002-09-07 08:19:28 UTC
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.
Comment 14 chris 2003-02-24 14:11:09 UTC
Verified was released in 1.0.2; closing