From c0be66ab8501d5a95b31ff19ab4cf39630c0422a Mon Sep 17 00:00:00 2001 From: Piotr Esden-Tempski Date: Tue, 9 Sep 2003 20:38:50 +0000 Subject: [PATCH] Piotr Esden-Tempski : Even more dietlibc patches. git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@1355 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- Documentation/Developers/CHANGELOG-ESDEN | 6 + package/base/dietlibc/parse-config-9 | 2 +- .../base/dietlibc/pkg_patch/pkg_bin86.patch | 11 ++ .../dietlibc/pkg_patch/pkg_iproute2.patch | 13 +- .../base/dietlibc/pkg_patch/pkg_lilo.patch | 152 +++++++++++++----- .../base/dietlibc/pkg_patch/pkg_nasm.patch | 32 ++++ package/x86/bin86/bin86.desc | 1 + package/x86/nasm/nasm.desc | 1 + target/dietlibc/config.in | 1 - 9 files changed, 175 insertions(+), 44 deletions(-) create mode 100644 package/base/dietlibc/pkg_patch/pkg_bin86.patch create mode 100644 package/base/dietlibc/pkg_patch/pkg_nasm.patch diff --git a/Documentation/Developers/CHANGELOG-ESDEN b/Documentation/Developers/CHANGELOG-ESDEN index 5717191c0..8e10b51e5 100644 --- a/Documentation/Developers/CHANGELOG-ESDEN +++ b/Documentation/Developers/CHANGELOG-ESDEN @@ -2,6 +2,12 @@ This is a changelog for Dietlibc-Target, Alpha Target and all changes esden does for ROCKLinux ;-) +*) 2003-09-07 (2.0.0-rc1 - 2.0.0-rc2) + - fixed iproute2 for dietlibc + - added bin86 and nasm to dietlibc target (needed for lilo) and also fixed for + dietlibc + - fixed lilo for dietilbc + *) 2003-09-04 (2.0.0-rc1 - 2.0.0-rc2) - added vim to dietlibc target - refixed util-linux package for dietlibc diff --git a/package/base/dietlibc/parse-config-9 b/package/base/dietlibc/parse-config-9 index b0d8c04c2..e065ea6b0 100644 --- a/package/base/dietlibc/parse-config-9 +++ b/package/base/dietlibc/parse-config-9 @@ -104,7 +104,7 @@ if [ "$pkg_dietlibc_useit" = 1 ]; then set_wrapper_and_misc ;; - sed) + sed|lilo) echo_status "Setting dietlibc special lcompat settings!" add_lib "-lcompat" set_wrapper_and_misc diff --git a/package/base/dietlibc/pkg_patch/pkg_bin86.patch b/package/base/dietlibc/pkg_patch/pkg_bin86.patch new file mode 100644 index 000000000..969fb1031 --- /dev/null +++ b/package/base/dietlibc/pkg_patch/pkg_bin86.patch @@ -0,0 +1,11 @@ +--- bin86-0.16.12/ld/Makefile.orig Wed Mar 20 21:58:20 2002 ++++ bin86-0.16.12/ld/Makefile Sun Sep 7 22:43:43 2003 +@@ -17,7 +17,7 @@ + + # An alternative file for a non-standard a.out.h (eg i386 linux on an Alpha) + # +-# NATIVE=-DA_OUT_INCL='"a_out_local.h"' ++NATIVE=-DA_OUT_INCL='"x86_aout.h"' + + OBJS= dumps.o io.o ld.o readobj.o table.o typeconv.o linksyms.o \ + writex86.o writebin.o writerel.o diff --git a/package/base/dietlibc/pkg_patch/pkg_iproute2.patch b/package/base/dietlibc/pkg_patch/pkg_iproute2.patch index 0a0f0ac62..892c91cd3 100644 --- a/package/base/dietlibc/pkg_patch/pkg_iproute2.patch +++ b/package/base/dietlibc/pkg_patch/pkg_iproute2.patch @@ -219,8 +219,17 @@ #include #include #include ---- ./Makefile.orig 2001-08-02 08:37:03.000000000 +0200 -+++ ./Makefile 2003-04-06 17:24:39.000000000 +0200 +--- ./Makefile.orig Fri Sep 5 14:30:17 2003 ++++ ./Makefile Fri Sep 5 14:37:24 2003 +@@ -5,7 +5,7 @@ + DEFINES= -DRESOLVE_HOSTNAMES + + #options if you have a bind>=4.9.4 libresolv (or, maybe, glibc) +-LDLIBS=-lresolv ++LDLIBS= + ADDLIB= + + #options if you compile with libc5, and without a bind>=4.9.4 libresolv @@ -33,7 +33,7 @@ LDLIBS += -L../lib -lnetlink -lutil diff --git a/package/base/dietlibc/pkg_patch/pkg_lilo.patch b/package/base/dietlibc/pkg_patch/pkg_lilo.patch index 225a970d3..6db8189f3 100644 --- a/package/base/dietlibc/pkg_patch/pkg_lilo.patch +++ b/package/base/dietlibc/pkg_patch/pkg_lilo.patch @@ -19,81 +19,153 @@ # file for details. # # --- ROCK-COPYRIGHT-NOTE-END --- - ---- ./partition.h.orig 2002-08-14 13:55:42.000000000 +0200 -+++ ./partition.h 2002-08-14 13:58:10.000000000 +0200 -@@ -16,10 +16,10 @@ - struct _change_rule *next; - } CHANGE_RULE; + +--- lilo-22.5.6/partition.h.orig Fri Jun 6 19:07:45 2003 ++++ lilo-22.5.6/partition.h Fri Sep 5 17:42:53 2003 +@@ -19,9 +19,9 @@ + enum {PTW_OKAY=0, PTW_DOS=1, PTW_OS2=2, PTW_SWAP, PTW_XFS, + PTW_mask=7, PTW_NTFS=8}; -#if 1 - #define LLSECTORSIZE ((long long)SECTOR_SIZE) - -+#if 0 + ++#ifndef __dietlibc__ + loff_t llseek(unsigned int fd, loff_t offs, unsigned int whence); - #endif ---- ./partition.c.orig 2002-08-14 13:56:50.000000000 +0200 -+++ ./partition.c 2002-08-14 13:59:32.000000000 +0200 -@@ -9,6 +9,7 @@ +--- lilo-22.5.6/partition.c.orig Fri Sep 5 17:41:58 2003 ++++ lilo-22.5.6/partition.c Fri Sep 5 17:47:18 2003 +@@ -9,7 +9,9 @@ */ -+#include "asm/posix_types.h" - +- ++#ifdef __dietlibc__ ++#include ++#endif #include #include -@@ -36,6 +37,7 @@ + #include +@@ -35,7 +37,7 @@ + #include "loader.h" - -+#if 0 +- ++#ifndef __dietlibc__ _syscall5(int, _llseek, uint, fd, ulong, hi, ulong, lo, loff_t *, res, uint, wh); -@@ -48,7 +50,7 @@ +@@ -48,6 +50,7 @@ return _llseek(fd, offs>>32, offs, &res, whence) < 0 ? (loff_t)(-1) : res; } -- +#endif - - -@@ -153,8 +155,8 @@ + static + int anywhere(void *buf, unsigned char *str) +@@ -185,8 +188,13 @@ } i=5; while (i<=pe && base) { -- if (llseek(fd, LLSECTORSIZE*(base+second) + PART_TABLE_OFFSET, SEEK_SET) < 0) -- die("secondary llseek failed"); ++#ifdef __dietlibc__ + if (lseek(fd, LLSECTORSIZE*(base+second) + PART_TABLE_OFFSET, SEEK_SET) < 0) + die("secondary lseek failed"); ++#else + if (llseek(fd, LLSECTORSIZE*(base+second) + PART_TABLE_OFFSET, SEEK_SET) < 0) + die("secondary llseek failed"); ++#endif if (read(fd, part_table, sizeof(part_table)) != sizeof(part_table)) die("secondary read pt failed"); if ( read(fd, &boot_sig, sizeof(boot_sig)) != sizeof(boot_sig) || boot_sig != BOOT_SIGNATURE ) die("read second boot signature failed"); ---- ./probe.c.orig 2002-08-14 13:59:52.000000000 +0200 -+++ ./probe.c 2002-08-14 14:00:02.000000000 +0200 -@@ -551,8 +551,8 @@ - } - i=5; - while (verbose>0 && base) { -- if (llseek(fd, LLSECTORSIZE*(base+second) + PART_TABLE_OFFSET, SEEK_SET) < 0) -- die("secondary llseek failed"); -+ if (lseek(fd, LLSECTORSIZE*(base+second) + PART_TABLE_OFFSET, SEEK_SET) < 0) +@@ -609,7 +617,11 @@ + if (pt[count].sys_ind && pt[count].boot_ind != flag) { + pt[count].boot_ind = flag; + printf("pt[%d] -> %2x\n", count+1, (int)flag); ++#ifdef __dietlibc__ ++ if (lseek(fd, daddr[count], SEEK_SET) < 0) die("PT lseek failed"); ++#else + if (llseek(fd, daddr[count], SEEK_SET) < 0) die("PT llseek failed"); ++#endif + if (!test) + if (write(fd, &pt[count], sizeof(pt[0])) != sizeof(pt[0]) ) + die("PT write failure"); +@@ -793,8 +805,13 @@ + if (max>0) + while (base) { + daddr = LLSECTORSIZE*(base+second) + PART_TABLE_OFFSET; ++#ifdef __dietlibc__ ++ if (lseek(fd, daddr, SEEK_SET) < 0) + die("secondary lseek failed"); ++#else + if (llseek(fd, daddr, SEEK_SET) < 0) + die("secondary llseek failed"); ++#endif if (read(fd, pt, sizeof(pt)) != sizeof(pt)) die("secondary read pt failed"); if ( read(fd, &boot_sig, sizeof(boot_sig)) != sizeof(boot_sig) || boot_sig != BOOT_SIGNATURE ) die("read second boot signature failed"); ---- ./Makefile.orig Sat Jan 11 13:58:28 2003 -+++ ./Makefile Sat Jan 11 13:58:34 2003 -@@ -57,7 +57,7 @@ +--- lilo-22.5.6/Makefile~ Mon Jun 30 03:45:19 2003 ++++ lilo-22.5.6/Makefile Fri Sep 5 18:27:38 2003 +@@ -51,7 +51,7 @@ # XL_SECS=n Support for extra large (non-standard) floppies. - CONFIG=-DBDATA -DBUILTIN -DDSECS=3 -DIGNORECASE -DLBA32 -DLVM -DEVMS -DM386 \ -- -DONE_SHOT -DPASS160 -DREISERFS -DREWRITE_TABLE -DSOLO_CHAIN -DVARSETUP \ -+ -DONE_SHOT -DPASS160 -DREWRITE_TABLE -DSOLO_CHAIN -DVARSETUP \ - -DVERSION -DUNIFY + CONFIG=-DBDATA -DDSECS=3 -DEVMS -DIGNORECASE -DLVM -DONE_SHOT -DPASS160 \ +- -DREISERFS -DREWRITE_TABLE -DSOLO_CHAIN -DVERSION -DVIRTUAL ++ -DREWRITE_TABLE -DSOLO_CHAIN -DVERSION -DVIRTUAL # set the compiler optimization level + +--- lilo-22.5.6/boot.c~ Tue Jun 24 22:23:10 2003 ++++ lilo-22.5.6/boot.c Fri Sep 5 18:35:27 2003 +@@ -17,7 +17,11 @@ + #include + #include + #include ++#ifdef __dietlibc__ ++#include ++#else + #include ++#endif + #include + + #include "config.h" +--- lilo-22.5.6/bsect.c.orig Mon Jun 30 02:34:44 2003 ++++ lilo-22.5.6/bsect.c Fri Sep 5 18:41:20 2003 +@@ -12,7 +12,9 @@ + + #include + #include ++#ifndef __dietlibc__ + #include ++#endif + #include + #include + #include +--- lilo-22.5.6/partition.c~ Fri Sep 5 17:47:18 2003 ++++ lilo-22.5.6/partition.c Fri Sep 5 18:44:06 2003 +@@ -19,7 +19,11 @@ + #include + #include + #include ++#ifdef __dietlibc__ ++#include ++#else + #include ++#endif + #include + #include + #include +--- lilo-22.5.6/edit.c.orig Sun Feb 23 19:14:12 2003 ++++ lilo-22.5.6/edit.c Mon Sep 8 07:48:20 2003 +@@ -10,7 +10,11 @@ + + #include + #include ++#ifdef __dietlibc__ ++#include ++#else + #include ++#endif + #include + #include + #include diff --git a/package/base/dietlibc/pkg_patch/pkg_nasm.patch b/package/base/dietlibc/pkg_patch/pkg_nasm.patch new file mode 100644 index 000000000..a54814a54 --- /dev/null +++ b/package/base/dietlibc/pkg_patch/pkg_nasm.patch @@ -0,0 +1,32 @@ +--- nasm-0.98.36/nasmlib.c~ Thu Feb 6 02:44:09 2003 ++++ nasm-0.98.36/nasmlib.c Sun Sep 7 23:23:29 2003 +@@ -372,10 +372,8 @@ + if (posn >= r->stepsize * LAYERSIZ(r)) + return 0; /* Return 0 for undefined entries */ + while (r->layers > 0) { +- ldiv_t l; +- l = ldiv (posn, r->stepsize); +- r = r->u.b.data[l.quot]; +- posn = l.rem; ++ r = r->u.b.data[posn/r->stepsize]; ++ posn = posn%r->stepsize; + if (!r) + return 0; /* Return 0 for undefined entries */ + } +@@ -408,14 +406,12 @@ + result = r; + + while (r->layers > 0) { +- ldiv_t l; + struct RAA **s; +- l = ldiv (posn, r->stepsize); +- s = &r->u.b.data[l.quot]; ++ s = &r->u.b.data[posn / r->stepsize]; + if (!*s) + *s = real_raa_init (r->layers - 1); + r = *s; +- posn = l.rem; ++ posn = posn % r->stepsize; + } + + r->u.l.data[posn] = value; diff --git a/package/x86/bin86/bin86.desc b/package/x86/bin86/bin86.desc index e07aa400a..3576ba5b2 100644 --- a/package/x86/bin86/bin86.desc +++ b/package/x86/bin86/bin86.desc @@ -30,6 +30,7 @@ [M] Clifford Wolf [C] base/development +[F] DIETLIBC [R] + x86 [L] GPL diff --git a/package/x86/nasm/nasm.desc b/package/x86/nasm/nasm.desc index 54284f202..dbc0d06cc 100644 --- a/package/x86/nasm/nasm.desc +++ b/package/x86/nasm/nasm.desc @@ -36,6 +36,7 @@ [M] Clifford Wolf [C] base/development +[F] DIETLIBC [R] + x86 [L] GPL diff --git a/target/dietlibc/config.in b/target/dietlibc/config.in index cdd347d70..afa5d7022 100644 --- a/target/dietlibc/config.in +++ b/target/dietlibc/config.in @@ -26,7 +26,6 @@ block_begin 0 ROCKCFG_TRG_DIETLIBC_PRONLY 1 if [ $ROCKCFG_TRG_DIETLIBC_PRONLY = 1 ] ; then pkgfilter grep ' DIETLIBC ' - pkgdisable iproute2 lilo # disabling only temporarily till they are fixed fi bool 'Link binaries dynamically with dietlibc' \