Browse Source

Piotr Esden-Tempski <pe1724@bingo-ev.de>:

Even more dietlibc patches.


git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@1355 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc
rocklinux
Piotr Esden-Tempski 22 years ago
parent
commit
c0be66ab85
9 changed files with 175 additions and 44 deletions
  1. +6
    -0
      Documentation/Developers/CHANGELOG-ESDEN
  2. +1
    -1
      package/base/dietlibc/parse-config-9
  3. +11
    -0
      package/base/dietlibc/pkg_patch/pkg_bin86.patch
  4. +11
    -2
      package/base/dietlibc/pkg_patch/pkg_iproute2.patch
  5. +112
    -40
      package/base/dietlibc/pkg_patch/pkg_lilo.patch
  6. +32
    -0
      package/base/dietlibc/pkg_patch/pkg_nasm.patch
  7. +1
    -0
      package/x86/bin86/bin86.desc
  8. +1
    -0
      package/x86/nasm/nasm.desc
  9. +0
    -1
      target/dietlibc/config.in

+ 6
- 0
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

+ 1
- 1
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

+ 11
- 0
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

+ 11
- 2
package/base/dietlibc/pkg_patch/pkg_iproute2.patch

@ -219,8 +219,17 @@
#include <linux/sockios.h>
#include <netinet/in.h>
#include <arpa/inet.h>
--- ./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

+ 112
- 40
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 <asm/posix_types.h>
+#endif
#include <stdlib.h>
#include <unistd.h>
@@ -36,6 +37,7 @@
#include <stdio.h>
@@ -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 <ctype.h>
#include <fcntl.h>
#include <errno.h>
+#ifdef __dietlibc__
+#include <linux/a.out.h>
+#else
#include <a.out.h>
+#endif
#include <sys/stat.h>
#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 <unistd.h>
#include <sys/types.h>
+#ifndef __dietlibc__
#include <sys/statfs.h>
+#endif
#include <sys/stat.h>
#include <stdio.h>
#include <fcntl.h>
--- 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 <ctype.h>
#include <fcntl.h>
#include <errno.h>
+#ifdef __dietlibc__
+#include <linux/a.out.h>
+#else
#include <a.out.h>
+#endif
#include <sys/stat.h>
#include <sys/types.h>
#include <asm/unistd.h>
--- 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 <unistd.h>
#include <sys/types.h>
+#ifdef __dietlibc__
+#include <sys/vfs.h>
+#else
#include <sys/statfs.h>
+#endif
#include <sys/stat.h>
#include <stdio.h>
#include <stdlib.h>

+ 32
- 0
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;

+ 1
- 0
package/x86/bin86/bin86.desc

@ -30,6 +30,7 @@
[M] Clifford Wolf <clifford@clifford.at>
[C] base/development
[F] DIETLIBC
[R] + x86
[L] GPL

+ 1
- 0
package/x86/nasm/nasm.desc

@ -36,6 +36,7 @@
[M] Clifford Wolf <clifford@clifford.at>
[C] base/development
[F] DIETLIBC
[R] + x86
[L] GPL

+ 0
- 1
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' \

Loading…
Cancel
Save