diff options
author | Eric Andersen <andersen@codepoet.org> | 2003-11-13 10:19:01 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2003-11-13 10:19:01 +0000 |
commit | 0ab048b6557ea0a337b96f5d0558694a237dfab8 (patch) | |
tree | 89dbb0a558beba1894d348fc537cc8d5e8a3d74a /debian | |
parent | 9cb6901edf2145a9111f11b15acf9d74494bd04d (diff) | |
download | uClibc-alpine-0ab048b6557ea0a337b96f5d0558694a237dfab8.tar.bz2 uClibc-alpine-0ab048b6557ea0a337b96f5d0558694a237dfab8.tar.xz |
Update the debian packaging for use in a standalone uClibc
system, rather than being a subordinate lib under a glibc
based system.
-Erik
Diffstat (limited to 'debian')
-rw-r--r-- | debian/README.Debian | 12 | ||||
-rw-r--r-- | debian/changelog | 187 | ||||
-rw-r--r-- | debian/config | 101 | ||||
-rw-r--r-- | debian/control | 58 | ||||
-rw-r--r-- | debian/control.in | 47 | ||||
-rw-r--r-- | debian/copyright | 10 | ||||
-rw-r--r-- | debian/docs | 3 | ||||
-rwxr-xr-x | debian/fixlinks | 81 | ||||
-rw-r--r-- | debian/gcc-uClibc/.cvsignore | 2 | ||||
-rw-r--r-- | debian/gcc-uClibc/Makefile | 99 | ||||
-rw-r--r-- | debian/gcc-uClibc/gcc-uClibc.c | 668 | ||||
-rw-r--r-- | debian/ldconfig.1 (renamed from debian/uclibc-gcc.1) | 0 | ||||
-rw-r--r-- | debian/ldd.1 (renamed from debian/uclibc-ldd.1) | 0 | ||||
-rw-r--r-- | debian/libuclibc-dev.files | 10 | ||||
-rw-r--r-- | debian/libuclibc0.files | 3 | ||||
-rw-r--r-- | debian/libuclibc0.postinst | 8 | ||||
-rw-r--r-- | debian/libuclibc0.shlibs | 8 | ||||
-rwxr-xr-x | debian/mksnapshot | 36 | ||||
-rwxr-xr-x | debian/rules | 92 | ||||
-rw-r--r-- | debian/uclibc-dev.files | 2 | ||||
-rw-r--r-- | debian/uclibc-gcc.dirs | 4 | ||||
-rw-r--r-- | debian/uclibc-ldconfig.1 | 28 | ||||
-rw-r--r-- | debian/uclibc-readelf.1 | 19 | ||||
-rw-r--r-- | debian/uclibc-toolchain.files | 3 | ||||
-rw-r--r-- | debian/uclibc.files | 4 | ||||
-rw-r--r-- | debian/uclibc.postinst | 8 | ||||
-rw-r--r-- | debian/uclibc.shlibs | 10 |
27 files changed, 167 insertions, 1336 deletions
diff --git a/debian/README.Debian b/debian/README.Debian deleted file mode 100644 index fd3919ead..000000000 --- a/debian/README.Debian +++ /dev/null @@ -1,12 +0,0 @@ - -The script mksnapshot will automatically download a new snapshot -from the uClibc CVS server. - -Notes on Build-Depends: - - kernel-headers | kernel-headers-2.4.10 autobuilt on i386 and powerpc - - kernel-headers-2.4 autobuilt on xxx - - - diff --git a/debian/changelog b/debian/changelog index 3733b657c..6155dce92 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,189 +1,6 @@ -uclibc (0.9.18-1) unstable; urgency=low +uclibc (0.9.23-1) unstable; urgency=low * New upstream release - * Update to kernel-source-2.4.20 - * Upgrade .shlib dependencies - * Enable IPv6 and other options (Closes: #174092) - * Remove build directory from ld script (Closes: #161474) - * Add/fix /lib/ld-uClibc.so.0 symlink - -- David Schleef <ds@schleef.org> Wed, 12 Feb 2003 12:40:38 -0800 - -uclibc (0.9.16-6) unstable; urgency=low - - * Reenable FPU and C99 math support that were accidentally - disabled in the move to 0.9.16. (Closes: #171359, #172686) - * Fix ${arch}-uclibc-xx installation directory (should be /usr/bin) - * Make ldd work with dh_shlibdeps (Closes: #171282, #171287) - - -- David Schleef <ds@schleef.org> Wed, 11 Dec 2002 15:55:52 -0800 - -uclibc (0.9.16-5) unstable; urgency=low - - * (Attempt #2) Removed some default flags on sparc. - - -- David Schleef <ds@schleef.org> Wed, 27 Nov 2002 13:56:39 -0800 - -uclibc (0.9.16-4) unstable; urgency=low - - * Removed some default flags on m68k and sparc, since they don't - work with the standard gcc. - * Stripped quotes around ARCH_CFLAGS - - -- David Schleef <ds@schleef.org> Fri, 22 Nov 2002 15:15:25 -0800 - -uclibc (0.9.16-3) unstable; urgency=low - - * Got the last change wrong. - * Enabled alpha build. - - -- David Schleef <ds@schleef.org> Thu, 21 Nov 2002 16:24:27 -0800 - -uclibc (0.9.16-2) unstable; urgency=low - - * Disable shared lib loader on m68k and sparc - - -- David Schleef <ds@schleef.org> Wed, 20 Nov 2002 19:45:31 -0800 - -uclibc (0.9.16-1) unstable; urgency=low - - * New upstream release (Closes: #169650, #169547) - * Rewrote much of the installation code to use dh_ more - * Removed gasp man page link (Closes: #169648) - * Upstream uses new configuration method (Closes: #169513) - - -- David Schleef <ds@schleef.org> Mon, 18 Nov 2002 11:32:43 -0800 - -uclibc (0.9.12-2) unstable; urgency=low - - * Make sure MAS_MMU=true on m68k - - -- David Schleef <ds@schleef.org> Thu, 27 Jun 2002 15:04:59 -0700 - -uclibc (0.9.12-1) unstable; urgency=low - - * New upstream release. - * Attempt to fix MIPS build again. (Closes: #150313) - - -- David Schleef <ds@schleef.org> Mon, 24 Jun 2002 16:26:18 -0700 - -uclibc (0.9.11-cvs20020619-1) unstable; urgency=low - - * This is an automatic snapshot of uClibc CVS - * new snapshot - * MIPS build should have been fixed in the last entry, which - was not actually uploaded (Closes: #150313). - - -- David Schleef <ds@schleef.org> Wed, 19 Jun 2002 11:45:59 -0700 - -uclibc (0.9.11-cvs20020420-1) unstable; urgency=low - - * Many of the configs have broken CROSS definitions. Compensate - for that in debian/rules. - - -- David Schleef <ds@schleef.org> Sat, 20 Apr 2002 15:40:39 -0700 - -uclibc (0.9.11-cvs20020419-1) unstable; urgency=low - - * new upstream snapshot - - should fix build on sparc and m68kk (Closes: #142708) - * I wanted to have a debian package for the 0.9.11 release, but - that was rather broken on PowerPC. - * Updated kernel source to 2.4.18 - - -- David Schleef <ds@schleef.org> Fri, 19 Apr 2002 10:15:59 -0700 - -uclibc (0.9.10-cvs20020406-1) unstable; urgency=low - - * new upstream snapshot - - should fix build on mips - * updated shlibs to 0.9.10, since it was broken previously (actually - was done in previous upload) - * create top-level lib/, for safety - - -- David Schleef <ds@schleef.org> Sat, 6 Apr 2002 14:34:41 -0800 - -uclibc (0.9.10-1) unstable; urgency=low - - * New upstream release (Closes: #140295) - - -- David Schleef <ds@schleef.org> Thu, 28 Mar 2002 11:25:17 -0800 - -uclibc (0.9.9-cvs20020221-2) unstable; urgency=low - - * debian/rules: touch linux/autoconf.h. Should make us buildable - on arm. - * add build-dep on bzip2 - - -- David Schleef <ds@schleef.org> Sun, 24 Feb 2002 17:26:37 -0800 - -uclibc (0.9.9-cvs20020221-1) unstable; urgency=low - - * New upstream snapshot - * Add subarchitecture symlinks on arm - * Use mips config file on mipsel - - -- David Schleef <ds@schleef.org> Thu, 21 Feb 2002 23:11:23 -0800 - -uclibc (0.9.9-cvs20020210-1) unstable; urgency=low - - * New upstream snapshot. - * debian/mksnapshot: updated version and filenames - * debian/control.in: changed dependency from kernel-headers to - kernel-source. - * debian/rules: force HAS_MMU=true - * debian/rules: change mipsel to mips - * debian/rules: untar kernel-source include directory and use - that as kernel source. - * Previous 3 lines should fix autobuildability (Closes: #131373) - - -- David Schleef <ds@schleef.org> Sun, 10 Feb 2002 17:11:22 -0800 - -uclibc (0.9.5-cvs20011117-1) unstable; urgency=low - - * New upstream snaphot - * mksnapshot (new): script to generate snapshots from upstream CVS - * control, control.in: limited architectures to those that can - theoretically build. Updated kernel-headers dependency to - -2.4.10 -- this may cause problems with autobuilders. - * fixlinks (new): script to fix up symlinks to comply with policy. - Decreases number of lintian complaints. - * rules: use fixlinks. Fix method of finding kernel headers -- - should increase potential autobuildability. - * uclibc-ldd.1, uclibc-readelf.1: Bogus updates to bogus man pages. - These really need to be written. - - -- David Schleef <ds@schleef.org> Sat, 17 Nov 2001 18:10:33 -0800 - -uclibc (0.9.5-cvs20011011-1) unstable; urgency=low - - * Closes #104243 - - -- David Schleef <ds@schleef.org> Thu, 11 Oct 2001 13:29:02 -0700 - -uclibc (0.9.5-cvs20010702-1) unstable; urgency=low - - * Build from CVS - * Can create cross-compiling library (but not cross packages) - - -- David Schleef <ds@schleef.org> Mon, 2 Jul 2001 23:16:20 -0700 - -uclibc (0.9.5-cvs20010630-1) unstable; urgency=low - - * No, really. Initial Release. I mean it this time. - * Clean up patch. - - -- David Schleef <ds@schleef.org> Sat, 30 Jun 2001 17:12:41 -0700 - -uclibc (0.9.5-cvs20010626-1) unstable; urgency=low - - * No, really. Initial Release. - - -- David Schleef <ds@schleef.org> Thu, 28 Jun 2001 16:49:25 -0700 - -uclibc (0.9.5-cvs20010625-1) unstable; urgency=low - - * Initial Release. - - -- David Schleef <ds@schleef.org> Mon, 25 Jun 2001 22:13:43 -0700 + -- Erik Andersen <andersen@codepoet.org> Wed, 12 Nov 2003 18:20:49 -0700 diff --git a/debian/config b/debian/config index 22711f08c..a478d4b0b 100644 --- a/debian/config +++ b/debian/config @@ -1,72 +1,127 @@ # # Automatically generated make config: don't edit # +# TARGET_alpha is not set +# TARGET_arm is not set +# TARGET_cris is not set +# TARGET_e1 is not set +# TARGET_h8300 is not set +# TARGET_i386 is not set +# TARGET_i960 is not set +# TARGET_m68k is not set +# TARGET_microblaze is not set +# TARGET_mips is not set +# TARGET_powerpc is not set +# TARGET_sh is not set +# TARGET_sparc is not set +# TARGET_v850 is not set # # Target Architecture Features and Options # HAVE_ELF=y -CONFIG_386=y -# CONFIG_486 is not set -# CONFIG_586 is not set -# CONFIG_586MMX is not set -# CONFIG_686 is not set -# CONFIG_PENTIUMIII is not set -# CONFIG_PENTIUM4 is not set -# CONFIG_K6 is not set -# CONFIG_K7 is not set -# CONFIG_CRUSOE is not set -# CONFIG_WINCHIPC6 is not set -# CONFIG_WINCHIP2 is not set -# CONFIG_CYRIXIII is not set -UCLIBC_HAS_MMU=y +TARGET_ARCH="none" +# ARCH_LITTLE_ENDIAN is not set +# ARCH_BIG_ENDIAN is not set +# ARCH_HAS_NO_MMU is not set UCLIBC_HAS_FLOATS=y -HAS_FPU=y +# ARCH_HAS_NO_FPU is not set +# HAS_FPU is not set DO_C99_MATH=y WARNINGS="-Wall" KERNEL_SOURCE="/usr/src/linux" -C_SYMBOL_PREFIX="" +HAVE_DOT_CONFIG=y # # General Library Settings # +# HAVE_NO_PIC is not set DOPIC=y HAVE_SHARED=y BUILD_UCLIBC_LDSO=y LDSO_LDD_SUPPORT=y +UCLIBC_CTOR_DTOR=y +# UCLIBC_PROFILING is not set UCLIBC_HAS_THREADS=y +PTHREADS_DEBUG_SUPPORT=y UCLIBC_HAS_LFS=y # MALLOC is not set MALLOC_930716=y +MALLOC_GLIBC_COMPAT=y +UCLIBC_DYNAMIC_ATEXIT=y HAS_SHADOW=y -UCLIBC_HAS_REGEX=y UNIX98PTY_ONLY=y ASSUME_DEVPTS=y +UCLIBC_HAS_TM_EXTENSIONS=y +UCLIBC_HAS_TZ_CACHING=y +UCLIBC_HAS_TZ_FILE=y +UCLIBC_HAS_TZ_FILE_READ_MANY=y +UCLIBC_TZ_FILE_PATH="/etc/TZ" # # Networking Support # -UCLIBC_HAS_IPV6=y +# UCLIBC_HAS_IPV6 is not set UCLIBC_HAS_RPC=y +# UCLIBC_HAS_FULL_RPC is not set # # String and Stdio Support # +UCLIBC_HAS_CTYPE_TABLES=y +UCLIBC_HAS_CTYPE_SIGNED=y +# UCLIBC_HAS_CTYPE_UNSAFE is not set +UCLIBC_HAS_CTYPE_CHECKED=y +# UCLIBC_HAS_CTYPE_ENFORCED is not set UCLIBC_HAS_WCHAR=y -# USE_OLD_VFPRINTF is not set +# UCLIBC_HAS_LOCALE is not set +UCLIBC_HAS_HEXADECIMAL_FLOATS=y +UCLIBC_HAS_GLIBC_CUSTOM_PRINTF=y +UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS=9 +UCLIBC_HAS_SCANF_GLIBC_A_FLAG=y +# UCLIBC_HAS_STDIO_BUFSIZ_NONE is not set +UCLIBC_HAS_STDIO_BUFSIZ_256=y +# UCLIBC_HAS_STDIO_BUFSIZ_512 is not set +# UCLIBC_HAS_STDIO_BUFSIZ_1024 is not set +# UCLIBC_HAS_STDIO_BUFSIZ_2048 is not set +# UCLIBC_HAS_STDIO_BUFSIZ_4096 is not set +# UCLIBC_HAS_STDIO_BUFSIZ_8192 is not set +UCLIBC_HAS_STDIO_BUILTIN_BUFFER_NONE=y +# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_4 is not set +# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_8 is not set +UCLIBC_HAS_STDIO_GETC_MACRO=y +UCLIBC_HAS_STDIO_PUTC_MACRO=y +UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION=y +# UCLIBC_HAS_FOPEN_LARGEFILE_MODE is not set +UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE=y +UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y +UCLIBC_HAS_PRINTF_M_SPEC=y +UCLIBC_HAS_ERRNO_MESSAGES=y +# UCLIBC_HAS_SYS_ERRLIST is not set +UCLIBC_HAS_SIGNUM_MESSAGES=y +# UCLIBC_HAS_SYS_SIGLIST is not set +UCLIBC_HAS_GNU_GETOPT=y + +# +# Big and Tall +# +UCLIBC_HAS_REGEX=y +# UCLIBC_HAS_WORDEXP is not set +UCLIBC_HAS_FTW=y +UCLIBC_HAS_GLOB=y # # Library Installation Options # -SHARED_LIB_LOADER_PATH="$(DEVEL_PREFIX)/lib" +SHARED_LIB_LOADER_PREFIX="/lib" +RUNTIME_PREFIX="/usr/$(TARGET_ARCH)-linux-uclibc" DEVEL_PREFIX="/usr/$(TARGET_ARCH)-linux-uclibc" -SYSTEM_DEVEL_PREFIX="$(DEVEL_PREFIX)" -DEVEL_TOOL_PREFIX="$(DEVEL_PREFIX)/usr" # -# uClibc hacking options +# uClibc development/debugging options # # DODEBUG is not set # DOASSERTS is not set # SUPPORT_LD_DEBUG is not set # SUPPORT_LD_DEBUG_EARLY is not set +# UCLIBC_MJN3_ONLY is not set diff --git a/debian/control b/debian/control index 2ea715022..b525be24d 100644 --- a/debian/control +++ b/debian/control @@ -1,47 +1,31 @@ Source: uclibc -Section: devel -Priority: optional -Maintainer: David Schleef <ds@schleef.org> -Build-Depends: debhelper, bzip2, kernel-source-2.4.20 +Section: libs +Priority: required +Maintainer: Erik Andersen <andersen@codepoet.org> +Build-Depends: make (>= 3.78-4), dpkg-dev (>= 1.4.1.5), debianutils (>= 1.13.1), tar (>= 1.13.11), bzip2, texinfo (>= 4.0), kernel-source-2.4.22, gcc-3.3, binutils (>= 2.14.90.0.6), sed (>= 4.0.5-4) Standards-Version: 3.5.8 -Package: libuclibc-dev -Section: devel -Architecture: alpha arm i386 m68k mips mipsel powerpc sh sparc -Depends: libuclibc0 (= ${Source-Version}) -Description: A small implementation of the C library - uClibc is an implementation of the standard C library that is - much smaller than glibc, which makes it useful for embedded - systems. This package includes header files and development - libraries necessary to compile applications that use uClibc. - -Package: libuclibc0 -Section: libs -Architecture: alpha arm i386 m68k mips mipsel powerpc sh sparc +Package: uclibc +Architecture: alpha arm i386 m68k mips mipsel powerpc sparc sh3 sh4 sh3eb sh4eb +Section: base +Priority: required Depends: -Description: A small implementation of the C library +Conflicts: libc6 +Description: The uClibc C Library: Shared libraries uClibc is an implementation of the standard C library that is much smaller than glibc, which makes it useful for embedded systems. This package provides only the run-time libraries. - . - The Debian binary packages for uClibc do not provide the necessary - components for using uClibc as the primary library on a system, - as might be done for an embedded system. -Package: uclibc-toolchain +Package: uclibc-dev +Architecture: alpha arm i386 m68k mips mipsel powerpc sparc sh3 sh4 sh3eb sh4eb Section: devel -Architecture: alpha arm i386 m68k mips mipsel powerpc sh sparc -Depends: gcc|c-compiler, binutils, ${shlibs:Depends} -Recommends: libuclibc-dev -Conflicts: uclibc-gcc -Replaces: uclibc-gcc -Description: A compiler wrapper for uClibc - This package includes utilities that function as a toolchain for - compiling with uClibc instead of the native libc. The utilities - have names such as powerpc-uclibc-gcc (depending on the architecture), - and should behave identically to the base utilities, except that - they use headers and libraries provided in the libuclibc-dev - package. Most utilities are symbolic links to the correct underlying - utility, although gcc and ld are implemented as wrapper binaries that - call gcc and ld with the necessary arguments and command line options. +Priority: standard +Depends: uclibc (= ${Source-Version}) +Provides: libc-dev, libc6-dev +Recommends: c-compiler +Description: The uClibc C Library: Development Libraries and Header Files + uClibc is an implementation of the standard C library that is + much smaller than glibc, which makes it useful for embedded + systems. This package includes header files and development + libraries necessary to compile applications that use uClibc. diff --git a/debian/control.in b/debian/control.in deleted file mode 100644 index ee46a686c..000000000 --- a/debian/control.in +++ /dev/null @@ -1,47 +0,0 @@ -Source: uclibc -Section: devel -Priority: optional -Maintainer: David Schleef <ds@schleef.org> -Build-Depends: debhelper, bzip2, _KERNEL_ -Standards-Version: 3.5.8 - -Package: libuclibc-dev_TARGET_ -Section: devel -Architecture: _ARCHS_ -Depends: libuclibc0_TARGET_ (= ${Source-Version}) -Description: A small implementation of the C library - uClibc is an implementation of the standard C library that is - much smaller than glibc, which makes it useful for embedded - systems. This package includes header files and development - libraries necessary to compile applications that use uClibc. - -Package: libuclibc0_TARGET_ -Section: libs -Architecture: _ARCHS_ -Depends: -Description: A small implementation of the C library - uClibc is an implementation of the standard C library that is - much smaller than glibc, which makes it useful for embedded - systems. This package provides only the run-time libraries. - . - The Debian binary packages for uClibc do not provide the necessary - components for using uClibc as the primary library on a system, - as might be done for an embedded system. - -Package: uclibc_TARGET_-toolchain -Section: devel -Architecture: _ARCHS_ -Depends: gcc|c-compiler, binutils, ${shlibs:Depends} -Recommends: libuclibc-dev_TARGET_ -Conflicts: uclibc_TARGET_-gcc -Replaces: uclibc_TARGET_-gcc -Description: A compiler wrapper for uClibc - This package includes utilities that function as a toolchain for - compiling with uClibc instead of the native libc. The utilities - have names such as powerpc-uclibc-gcc (depending on the architecture), - and should behave identically to the base utilities, except that - they use headers and libraries provided in the libuclibc-dev_TARGET_ - package. Most utilities are symbolic links to the correct underlying - utility, although gcc and ld are implemented as wrapper binaries that - call gcc and ld with the necessary arguments and command line options. - diff --git a/debian/copyright b/debian/copyright index 3d3c38511..f7562ade9 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,11 +1,7 @@ -This package was debianized by David Schleef <ds@stm.lbl.gov> on -Mon, 25 Jun 2001 22:13:43 -0700. +This package was debianized by Erik Andersen <andersee@debian.org> on +Wed, 12 Nov 2003 19:15:30 -0700 -The source is a snapshot of the uClibc CVS tree at -:pserver:anonymous@uclibc.org:/var/cvs. Password -is "", module name is uClibc. - -Upstream Maintainer: Erik Andersen <andersee@debian.org> +Maintainer: Erik Andersen <andersee@debian.org> Copyright: diff --git a/debian/docs b/debian/docs index 724e08449..4860c7273 100644 --- a/debian/docs +++ b/debian/docs @@ -1,2 +1,5 @@ README +INSTALL TODO +Changelog +Changelog.full diff --git a/debian/fixlinks b/debian/fixlinks deleted file mode 100755 index 110a5e313..000000000 --- a/debian/fixlinks +++ /dev/null @@ -1,81 +0,0 @@ -#!/usr/bin/perl -w -# vi: set ts=4: - - -@LINKS=`find . -type l|LC_ALL=C xargs ls -l`; - -#print @LINKS; - -#$debug = 1; - -while($_ = shift @LINKS){ - chomp; - my ($perm,$nlinks,$owner,$group,$size,$month,$day,$year,$file) = - split(' ', $_, 9); - my $link; - - if($perm =~ m/^l/){ - ($relfile, $link) = split(' -> ', $file); - } - - # chop off leading . in $file - $file = $relfile; - $file =~ s/^\.//; - - if($perm =~ m/^l/){ - my @pathcomponents = split('/', $file); - my @linkcomponents = split('/', $link); - - if($link =~ m/^\//){ - @newcomponents = @linkcomponents; - }else{ - @newcomponents = @pathcomponents; - - # chop off filename - pop(@newcomponents); - - while($comp = shift @linkcomponents){ - $debug && print "path: ",join(':',@newcomponents)," -- $comp -- ", join(':',@linkcomponents),"\n"; - - if($comp eq ""){ - # ignore - }elsif($comp eq ".."){ - pop(@newcomponents); - }else{ - push @newcomponents,$comp; - } - } - } - - if($newcomponents[0] eq ""){ - shift(@newcomponents); - } - if($pathcomponents[0] eq ""){ - shift(@pathcomponents); - } - - #print "from ",join('/',@pathcomponents),"\n"; - #print "to ",join('/',@newcomponents),"\n"; - - if($newcomponents[0] eq $pathcomponents[0]){ - $debug && print $newcomponents[0],", ",$pathcomponents[0]; - $debug && print "should be relative\n"; - while($newcomponents[0] eq $pathcomponents[0]){ - shift(@newcomponents); - shift(@pathcomponents); - } - while(@pathcomponents > 1){ - shift(@pathcomponents); - unshift(@newcomponents,".."); - } - }else{ - $debug && print "should be absolute\n"; - unshift(@newcomponents,""); - } - $newlink=join('/',@newcomponents); - print "ln -sf $newlink $relfile\n"; - unlink($relfile); - symlink($newlink,$relfile); - } -} - diff --git a/debian/gcc-uClibc/.cvsignore b/debian/gcc-uClibc/.cvsignore deleted file mode 100644 index d67d50416..000000000 --- a/debian/gcc-uClibc/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -gcc-uClibc.h -*-uclibc-* diff --git a/debian/gcc-uClibc/Makefile b/debian/gcc-uClibc/Makefile deleted file mode 100644 index b4b4808d0..000000000 --- a/debian/gcc-uClibc/Makefile +++ /dev/null @@ -1,99 +0,0 @@ -# Makefile for building a fake gcc/binutils toolchain -# that simply spoofs the location of the C library -# -# Copyright (C) 2000-2002 Erik Andersen <andersen@uclibc.org> -# - -TOPDIR = ../../ -include $(TOPDIR)Rules.mak - -UCLIBC_DIR := $(shell (cd $(TOPDIR); /bin/pwd)) -GCC_BIN := $(shell which $(CC)) -LD_BIN := $(shell which $(LD)) -GCCINCDIR := $(shell $(CC) -print-search-dirs | sed -ne "s/install: \(.*\)/\1include/gp") - -ifeq ($(HAVE_SHARED),y) - LIBRARY_CACHE:=#-DUSE_CACHE - ifeq ($(BUILD_UCLIBC_LDSO),y) - LDSO:=$(TOPDIR)lib/$(UCLIBC_LDSO) - DYNAMIC_LINKER:=$(SHARED_LIB_LOADER_PREFIX)/$(UCLIBC_LDSO) - else - LDSO:=$(SYSTEM_LDSO) - DYNAMIC_LINKER:=/lib/$(strip $(subst ",, $(notdir $(SYSTEM_LDSO)))) - endif -endif - -all: $(TARGET_ARCH)-uclibc-gcc $(TARGET_ARCH)-uclibc-ld - -gcc-uClibc.h: Makefile $(TOPDIR)/.config - @echo "/* this file was autogenerated by make */" > $@ - @echo "#define UCLIBC_TARGET_PREFIX " \"$(TARGET_PREFIX)\" >> $@ - @echo "#define UCLIBC_DEVEL_PREFIX " \"$(DEVEL_PREFIX)\" >> $@ - @echo "#define UCLIBC_BUILD_DIR " \"$(UCLIBC_DIR)\" >> $@ - @echo "#define GCC_BIN " \"$(GCC_BIN)\" >> $@ - @echo "#define LIBGCC_DIR " \"$(LIBGCC_DIR)\" >> $@ - @echo "#define TARGET_ARCH " \"$(TARGET_ARCH)\" >> $@ - @echo "#define DYNAMIC_LINKER " \"$(DYNAMIC_LINKER)\" >> $@ - @echo "#define BUILD_DYNAMIC_LINKER " \"$(UCLIBC_DIR)/lib/$(UCLIBC_LDSO)\" >> $@ -ifeq ($(strip $(HAVE_SHARED)),y) - @echo "#define __UCLIBC_HAS_SHARED__ 1" >> $@ -else - @echo "#undef __UCLIBC_HAS_SHARED__" >> $@ -endif -ifeq ($(strip $(UCLIBC_HAS_MMU)),y) - @echo "#define __UCLIBC_HAS_MMU__ 1" >> $@ -else - @echo "#undef __UCLIBC_HAS_MMU__" >> $@ -endif -ifeq ($(strip $(HAS_ELF)),y) - @echo "#define __HAS_ELF__ 1" >> $@ -else - @echo "#undef __HAS_ELF__" >> $@ -endif -ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y) - @echo "#define __UCLIBC_CTOR_DTOR__ 1" >> $@ -ifeq ($(strip $(UCLIBC_PROFILING)),y) - @echo "#define __UCLIBC_PROFILING__ 1" >> $@ -else - @echo "#undef __UCLIBC_PROFILING__" >> $@ -endif -else - @echo "#undef __UCLIBC_CTOR_DTOR__" >> $@ -endif - -$(TARGET_ARCH)-uclibc-gcc: gcc-uClibc.c gcc-uClibc.h - $(HOSTCC) $(HOSTCFLAGS) -s $< -o $@ - -$(TARGET_ARCH)-uclibc-ld: Makefile $(TOPDIR)/.config - @echo "#!/bin/sh" > $@ - @echo "# This file was autogenerated by make" >> $@ - @echo "exec $(LD_BIN) \"\$$@\" -L$(DEVEL_PREFIX)usr/lib " \ - "-L$(DEVEL_PREFIX)lib -L$(UCLIBC_DIR)" >> $@ - chmod a+x $@ - -install: all - $(INSTALL) -d $(PREFIX)$(DEVEL_PREFIX)usr/bin - $(INSTALL) -d $(PREFIX)$(DEVEL_PREFIX)bin - $(INSTALL) -m 755 $(TARGET_ARCH)-uclibc-gcc $(PREFIX)$(DEVEL_PREFIX)bin/ - $(INSTALL) -m 755 $(TARGET_ARCH)-uclibc-ld $(PREFIX)$(DEVEL_PREFIX)bin/ - $(LN) -fs $(TARGET_ARCH)-uclibc-gcc $(PREFIX)$(DEVEL_PREFIX)bin/$(TARGET_ARCH)-uclibc-cc - $(LN) -fs $(DEVEL_PREFIX)bin/$(TARGET_ARCH)-uclibc-gcc $(PREFIX)$(DEVEL_PREFIX)usr/bin/gcc - $(LN) -fs $(DEVEL_PREFIX)bin/$(TARGET_ARCH)-uclibc-gcc $(PREFIX)$(DEVEL_PREFIX)usr/bin/cc - $(LN) -fs $(DEVEL_PREFIX)bin/$(TARGET_ARCH)-uclibc-ld $(PREFIX)$(DEVEL_PREFIX)usr/bin/ld -ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y) - $(LN) -fs $(TARGET_ARCH)-uclibc-gcc $(PREFIX)$(DEVEL_PREFIX)bin/$(TARGET_ARCH)-uclibc-g++ - $(LN) -fs $(TARGET_ARCH)-uclibc-gcc $(PREFIX)$(DEVEL_PREFIX)bin/$(TARGET_ARCH)-uclibc-c++ - $(LN) -fs $(DEVEL_PREFIX)bin/$(TARGET_ARCH)-uclibc-gcc $(PREFIX)$(DEVEL_PREFIX)usr/bin/c++ - $(LN) -fs $(DEVEL_PREFIX)bin/$(TARGET_ARCH)-uclibc-gcc $(PREFIX)$(DEVEL_PREFIX)usr/bin/g++ -endif - for app in addr2line ar as cpp gasp nm objcopy \ - objdump ranlib size strings strip; do \ - APPNAME=`which $(CROSS)$${app} 2>/dev/null`; \ - if [ -x "$$APPNAME" ] ; then \ - $(LN) -fs "$$APPNAME" $(PREFIX)$(DEVEL_PREFIX)usr/bin/$${app}; \ - $(LN) -fs "$$APPNAME" $(PREFIX)$(DEVEL_PREFIX)bin/$(TARGET_ARCH)-uclibc-$${app}; \ - fi; \ - done - -clean: - $(RM) gcc-uClibc.h *-uclibc-gcc *-uclibc-ld core diff --git a/debian/gcc-uClibc/gcc-uClibc.c b/debian/gcc-uClibc/gcc-uClibc.c deleted file mode 100644 index e6566a143..000000000 --- a/debian/gcc-uClibc/gcc-uClibc.c +++ /dev/null @@ -1,668 +0,0 @@ -/* vi: set sw=4 ts=4: */ -/* - * Copyright (C) 2000 Manuel Novoa III - * Copyright (C) 2002-2003 Erik Andersen - * - * This is a crude wrapper to use uClibc with gcc. - * It was originally written to work around ./configure for ext2fs-utils. - * It certainly can be improved, but it works for me in the normal cases. - * - * April 7, 2001 - * - * A bug was fixed in building the gcc command line when dynamic linking. - * The functions dlopen, etc. now work. At this time, you must make sure - * the correct libdl.so is included however. It is safest to, for example, - * add /lib/libdl.so.1 if using ld-linux.so.1 rather than adding -ldl to the - * command line. - * - * Note: This is only a problem if devel and target archs are the same. To - * avoid the problem, you can use a customized dynamic linker. - * - * - * April 18, 2001 - * - * The wrapper now works with either installed and uninstalled uClibc versions. - * If you want to use the uninstalled header files and libs, either include - * the string "build" in the invocation name such as - * 'ln -s <ARCH>-uclibc-gcc <ARCH>-uclibc-gcc-build' - * or include it in the environment variable setting of UCLIBC_ENV. - * Note: This automatically enables the "rpath" behavior described below. - * - * The wrapper will now pass the location of the uClibc shared libs used to - * the linker with the "-rpath" option if the invocation name includes the - * string "rpath" or if the environment variable UCLIBC_ENV include it (as - * with "build" above). This is primarily intended to be used on devel - * platforms of the same arch as the target. A good place to use this feature - * would be in the uClibc/test directory. - * - * The wrapper now displays the command line passed to gcc when '-v' is used. - * - * May 31, 2001 - * - * "rpath" and "build" behavior are now decoupled. You can of course get - * the old "build" behavior by setting UCLIBC_ENV="rpath-build". Order - * isn't important here, as only the substrings are searched for. - * - * Added environment variable check for UCLIBC_GCC_DLOPT to let user specify - * an alternative dynamic linker at runtime without using command line args. - * Since this wouldn't commonly be used, I made it easy on myself. You have - * to match the option you would have passed to the gcc wrapper. As an - * example, - * - * export UCLIBC_GCC_DLOPT="-Wl,--dynamic-linker,/lib/ld-alt-linker.so.3" - * - * This is really only useful if target arch == devel arch and DEVEL_PREFIX - * isn't empty. It involves a recompile, but you can at least test apps - * on your devel system if combined with the "rpath" behavor if by using - * LD_LIBRARY_PATH, etc. - * - * Also added check for "-Wl,--dynamic-linker" on the command line. The - * use default dynamic linker or the envirnment-specified dynamic linker - * is disabled in that case. - * - * Added options --uclibc-use-build-dir and --uclibc-use-rpath so that those - * behaviors can be invoked from the command line. - * - */ - -/* - * - * TODO: - * Check/modify gcc-specific environment variables? - */ - -#include <stdio.h> -#include <stdlib.h> -#include <stdarg.h> -#include <string.h> -#include <unistd.h> -#include <errno.h> -#include <sys/stat.h> -#include <sys/wait.h> - -#include "gcc-uClibc.h" - -static char *our_usr_lib_path = "-L"UCLIBC_DEVEL_PREFIX"/lib"; - -static char static_linking[] = "-static"; -static char nostdinc[] = "-nostdinc"; -static char nostartfiles[] = "-nostartfiles"; -static char nodefaultlibs[] = "-nodefaultlibs"; -static char nostdlib[] = "-nostdlib"; -#ifdef __UCLIBC_CTOR_DTOR__ -static char nostdinc_plus[] = "-nostdinc++"; -#endif - -/* Include a local implementation of basename, since this - * uses the host system's C lib, and CYGWIN apparently - * doesn't provide an implementation of basename(). */ -char *basename(const char *path) -{ - register const char *s; - register const char *p; - p = s = path; - while (*s) { - if (*s++ == '/') { - p = s; - } - } - return (char *) p; -} - -char *dirname(char *path) -{ - static const char null_or_empty_or_noslash[] = "."; - register char *s; - register char *last; - char *first; - - last = s = path; - - if (s != NULL) { - -LOOP: - while (*s && (*s != '/')) ++s; - first = s; - while (*s == '/') ++s; - if (*s) { - last = first; - goto LOOP; - } - - if (last == path) { - if (*last != '/') { - goto DOT; - } - if ((*++last == '/') && (last[1] == '\0')) { - ++last; - } - } - *last = '\0'; - return path; - } -DOT: - return (char *) null_or_empty_or_noslash; -} - - -extern void *xmalloc(size_t size) -{ - void *ptr = malloc(size); - - if (!ptr) { - fprintf(stderr, "memory exhausted"); - exit(EXIT_FAILURE); - } - return ptr; -} - -void xstrcat(char **string, ...) -{ - const char *c; - va_list p; - /* Don't bother to calculate how big exerything - * will be, just be careful to not overflow... */ - va_start(p, string); - *string = xmalloc(BUFSIZ); - **string = '\0'; - while ((c = va_arg(p, const char *))) { - strcat(*string, c); - } - va_end(p); -} - -int main(int argc, char **argv) -{ - int use_build_dir = 0, linking = 1, use_static_linking = 0; - int use_stdinc = 1, use_start = 1, use_stdlib = 1, use_pic = 0; - int source_count = 0, use_rpath = 0, verbose = 0; - int minusx = 0; - int i, j, k, l, m, n; - char ** gcc_argv; - char ** gcc_argument; - char ** libraries; - char ** libpath; - char *dlstr; - char *incstr; - char *devprefix; - char *builddir; - char *libstr; - char *build_dlstr = NULL; - char *cc; - char *ep; - char *rpath_link[2]; - char *rpath[2]; - char *uClibc_inc[2]; - char *our_lib_path[2]; - char *crt0_path[2]; - char *crtbegin_path[2]; - char *crtend_path[2]; - const char *application_name; -#ifdef __UCLIBC_CTOR_DTOR__ - char *crti_path[2]; - char *crtn_path[2]; - int len; - int ctor_dtor = 1, cplusplus = 0, use_nostdinc_plus = 0; - int findlibgcc = 1; - char *cpp = NULL; -#endif -#ifdef __UCLIBC_PROFILING__ - int profile = 0; - char *gcrt1_path[2]; -#endif - - cc = getenv("UCLIBC_CC"); - if (cc == NULL) { - cc = GCC_BIN; -#ifdef __UCLIBC_CTOR_DTOR__ - findlibgcc = 0; -#endif - } - - application_name = basename(argv[0]); - if (application_name[0] == '-') - application_name++; - -#ifdef __UCLIBC_CTOR_DTOR__ - /* We must use strstr since g++ might be named like a - * cross compiler (i.e. arm-linux-g++). We must also - * search carefully, in case we are searching something - * like /opt/c++/gcc-3.1/bin/arm-linux-g++ or some similar - * perversion... */ - len = strlen(application_name); - if ((strcmp(application_name+len-3, "g++") == 0) || - (strcmp(application_name+len-3, "c++") == 0)) { - len = strlen(cc); - if (strcmp(cc+len-3, "gcc") == 0) { - cpp = strdup(cc); - cpp[len-1] = '+'; - cpp[len-2] = '+'; - } - cplusplus = 1; - use_nostdinc_plus = 1; - } -#endif - - devprefix = getenv("UCLIBC_DEVEL_PREFIX"); - if (!devprefix) { - devprefix = UCLIBC_DEVEL_PREFIX; - } - - builddir = getenv("UCLIBC_BUILD_DIR"); - if (!builddir) { - builddir = UCLIBC_BUILD_DIR; - } - - incstr = getenv("UCLIBC_GCC_INC"); - libstr = getenv("UCLIBC_GCC_LIB"); - - ep = getenv("UCLIBC_ENV"); - if (!ep) { - ep = ""; - } - - if (strstr(ep,"build") != NULL) { - use_build_dir = 1; - } - - if (strstr(ep,"rpath") != NULL) { - use_rpath = 1; - } - - - xstrcat(&(rpath_link[0]), "-Wl,-rpath-link,", devprefix, "/lib", NULL); - xstrcat(&(rpath_link[1]), "-Wl,-rpath-link,", builddir, "/lib", NULL); - - xstrcat(&(rpath[0]), "-Wl,-rpath,", devprefix, "/lib", NULL); - xstrcat(&(rpath[1]), "-Wl,-rpath,", builddir, "/lib", NULL); - - xstrcat(&(uClibc_inc[0]), devprefix, "/include/", NULL); - xstrcat(&(uClibc_inc[1]), builddir, "/include/", NULL); - -#ifdef __UCLIBC_CTOR_DTOR__ - xstrcat(&(crt0_path[0]), devprefix, "/lib/crt1.o", NULL); - xstrcat(&(crt0_path[1]), builddir, "/lib/crt1.o", NULL); - xstrcat(&(crti_path[0]), devprefix, "/lib/crti.o", NULL); - xstrcat(&(crti_path[1]), builddir, "/lib/crti.o", NULL); - xstrcat(&(crtn_path[0]), devprefix, "/lib/crtn.o", NULL); - xstrcat(&(crtn_path[1]), builddir, "/lib/crtn.o", NULL); -#else - xstrcat(&(crt0_path[0]), devprefix, "/lib/crt0.o", NULL); - xstrcat(&(crt0_path[1]), builddir, "/lib/crt0.o", NULL); -#endif -#ifdef __UCLIBC_PROFILING__ - xstrcat(&(gcrt1_path[0]), devprefix, "/lib/gcrt1.o", NULL); - xstrcat(&(gcrt1_path[1]), builddir, "/lib/gcrt1.o", NULL); -#endif - - xstrcat(&(our_lib_path[0]), "-L", devprefix, "/lib", NULL); - xstrcat(&(our_lib_path[1]), "-L", builddir, "/lib", NULL); - -#ifdef __UCLIBC_HAS_SHARED__ - build_dlstr = "-Wl,--dynamic-linker," BUILD_DYNAMIC_LINKER; - dlstr = getenv("UCLIBC_GCC_DLOPT"); - if (!dlstr) { - dlstr = "-Wl,--dynamic-linker," DYNAMIC_LINKER; - } -#endif - - m = 0; - libraries = __builtin_alloca(sizeof(char*) * (argc)); - libraries[m] = NULL; - - n = 0; - libpath = __builtin_alloca(sizeof(char*) * (argc)); - libpath[n] = NULL; - - for ( i = 1 ; i < argc ; i++ ) { - if (argv[i][0] == '-' && argv[i][1] != '\0') { /* option */ - switch (argv[i][1]) { - case 'c': /* compile or assemble */ - case 'S': /* generate assembler code */ - case 'E': /* preprocess only */ - case 'M': /* generate dependencies */ - linking = 0; - break; - case 'L': /* library */ - libpath[n++] = argv[i]; - libpath[n] = NULL; - if (argv[i][2] == '\0') { - argv[i] = NULL; - libpath[n++] = argv[++i]; - libpath[n] = NULL; - } - argv[i] = NULL; - break; - case 'l': /* library */ - libraries[m++] = argv[i]; - libraries[m] = NULL; - argv[i] = NULL; - break; - case 'x': /* Set target language */ - minusx = 1; - i++; - break; - case 'v': /* verbose */ - if (argv[i][2] == '\0') verbose = 1; - printf("Invoked as %s\n", argv[0]); - break; - case 'n': - if (strcmp(nostdinc, argv[i]) == 0) { - use_stdinc = 0; - } else if (strcmp(nostartfiles, argv[i]) == 0) { -#ifdef __UCLIBC_CTOR_DTOR__ - ctor_dtor = 0; -#endif - use_start = 0; - } else if (strcmp(nodefaultlibs, argv[i]) == 0) { - use_stdlib = 0; - argv[i] = NULL; - } else if (strcmp(nostdlib, argv[i]) == 0) { -#ifdef __UCLIBC_CTOR_DTOR__ - ctor_dtor = 0; -#endif - use_start = 0; - use_stdlib = 0; - } -#ifdef __UCLIBC_CTOR_DTOR__ - else if (strcmp(nostdinc_plus, argv[i]) == 0) { - if (cplusplus) { - use_nostdinc_plus = 0; - } - } -#endif - break; - case 's': - if (strstr(argv[i], static_linking) != NULL) { - use_static_linking = 1; - } - if (strcmp("-shared", argv[i]) == 0) { - use_start = 0; - use_pic = 1; - } - break; - case 'W': /* -static could be passed directly to ld */ - if (strncmp("-Wl,", argv[i], 4) == 0) { - if (strstr(argv[i], static_linking) != NULL) { - use_static_linking = 1; - } - if (strstr(argv[i], "--dynamic-linker") != NULL) { - dlstr = NULL; - } - } - break; -#ifdef __UCLIBC_PROFILING__ - case 'p': - if (strcmp("-pg", argv[i]) == 0) { - profile = 1; - } - break; -#endif - case 'f': - /* Check if we are doing PIC */ - if (strcmp("-fPIC", argv[i]) == 0) { - use_pic = 1; - } else if (strcmp("-fpic", argv[i]) == 0) { - use_pic = 1; - } -#ifdef __UCLIBC_PROFILING__ - else if (strcmp("-fprofile-arcs", argv[i]) == 0) { - profile = 1; - } -#endif - break; - - case '-': - if (strstr(argv[i]+1, static_linking) != NULL) { - use_static_linking = 1; - argv[i] = NULL; - } else if (strcmp("--uclibc-use-build-dir", argv[i]) == 0) { - use_build_dir = 1; - argv[i] = NULL; - } else if (strcmp("--uclibc-use-rpath", argv[i]) == 0) { - use_rpath = 1; - argv[i] = NULL; - } else if (strcmp ("--uclibc-cc", argv[i]) == 0 && argv[i + 1]) { - cc = argv[i + 1]; - argv[i++] = NULL; - argv[i] = NULL; - } else if (strncmp ("--uclibc-cc=", argv[i], 12) == 0) { - cc = argv[i] + 12; - argv[i] = NULL; - } -#ifdef __UCLIBC_CTOR_DTOR__ - else if (strcmp("--uclibc-no-ctors",argv[i]) == 0) { - ctor_dtor = 0; - argv[i] = NULL; - } -#endif - break; - } - } else if (argv[i][0] == '-' && argv[i][1] == '\0') { - /* Reading code from stdin - crazy eh? */ - ++source_count; - } else { /* assume it is an existing source file */ - ++source_count; - } - } - - gcc_argv = __builtin_alloca(sizeof(char*) * (argc + 64)); - gcc_argument = __builtin_alloca(sizeof(char*) * (argc + 20)); - - i = 0; k = 0; -#ifdef __UCLIBC_CTOR_DTOR__ - if (ctor_dtor) { - struct stat statbuf; - if (findlibgcc || stat(LIBGCC_DIR, &statbuf) < 0 || - !S_ISDIR(statbuf.st_mode)) - { - /* Bummer, gcc is hiding from us. This is going - * to really slow things down... bummer. */ - int status, gcc_pipe[2]; - pid_t pid, wpid; - - pipe(gcc_pipe); - if (!(pid = fork())) { - char *argv[4]; - close(gcc_pipe[0]); - close(1); - close(2); - dup2(gcc_pipe[1], 1); - dup2(gcc_pipe[1], 2); - argv[0] = cc; - argv[1] = "-print-libgcc-file-name"; - argv[2] = NULL; - execvp(cc, argv); - close(gcc_pipe[1]); - _exit(EXIT_FAILURE); - } - wpid = 0; - while (wpid != pid) { - wpid = wait(&status); - } - close(gcc_pipe[1]); - if (WIFEXITED(status) && WEXITSTATUS(status)) { -crash_n_burn: - fprintf(stderr, "Unable to locale crtbegin.o provided by gcc"); - exit(EXIT_FAILURE); - } - if (WIFSIGNALED(status)) { - fprintf(stderr, "%s exited because of uncaught signal %d", cc, WTERMSIG(status)); - exit(EXIT_FAILURE); - } - - { - char buf[1024], *dir; - status = read(gcc_pipe[0], buf, sizeof(buf)); - close(gcc_pipe[0]); - if (status < 0) { - goto crash_n_burn; - } - dir = dirname(buf); - xstrcat(&(crtbegin_path[0]), dir, "/crtbegin.o", NULL); - xstrcat(&(crtbegin_path[1]), dir, "/crtbeginS.o", NULL); - xstrcat(&(crtend_path[0]), dir, "/crtend.o", NULL); - xstrcat(&(crtend_path[1]), dir, "/crtendS.o", NULL); - } - - } else { - xstrcat(&(crtbegin_path[0]), LIBGCC_DIR, "crtbegin.o", NULL); - xstrcat(&(crtbegin_path[1]), LIBGCC_DIR, "crtbeginS.o", NULL); - xstrcat(&(crtend_path[0]), LIBGCC_DIR, "crtend.o", NULL); - xstrcat(&(crtend_path[1]), LIBGCC_DIR, "crtendS.o", NULL); - } - } - - if (cplusplus && cpp) - gcc_argv[i++] = cpp; - else -#endif - gcc_argv[i++] = cc; - - for ( j = 1 ; j < argc ; j++ ) { - if (argv[j] != NULL) { - gcc_argument[k++] = argv[j]; - } - } - gcc_argument[k] = NULL; - - if (linking && source_count) { -#if defined __HAVE_ELF__ && ! defined __UCLIBC_HAS_MMU__ - gcc_argv[i++] = "-Wl,-elf2flt"; -#endif - gcc_argv[i++] = nostdlib; - if (use_static_linking) { - gcc_argv[i++] = static_linking; - } - if (!use_static_linking) { - if (dlstr && use_build_dir) { - gcc_argv[i++] = build_dlstr; - } else if (dlstr) { - gcc_argv[i++] = dlstr; - } - if (use_rpath) { - gcc_argv[i++] = rpath[use_build_dir]; - } - } - for ( l = 0 ; l < n ; l++ ) { - if (libpath[l]) gcc_argv[i++] = libpath[l]; - } - gcc_argv[i++] = rpath_link[use_build_dir]; /* just to be safe */ - if (libstr) - gcc_argv[i++] = libstr; - gcc_argv[i++] = our_lib_path[use_build_dir]; - if (!use_build_dir) { - gcc_argv[i++] = our_usr_lib_path; - } - } - if (use_stdinc && source_count) { - gcc_argv[i++] = nostdinc; -#ifdef __UCLIBC_CTOR_DTOR__ - if (cplusplus) { - char *cppinc; - if (use_nostdinc_plus) { - gcc_argv[i++] = nostdinc_plus; - } - xstrcat(&cppinc, uClibc_inc[use_build_dir], "g++/", NULL); - gcc_argv[i++] = "-isystem"; - gcc_argv[i++] = cppinc; - xstrcat(&cppinc, uClibc_inc[use_build_dir], "g++-v3/", NULL); - gcc_argv[i++] = "-isystem"; - gcc_argv[i++] = cppinc; - } -#endif - gcc_argv[i++] = "-isystem"; - gcc_argv[i++] = uClibc_inc[use_build_dir]; - gcc_argv[i++] = "-iwithprefix"; - gcc_argv[i++] = "include"; - if (incstr) - gcc_argv[i++] = incstr; - } - - if (linking && source_count) { - -#ifdef __UCLIBC_PROFILING__ - if (profile) { - gcc_argv[i++] = gcrt1_path[use_build_dir]; - } -#endif -#ifdef __UCLIBC_CTOR_DTOR__ - if (ctor_dtor) { - gcc_argv[i++] = crti_path[use_build_dir]; - if (use_pic) { - gcc_argv[i++] = crtbegin_path[1]; - } else { - gcc_argv[i++] = crtbegin_path[0]; - } - } -#endif - if (use_start) { -#ifdef __UCLIBC_PROFILING__ - if (!profile) -#endif - { - gcc_argv[i++] = crt0_path[use_build_dir]; - } - } - for ( l = 0 ; l < k ; l++ ) { - if (gcc_argument[l]) gcc_argv[i++] = gcc_argument[l]; - } - if (use_stdlib) { - //gcc_argv[i++] = "-Wl,--start-group"; - gcc_argv[i++] = "-lgcc"; - } - for ( l = 0 ; l < m ; l++ ) { - if (libraries[l]) gcc_argv[i++] = libraries[l]; - } - if (use_stdlib) { -#ifdef __UCLIBC_CTOR_DTOR__ - if (cplusplus) { - gcc_argv[i++] = "-lstdc++"; - gcc_argv[i++] = "-lm"; - } -#endif - gcc_argv[i++] = "-lc"; - gcc_argv[i++] = "-lgcc"; - //gcc_argv[i++] = "-Wl,--end-group"; - } -#ifdef __UCLIBC_CTOR_DTOR__ - if (ctor_dtor) { - if (minusx) { - gcc_argv[i++] = "-x"; - gcc_argv[i++] = "none"; - } - if (use_pic) { - gcc_argv[i++] = crtend_path[1]; - } else { - gcc_argv[i++] = crtend_path[0]; - } - - gcc_argv[i++] = crtn_path[use_build_dir]; - } -#endif - } else { - for ( l = 0 ; l < k ; l++ ) { - if (gcc_argument[l]) gcc_argv[i++] = gcc_argument[l]; - } - } - gcc_argv[i++] = NULL; - - if (verbose) { - for ( j = 0 ; gcc_argv[j] ; j++ ) { - printf("arg[%2i] = %s\n", j, gcc_argv[j]); - } - fflush(stdout); - } - //no need to free memory from xstrcat because we never return... -#ifdef __UCLIBC_CTOR_DTOR__ - if (cplusplus && cpp) { - execvp(cpp, gcc_argv); - fprintf(stderr, "%s: %s\n", cpp, strerror(errno)); - } else -#endif - { - execvp(cc, gcc_argv); - fprintf(stderr, "%s: %s\n", cc, strerror(errno)); - } - exit(EXIT_FAILURE); -} diff --git a/debian/uclibc-gcc.1 b/debian/ldconfig.1 index 2fb31b553..2fb31b553 100644 --- a/debian/uclibc-gcc.1 +++ b/debian/ldconfig.1 diff --git a/debian/uclibc-ldd.1 b/debian/ldd.1 index 6e391fca8..6e391fca8 100644 --- a/debian/uclibc-ldd.1 +++ b/debian/ldd.1 diff --git a/debian/libuclibc-dev.files b/debian/libuclibc-dev.files deleted file mode 100644 index a1311bf1d..000000000 --- a/debian/libuclibc-dev.files +++ /dev/null @@ -1,10 +0,0 @@ -usr/*-linux-uclibc/include -usr/*-linux-uclibc/lib/*.a -usr/*-linux-uclibc/lib/libcrypt.so -usr/*-linux-uclibc/lib/libdl.so -usr/*-linux-uclibc/lib/libm.so -usr/*-linux-uclibc/lib/libpthread.so -usr/*-linux-uclibc/lib/libresolv.so -usr/*-linux-uclibc/lib/libc.so -usr/*-linux-uclibc/lib/libutil.so -usr/*-linux-uclibc/lib/*.o diff --git a/debian/libuclibc0.files b/debian/libuclibc0.files deleted file mode 100644 index 7698dcc2d..000000000 --- a/debian/libuclibc0.files +++ /dev/null @@ -1,3 +0,0 @@ -lib/* -usr/*-linux-uclibc/lib/*.so.* -usr/*-linux-uclibc/lib/*-*.so diff --git a/debian/libuclibc0.postinst b/debian/libuclibc0.postinst deleted file mode 100644 index 27a7dfebf..000000000 --- a/debian/libuclibc0.postinst +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -#if [ "$1" = "configure" ]; then -# /sbin/ldconfig -#fi - -#DEBHELPER# - diff --git a/debian/libuclibc0.shlibs b/debian/libuclibc0.shlibs deleted file mode 100644 index 1f1f5467c..000000000 --- a/debian/libuclibc0.shlibs +++ /dev/null @@ -1,8 +0,0 @@ -libc 0 libuclibc0 (>= 0.9.17-1) -libm 0 libuclibc0 (>= 0.9.17-1) -ld-uClibc 0 libuclibc0 (>= 0.9.17-1) -libdl 0 libuclibc0 (>= 0.9.17-1) -libcrypt 0 libuclibc0 (>= 0.9.17-1) -libutil 0 libuclibc0 (>= 0.9.17-1) -libresolv 0 libuclibc0 (>= 0.9.17-1) -libpthread 0 libpthread0 (>= 0.9.17-1) diff --git a/debian/mksnapshot b/debian/mksnapshot deleted file mode 100755 index d4e6cd41f..000000000 --- a/debian/mksnapshot +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - - -topdir=$(pwd) -today=$(date +%Y%m%d) -version=0.9.19 -dir=uclibc-${version}-cvs${today} - -mkdir -p ${topdir}/uclibc-tmp -cd ${topdir}/uclibc-tmp - -export CVSROOT=':pserver:anonymous@cvs.uclibc.org:/var/cvs' -if ! grep -q '^.pserver.anonymous.cvs.uclibc.org..var.cvs' ~/.cvspass -then - echo "$CVSROOT" 'A' >>~/.cvspass -fi -#export CVSROOT='ds@cvs.uclibc.org:/var/cvs' - -cvs co -d ${dir} uClibc - -cd ${topdir}/uclibc-tmp/${dir}/debian -echo "uclibc (${version}-cvs${today}-1) unstable; urgency=low" >changelog.tmp -echo >>changelog.tmp -echo " * This is an automatic snapshot of uClibc CVS" >>changelog.tmp -echo >>changelog.tmp -echo " -- David Schleef <ds@schleef.org> $(date -R)" >>changelog.tmp -echo >>changelog.tmp -cat changelog >>changelog.tmp -mv changelog.tmp changelog - -cd ${topdir}/uclibc-tmp -tar -czf ../uclibc_${version}-cvs${today}.orig.tar.gz ${dir} - -cd ${topdir} -rm -rf uclibc-tmp - diff --git a/debian/rules b/debian/rules index d0d001e49..503526558 100755 --- a/debian/rules +++ b/debian/rules @@ -13,18 +13,14 @@ major=$(shell grep '^MAJOR_VERSION' Rules.mak|sed 's/.*=//') minor=$(shell grep '^MINOR_VERSION' Rules.mak|sed 's/.*=//') version:=$(strip $(major)).$(strip $(minor)) -kernel_version=2.4.20 +kernel_version=2.4.22 kernel_source=kernel-source-$(kernel_version) builddir=$(shell pwd) target=$(DEB_HOST_GNU_CPU) -#target=arm with_shared_libs=y -#ifeq ($(target),powerpc) -#with_shared_libs=n -#endif ifeq ($(with_shared_libs),y) shared_libs_true=true @@ -42,18 +38,11 @@ else cross_options = --cross="" endif -p_dev=libuclibc-dev$(target_suffix) -p_lib=libuclibc0$(target_suffix) -p_gcc=uclibc$(target_suffix)-toolchain - -debian/control: debian/control.in debian/rules - sed -e s/_TARGET_/$(target_suffix)/ \ - -e "s/_ARCHS_/alpha arm i386 m68k mips mipsel powerpc sh sparc/" \ - -e "s/_KERNEL_/$(kernel_source)/" \ - debian/control.in >debian/control +p_dev=uclibc-dev$(target_suffix) +p_lib=uclibc$(target_suffix) build: build-stamp -build-stamp: debian/control +build-stamp: dh_testdir # Brute force method of getting kernel headers @@ -80,23 +69,38 @@ build-stamp: debian/control ) >$(kernel_source)/include/linux/version.h cp debian/config .config - echo CONFIG_386=y >>.config -ifeq ($(findstring $(target),alpha m68k sparc),$(target)) - echo BUILD_UCLIBC_LDSO=n >>.config -endif - echo SHARED_LIB_LOADER_PATH=\"/lib\" >>.config - echo KERNEL_SOURCE=\"$(builddir)/$(kernel_source)\" >>.config - echo 'DEVEL_TOOL_PREFIX="$$(DEVEL_PREFIX)"' >>.config - echo 'SYSTEM_DEVEL_PREFIX="/usr"' >>.config + + sed -ie 's,^.*TARGET_$(target).*,TARGET_$(target)=y,g' \ + .config + sed -ie 's,^TARGET_ARCH.*,TARGET_ARCH=\"$(target)\",g' \ + .config + sed -ie 's,^KERNEL_SOURCE=.*,KERNEL_SOURCE=\"$(builddir)/$(kernel_source)\",g' \ + .config + sed -ie 's,^RUNTIME_PREFIX=.*,RUNTIME_PREFIX=\"/\",g' \ + .config + sed -ie 's,^DEVEL_PREFIX=.*,DEVEL_PREFIX=\"/usr/\",g' \ + .config + sed -ie 's,^SHARED_LIB_LOADER_PREFIX=.*,SHARED_LIB_LOADER_PREFIX=\"/lib\",g' \ + .config + sed -ie 's,.*UCLIBC_HAS_WCHAR.*,UCLIBC_HAS_WCHAR=y\nUCLIBC_HAS_LOCALE=n,g' \ + .config +#ifeq ($(target),arm) + sed -ie 's,.*HAS_FPU.*,HAS_FPU=n\nUCLIBC_HAS_FLOATS=y\nUCLIBC_HAS_SOFT_FLOAT=y,g' .config + echo CONFIG_GENERIC_ARM=y >>.config +#endif +#ifeq ($(target),i386) + echo CONFIG_GENERIC_386=y >>.config +#endif yes '' | make oldconfig mkdir -p lib - $(MAKE) TARGET_ARCH=$(target) + $(MAKE) + $(MAKE) utils touch build-stamp -clean: debian/control +clean: dh_testdir dh_testroot rm -f build-stamp @@ -110,7 +114,7 @@ clean: debian/control dh_clean -install: build debian/control +install: build dh_testdir dh_testroot dh_clean -k @@ -118,36 +122,16 @@ install: build debian/control -rm debian/tmp -mkdir debian/tmp - #ln -s tmp debian/tmp # Add here commands to install the package into debian/tmp. - $(MAKE) install PREFIX=`pwd`/debian/tmp - $(MAKE) install_runtime PREFIX=`pwd`/debian/tmp + $(MAKE) install install_utils PREFIX=`pwd`/debian/tmp install -d debian/tmp/usr/share/man/man1 - install -m 644 debian/uclibc-gcc.1 \ - debian/tmp/usr/share/man/man1/$(target)-uclibc-gcc.1 - (cd debian/tmp/usr/share/man/man1; \ - ln -sf $(target)-uclibc-gcc.1.gz $(target)-uclibc-cc.1.gz; \ - ln -sf $(target)-uclibc-gcc.1.gz $(target)-uclibc-ld.1.gz; \ - for x in addr2line ar as cpp nm objcopy objdump ranlib \ - size strings strip;do \ - ln -sf $$x.1.gz $(target)-uclibc-$$x.1.gz;done) - - install -d debian/tmp/usr/share/man/man1 - install -m 644 debian/uclibc-ldd.1 \ - debian/tmp/usr/share/man/man1/$(target)-uclibc-ldd.1 - install -m 644 debian/uclibc-ldconfig.1 \ - debian/tmp/usr/share/man/man1/$(target)-uclibc-ldconfig.1 - install -m 644 debian/uclibc-readelf.1 \ - debian/tmp/usr/share/man/man1/$(target)-uclibc-readelf.1 + install -m 644 debian/ldd.1 \ + debian/tmp/usr/share/man/man1/ldd.1 + install -m 644 debian/ldconfig.1 \ + debian/tmp/usr/share/man/man1/ldconfig.1 - mkdir debian/tmp/lib/ - cd debian/tmp/lib && ln -sf /usr/$(target)-linux-uclibc/lib/ld-uClibc.so.0 . - - cd debian/tmp && ../fixlinks - - (cd debian/tmp; find . -name '.*' -exec rm -f '{}' ';') # Build architecture-independent files here. binary-indep: @@ -167,7 +151,7 @@ binary-arch: build install # dh_installpam # dh_installinit dh_installcron -# dh_installmanpages -plibuclibc0 +# dh_installmanpages -puclibc dh_installinfo # dh_undocumented dh_installchangelogs @@ -180,11 +164,7 @@ binary-arch: build install # dh_makeshlibs dh_installdeb # dh_perl -#ifeq ($(target),$(DEB_HOST_GNU_CPU)) -# dh_shlibdeps --exclude=ld_uclibc -ldebian/$(p_lib)/usr/$(target)-linux-uclibc/lib -#else dh_shlibdeps --exclude=lib -#endif dh_gencontrol dh_md5sums dh_builddeb diff --git a/debian/uclibc-dev.files b/debian/uclibc-dev.files new file mode 100644 index 000000000..da07fddd0 --- /dev/null +++ b/debian/uclibc-dev.files @@ -0,0 +1,2 @@ +usr/include +usr/lib diff --git a/debian/uclibc-gcc.dirs b/debian/uclibc-gcc.dirs deleted file mode 100644 index 4313c4a24..000000000 --- a/debian/uclibc-gcc.dirs +++ /dev/null @@ -1,4 +0,0 @@ -usr/lib -usr/share/doc -usr/share/man/man1 -usr/bin diff --git a/debian/uclibc-ldconfig.1 b/debian/uclibc-ldconfig.1 deleted file mode 100644 index 2fb31b553..000000000 --- a/debian/uclibc-ldconfig.1 +++ /dev/null @@ -1,28 +0,0 @@ -.TH UCLIBC-GCC 1 -.SH NAME -uclibc-gcc \- Cross-compiler for uClibc -.SH SYNOPSIS -.B uclibc-gcc -[ -.B options -] -.br -.B uclibc-ld -[ -.B options -] -.SH DESCRIPTION -These programs are wrappers for -.B gcc -and -.B ld. -.SH BUGS -Probably. - -.SH AUTHORS -Manuel Nova -.br -Manual page written by David Schleef <ds@schleef.org> -.SH SEE ALSO -.BR gcc (1), -.BR ld (1) diff --git a/debian/uclibc-readelf.1 b/debian/uclibc-readelf.1 deleted file mode 100644 index 65af1b207..000000000 --- a/debian/uclibc-readelf.1 +++ /dev/null @@ -1,19 +0,0 @@ -.TH UCLIBC-READELF 1 -.SH NAME -uclibc-readelf \- Displays information about ELF files. -.SH SYNOPSIS -.B uclibc-readelf -[ -.B options -] -.SH DESCRIPTION -A small program to display information about ELF files. -.SH BUGS -Maybe. - -.SH AUTHORS -Erik Andersen <andersen@codepoet.org> -.br -Manual page written by David Schleef <ds@schleef.org> -.SH SEE ALSO -.BR readelf (1) diff --git a/debian/uclibc-toolchain.files b/debian/uclibc-toolchain.files deleted file mode 100644 index b542017e1..000000000 --- a/debian/uclibc-toolchain.files +++ /dev/null @@ -1,3 +0,0 @@ -usr/*-linux-uclibc/bin/* -usr/bin/* -usr/share/man/man1/* diff --git a/debian/uclibc.files b/debian/uclibc.files new file mode 100644 index 000000000..7b3e51c5d --- /dev/null +++ b/debian/uclibc.files @@ -0,0 +1,4 @@ +lib +usr/share/man +sbin +usr/bin diff --git a/debian/uclibc.postinst b/debian/uclibc.postinst new file mode 100644 index 000000000..aac68193e --- /dev/null +++ b/debian/uclibc.postinst @@ -0,0 +1,8 @@ +#!/bin/sh + +if [ "$1" = "configure" ]; then + /sbin/ldconfig +fi + +#DEBHELPER# + diff --git a/debian/uclibc.shlibs b/debian/uclibc.shlibs new file mode 100644 index 000000000..0b7bd676a --- /dev/null +++ b/debian/uclibc.shlibs @@ -0,0 +1,10 @@ +libc 0 uclibc (>= 0.9.23-1) +libm 0 uclibc (>= 0.9.23-1) +ld-uClibc 0 uclibc (>= 0.9.23-1) +libdl 0 uclibc (>= 0.9.23-1) +libcrypt 0 uclibc (>= 0.9.23-1) +libutil 0 uclibc (>= 0.9.23-1) +libresolv 0 uclibc (>= 0.9.23-1) +libnsl 0 uclibc (>= 0.9.23-1) +libthread_db 1 libthread_db (>= 0.9.23-1) +libpthread 0 libpthread (>= 0.9.23-1) |