public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
* 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
* [PATCH 0/2] OSX: Patches to make ct-ng compile & build on OSX 10.10
@ 2014-08-03 15:07 Delta Tatham
  2014-08-03 15:07 ` [PATCH 1/2] Prevent zconf.gperf from throwing an error on OSX Delta Tatham
  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>

An initial set of patches to ensure ct-ng compiles itself and builds cross compilers on OSX.
While I kept the patches in ./patches/ platform-agnostic, someone might need to have a look at zconf.gperf

Daniel Zauner aka Delta Tatham (2):
  Prevent zconf.gperf from throwing an error on OSX
  Patches to enable compilation on OSX 10.10

 kconfig/zconf.gperf                                |   4 +
 patches/eglibc/2_18/0-osx-libintl_h-fixup.patch    | 286 +++++++++++++++++++++
 .../eglibc/2_18/1-osx-sunrpc-types_h-fixup.patch   |  14 +
 patches/ppl/0.11.2/401-flexible-array-clang.patch  |  21 ++
 4 files changed, 325 insertions(+)
 create mode 100644 patches/eglibc/2_18/0-osx-libintl_h-fixup.patch
 create mode 100644 patches/eglibc/2_18/1-osx-sunrpc-types_h-fixup.patch
 create mode 100644 patches/ppl/0.11.2/401-flexible-array-clang.patch

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