WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Inheriting CFLAGS

To: xen-devel@xxxxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] Inheriting CFLAGS
From: Jerome Brown <guruswami@xxxxxxxxxxxx>
Date: Tue, 16 Nov 2004 12:19:53 +1300
Delivery-date: Tue, 16 Nov 2004 00:20:44 +0000
Envelope-to: steven.hand@xxxxxxxxxxxx
In-reply-to: <E1CTpK2-0004af-00@xxxxxxxxxxxxxxxxx>
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
References: <E1CTpK2-0004af-00@xxxxxxxxxxxxxxxxx>
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
User-agent: Mozilla Thunderbird 0.8 (Windows/20040913)
No, I do not have those lines in my Rules.mk file. It was downloaded this morning using the ebuild, so was the xen-2.0.tgz file from sourceforge. If I add -nopie to the CFLAGS in Rules.mk file xen will compile fine, however if I add -nopie to my environment CFLAGS it does not get picked up by the xen build script. Therefore I can compile and install it, but it takes manual intervention, which defeats the idea of using an ebuild :)

I am not looking of inheriting CFLAGS into the kernel build process - I agree that it is bad. However I am unable to build Xen-2.0 itself with my compiler. Unfortunately, unlike with GCC 3.4, it doesn't compile a non-SSP/PIE version of gcc to use. (I'm running gcc 3.3.4)

Keir Fraser wrote:
I am attempting to install Xen-2.0 using the Gentoo Ebuilds written by Philip
Taylor, and have run into the same problem as A Streecar Named with needing to
implement the -nopie flag.

strange, I didn't have to do it (using ebuilds from http://bugs.gentoo.org/show_bug.cgi?id=70161)


Yes, I did wonder about this.

Can you take a look in xen/arch/x86/Rules.mk and see if you have the
lines:
 # Disable PIE/SSP if GCC supports them. They can break us.
 CFLAGS  += $(call test-gcc-flag,-nopie)
 CFLAGS  += $(call test-gcc-flag,-fno-stack-protector)
 CFLAGS  += $(call test-gcc-flag,-fno-stack-protector-all)

If so then you have a *very* up-to-date tree. :-) I recently checked
in a build fix that would disable PIE/SSP iff they are supported by
GCC.
If not then I'm confused!


Is it possible to have Xen inherit these CFLAGS as a base, and then modify
them as required? Part of the enthusiasm over Gentoo is the ability to
customise and optimise the applications.

If you're talking about kernel, I don't think it's a good idea. None of the packages under sys-kernel inherits CFLAGS from Portage's /etc/make.conf.


Yeah, it's a bad idea! Kernels are very sensitive to compile flags
-- both Xen and Linux use a wide range of GCC features and frequently
use inline assembler, so the code is fragile when flags are changed
from what we developers use. Allowing CFLAGS to be modified would be
giving users a loaded gun. :-)

 -- Keir


-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel




-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel