From 93c8ab687190fc3dac8a6d2bfdd42d1fb99b59c0 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Tue, 17 Jul 2001 09:54:09 +0000 Subject: Changes to build cross-compiling libraries --- debian/changelog | 2 ++ debian/control | 4 ++-- debian/control.in | 43 ++++++----------------------------------- debian/libuclibc0.shlibs | 3 ++- debian/rules | 50 ++++++++++++++++++++++++++++++++---------------- 5 files changed, 46 insertions(+), 56 deletions(-) diff --git a/debian/changelog b/debian/changelog index d57fca025..567e969fe 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,8 @@ uclibc (0.9.5-cvs20010702-1) unstable; urgency=low * Build from CVS + * Can create cross-compiling library (but not cross packages) + * Closes #104243 -- David Schleef Mon, 2 Jul 2001 23:16:20 -0700 diff --git a/debian/control b/debian/control index 1463dc494..72acf8d80 100644 --- a/debian/control +++ b/debian/control @@ -8,8 +8,7 @@ Standards-Version: 3.5.2 Package: libuclibc-dev Section: devel Architecture: any -Depends: libuclibc0, ${shlibs:Depends} -Conflicts: libuclibc-dev-i386 +Depends: ${shlibs: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 @@ -33,3 +32,4 @@ Description: A compiler wrapper for uClibc to do compilation against uClibc instead of the native libc. This package is used for cross compiling. + diff --git a/debian/control.in b/debian/control.in index c5004b376..d03e3732b 100644 --- a/debian/control.in +++ b/debian/control.in @@ -1,30 +1,20 @@ -#if 0 -Macros used: -CROSS - defined if we are building cross compiling packages. This does - not mean that we are cross-building _this_ package. -_HOST_ - suffix for the arch we are compiling -_TARGET_ - suffix for the arch that the package will target -#endif - Source: uclibc Section: devel Priority: optional Maintainer: David Schleef Build-Depends: debhelper -Standards-Version: 3.0.1 +Standards-Version: 3.5.2 -#ifndef CROSS -Package: libuclibc-dev +Package: libuclibc-dev_TARGET_ Section: devel Architecture: any -Depends: libuclibc0, ${shlibs:Depends} -Conflicts: libuclibc-dev_HOST_ +Depends: ${shlibs: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. -Package: libuclibc0 +Package: libuclibc0_TARGET_ Section: libs Architecture: any Depends: ${shlibs:Depends} @@ -33,34 +23,13 @@ Description: A small implementation of the C library much smaller than glibc, which makes it useful for embedded systems. -Package: uclibc-gcc +Package: uclibc_TARGET_-gcc Section: devel Architecture: any -Depends: c-compiler, binutils, ${shlibs:Depends} +Depends: gcc|c-compiler, binutils, ${shlibs:Depends} Description: A compiler wrapper for uClibc This is a small wrapper for gcc, ld, and other toolchain utilities to do compilation against uClibc instead of the native libc. This package is used for cross compiling. -#endif -Package: libuclibc-dev_TARGET_ -Section: devel -Architecture: all -Depends: -Suggests: uclibc-gcc_TARGET_ -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 is used for cross compiling. - -#ifdef CROSS -Package: uclibc-gcc_TARGET_ -Section: devel -Architecture: any -Depends: c-compiler_TARGET_, binutils, ${shlibs:Depends} -Description: A compiler wrapper for uClibc - This is a small wrapper for gcc, ld, and other toolchain utilities - to do compilation against uClibc instead of the native libc. - This package is used for cross compiling. -#endif diff --git a/debian/libuclibc0.shlibs b/debian/libuclibc0.shlibs index 81556def9..06109f1c3 100644 --- a/debian/libuclibc0.shlibs +++ b/debian/libuclibc0.shlibs @@ -1,6 +1,7 @@ libc 0 libuclibc0 (>> 0.9.5-0) libm 0 libuclibc0 (>> 0.9.5-0) -ld-uclibc 0 libuclibc0 (>> 0.9.5-0) +ld-uClibc 0 libuclibc0 (>> 0.9.5-0) libdl 0 libuclibc0 (>> 0.9.5-0) libcrypt 0 libuclibc0 (>> 0.9.5-0) libutil 0 libuclibc0 (>> 0.9.5-0) +libresolv 0 libuclibc0 (>> 0.9.5-0) diff --git a/debian/rules b/debian/rules index 769c19172..43163582e 100755 --- a/debian/rules +++ b/debian/rules @@ -21,6 +21,16 @@ with_shared_libs=y #with_shared_libs=n #endif +ifneq ($(target),$(DEB_HOST_GNU_CPU)) +target_suffix=-$(target) +endif + +p_dev=libuclibc-dev$(target_suffix) +p_lib=libuclibc0$(target_suffix) +p_gcc=uclibc$(target_suffix)-gcc + +debian/control: debian/control.in + sed s/_TARGET_/$(target_suffix)/ debian/control.in >debian/control build: build-stamp build-stamp: @@ -56,42 +66,46 @@ clean: dh_clean -install: build +install: build debian/control dh_testdir dh_testroot dh_clean -k dh_installdirs + -rm debian/$(p_dev) + ln -s tmp debian/$(p_dev) + # Add here commands to install the package into debian/tmp. - $(MAKE) install_dev DESTDIR=`pwd`/debian/tmp - $(MAKE) install_runtime DESTDIR=`pwd`/debian/libuclibc0 - $(MAKE) install_gcc DESTDIR=`pwd`/debian/uclibc-gcc + $(MAKE) install_dev DESTDIR=`pwd`/debian/$(p_dev) + $(MAKE) install_runtime DESTDIR=`pwd`/debian/$(p_lib) + $(MAKE) install_gcc DESTDIR=`pwd`/debian/$(p_gcc) + install -d debian/$(p_gcc)/usr/share/man/man1 install -m 644 debian/uclibc-gcc.1 \ - debian/uclibc-gcc/usr/share/man/man1/$(target)-uclibc-gcc.1 - (cd debian/uclibc-gcc/usr/share/man/man1; \ + debian/$(p_gcc)/usr/share/man/man1/$(target)-uclibc-gcc.1 + (cd debian/$(p_gcc)/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 gasp nm objcopy objdump ranlib \ size strings strip;do \ ln -sf $$x.1.gz $(target)-uclibc-$$x.1.gz;done) - install -d debian/libuclibc0/usr/share/man/man1 + install -d debian/$(p_lib)/usr/share/man/man1 install -m 644 debian/uclibc-ldd.1 \ - debian/libuclibc0/usr/share/man/man1/$(target)-uclibc-ldd.1 - + debian/$(p_lib)/usr/share/man/man1/$(target)-uclibc-ldd.1 install -m 644 debian/uclibc-ldconfig.1 \ - debian/libuclibc0/usr/share/man/man1/$(target)-uclibc-ldconfig.1 + debian/$(p_lib)/usr/share/man/man1/$(target)-uclibc-ldconfig.1 ifeq ($(with_shared_libs),y) - mkdir -p debian/libuclibc0/lib/ - ln -sf /usr/$(target)-uclibc-linux/lib/ld-uclibc.so.0 \ - debian/libuclibc0/lib/ld-uclibc.so.0 +ifeq ($(target),$(DEB_HOST_GNU_CPU)) + mkdir -p debian/$(p_lib)/lib/ + ln -sf /usr/$(target)-uclibc-linux/lib/ld-uClibc.so.0 \ + debian/$(p_lib)/lib/ld-uClibc.so.0 +endif endif # Build architecture-independent files here. -binary-indep: build install -# We have nothing to do by default. +binary-indep: # Build architecture-dependent files here. binary-arch: build install @@ -120,7 +134,11 @@ binary-arch: build install # dh_makeshlibs dh_installdeb # dh_perl - dh_shlibdeps --exclude=ld_uclibc -ldebian/libuclibc0/usr/$(target)-linux-uclibc/lib +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 -- cgit v1.2.3