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: Jan Kundrát <jan.kundrat@xxxxxx>
Date: Tue, 16 Nov 2004 22:32:55 +0100
Cc: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>, Jerome Brown <guruswami@xxxxxxxxxxxx>
Delivery-date: Tue, 16 Nov 2004 23:30:27 +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: KMail/1.7
> > > 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!

No, I can't seen anything like that. 

zirafa ~ # gcc -v
Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/specs
Configured with: /var/tmp/portage/gcc-3.3.4-r1/work/gcc-3.3.4/configure 
--prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.3 
--includedir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/include 
--datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3 
--mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3/man 
--infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3/info --enable-shared 
--host=i686-pc-linux-gnu --target=i686-pc-linux-gnu --with-system-zlib 
--enable-languages=c,c++ --enable-threads=posix --enable-long-long 
--disable-checking --disable-libunwind-exceptions--enable-cstdio=stdio 
--enable-version-specific-runtime-libs 
--with-gxx-include-dir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/include/g++-v3 
--with-local-prefix=/usr/local --enable-shared --enable-nls 
--without-included-gettext --disable-multilib --enable-__cxa_atexit 
--enable-clocale=generic
Thread model: posix
gcc version 3.3.4 20040623 (Gentoo Linux 3.3.4-r1, ssp-3.3.2-2, pie-8.7.6)
zirafa ~ # ebuild /usr/local/portage/sys-apps/xen/xen-2.0.ebuild unpack
zirafa ~ # cat /var/tmp/portage/xen-2.0/work/xen-2.0/xen/arch/x86/Rules.mk
########################################
# x86-specific definitions

CC := gcc
LD := ld

CFLAGS  := -nostdinc -fno-builtin -fno-common -fno-strict-aliasing
CFLAGS  += -iwithprefix include -Wall -Werror -pipe
CFLAGS  += -I$(BASEDIR)/include -Wno-pointer-arith -Wredundant-decls

ifeq ($(optimize),y)
CFLAGS  += -O3 -march=pentium2 -pipe -fomit-frame-pointer
else
x86_32/usercopy.o: CFLAGS += -O1
endif


# Prevent floating-point variables from creeping into Xen.
CFLAGS  += -msoft-float

ifeq ($(TARGET_SUBARCH),x86_32)
CFLAGS  += -m32 -march=i686
LDFLAGS := --oformat elf32-i386
endif

ifeq ($(TARGET_SUBARCH),x86_64)
CFLAGS  += -m64 -mno-red-zone -fpic -fno-reorder-blocks
CFLAGS  += -fno-asynchronous-unwind-tables
LDFLAGS := --oformat elf64-x86-64
endif





-------------------------------------------------------
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