This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: libsanitizer merge from upstream r196090


On Mon, Dec 02, 2013 at 05:59:53PM +0100, Konstantin Serebryany wrote:
> On Mon, Dec 2, 2013 at 5:44 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> > On Mon, Dec 02, 2013 at 05:26:45PM +0100, Uros Bizjak wrote:
> >> No, so your patch doesn't regress anything. I can configure with
> >> --disable-libsanitizer to skip build of libsanitizer, although it
> >> would be nice to support RHEL5 derived long-term distributions.
> >>
> >> > Is there a way to test gcc in such environment w/o setting up VMs
> >> > (e.g. chroot, or some such)?
> >>
> >> Maybe gcc compile farm has linux-2.6.18 machine available?
> >
> > That or perhaps try say:
> > mkdir ~/centos5
> > cd ~/centos5
> > wget http://mirrors.kernel.org/centos/5/os/x86_64/CentOS/glibc-devel-2.5-118.x86_64.rpm
> > wget http://mirrors.kernel.org/centos/5/os/x86_64/CentOS/glibc-headers-2.5-118.x86_64.rpm
> > wget http://mirrors.kernel.org/centos/5/os/x86_64/CentOS/kernel-headers-2.6.18-371.el5.x86_64.rpm
> > for i in *.rpm; do
> >   rpm2cpio $i | cpio -id
> > done
> >
> > and then compile with
> > g++ -nostdinc `g++ -v -E -xc++ /dev/null 2>&1 | sed -n '/^#include </,/^End of/{/\/usr\/include/d;s/^ \//-isystem /p}'` -isystem ~/centos5/usr/include/
> > This command will use all standard C++ search paths except for /usr/include,
> > and will use ~/centos5/usr/include/ instead of that.
> 
> Doing this gives me:
> ../gcc/libsanitizer/sanitizer_common/sanitizer_platform_limits_linux.cc:24:20:
> fatal error: stddef.h: No such file or directory
> because stddef.h is found in /usr/include/linux; I guess we need some
> more gcc flags here.

Oops, sorry, should have been:
g++ -nostdinc `g++ -v -E -xc++ /dev/null 2>&1 | sed -n '/^#include </,/^End of/{/\/usr\/include/d;s/^ \//-isystem \//p}'` -isystem ~/centos5/usr/include/
(forgot about \/ in there, so it resulted in -isystem usr/lib/... rather than
-isystem /usr/lib/...

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]