[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#107587: gcc and gcc-3.0 should support alternatives



[please CC debian-gcc@lists.debian.org on replies]

why do you propose gcc-3.0 as the "user compiler"? setting the "system
compiler" to something other than the "user compiler" would break
every C++ related development environment.

Giacomo Catenazzi writes:
 > Matthias Klose wrote:
 > 
 > > Giacomo Catenazzi writes:
 > >  > Package: gcc
 > >  > Version: 2:2.95.4-5
 > >  > Severity: wishlist
 > >  > 
 > >  > gcc should use 'update-alternative', so that user can define
 > >  > easily (and in a std manner) the default compiler.
 > > 
 > > we explicitely do NOT use alternatives for gcc. gcc is the system
 > > compiler (like other "system" components libc and binutils) and should
 > > not be changed. There is no "alternative" as the system compiler. If
 > > you want to use gcc-3.0 please add CC=xx and CXX=xx to configure/make
 > > or else divert the binaries (dpkg-divert(1)). Be sure to undo these
 > > changes before uploading packages compiled with the changed
 > configuration.
 > > 
 > 
 > 
 > oops I sent you the wrong version of the proposal.
 > ( The right version was only on my head :-) )
 > 
 > FACT:
 > 
 > There is two kind of compilers:
 > the normal/user compiler (used by user for own developement, no
 > special requirement) and system compiler (to compiler system programs,
 > must be ABI compatible with sys libraries,...).
 > Really yet there is also an other compiler: the 'kernel compiler'
 > (used to compiler kernel, requirement: it should be able to compiler
 > actual kernel (with special GNU extentions...)).
 > 
 > PROBLEM:
 > 
 > Debian support the three compiler, but in a manner I don't like:
 > - system compiler is gcc (but only debian developers, dpkg-src,
 > processes called from debian/rules  need relly this version).
 > - user compier: gcc-3.0/gcc-2.96/... : to hard to call
 > this compiler, specially in project with developers using different
 > distributions.
 > - kernel compiler gcc272/gcc-2.95: (this is the least important,
 > and we (kbuild people) are still discuss how to manage it in kernel
 > 2.5.x).
 > 
 > SOLUTION:
 > 
 > IMHO the main (the most important (for the user)) is the
 > normal/system compiler.
 > Thus we should call this compiler 'gcc' and support alternatives, so
 > that user can choice the better compiler for the own task.
 > 
 > The system compiler should ba called 'dgcc' or 'deb-gcc'. Really
 > 'debgcc' could be a script that include automatically some std flags
 > and arch, to simplify port or other automatic recompilation (debian
 > with all packages compiler for i686,..).
 > Because this compiler is need mainly only in sub-processed of
 > debian/rules, this script (or dpkg) should set via environment
 > the right system compiler). As you see, a small change in dpkg
 > will maintain the compatibility of actual code, without need to
 > substitute gcc into debgcc.
 > 
 > The kernel compiler should be called kgcc (as other distribution).
 > (and this kgcc should be a simple link to the right compiler).
 > 
 > CONCLUSION:
 > 
 > As you see, the 3 kind of compiler would be called using a name
 > reflecting the purpose and not using version.
 > This IMHO will simplify the writing of scripts, and also to remember
 > the right compiler, and naturally will simplify the life of normal user
 > (which use gcc as development compiler and not as system compiler).
 > 
 > 
 > What do you think? Do you have other solution? or do you see
 > more problem that solution changing the behaviour of compiler?
 > 
 > 
 > 	g.



Reply to: