I finally got the gcc so far that it can use dietlibc as default libc I could get most packets in the ditlibc target running. Many package patches and dietlibc code - see the CHANGELOG-ESDEN for the details. git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@1345 c5f82cb5-29bc-0310-9cd0-bff59a50e3bcrocklinux
@ -0,0 +1,22 @@ |
|||
--- cpio-2.5/rtapelib.c~ Thu Dec 6 05:55:12 2001
|
|||
+++ cpio-2.5/rtapelib.c Thu Aug 21 01:17:19 2003
|
|||
@@ -202,7 +202,8 @@
|
|||
return atoi (cp + 1); |
|||
} |
|||
|
|||
-#ifdef HAVE_NETDB_H
|
|||
+#if 0
|
|||
+/*#ifdef HAVE_NETDB_H*/
|
|||
/* Execute /etc/rmt as user USER on remote system HOST using rexec. |
|||
Return a file descriptor of a bidirectional socket for stdin and stdout. |
|||
If USER is NULL, or an empty string, use the current username. |
|||
@@ -340,7 +341,8 @@
|
|||
} |
|||
*dev = '\0'; |
|||
|
|||
-#ifdef HAVE_NETDB_H
|
|||
+#if 0
|
|||
+/*#ifdef HAVE_NETDB_H*/
|
|||
/* Execute the remote command using rexec. */ |
|||
READ (i) = WRITE (i) = _rmt_rexec (system, login); |
|||
if (READ (i) < 0) |
@ -1,60 +0,0 @@ |
|||
# --- ROCK-COPYRIGHT-NOTE-BEGIN --- |
|||
# |
|||
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
|||
# Please add additional copyright information _after_ the line containing |
|||
# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by |
|||
# the ./scripts/Create-CopyPatch script. Do not edit this copyright text! |
|||
# |
|||
# ROCK Linux: rock-src/package/base/dietlibc/pkg_patch/pkg_e2fsprogs.patch |
|||
# ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf |
|||
# |
|||
# This program is free software; you can redistribute it and/or modify |
|||
# it under the terms of the GNU General Public License as published by |
|||
# the Free Software Foundation; either version 2 of the License, or |
|||
# (at your option) any later version. A copy of the GNU General Public |
|||
# License can be found at Documentation/COPYING. |
|||
# |
|||
# Many people helped and are helping developing ROCK Linux. Please |
|||
# have a look at http://www.rocklinux.org/ and the Documentation/TEAM |
|||
# file for details. |
|||
# |
|||
# --- ROCK-COPYRIGHT-NOTE-END --- |
|||
|
|||
--- ./misc/tune2fs.c.orig Tue May 7 01:12:40 2002
|
|||
+++ ./misc/tune2fs.c Tue May 7 01:13:10 2002
|
|||
@@ -406,23 +406,6 @@
|
|||
print_label++; |
|||
} |
|||
|
|||
-static time_t parse_time(char *str)
|
|||
-{
|
|||
- struct tm ts;
|
|||
-
|
|||
- if (strcmp(str, "now") == 0) {
|
|||
- return (time(0));
|
|||
- }
|
|||
- memset(&ts, 0, sizeof(ts));
|
|||
- strptime(optarg, "%Y%m%d%H%M%S", &ts);
|
|||
- if (ts.tm_mday == 0) {
|
|||
- com_err(program_name, 0,
|
|||
- _("Couldn't parse date/time specifier: %s"),
|
|||
- str);
|
|||
- usage();
|
|||
- }
|
|||
- return (mktime(&ts));
|
|||
-}
|
|||
|
|||
static void parse_tune2fs_options(int argc, char **argv) |
|||
{ |
|||
@@ -586,11 +569,6 @@
|
|||
break; |
|||
case 's': |
|||
s_flag = atoi(optarg); |
|||
- open_flag = EXT2_FLAG_RW;
|
|||
- break;
|
|||
- case 'T':
|
|||
- T_flag = 1;
|
|||
- last_check_time = parse_time(optarg);
|
|||
open_flag = EXT2_FLAG_RW; |
|||
break; |
|||
case 'u': |
@ -0,0 +1,73 @@ |
|||
The getline stuff should be made in a more clean way ... perhups it will be |
|||
then upstreamable ... who knows ;) |
|||
|
|||
putw and getw could also be put in a __dietlibc__ conditional ... |
|||
|
|||
--- findutils-4.1.orig/locate/code.c 1994-09-26 23:06:09.000000000 +0000
|
|||
+++ findutils-4.1/locate/code.c 2002-09-18 23:37:03.000000000 +0000
|
|||
@@ -172,7 +172,11 @@
|
|||
if (diffcount < -LOCATEDB_OLD_OFFSET || diffcount > LOCATEDB_OLD_OFFSET) |
|||
{ |
|||
putc (LOCATEDB_OLD_ESCAPE, stdout); |
|||
- putw (diffcount + LOCATEDB_OLD_OFFSET, stdout);
|
|||
+ {
|
|||
+ int a = diffcount + LOCATEDB_OLD_OFFSET;
|
|||
+ fwrite(&a,sizeof(a),1,stdout);
|
|||
+ }
|
|||
+// putw (diffcount + LOCATEDB_OLD_OFFSET, stdout);
|
|||
} |
|||
else |
|||
putc (diffcount + LOCATEDB_OLD_OFFSET, stdout); |
|||
diff -Nur findutils-4.1.orig/locate/locate.c findutils-4.1/locate/locate.c
|
|||
--- findutils-4.1.orig/locate/locate.c 1994-09-26 23:06:14.000000000 +0000
|
|||
+++ findutils-4.1/locate/locate.c 2002-09-18 23:37:07.000000000 +0000
|
|||
@@ -246,8 +246,12 @@
|
|||
if (old_format) |
|||
{ |
|||
/* Get the offset in the path where this path info starts. */ |
|||
- if (c == LOCATEDB_OLD_ESCAPE)
|
|||
- count += getw (fp) - LOCATEDB_OLD_OFFSET;
|
|||
+ if (c == LOCATEDB_OLD_ESCAPE) {
|
|||
+ int a;
|
|||
+ fread(&a,sizeof(a),1,fp);
|
|||
+ count += a - LOCATEDB_OLD_OFFSET;
|
|||
+// count += getw (fp) - LOCATEDB_OLD_OFFSET;
|
|||
+ }
|
|||
else |
|||
count += c - LOCATEDB_OLD_OFFSET; |
|||
|
|||
--- ./gnulib/lib/getline.c.orig Wed Aug 20 14:00:08 2003
|
|||
+++ ./gnulib/lib/getline.c Wed Aug 20 14:01:39 2003
|
|||
@@ -33,7 +33,7 @@
|
|||
|
|||
#include <stdio.h> |
|||
#include <sys/types.h> |
|||
-
|
|||
+#if 0
|
|||
#if defined __GNU_LIBRARY__ && HAVE_GETDELIM |
|||
|
|||
int |
|||
@@ -145,4 +145,5 @@
|
|||
{ |
|||
return getdelim2 (lineptr, n, stream, delimiter, 0, 0); |
|||
} |
|||
+#endif
|
|||
#endif |
|||
--- ./gnulib/lib/getline.h.orig Wed Aug 20 13:59:59 2003
|
|||
+++ ./gnulib/lib/getline.h Wed Aug 20 14:00:34 2003
|
|||
@@ -30,13 +30,13 @@
|
|||
|
|||
/* glibc2 has these functions declared in <stdio.h>. Avoid redeclarations. */ |
|||
# if __GLIBC__ < 2 |
|||
-
|
|||
+/*
|
|||
int |
|||
getline PARAMS ((char **_lineptr, size_t *_n, FILE *_stream)); |
|||
|
|||
int |
|||
getdelim PARAMS ((char **_lineptr, size_t *_n, int _delimiter, FILE *_stream)); |
|||
-
|
|||
+*/
|
|||
# endif |
|||
|
|||
#endif /* not GETLINE_H_ */ |
@ -0,0 +1,88 @@ |
|||
diff -Nur gcc-3.2.3.orig/gcc/Makefile.in gcc-3.2.3/gcc/Makefile.in
|
|||
--- gcc-3.2.3.orig/gcc/Makefile.in Tue Jan 28 22:54:07 2003
|
|||
+++ gcc-3.2.3/gcc/Makefile.in Tue Jun 3 23:18:27 2003
|
|||
@@ -232,9 +232,9 @@
|
|||
FIBHEAP_H = $(srcdir)/../include/fibheap.h |
|||
|
|||
# Default native SYSTEM_HEADER_DIR, to be overridden by targets. |
|||
-NATIVE_SYSTEM_HEADER_DIR = /usr/include
|
|||
+NATIVE_SYSTEM_HEADER_DIR = /usr/dietlibc/include
|
|||
# Default cross SYSTEM_HEADER_DIR, to be overridden by targets. |
|||
-CROSS_SYSTEM_HEADER_DIR = $(build_tooldir)/sys-include
|
|||
+CROSS_SYSTEM_HEADER_DIR = /usr/dietlibc/include
|
|||
|
|||
# autoconf sets SYSTEM_HEADER_DIR to one of the above. |
|||
SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@ |
|||
diff -Nur gcc-3.2.3.orig/gcc/config/linux.h gcc-3.2.3/gcc/config/linux.h
|
|||
--- gcc-3.2.3.orig/gcc/config/linux.h Tue Dec 18 11:42:32 2001
|
|||
+++ gcc-3.2.3/gcc/config/linux.h Thu Jun 5 19:46:50 2003
|
|||
@@ -46,22 +46,10 @@
|
|||
object constructed before entering `main'. */ |
|||
|
|||
#undef STARTFILE_SPEC |
|||
-#ifdef USE_GNULIBC_1
|
|||
#define STARTFILE_SPEC \ |
|||
- "%{!shared: \
|
|||
- %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \
|
|||
- %{!p:%{profile:gcrt1.o%s} \
|
|||
- %{!profile:crt1.o%s}}}} \
|
|||
- crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
|
|||
-#else
|
|||
-#define STARTFILE_SPEC \
|
|||
- "%{!shared: \
|
|||
- %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \
|
|||
- %{!p:%{profile:gcrt1.o%s} \
|
|||
- %{!profile:crt1.o%s}}}} \
|
|||
- crti.o%s %{static:crtbeginT.o%s}\
|
|||
- %{!static:%{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}}"
|
|||
-#endif
|
|||
+ "start.o%s"
|
|||
+/* "%{!shared:start.o%s}\
|
|||
+ %{shared:shared_not_yet_set_in_STARTFILE_SPEC.o%s}"*/
|
|||
|
|||
/* Provide a ENDFILE_SPEC appropriate for GNU/Linux. Here we tack on |
|||
the GNU/Linux magical crtend.o file (see crtstuff.c) which |
|||
@@ -71,8 +59,9 @@
|
|||
|
|||
#undef ENDFILE_SPEC |
|||
#define ENDFILE_SPEC \ |
|||
- "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
|
|||
-
|
|||
+ ""
|
|||
+/*"%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
|
|||
+*/
|
|||
/* This is for -profile to use -lc_p instead of -lc. */ |
|||
#ifndef CC1_SPEC |
|||
#define CC1_SPEC "%{profile:-p}" |
|||
diff -Nur gcc-3.2.3.orig/gcc/cppdefault.h gcc-3.2.3/gcc/cppdefault.h
|
|||
--- gcc-3.2.3.orig/gcc/cppdefault.h Sun Oct 7 18:50:51 2001
|
|||
+++ gcc-3.2.3/gcc/cppdefault.h Tue Jun 3 23:19:22 2003
|
|||
@@ -27,7 +27,7 @@
|
|||
tradcpp. */ |
|||
|
|||
#ifndef STANDARD_INCLUDE_DIR |
|||
-#define STANDARD_INCLUDE_DIR "/usr/include"
|
|||
+#define STANDARD_INCLUDE_DIR "/usr/dietlibc/include"
|
|||
#endif |
|||
|
|||
#ifndef STANDARD_INCLUDE_COMPONENT |
|||
diff -Nur gcc-3.2.3.orig/gcc/gcc.c gcc-3.2.3/gcc/gcc.c
|
|||
--- gcc-3.2.3.orig/gcc/gcc.c Wed Jun 4 11:55:54 2003
|
|||
+++ gcc-3.2.3/gcc/gcc.c Thu Jun 5 20:04:26 2003
|
|||
@@ -1340,6 +1340,7 @@
|
|||
static const char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX; |
|||
static const char *const standard_startfile_prefix_1 = "/lib/"; |
|||
static const char *const standard_startfile_prefix_2 = "/usr/lib/"; |
|||
+static const char *const standard_startfile_prefix_3 = "/usr/dietlibc/lib-i386/";
|
|||
|
|||
static const char *const tooldir_base_prefix = TOOLDIR_BASE_PREFIX; |
|||
static const char *tooldir_prefix; |
|||
@@ -5976,6 +5977,8 @@
|
|||
add_prefix (&startfile_prefixes, standard_startfile_prefix_1, |
|||
"BINUTILS", PREFIX_PRIORITY_LAST, 0, NULL, 1); |
|||
add_prefix (&startfile_prefixes, standard_startfile_prefix_2, |
|||
+ "BINUTILS", PREFIX_PRIORITY_LAST, 0, NULL, 1);
|
|||
+ add_prefix (&startfile_prefixes, standard_startfile_prefix_3,
|
|||
"BINUTILS", PREFIX_PRIORITY_LAST, 0, NULL, 1); |
|||
#if 0 /* Can cause surprises, and one can use -B./ instead. */ |
|||
add_prefix (&startfile_prefixes, "./", NULL, |