summaryrefslogtreecommitdiff
path: root/toolchain/eglibc
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2014-01-26 02:29:04 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2014-01-26 02:29:04 +0100
commit9ba5458abb6f6ed70a0fdaeace26d97f3913e389 (patch)
tree3eef49bac80a5a5260c7b94bcb0ac2e323bc42e6 /toolchain/eglibc
parentee592b26a7031dcecb774abbc97260da28f065fe (diff)
fix cross compile on Darwin Maverick
Diffstat (limited to 'toolchain/eglibc')
-rw-r--r--toolchain/eglibc/Makefile2
-rw-r--r--toolchain/eglibc/Makefile.inc1
-rw-r--r--toolchain/eglibc/eglibc.config4
-rw-r--r--toolchain/eglibc/patches/eglibc-cross.patch89
4 files changed, 45 insertions, 51 deletions
diff --git a/toolchain/eglibc/Makefile b/toolchain/eglibc/Makefile
index 276b468d4..72dd1b1b7 100644
--- a/toolchain/eglibc/Makefile
+++ b/toolchain/eglibc/Makefile
@@ -28,7 +28,7 @@ EGLIBC_BUILD_DIR_FINAL:= ${WRKDIR}/$(PKG_NAME)-$(PKG_VERSION)-final
$(WRKBUILD)/.headers_configure:
mkdir -p $(EGLIBC_BUILD_DIR_INITIAL)
$(CP) ${TOPDIR}/toolchain/eglibc/eglibc.config \
- $(EGLIBC_BUILD_DIR_INITIAL)/option-groups.config
+ $(WRKBUILD)/libc/option-groups.config
(cd $(EGLIBC_BUILD_DIR_INITIAL); \
${EGLIBC_ENV} \
CC="${REAL_GNU_TARGET_NAME}-gcc $(ADK_TARGET_ABI_CFLAGS)" \
diff --git a/toolchain/eglibc/Makefile.inc b/toolchain/eglibc/Makefile.inc
index b90983ff1..5c59d9d2e 100644
--- a/toolchain/eglibc/Makefile.inc
+++ b/toolchain/eglibc/Makefile.inc
@@ -15,6 +15,7 @@ EGLIBC_CONFOPTS:= --build=$(GNU_HOST_NAME) \
--disable-nscd \
--with-__thread \
--with-tls \
+ --disable-obsolete-rpc \
--enable-add-ons \
--disable-nls
EGLIBC_ENV:= PATH='${TARGET_PATH}' \
diff --git a/toolchain/eglibc/eglibc.config b/toolchain/eglibc/eglibc.config
index 6c3025f71..f0304ff85 100644
--- a/toolchain/eglibc/eglibc.config
+++ b/toolchain/eglibc/eglibc.config
@@ -31,13 +31,13 @@ OPTION_EGLIBC_LIBM = y
OPTION_EGLIBC_LOCALES = y
OPTION_EGLIBC_LOCALE_CODE = y
OPTION_EGLIBC_MEMUSAGE = y
-OPTION_EGLIBC_NIS = y
+OPTION_EGLIBC_NIS = n
OPTION_EGLIBC_NSSWITCH = y
OPTION_EGLIBC_RCMD = y
OPTION_EGLIBC_RTLD_DEBUG = y
OPTION_EGLIBC_SPAWN = y
OPTION_EGLIBC_STREAMS = y
-OPTION_EGLIBC_SUNRPC = y
+OPTION_EGLIBC_SUNRPC = n
OPTION_EGLIBC_UTMP = y
OPTION_EGLIBC_UTMPX = y
OPTION_EGLIBC_WORDEXP = y
diff --git a/toolchain/eglibc/patches/eglibc-cross.patch b/toolchain/eglibc/patches/eglibc-cross.patch
index 893345f2b..6d74ec327 100644
--- a/toolchain/eglibc/patches/eglibc-cross.patch
+++ b/toolchain/eglibc/patches/eglibc-cross.patch
@@ -1,60 +1,50 @@
diff -Nur eglibc-2.18.orig/libc/sunrpc/rpc/types.h eglibc-2.18/libc/sunrpc/rpc/types.h
--- eglibc-2.18.orig/libc/sunrpc/rpc/types.h 2013-09-13 10:20:22.000000000 +0200
-+++ eglibc-2.18/libc/sunrpc/rpc/types.h 2013-09-13 10:49:06.000000000 +0200
-@@ -69,19 +69,25 @@
- #include <sys/types.h>
++++ eglibc-2.18/libc/sunrpc/rpc/types.h 2014-01-25 13:23:20.000000000 +0100
+@@ -70,6 +70,7 @@
#endif
--#ifndef __u_char_defined
--typedef __u_char u_char;
--typedef __u_short u_short;
--typedef __u_int u_int;
--typedef __u_long u_long;
--typedef __quad_t quad_t;
--typedef __u_quad_t u_quad_t;
--typedef __fsid_t fsid_t;
--# define __u_char_defined
-+typedef unsigned char u_char;
-+typedef unsigned short u_short;
-+typedef unsigned int u_int;
-+typedef unsigned long u_long;
-+#if __WORDSIZE == 64
-+typedef long int quad_t;
-+typedef unsigned long int u_quad_t;
-+#elif defined __GLIBC_HAVE_LONG_LONG
-+typedef long long int quad_t;
-+typedef unsigned long long int u_quad_t;
-+#endif
-+#if defined(_CROSS_RPCGEN_)
-+typedef u_quad_t fsid_t;
+ #ifndef __u_char_defined
++#if !defined(__APPLE__) && !defined(__BSD__)
+ typedef __u_char u_char;
+ typedef __u_short u_short;
+ typedef __u_int u_int;
+@@ -79,11 +80,14 @@
+ typedef __fsid_t fsid_t;
+ # define __u_char_defined
#endif
--#ifndef __daddr_t_defined
--typedef __daddr_t daddr_t;
--typedef __caddr_t caddr_t;
-+
-+# define __u_char_defined
-+#if !defined(__daddr_t_defined) && defined(linux)
-+typedef long int daddr_t;
-+typedef char *caddr_t;
++#endif
+ #ifndef __daddr_t_defined
++#if !defined(__APPLE__) && !defined(__BSD__)
+ typedef __daddr_t daddr_t;
+ typedef __caddr_t caddr_t;
# define __daddr_t_defined
#endif
++#endif
+ #include <sys/time.h>
+ #include <sys/param.h>
diff -Nur eglibc-2.18.orig/libc/sunrpc/rpc_main.c eglibc-2.18/libc/sunrpc/rpc_main.c
--- eglibc-2.18.orig/libc/sunrpc/rpc_main.c 2013-09-13 10:20:22.000000000 +0200
-+++ eglibc-2.18/libc/sunrpc/rpc_main.c 2013-09-13 10:49:34.000000000 +0200
-@@ -38,7 +38,11 @@
++++ eglibc-2.18/libc/sunrpc/rpc_main.c 2014-01-25 09:57:31.000000000 +0100
+@@ -38,7 +38,6 @@
#include <stdio.h>
#include <string.h>
#include <unistd.h>
-+#ifdef _CROSS_RPCGEN_
-+#define gettext(X) (X)
-+#else
- #include <libintl.h>
-+#endif
+-#include <libintl.h>
#include <locale.h>
#include <ctype.h>
#include <sys/types.h>
-@@ -958,10 +962,12 @@
+@@ -51,6 +50,8 @@
+ #include "rpc_scan.h"
+ #include "proto.h"
+
++#define gettext(X) (X)
++
+ #include "../version.h"
+ #define PACKAGE _libc_intl_domainname
+
+@@ -958,10 +959,12 @@
abort ();
temp = rindex (cmd->infile, '.');
cp = stpcpy (mkfilename, "Makefile.");
@@ -72,16 +62,19 @@ diff -Nur eglibc-2.18.orig/libc/sunrpc/rpc_main.c eglibc-2.18/libc/sunrpc/rpc_ma
else
diff -Nur eglibc-2.18.orig/libc/sunrpc/rpc_scan.c eglibc-2.18/libc/sunrpc/rpc_scan.c
--- eglibc-2.18.orig/libc/sunrpc/rpc_scan.c 2013-09-13 10:20:22.000000000 +0200
-+++ eglibc-2.18/libc/sunrpc/rpc_scan.c 2013-09-13 10:49:06.000000000 +0200
-@@ -37,7 +37,11 @@
++++ eglibc-2.18/libc/sunrpc/rpc_scan.c 2014-01-25 09:57:31.000000000 +0100
+@@ -37,12 +37,13 @@
#include <stdio.h>
#include <ctype.h>
#include <string.h>
-+#ifdef _CROSS_RPCGEN_
-+#define gettext(X) (X)
-+#else
- #include <libintl.h>
-+#endif
+-#include <libintl.h>
#include "rpc_scan.h"
#include "rpc_parse.h"
#include "rpc_util.h"
+ #include "proto.h"
+
++#define gettext(X) (X)
++
+ #define startcomment(where) (where[0] == '/' && where[1] == '*')
+ #define endcomment(where) (where[-1] == '*' && where[0] == '/')
+