* Build process
@ 2004-11-07 22:46 Philip Taylor
2004-11-08 8:05 ` Keir Fraser
0 siblings, 1 reply; 6+ messages in thread
From: Philip Taylor @ 2004-11-07 22:46 UTC (permalink / raw)
To: xen-devel
I've been playing a little with Xen on Gentoo (just out of interest,
rather than for any productive reason), and considered making an ebuild
to allow a simple "emerge xen-utilities xen-sources" method of compiling
the tools and kernel (probably equivalent to "emerge usermode-utilities
usermode-sources" for UML). (It would be easier if I knew what I was
doing, and I haven't actually got much working yet, but it should be
theoretically possible.)
One small (but annoying) problem was that I couldn't change the
compiler. Some of the Makefiles set 'CC=gcc' and 'HOSTCC=gcc', which
referred to GCC 3.4 (which doesn't work -- I think it died while
compiling the kernel), and I wanted to explicitly use the GCC 3.3
binary. The GCC problem was relatively easily fixed by swapping my
system's default gcc; but I also fancied using ccache, which usually
works by just changing CC, and couldn't find any way to do that without
altering the makefiles (and I'd prefer to build from a clean copy of the
source).
Would it be possible/safe to use something like 'CC ?= gcc' and
'HOSTCC ?= $(CC)' (I hope that does what I expect) in all the relevant
makefiles, so the compiler can be easily overriden? Or is there some
other solution that I've missed?
Thanks,
--
Philip Taylor
philip@zaynar.demon.co.uk
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Build process
2004-11-07 22:46 Build process Philip Taylor
@ 2004-11-08 8:05 ` Keir Fraser
2004-11-09 22:39 ` Philip Taylor
0 siblings, 1 reply; 6+ messages in thread
From: Keir Fraser @ 2004-11-08 8:05 UTC (permalink / raw)
To: Philip Taylor; +Cc: xen-devel
Even if we fixed our Makefiles (and I'm not sure we can -- if we use
'?=' then we don't get 'gcc' by default because it appears CC is set
to 'cc' already) your beef is with the Linux build system. In the
Linux build system there is no way to change the compiler name to
anything other than $(CROSS_COMPILE)gcc [you can set CROSS_COMPILE
though].
Have you tried tricks like creating a symlink in a local directory to
your preferred compiler and adding it to your PATH? e.g.,
# ln -sf `which ccache' gcc
# PATH=`pwd`:$PATH make
-- Keir
> I've been playing a little with Xen on Gentoo (just out of interest,
> rather than for any productive reason), and considered making an ebuild
> to allow a simple "emerge xen-utilities xen-sources" method of compiling
> the tools and kernel (probably equivalent to "emerge usermode-utilities
> usermode-sources" for UML). (It would be easier if I knew what I was
> doing, and I haven't actually got much working yet, but it should be
> theoretically possible.)
>
> One small (but annoying) problem was that I couldn't change the
> compiler. Some of the Makefiles set 'CC=gcc' and 'HOSTCC=gcc', which
> referred to GCC 3.4 (which doesn't work -- I think it died while
> compiling the kernel), and I wanted to explicitly use the GCC 3.3
> binary. The GCC problem was relatively easily fixed by swapping my
> system's default gcc; but I also fancied using ccache, which usually
> works by just changing CC, and couldn't find any way to do that without
> altering the makefiles (and I'd prefer to build from a clean copy of the
> source).
> Would it be possible/safe to use something like 'CC ?= gcc' and
> 'HOSTCC ?= $(CC)' (I hope that does what I expect) in all the relevant
> makefiles, so the compiler can be easily overriden? Or is there some
> other solution that I've missed?
>
> Thanks,
> --
> Philip Taylor
> philip@zaynar.demon.co.uk
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Sybase ASE Linux Express Edition - download now for FREE
> LinuxWorld Reader's Choice Award Winner for best database on Linux.
> http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/xen-devel
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Build process
2004-11-08 8:05 ` Keir Fraser
@ 2004-11-09 22:39 ` Philip Taylor
2004-11-10 1:38 ` Jerome Brown
0 siblings, 1 reply; 6+ messages in thread
From: Philip Taylor @ 2004-11-09 22:39 UTC (permalink / raw)
To: Keir Fraser; +Cc: xen-devel
Keir Fraser wrote on 08/11/2004 08:05:
...
> Would it be possible/safe to use something like 'CC ?= gcc' and
>> 'HOSTCC ?= $(CC)' (I hope that does what I expect) in all the relevant
>> makefiles, so the compiler can be easily overriden? Or is there some
>> other solution that I've missed?
...
> Have you tried tricks like creating a symlink in a local directory to
> your preferred compiler and adding it to your PATH? e.g.,
> # ln -sf `which ccache' gcc
> # PATH=`pwd`:$PATH make
Ah, that worked (after I apparently fork-bombed my machine and also
corrupted python). But it turns out that Gentoo's Portage automatically
makes ccache handle calls to 'gcc' anyway, and the problems with GCC 3.4
were straightforward to fix (see patch at
http://zaynar.demon.co.uk/misc2/blkfront.patch - it needs inline
functions to be defined before they're first called).
I believe my attempt at a kernel ebuild is generally working (using the
2.0 source release plus the above patch for GCC 3.4), though currently
only for 2.6.9-xen0 and with a little too much manual intervention. It
also compiles the rest of Xen + tools + docs without any problems, but
doesn't quite know how to install them. Anyway, I should end up with
something useful soon, so I'd be interested to know if anybody with
Gentoo would be interested in testing/using it.
> -- Keir
>
--
Philip Taylor
philip@zaynar.demon.co.uk
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Build process
2004-11-09 22:39 ` Philip Taylor
@ 2004-11-10 1:38 ` Jerome Brown
2004-11-11 21:19 ` Philip Taylor
0 siblings, 1 reply; 6+ messages in thread
From: Jerome Brown @ 2004-11-10 1:38 UTC (permalink / raw)
To: xen-devel
I'm running Gentoo and would be very happy to test etc - I have been
thinking about writing an ebuild myself, but haven't got around to it.
If your interested, post on the Gentoo-Server mailing list and ask there
there are a few interested parties from memory.
Jerome
Philip Taylor wrote:
> Keir Fraser wrote on 08/11/2004 08:05:
>
> ...
>
>> Would it be possible/safe to use something like 'CC ?= gcc' and
>>
>>> 'HOSTCC ?= $(CC)' (I hope that does what I expect) in all the
>>> relevant makefiles, so the compiler can be easily overriden? Or is
>>> there some other solution that I've missed?
>
> ...
>
>> Have you tried tricks like creating a symlink in a local directory to
>> your preferred compiler and adding it to your PATH? e.g.,
>> # ln -sf `which ccache' gcc
>> # PATH=`pwd`:$PATH make
>
>
> Ah, that worked (after I apparently fork-bombed my machine and also
> corrupted python). But it turns out that Gentoo's Portage automatically
> makes ccache handle calls to 'gcc' anyway, and the problems with GCC 3.4
> were straightforward to fix (see patch at
> http://zaynar.demon.co.uk/misc2/blkfront.patch - it needs inline
> functions to be defined before they're first called).
>
> I believe my attempt at a kernel ebuild is generally working (using the
> 2.0 source release plus the above patch for GCC 3.4), though currently
> only for 2.6.9-xen0 and with a little too much manual intervention. It
> also compiles the rest of Xen + tools + docs without any problems, but
> doesn't quite know how to install them. Anyway, I should end up with
> something useful soon, so I'd be interested to know if anybody with
> Gentoo would be interested in testing/using it.
>
>
>> -- Keir
>>
>
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-11-15 21:30 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-07 22:46 Build process Philip Taylor
2004-11-08 8:05 ` Keir Fraser
2004-11-09 22:39 ` Philip Taylor
2004-11-10 1:38 ` Jerome Brown
2004-11-11 21:19 ` Philip Taylor
[not found] ` <4197BF8E.9070509@orcon.net.nz>
[not found] ` <4197C7A0.6070309@zaynar.demon.co.uk>
2004-11-15 21:30 ` Jerome Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.