* Re: [PATCH 1/2] Prevent zconf.gperf from throwing an error on OSX
@ 2014-10-16 16:27 Jason T. Masker
2014-10-16 16:30 ` Bryan Hundven
2014-10-16 16:32 ` Bryan Hundven
0 siblings, 2 replies; 10+ messages in thread
From: Jason T. Masker @ 2014-10-16 16:27 UTC (permalink / raw)
To: crossgcc
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] Prevent zconf.gperf from throwing an error on OSX
2014-10-16 16:27 [PATCH 1/2] Prevent zconf.gperf from throwing an error on OSX Jason T. Masker
@ 2014-10-16 16:30 ` Bryan Hundven
2014-10-16 20:54 ` Gmail
2014-10-16 16:32 ` Bryan Hundven
1 sibling, 1 reply; 10+ messages in thread
From: Bryan Hundven @ 2014-10-16 16:30 UTC (permalink / raw)
To: Jason T. Masker; +Cc: crossgcc
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] Prevent zconf.gperf from throwing an error on OSX
2014-10-16 16:27 [PATCH 1/2] Prevent zconf.gperf from throwing an error on OSX Jason T. Masker
2014-10-16 16:30 ` Bryan Hundven
@ 2014-10-16 16:32 ` Bryan Hundven
2014-10-16 16:45 ` Jason T. Masker
1 sibling, 1 reply; 10+ messages in thread
From: Bryan Hundven @ 2014-10-16 16:32 UTC (permalink / raw)
To: Jason T. Masker; +Cc: crossgcc
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.
You also need to put your sign-off here, for Yann to accept the patch.
>
> 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
>
-Bryan
--
For unsubscribe information see http://sourceware.org/lists.html#faq
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] Prevent zconf.gperf from throwing an error on OSX
2014-10-16 16:32 ` Bryan Hundven
@ 2014-10-16 16:45 ` Jason T. Masker
0 siblings, 0 replies; 10+ messages in thread
From: Jason T. Masker @ 2014-10-16 16:45 UTC (permalink / raw)
To: Bryan Hundven; +Cc: crossgcc
Signed-off-by: Jason Masker <jason@masker.net>
On Thu, Oct 16, 2014 at 12:32 PM, 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.
>
> You also need to put your sign-off here, for Yann to accept the patch.
>
>>
>> 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
>>
>
> -Bryan
--
For unsubscribe information see http://sourceware.org/lists.html#faq
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] Prevent zconf.gperf from throwing an error on OSX
2014-10-16 16:30 ` Bryan Hundven
@ 2014-10-16 20:54 ` Gmail
0 siblings, 0 replies; 10+ messages in thread
From: Gmail @ 2014-10-16 20:54 UTC (permalink / raw)
To: Bryan Hundven; +Cc: Jason T. Masker, crossgcc
+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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] Prevent zconf.gperf from throwing an error on OSX
2014-08-05 7:38 ` Bryan Hundven
@ 2014-08-06 16:52 ` Fernando Ortiz (e2k)
0 siblings, 0 replies; 10+ messages in thread
From: Fernando Ortiz (e2k) @ 2014-08-06 16:52 UTC (permalink / raw)
To: Bryan Hundven; +Cc: Delta Tatham, crossgcc maillist, Yann E. MORIN
Bryan, all,
On 08/05/2014 02:38 AM, Bryan Hundven wrote:
> Fernando, all,
>
> On Mon, Aug 4, 2014 at 10:42 PM, Fernando Ortiz (e2k)
> <eratos2000@gmail.com> wrote:
>> I can confirm this work as is using Mac OS X, ubuntu and debian.
> Was it a failing issue on ubuntu or debian? Did it add a warning? I'm
> not around my computer, or I'd just test it myself.
The computer I'm using was built recently so not all the packages were
there when I first tested, I know it fails the first time, but cannot
recreate the problem now tested again on trusty and works without this
patch. I had installed many packages since I first tested that it may
have fixed the original problem.
However it still fails on Mac OS X with:
https://gist.github.com/nandub/fd91fcfcc751149fe7ba
>
>> On Aug 5, 2014, at 12:20 AM, Bryan Hundven <bryanhundven@gmail.com> wrote:
>>
>>> Daniel, List,
>>>
>>> On Sun, Aug 3, 2014 at 8:06 AM, Delta Tatham <delta.tatham@me.com> wrote:
>>>> From: Daniel Zauner <delta.tatham@me.com>
>>>>
>>>> Grabbed this one from the homebrew formula. Might need further adaption for non-OSX
>>>> Signed-off-by: Daniel Zauner aka Delta Tatham <delta.tatham@me.com>
>>>> ---
>>>> kconfig/zconf.gperf | 4 ++++
>>>> 1 file changed, 4 insertions(+)
>>>>
>>>> diff --git a/kconfig/zconf.gperf b/kconfig/zconf.gperf
>>>> index c9e690e..21e79e4 100644
>>>> --- a/kconfig/zconf.gperf
>>>> +++ b/kconfig/zconf.gperf
>>>> @@ -7,6 +7,10 @@
>>>> %pic
>>>> %struct-type
>>> Can we ifdef on Darwin/BSD here? If it works on other platforms, then
>>> only the ones mentioned need stddef.h included here.
>>>
>>>> +%{
>>>> +#include <stddef.h>
>>>> +%}
>>>> +
>>>> struct kconf_id;
>>>>
>>>> static struct kconf_id *kconf_id_lookup(register const char *str, register unsigned int len);
>>>> --
>>>> 1.9.3 (Apple Git-50)
>>>>
>>>>
>>>> --
>>>> For unsubscribe information see http://sourceware.org/lists.html#faq
>>>>
>>> Otherwise: +1
>>>
>>> -Bryan
>>>
>>> --
>>> For unsubscribe information see http://sourceware.org/lists.html#faq
>>>
> Thanks,
>
> -Bryan
--
For unsubscribe information see http://sourceware.org/lists.html#faq
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] Prevent zconf.gperf from throwing an error on OSX
2014-08-05 5:42 ` Fernando Ortiz (e2k)
@ 2014-08-05 7:38 ` Bryan Hundven
2014-08-06 16:52 ` Fernando Ortiz (e2k)
0 siblings, 1 reply; 10+ messages in thread
From: Bryan Hundven @ 2014-08-05 7:38 UTC (permalink / raw)
To: Fernando Ortiz (e2k); +Cc: Delta Tatham, crossgcc maillist, Yann E. MORIN
Fernando, all,
On Mon, Aug 4, 2014 at 10:42 PM, Fernando Ortiz (e2k)
<eratos2000@gmail.com> wrote:
> I can confirm this work as is using Mac OS X, ubuntu and debian.
Was it a failing issue on ubuntu or debian? Did it add a warning? I'm
not around my computer, or I'd just test it myself.
> On Aug 5, 2014, at 12:20 AM, Bryan Hundven <bryanhundven@gmail.com> wrote:
>
>> Daniel, List,
>>
>> On Sun, Aug 3, 2014 at 8:06 AM, Delta Tatham <delta.tatham@me.com> wrote:
>>> From: Daniel Zauner <delta.tatham@me.com>
>>>
>>> Grabbed this one from the homebrew formula. Might need further adaption for non-OSX
>>> Signed-off-by: Daniel Zauner aka Delta Tatham <delta.tatham@me.com>
>>> ---
>>> kconfig/zconf.gperf | 4 ++++
>>> 1 file changed, 4 insertions(+)
>>>
>>> diff --git a/kconfig/zconf.gperf b/kconfig/zconf.gperf
>>> index c9e690e..21e79e4 100644
>>> --- a/kconfig/zconf.gperf
>>> +++ b/kconfig/zconf.gperf
>>> @@ -7,6 +7,10 @@
>>> %pic
>>> %struct-type
>>
>> Can we ifdef on Darwin/BSD here? If it works on other platforms, then
>> only the ones mentioned need stddef.h included here.
>>
>>> +%{
>>> +#include <stddef.h>
>>> +%}
>>> +
>>> struct kconf_id;
>>>
>>> static struct kconf_id *kconf_id_lookup(register const char *str, register unsigned int len);
>>> --
>>> 1.9.3 (Apple Git-50)
>>>
>>>
>>> --
>>> For unsubscribe information see http://sourceware.org/lists.html#faq
>>>
>>
>> Otherwise: +1
>>
>> -Bryan
>>
>> --
>> For unsubscribe information see http://sourceware.org/lists.html#faq
>>
>
Thanks,
-Bryan
--
For unsubscribe information see http://sourceware.org/lists.html#faq
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] Prevent zconf.gperf from throwing an error on OSX
2014-08-05 5:20 ` Bryan Hundven
@ 2014-08-05 5:42 ` Fernando Ortiz (e2k)
2014-08-05 7:38 ` Bryan Hundven
0 siblings, 1 reply; 10+ messages in thread
From: Fernando Ortiz (e2k) @ 2014-08-05 5:42 UTC (permalink / raw)
To: Bryan Hundven; +Cc: Delta Tatham, crossgcc maillist, Yann E. MORIN
I can confirm this work as is using Mac OS X, ubuntu and debian.
On Aug 5, 2014, at 12:20 AM, Bryan Hundven <bryanhundven@gmail.com> wrote:
> Daniel, List,
>
> On Sun, Aug 3, 2014 at 8:06 AM, Delta Tatham <delta.tatham@me.com> wrote:
>> From: Daniel Zauner <delta.tatham@me.com>
>>
>> Grabbed this one from the homebrew formula. Might need further adaption for non-OSX
>> Signed-off-by: Daniel Zauner aka Delta Tatham <delta.tatham@me.com>
>> ---
>> kconfig/zconf.gperf | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>> diff --git a/kconfig/zconf.gperf b/kconfig/zconf.gperf
>> index c9e690e..21e79e4 100644
>> --- a/kconfig/zconf.gperf
>> +++ b/kconfig/zconf.gperf
>> @@ -7,6 +7,10 @@
>> %pic
>> %struct-type
>
> Can we ifdef on Darwin/BSD here? If it works on other platforms, then
> only the ones mentioned need stddef.h included here.
>
>> +%{
>> +#include <stddef.h>
>> +%}
>> +
>> struct kconf_id;
>>
>> static struct kconf_id *kconf_id_lookup(register const char *str, register unsigned int len);
>> --
>> 1.9.3 (Apple Git-50)
>>
>>
>> --
>> For unsubscribe information see http://sourceware.org/lists.html#faq
>>
>
> Otherwise: +1
>
> -Bryan
>
> --
> For unsubscribe information see http://sourceware.org/lists.html#faq
>
--
For unsubscribe information see http://sourceware.org/lists.html#faq
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] Prevent zconf.gperf from throwing an error on OSX
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)
0 siblings, 1 reply; 10+ messages in thread
From: Bryan Hundven @ 2014-08-05 5:20 UTC (permalink / raw)
To: Delta Tatham; +Cc: crossgcc maillist, Yann E. MORIN
Daniel, List,
On Sun, Aug 3, 2014 at 8:06 AM, Delta Tatham <delta.tatham@me.com> wrote:
> From: Daniel Zauner <delta.tatham@me.com>
>
> Grabbed this one from the homebrew formula. Might need further adaption for non-OSX
> Signed-off-by: Daniel Zauner aka Delta Tatham <delta.tatham@me.com>
> ---
> kconfig/zconf.gperf | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/kconfig/zconf.gperf b/kconfig/zconf.gperf
> index c9e690e..21e79e4 100644
> --- a/kconfig/zconf.gperf
> +++ b/kconfig/zconf.gperf
> @@ -7,6 +7,10 @@
> %pic
> %struct-type
Can we ifdef on Darwin/BSD here? If it works on other platforms, then
only the ones mentioned need stddef.h included here.
> +%{
> +#include <stddef.h>
> +%}
> +
> struct kconf_id;
>
> static struct kconf_id *kconf_id_lookup(register const char *str, register unsigned int len);
> --
> 1.9.3 (Apple Git-50)
>
>
> --
> For unsubscribe information see http://sourceware.org/lists.html#faq
>
Otherwise: +1
-Bryan
--
For unsubscribe information see http://sourceware.org/lists.html#faq
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/2] Prevent zconf.gperf from throwing an error on OSX
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 ` Delta Tatham
2014-08-05 5:20 ` Bryan Hundven
0 siblings, 1 reply; 10+ messages in thread
From: Delta Tatham @ 2014-08-03 15:07 UTC (permalink / raw)
To: crossgcc; +Cc: Daniel Zauner, yann.morin.1998
From: Daniel Zauner <delta.tatham@me.com>
Grabbed this one from the homebrew formula. Might need further adaption for non-OSX
Signed-off-by: Daniel Zauner aka Delta Tatham <delta.tatham@me.com>
---
kconfig/zconf.gperf | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/kconfig/zconf.gperf b/kconfig/zconf.gperf
index c9e690e..21e79e4 100644
--- a/kconfig/zconf.gperf
+++ b/kconfig/zconf.gperf
@@ -7,6 +7,10 @@
%pic
%struct-type
+%{
+#include <stddef.h>
+%}
+
struct kconf_id;
static struct kconf_id *kconf_id_lookup(register const char *str, register unsigned int len);
--
1.9.3 (Apple Git-50)
--
For unsubscribe information see http://sourceware.org/lists.html#faq
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2014-10-16 20:54 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-16 16:27 [PATCH 1/2] Prevent zconf.gperf from throwing an error on OSX Jason T. Masker
2014-10-16 16:30 ` Bryan Hundven
2014-10-16 20:54 ` Gmail
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)
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).