public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
From: Gmail <eratos2000@gmail.com>
To: Bryan Hundven <bryanhundven@gmail.com>
Cc: "Jason T. Masker" <jason@masker.net>, crossgcc <crossgcc@sourceware.org>
Subject: Re: [PATCH 1/2] Prevent zconf.gperf from throwing an error on OSX
Date: Thu, 16 Oct 2014 20:54:00 -0000	[thread overview]
Message-ID: <11A727C0-2ADB-4ABA-82CC-0AE231DDFF3B@gmail.com> (raw)
In-Reply-To: <CAJ+oik1BtyK76wYEzTJWtEe_gkzMEjnfFztpoLmudTtj0Rs3RA@mail.gmail.com>

+1

Sent from my iPhone

> On Oct 16, 2014, at 11:30 AM, Bryan Hundven <bryanhundven@gmail.com> wrote:
> 
> Jason,
> 
>> On Thu, Oct 16, 2014 at 9:27 AM, Jason T. Masker <jason@masker.net> wrote:
>> Updated zconf.gperf patch to be conditional.
>> 
>> The problem is when compiling with clang/LLVM, so not necessarily
>> specific to OS X. Offsetof is part of C99 and defined in stddef.h, but
>> is builtin with gcc. This code will check for a definition and try
>> including stddef.h if it is not found. As a last resort, offsetof will
>> be defined.
>> 
>> 
>> diff --git a/kconfig/zconf.gperf b/kconfig/zconf.gperf
>> index c9e690e..d758a2a 100644
>> --- a/kconfig/zconf.gperf
>> +++ b/kconfig/zconf.gperf
>> @@ -7,6 +7,15 @@
>> %pic
>> %struct-type
>> 
>> +%{
>> +# ifndef offsetof
>> +#  include <stddef.h>
>> +#  ifndef offsetof
>> +#   define offsetof(st, m) ((size_t)(&((st *)0)->m))
>> +#  endif
>> +# endif
>> +%}
>> +
>> struct kconf_id;
>> 
>> static struct kconf_id *kconf_id_lookup(register const char *str,
>> register unsigned int len);
>> 
>> --
>> For unsubscribe information see http://sourceware.org/lists.html#faq
>> 
> 
> I 100% agree with this patch! A newer version of gperf does make the
> issue go away, it is however a good goal to not have to install
> homebrew to install a newer version of gperf (I've complained about
> this in the past), so...
> 
> Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
> 
> --
> For unsubscribe information see http://sourceware.org/lists.html#faq
> 

--
For unsubscribe information see http://sourceware.org/lists.html#faq

  reply	other threads:[~2014-10-16 20:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-16 16:27 Jason T. Masker
2014-10-16 16:30 ` Bryan Hundven
2014-10-16 20:54   ` Gmail [this message]
2014-10-16 16:32 ` Bryan Hundven
2014-10-16 16:45   ` Jason T. Masker
  -- strict thread matches above, loose matches on Subject: below --
2014-08-03 15:07 [PATCH 0/2] OSX: Patches to make ct-ng compile & build on OSX 10.10 Delta Tatham
2014-08-03 15:07 ` [PATCH 1/2] Prevent zconf.gperf from throwing an error on OSX Delta Tatham
2014-08-05  5:20   ` Bryan Hundven
2014-08-05  5:42     ` Fernando Ortiz (e2k)
2014-08-05  7:38       ` Bryan Hundven
2014-08-06 16:52         ` Fernando Ortiz (e2k)

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=11A727C0-2ADB-4ABA-82CC-0AE231DDFF3B@gmail.com \
    --to=eratos2000@gmail.com \
    --cc=bryanhundven@gmail.com \
    --cc=crossgcc@sourceware.org \
    --cc=jason@masker.net \
    /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).