* [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
2014-08-03 15:07 ` [PATCH 2/2] Patches to enable compilation on OSX 10.10 Delta Tatham
1 sibling, 1 reply; 12+ 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] 12+ messages in thread
* [PATCH 2/2] Patches to enable compilation on OSX 10.10
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-03 15:07 ` Delta Tatham
1 sibling, 0 replies; 12+ 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>
PPL 0.11.2:
Fixed clang-compat
Pulled from https://www.cs.unipr.it/mantis/view.php?id=596
eGlibc 2_18:
- removed libintl.h from sunrpc files as not necessary in OSX
- Workaround for types (see https://coderwall.com/p/k1wqdw)
Signed-off-by: Daniel Zauner aka Delta Tatham <delta.tatham@me.com>
---
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 ++
3 files changed, 321 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
diff --git a/patches/eglibc/2_18/0-osx-libintl_h-fixup.patch b/patches/eglibc/2_18/0-osx-libintl_h-fixup.patch
new file mode 100644
index 0000000..40e5b07
--- /dev/null
+++ b/patches/eglibc/2_18/0-osx-libintl_h-fixup.patch
@@ -0,0 +1,286 @@
+diff -rup a.eglibc-2_18/sunrpc/auth_unix.c eglibc-2_18/sunrpc/auth_unix.c
+--- eglibc-2_18/sunrpc/auth_unix.c 2014-08-03 14:33:45.000000000 +0100
++++ eglibc-2_18/sunrpc/auth_unix.c 2014-08-03 14:45:19.000000000 +0100
+@@ -43,7 +43,9 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <unistd.h>
++#ifndef __APPLE__
+ #include <libintl.h>
++#endif
+ #include <sys/param.h>
+ #include <wchar.h>
+
+diff -rup a.eglibc-2_18/sunrpc/clnt_perr.c eglibc-2_18/sunrpc/clnt_perr.c
+--- eglibc-2_18/sunrpc/clnt_perr.c 2014-08-03 14:33:45.000000000 +0100
++++ eglibc-2_18/sunrpc/clnt_perr.c 2014-08-03 14:45:19.000000000 +0100
+@@ -32,7 +32,9 @@
+ */
+ #include <stdio.h>
+ #include <string.h>
++#ifndef __APPLE__
+ #include <libintl.h>
++#endif
+ #include <rpc/rpc.h>
+ #include <wchar.h>
+ #include <libio/iolibio.h>
+diff -rup a.eglibc-2_18/sunrpc/clnt_raw.c eglibc-2_18/sunrpc/clnt_raw.c
+--- eglibc-2_18/sunrpc/clnt_raw.c 2014-08-03 14:33:45.000000000 +0100
++++ eglibc-2_18/sunrpc/clnt_raw.c 2014-08-03 14:45:19.000000000 +0100
+@@ -39,7 +39,9 @@
+ #include <rpc/rpc.h>
+ #include <rpc/svc.h>
+ #include <rpc/xdr.h>
++#ifndef __APPLE__
+ #include <libintl.h>
++#endif
+
+ #define MCALL_MSG_SIZE 24
+
+diff -rup a.eglibc-2_18/sunrpc/clnt_tcp.c eglibc-2_18/sunrpc/clnt_tcp.c
+--- eglibc-2_18/sunrpc/clnt_tcp.c 2014-08-03 14:33:45.000000000 +0100
++++ eglibc-2_18/sunrpc/clnt_tcp.c 2014-08-03 14:45:19.000000000 +0100
+@@ -48,7 +48,9 @@
+ #include <errno.h>
+ #include <stdio.h>
+ #include <unistd.h>
++#ifndef __APPLE__
+ #include <libintl.h>
++#endif
+ #include <rpc/rpc.h>
+ #include <sys/poll.h>
+ #include <sys/socket.h>
+diff -rup a.eglibc-2_18/sunrpc/clnt_udp.c eglibc-2_18/sunrpc/clnt_udp.c
+--- eglibc-2_18/sunrpc/clnt_udp.c 2014-08-03 14:33:45.000000000 +0100
++++ eglibc-2_18/sunrpc/clnt_udp.c 2014-08-03 14:45:19.000000000 +0100
+@@ -33,7 +33,9 @@
+
+ #include <stdio.h>
+ #include <unistd.h>
++#ifndef __APPLE__
+ #include <libintl.h>
++#endif
+ #include <rpc/rpc.h>
+ #include <rpc/xdr.h>
+ #include <rpc/clnt.h>
+diff -rup a.eglibc-2_18/sunrpc/clnt_unix.c eglibc-2_18/sunrpc/clnt_unix.c
+--- eglibc-2_18/sunrpc/clnt_unix.c 2014-08-03 14:33:45.000000000 +0100
++++ eglibc-2_18/sunrpc/clnt_unix.c 2014-08-03 14:45:19.000000000 +0100
+@@ -48,7 +48,9 @@
+ #include <errno.h>
+ #include <stdio.h>
+ #include <unistd.h>
++#ifndef __APPLE__
+ #include <libintl.h>
++#endif
+ #include <rpc/rpc.h>
+ #include <sys/uio.h>
+ #include <sys/poll.h>
+diff -rup a.eglibc-2_18/sunrpc/get_myaddr.c eglibc-2_18/sunrpc/get_myaddr.c
+--- eglibc-2_18/sunrpc/get_myaddr.c 2014-08-03 14:33:45.000000000 +0100
++++ eglibc-2_18/sunrpc/get_myaddr.c 2014-08-03 14:45:19.000000000 +0100
+@@ -38,7 +38,9 @@
+ #include <sys/socket.h>
+ #include <stdio.h>
+ #include <unistd.h>
++#ifndef __APPLE__
+ #include <libintl.h>
++#endif
+ #include <net/if.h>
+ #include <ifaddrs.h>
+ #include <sys/ioctl.h>
+diff -rup a.eglibc-2_18/sunrpc/pm_getmaps.c eglibc-2_18/sunrpc/pm_getmaps.c
+--- eglibc-2_18/sunrpc/pm_getmaps.c 2014-08-03 14:33:45.000000000 +0100
++++ eglibc-2_18/sunrpc/pm_getmaps.c 2014-08-03 14:45:20.000000000 +0100
+@@ -41,7 +41,9 @@
+ #include <stdbool.h>
+ #include <stdio.h>
+ #include <errno.h>
++#ifndef __APPLE__
+ #include <libintl.h>
++#endif
+ #include <unistd.h>
+ #include <not-cancel.h>
+
+diff -rup a.eglibc-2_18/sunrpc/pmap_clnt.c eglibc-2_18/sunrpc/pmap_clnt.c
+--- eglibc-2_18/sunrpc/pmap_clnt.c 2014-08-03 14:33:45.000000000 +0100
++++ eglibc-2_18/sunrpc/pmap_clnt.c 2014-08-03 14:45:20.000000000 +0100
+@@ -35,7 +35,9 @@
+
+ #include <stdio.h>
+ #include <unistd.h>
++#ifndef __APPLE__
+ #include <libintl.h>
++#endif
+ #include <net/if.h>
+ #include <ifaddrs.h>
+ #include <sys/ioctl.h>
+diff -rup a.eglibc-2_18/sunrpc/pmap_rmt.c eglibc-2_18/sunrpc/pmap_rmt.c
+--- eglibc-2_18/sunrpc/pmap_rmt.c 2014-08-03 14:33:45.000000000 +0100
++++ eglibc-2_18/sunrpc/pmap_rmt.c 2014-08-03 14:45:20.000000000 +0100
+@@ -35,7 +35,9 @@
+
+ #include <unistd.h>
+ #include <string.h>
++#ifndef __APPLE__
+ #include <libintl.h>
++#endif
+ #include <rpc/rpc.h>
+ #include <rpc/pmap_prot.h>
+ #include <rpc/pmap_clnt.h>
+diff -rup a.eglibc-2_18/sunrpc/rpc_main.c eglibc-2_18/sunrpc/rpc_main.c
+--- eglibc-2_18/sunrpc/rpc_main.c 2014-08-03 14:33:45.000000000 +0100
++++ eglibc-2_18/sunrpc/rpc_main.c 2014-08-03 14:45:55.000000000 +0100
+@@ -38,7 +38,9 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <unistd.h>
++#ifndef __APPLE__
+ #include <libintl.h>
++#endif
+ #include <locale.h>
+ #include <ctype.h>
+ #include <sys/types.h>
+diff -rup a.eglibc-2_18/sunrpc/rpc_scan.c eglibc-2_18/sunrpc/rpc_scan.c
+--- eglibc-2_18/sunrpc/rpc_scan.c 2014-08-03 14:33:45.000000000 +0100
++++ eglibc-2_18/sunrpc/rpc_scan.c 2014-08-03 14:46:00.000000000 +0100
+@@ -37,7 +37,9 @@
+ #include <stdio.h>
+ #include <ctype.h>
+ #include <string.h>
++#ifndef __APPLE__
+ #include <libintl.h>
++#endif
+ #include "rpc_scan.h"
+ #include "rpc_parse.h"
+ #include "rpc_util.h"
+diff -rup a.eglibc-2_18/sunrpc/rpcinfo.c eglibc-2_18/sunrpc/rpcinfo.c
+--- eglibc-2_18/sunrpc/rpcinfo.c 2014-08-03 14:33:45.000000000 +0100
++++ eglibc-2_18/sunrpc/rpcinfo.c 2014-08-03 14:46:10.000000000 +0100
+@@ -48,7 +48,9 @@
+ #include <signal.h>
+ #include <ctype.h>
+ #include <locale.h>
++#ifndef __APPLE__
+ #include <libintl.h>
++#endif
+
+ #include "../version.h"
+ #define PACKAGE _libc_intl_domainname
+diff -rup a.eglibc-2_18/sunrpc/svc_run.c eglibc-2_18/sunrpc/svc_run.c
+--- eglibc-2_18/sunrpc/svc_run.c 2014-08-03 14:33:45.000000000 +0100
++++ eglibc-2_18/sunrpc/svc_run.c 2014-08-03 14:47:35.000000000 +0100
+@@ -33,7 +33,9 @@
+
+ #include <errno.h>
+ #include <unistd.h>
++#ifndef __APPLE__
+ #include <libintl.h>
++#endif
+ #include <sys/poll.h>
+ #include <rpc/rpc.h>
+
+diff -rup a.eglibc-2_18/sunrpc/svc_simple.c eglibc-2_18/sunrpc/svc_simple.c
+--- eglibc-2_18/sunrpc/svc_simple.c 2014-08-03 14:33:45.000000000 +0100
++++ eglibc-2_18/sunrpc/svc_simple.c 2014-08-03 14:47:48.000000000 +0100
+@@ -34,7 +34,9 @@
+
+ #include <stdio.h>
+ #include <string.h>
++#ifndef __APPLE__
+ #include <libintl.h>
++#endif
+ #include <unistd.h>
+ #include <rpc/rpc.h>
+ #include <rpc/pmap_clnt.h>
+diff -rup a.eglibc-2_18/sunrpc/svc_tcp.c eglibc-2_18/sunrpc/svc_tcp.c
+--- eglibc-2_18/sunrpc/svc_tcp.c 2014-08-03 14:33:45.000000000 +0100
++++ eglibc-2_18/sunrpc/svc_tcp.c 2014-08-03 14:47:54.000000000 +0100
+@@ -55,7 +55,9 @@
+ #include <stdio.h>
+ #include <unistd.h>
+ #include <string.h>
++#ifndef __APPLE__
+ #include <libintl.h>
++#endif
+ #include <rpc/rpc.h>
+ #include <sys/socket.h>
+ #include <sys/poll.h>
+diff -rup a.eglibc-2_18/sunrpc/svc_udp.c eglibc-2_18/sunrpc/svc_udp.c
+--- eglibc-2_18/sunrpc/svc_udp.c 2014-08-03 14:33:45.000000000 +0100
++++ eglibc-2_18/sunrpc/svc_udp.c 2014-08-03 14:47:57.000000000 +0100
+@@ -56,7 +56,9 @@
+ #include <rpc/rpc.h>
+ #include <sys/socket.h>
+ #include <errno.h>
++#ifndef __APPLE__
+ #include <libintl.h>
++#endif
+
+ #ifdef IP_PKTINFO
+ #include <sys/uio.h>
+diff -rup a.eglibc-2_18/sunrpc/svc_unix.c eglibc-2_18/sunrpc/svc_unix.c
+--- eglibc-2_18/sunrpc/svc_unix.c 2014-08-03 14:33:45.000000000 +0100
++++ eglibc-2_18/sunrpc/svc_unix.c 2014-08-03 14:48:03.000000000 +0100
+@@ -62,7 +62,9 @@
+ #include <sys/poll.h>
+ #include <errno.h>
+ #include <stdlib.h>
++#ifndef __APPLE__
+ #include <libintl.h>
++#endif
+ #include <wchar.h>
+
+ /*
+diff -rup a.eglibc-2_18/sunrpc/xdr.c eglibc-2_18/sunrpc/xdr.c
+--- eglibc-2_18/sunrpc/xdr.c 2014-08-03 14:33:45.000000000 +0100
++++ eglibc-2_18/sunrpc/xdr.c 2014-08-03 14:48:10.000000000 +0100
+@@ -38,7 +38,9 @@
+ #include <stdio.h>
+ #include <limits.h>
+ #include <string.h>
++#ifndef __APPLE__
+ #include <libintl.h>
++#endif
+ #include <wchar.h>
+ #include <stdint.h>
+
+diff -rup a.eglibc-2_18/sunrpc/xdr_array.c eglibc-2_18/sunrpc/xdr_array.c
+--- eglibc-2_18/sunrpc/xdr_array.c 2014-08-03 14:33:45.000000000 +0100
++++ eglibc-2_18/sunrpc/xdr_array.c 2014-08-03 14:48:10.000000000 +0100
+@@ -38,7 +38,9 @@
+ #include <string.h>
+ #include <rpc/types.h>
+ #include <rpc/xdr.h>
++#ifndef __APPLE__
+ #include <libintl.h>
++#endif
+ #include <limits.h>
+ #include <wchar.h>
+
+diff -rup a.eglibc-2_18/sunrpc/xdr_rec.c eglibc-2_18/sunrpc/xdr_rec.c
+--- eglibc-2_18/sunrpc/xdr_rec.c 2014-08-03 14:33:45.000000000 +0100
++++ eglibc-2_18/sunrpc/xdr_rec.c 2014-08-03 14:48:10.000000000 +0100
+@@ -47,7 +47,9 @@
+ #include <unistd.h>
+ #include <stdint.h>
+ #include <rpc/rpc.h>
++#ifndef __APPLE__
+ #include <libintl.h>
++#endif
+ #include <wchar.h>
+ #include <libio/iolibio.h>
+
+diff -rup a.eglibc-2_18/sunrpc/xdr_ref.c eglibc-2_18/sunrpc/xdr_ref.c
+--- eglibc-2_18/sunrpc/xdr_ref.c 2014-08-03 14:33:45.000000000 +0100
++++ eglibc-2_18/sunrpc/xdr_ref.c 2014-08-03 14:48:10.000000000 +0100
+@@ -38,7 +38,9 @@
+ #include <string.h>
+ #include <rpc/types.h>
+ #include <rpc/xdr.h>
++#ifndef __APPLE__
+ #include <libintl.h>
++#endif
+ #include <wchar.h>
+ #include <libio/iolibio.h>
+
diff --git a/patches/eglibc/2_18/1-osx-sunrpc-types_h-fixup.patch b/patches/eglibc/2_18/1-osx-sunrpc-types_h-fixup.patch
new file mode 100644
index 0000000..5aea6bd
--- /dev/null
+++ b/patches/eglibc/2_18/1-osx-sunrpc-types_h-fixup.patch
@@ -0,0 +1,14 @@
+--- a.eglibc-2_18/sunrpc/rpc/types.h 2014-08-03 15:06:56.000000000 +0100
++++ eglibc-2_18/sunrpc/rpc/types.h 2014-08-03 15:08:50.000000000 +0100
+@@ -69,6 +69,11 @@ typedef unsigned long rpcport_t;
+ #include <sys/types.h>
+ #endif
+
++#ifdef __APPLE__
++#define __u_char_defined
++#define __daddr_t_defined
++#endif
++
+ #ifndef __u_char_defined
+ typedef __u_char u_char;
+ typedef __u_short u_short;
diff --git a/patches/ppl/0.11.2/401-flexible-array-clang.patch b/patches/ppl/0.11.2/401-flexible-array-clang.patch
new file mode 100644
index 0000000..48a81bd
--- /dev/null
+++ b/patches/ppl/0.11.2/401-flexible-array-clang.patch
@@ -0,0 +1,21 @@
+diff -urN ppl-0.11.orig/m4/ac_cxx_flexible_arrays.m4 ppl-0.11/m4/ac_cxx_flexible_arrays.m4
+--- ppl-0.11.orig/m4/ac_cxx_flexible_arrays.m4 2010-08-02 13:21:24.000000000 -0700
++++ ppl-0.11/m4/ac_cxx_flexible_arrays.m4 2014-03-12 08:43:21.000000000 -0700
+@@ -40,6 +40,8 @@
+ A()
+ : i(0), b(false) {
+ }
++
++ ~A() {}
+ };
+
+ class B {
+@@ -89,6 +91,8 @@
+ A()
+ : i(0), b(false) {
+ }
++
++ ~A() {}
+ };
+
+ class B {
--
1.9.3 (Apple Git-50)
--
For unsubscribe information see http://sourceware.org/lists.html#faq
^ permalink raw reply [flat|nested] 12+ 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
2014-08-03 15:07 ` [PATCH 2/2] Patches to enable compilation on OSX 10.10 Delta Tatham
0 siblings, 2 replies; 12+ 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] 12+ 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; 12+ 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] 12+ 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; 12+ 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] 12+ 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; 12+ 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] 12+ 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; 12+ 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] 12+ 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; 12+ 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] 12+ 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; 12+ 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] 12+ 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; 12+ 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] 12+ 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; 12+ 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] 12+ messages in thread
* 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; 12+ 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] 12+ messages in thread
end of thread, other threads:[~2014-10-16 20:54 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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)
2014-08-03 15:07 ` [PATCH 2/2] Patches to enable compilation on OSX 10.10 Delta Tatham
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
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).