From: Jonathan Wakely <jwakely.gcc@gmail.com>
To: Nick Stokes <randomaccessiterator@gmail.com>
Cc: gcc-help@gcc.gnu.org
Subject: Re: g++ cross distro compilation problem
Date: Fri, 21 Jan 2011 09:16:00 -0000 [thread overview]
Message-ID: <AANLkTi=sKLjadQWWg7XxkVsCdD=arEmvoiSVS4P-0Uaa@mail.gmail.com> (raw)
In-Reply-To: <AANLkTinS7Y-mvFENz3Oi5Gu9YBtCHtGOH6HvQaZ3y4nb@mail.gmail.com>
On 21 January 2011 02:03, Nick Stokes wrote:
>>
>> But unfortunately this didn't work either. The reason is subtle (and
>> elusive!): On CentOS (where gcc is built) the GCC features.h header is
>> defining __USE_XOPEN2K, and not __USE_XOPEN2K8 conditioned on
>> _XOPEN_SOURCE (or _POSIX_C_SOURCE) being defined. But on the
>> front-end SUSE, the /usr/include/locale.h is expecting __USE_XOPEN2K8,
>> hence fails.
By "GCC features.h header" do you mean one under the GCC installation
tree in /opt, or /usr/include/features.h? If the former, that
explains the problem - you have a fixinclude'd features.h created on
the old system, which has a glibc that predates POSIX 2008, so
_GNU_SOURCE doesn't define __USE_XOPEN2K8 (as I think it would on a
newer glibc)
> I guess I can sweep under the rug for now by defining __USE_XOPEN2K8.
> Incidentally, I need to make this transparent for users. Is it
> possible to add such "custom" definitions to gcc at configure time (or
> is there some other way to accomplish this)?
http://gcc.gnu.org/onlinedocs/gcc/Spec-Files.html
Or you can provide a wrapper script which invokes the actual gcc
driver with the additional flags you need.
Rather than defining __USE_XOPEN2K8 (which is definitely not meant to
be defined/undefined by users) I would consider modifying the
features.h file so that _GNU_SOURCE sets __XOPEN28K. You could try
building the same GCC on a login machine, and compare the features.h
from that build (if it has one, otherwise just use
/usr/include/features.h)
next prev parent reply other threads:[~2011-01-21 9:16 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-19 0:39 Nick Stokes
2011-01-19 0:57 ` Ian Lance Taylor
2011-01-19 1:14 ` Jonathan Wakely
2011-01-19 1:17 ` Jonathan Wakely
2011-01-19 23:27 ` Nick Stokes
2011-01-20 0:47 ` Jonathan Wakely
2011-01-20 15:53 ` Nick Stokes
2011-01-20 16:40 ` Jonathan Wakely
2011-01-20 19:29 ` Nick Stokes
2011-01-20 19:58 ` Jonathan Wakely
2011-01-20 20:01 ` Jonathan Wakely
2011-01-21 0:57 ` Nick Stokes
2011-01-21 2:03 ` Nick Stokes
2011-01-21 9:16 ` Jonathan Wakely [this message]
2011-01-21 14:35 ` Nick Stokes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='AANLkTi=sKLjadQWWg7XxkVsCdD=arEmvoiSVS4P-0Uaa@mail.gmail.com' \
--to=jwakely.gcc@gmail.com \
--cc=gcc-help@gcc.gnu.org \
--cc=randomaccessiterator@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).