diff options
author | "Steven J. Hill" <sjhill@realitydiluted.com> | 2005-08-18 23:08:19 +0000 |
---|---|---|
committer | "Steven J. Hill" <sjhill@realitydiluted.com> | 2005-08-18 23:08:19 +0000 |
commit | bb4bed8545c1bd57ee54202fafa97c3c90001af0 (patch) | |
tree | eae2fb2e5dc248f0e798d791efdcf72f0a9fdfdd /package | |
parent | bd00131051a6243939f0b28ae0ae3244b67bd539 (diff) |
Changes to allow compilation with GCC-4.1.0.
Diffstat (limited to 'package')
-rw-r--r-- | package/modutils/modutils.patch | 82 | ||||
-rw-r--r-- | package/mtd/mtd.mk | 4 | ||||
-rw-r--r-- | package/mtd/mtd.patch | 24 | ||||
-rw-r--r-- | package/openvpn/openvpn.mk | 11 |
4 files changed, 116 insertions, 5 deletions
diff --git a/package/modutils/modutils.patch b/package/modutils/modutils.patch index 16a6527f8..e0303b21c 100644 --- a/package/modutils/modutils.patch +++ b/package/modutils/modutils.patch @@ -1,5 +1,6 @@ ---- _modutils-2.4.26/Makefile.in 2005-02-01 12:41:39.000000000 +0100 -+++ modutils-2.4.26/Makefile.in 2005-02-01 12:39:18.000000000 +0100 +diff -ur modutils-2.4.27/Makefile.in modutils-2.4.27-patched/Makefile.in +--- modutils-2.4.27/Makefile.in 2004-03-07 01:24:48.000000000 -0600 ++++ modutils-2.4.27-patched/Makefile.in 2005-08-17 08:41:57.000000000 -0500 @@ -3,7 +3,7 @@ include Makefile.common @@ -9,8 +10,26 @@ ifneq (@kerneld_SUBDIR@,) SUBDIRS += man_kerneld endif ---- _modutils-2.4.26/insmod/Makefile.in 2003-10-27 05:42:07.000000000 +0100 -+++ modutils-2.4.26/insmod/Makefile.in 2005-02-01 12:39:40.000000000 +0100 +diff -ur modutils-2.4.27/depmod/depmod.c modutils-2.4.27-patched/depmod/depmod.c +--- modutils-2.4.27/depmod/depmod.c 2003-03-22 20:34:28.000000000 -0600 ++++ modutils-2.4.27-patched/depmod/depmod.c 2005-08-17 21:33:40.000000000 -0500 +@@ -1132,8 +1132,11 @@ + return -1; + + for (ksym = ksyms; so_far < nksyms; ++so_far, ksym++) { +- if (strncmp((char *)ksym->name, "GPLONLY_", 8) == 0) +- ((char *)ksym->name) += 8; ++ if (strncmp((char *)ksym->name, "GPLONLY_", 8) == 0) { ++ char *p = (char *)ksym->name; ++ p += 8; ++ ksym->name = p; ++ } + assert(n_syms < MAX_MAP_SYM); + symtab[n_syms++] = addsym((char *)ksym->name, mod, SYM_DEFINED, 0); + } +diff -ur modutils-2.4.27/insmod/Makefile.in modutils-2.4.27-patched/insmod/Makefile.in +--- modutils-2.4.27/insmod/Makefile.in 2003-10-26 22:42:07.000000000 -0600 ++++ modutils-2.4.27-patched/insmod/Makefile.in 2005-08-17 08:41:57.000000000 -0500 @@ -126,10 +126,6 @@ $(MKDIR) $(DESTDIR)$(sbindir); \ $(INSTALL) $(STRIP) $$i $(DESTDIR)$(sbindir); done; @@ -22,3 +41,58 @@ for i in $(COMB); do \ ln -sf insmod $(DESTDIR)$(sbindir)/$$i; \ (test "$(insmod_static)" = yes && \ +diff -ur modutils-2.4.27/insmod/insmod.c modutils-2.4.27-patched/insmod/insmod.c +--- modutils-2.4.27/insmod/insmod.c 2003-10-26 20:34:46.000000000 -0600 ++++ modutils-2.4.27-patched/insmod/insmod.c 2005-08-17 21:34:04.000000000 -0500 +@@ -274,8 +274,11 @@ + */ + if (strncmp((char *)s->name, "GPLONLY_", 8) == 0) { + gplonly_seen = 1; +- if (gpl) +- ((char *)s->name) += 8; ++ if (gpl) { ++ char *p = (char *)s->name; ++ p += 8; ++ s->name = p; ++ } + else + continue; + } +diff -ur modutils-2.4.27/obj/obj_kallsyms.c modutils-2.4.27-patched/obj/obj_kallsyms.c +--- modutils-2.4.27/obj/obj_kallsyms.c 2002-02-28 18:39:06.000000000 -0600 ++++ modutils-2.4.27-patched/obj/obj_kallsyms.c 2005-08-17 21:29:36.000000000 -0500 +@@ -200,8 +200,8 @@ + + /* Initial contents, header + one entry per input section. No strings. */ + osec->header.sh_size = sizeof(*a_hdr) + loaded*sizeof(*a_sec); +- a_hdr = (struct kallsyms_header *) osec->contents = +- xmalloc(osec->header.sh_size); ++ osec->contents = xmalloc(osec->header.sh_size); ++ a_hdr = (struct kallsyms_header *) osec->contents; + memset(osec->contents, 0, osec->header.sh_size); + a_hdr->size = sizeof(*a_hdr); + a_hdr->sections = loaded; +@@ -275,8 +275,8 @@ + a_hdr->symbol_off + + a_hdr->symbols*a_hdr->symbol_size + + strings_size - strings_left; +- a_hdr = (struct kallsyms_header *) osec->contents = +- xrealloc(a_hdr, a_hdr->total_size); ++ osec->contents = xrealloc(a_hdr, a_hdr->total_size); ++ a_hdr = (struct kallsyms_header *) osec->contents; + p = (char *)a_hdr + a_hdr->symbol_off; + memcpy(p, symbols, a_hdr->symbols*a_hdr->symbol_size); + free(symbols); +diff -ur modutils-2.4.27/obj/obj_mips.c modutils-2.4.27-patched/obj/obj_mips.c +--- modutils-2.4.27/obj/obj_mips.c 2003-04-04 16:47:17.000000000 -0600 ++++ modutils-2.4.27-patched/obj/obj_mips.c 2005-08-17 21:29:20.000000000 -0500 +@@ -244,7 +244,8 @@ + archdata_sec->header.sh_size = 0; + sec = obj_find_section(f, "__dbe_table"); + if (sec) { +- ad = (struct archdata *) (archdata_sec->contents) = xmalloc(sizeof(*ad)); ++ archdata_sec->contents = xmalloc(sizeof(*ad)); ++ ad = (struct archdata *) archdata_sec->contents; + memset(ad, 0, sizeof(*ad)); + archdata_sec->header.sh_size = sizeof(*ad); + ad->__start___dbe_table = sec->header.sh_addr; diff --git a/package/mtd/mtd.mk b/package/mtd/mtd.mk index ceaa58199..49d175056 100644 --- a/package/mtd/mtd.mk +++ b/package/mtd/mtd.mk @@ -21,6 +21,8 @@ $(DL_DIR)/$(MTD_SOURCE): $(MTD_HOST_DIR)/.unpacked: $(DL_DIR)/$(MTD_SOURCE) zcat $(DL_DIR)/$(MTD_SOURCE) | tar -C $(TOOL_BUILD_DIR) $(TAR_OPTIONS) - + toolchain/patch-kernel.sh $(MTD_HOST_DIR) \ + package/mtd \*.patch touch $(MTD_HOST_DIR)/.unpacked $(MTD_HOST_DIR)/util/mkfs.jffs2: $(MTD_HOST_DIR)/.unpacked @@ -46,6 +48,8 @@ MTD_DIR:=$(BUILD_DIR)/mtd-20050122.orig $(MTD_DIR)/.unpacked: $(DL_DIR)/$(MTD_SOURCE) zcat $(DL_DIR)/$(MTD_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - + toolchain/patch-kernel.sh $(MTD_DIR) \ + package/mtd \*.patch touch $(MTD_DIR)/.unpacked MTD_TARGETS_n := diff --git a/package/mtd/mtd.patch b/package/mtd/mtd.patch new file mode 100644 index 000000000..d9b926951 --- /dev/null +++ b/package/mtd/mtd.patch @@ -0,0 +1,24 @@ +diff -ur mtd-20050122.orig/include/mtd/jffs2-user.h mtd-20050122.orig-patched/include/mtd/jffs2-user.h +--- mtd-20050122.orig/include/mtd/jffs2-user.h 2004-05-05 06:57:54.000000000 -0500 ++++ mtd-20050122.orig-patched/include/mtd/jffs2-user.h 2005-08-17 22:17:32.000000000 -0500 +@@ -19,8 +19,6 @@ + #undef je32_to_cpu + #undef jemode_to_cpu + +-extern int target_endian; +- + #define t16(x) ({ uint16_t __b = (x); (target_endian==__BYTE_ORDER)?__b:bswap_16(__b); }) + #define t32(x) ({ uint32_t __b = (x); (target_endian==__BYTE_ORDER)?__b:bswap_32(__b); }) + +diff -ur mtd-20050122.orig/util/jffs3.h mtd-20050122.orig-patched/util/jffs3.h +--- mtd-20050122.orig/util/jffs3.h 2005-01-21 17:00:13.000000000 -0600 ++++ mtd-20050122.orig-patched/util/jffs3.h 2005-08-17 22:19:25.000000000 -0500 +@@ -177,8 +177,6 @@ + #undef je32_to_cpu + #undef jemode_to_cpu + +-extern int target_endian; +- + #define t16(x) ({ uint16_t __b = (x); (target_endian==__BYTE_ORDER)?__b:bswap_16(__b); }) + #define t32(x) ({ uint32_t __b = (x); (target_endian==__BYTE_ORDER)?__b:bswap_32(__b); }) + diff --git a/package/openvpn/openvpn.mk b/package/openvpn/openvpn.mk index e50a3c0af..03279171a 100644 --- a/package/openvpn/openvpn.mk +++ b/package/openvpn/openvpn.mk @@ -13,6 +13,15 @@ OPENVPN_CAT:=zcat OPENVPN_BINARY:=openvpn OPENVPN_TARGET_BINARY:=usr/sbin/openvpn +# +# Select thread model. +# +ifeq ($(strip $(BR2_PTHREADS_NATIVE)),y) +THREAD_MODEL="--enable-threads=posix" +else +THREAD_MODEL=--enable-pthread +endif + $(DL_DIR)/$(OPENVPN_SOURCE): $(WGET) -P $(DL_DIR) $(OPENVPN_SITE)/$(OPENVPN_SOURCE) @@ -41,7 +50,7 @@ $(OPENVPN_DIR)/.configured: $(OPENVPN_DIR)/.unpacked --mandir=/usr/man \ --infodir=/usr/info \ --program-prefix="" \ - --enable-pthread \ + $(THREAD_MODEL) \ ); touch $(OPENVPN_DIR)/.configured |