[uClibc] binutils-uClibc followup patch

Carl Miller chaz at energoncube.net
Thu Dec 25 00:09:05 UTC 2003


> Denis Dowling notes:
>
> > Agree with the intent of the patches. I cannot build binutils however. I
> > configure with --target=i386-pc-linux-uclibc but I get the following error
> > when building:
> > 
> > *** ld does not support target i386-pc-linux-uclibc
> > *** see ld/configure.tgt for supported targets
> > make: *** [configure-ld] Error 1
> > 
> > Seems that there is a patch missing for this file or I am using a bugus
> > target. Any ideas?

I responded:

> Looks like my binutils patch was insufficient.  It looks like
> ld/configure.tgt is yet *another* place where the build system makes
> decisions based on target tuple.  I got lucky with my ppc405 build because
> it lists powerpc*-*-linux* as a match.  Some architectures put the wildcard
> right after "-linux", some make it match "-linux-gnu".  i386 is one that
> must match -linux-gnu*.  I don't know why that is; it seems rather silly
> to me.  I'll work up a patch for ld/configure.tgt that fixes this and send
> it off to you today.

Attached.  Apply this one on top of my previous binutils patch.  With it, I
got a clean build of binutils-2.14.90.0.5 for i386-pc-linux-uclibc.


                                ----Carl
-------------- next part --------------
Yet another place that checks the target tuple and looks specifically for
linux-gnu.  Remove "-gnu" where it makes no difference in the outcome, and
add "-uclibc" alternates where it does, so that *-*-linux-uclibc target
tuples work.


Index: ld/configure.tgt
===================================================================
RCS file: /home/cvs/tools/binutils-2.14.90.0.5/ld/configure.tgt,v
retrieving revision 1.1.1.1
diff -d -u -r1.1.1.1 configure.tgt
--- binutils-2.14.90.0.5/ld/configure.tgt	4 Dec 2003 01:18:32 -0000	1.1.1.1
+++ binutils-2.14.90.0.5/ld/configure.tgt	24 Dec 2003 23:46:16 -0000
@@ -29,7 +29,7 @@
 cris-*-*aout*)		targ_emul=crisaout
 			targ_extra_emuls="criself crislinux"
 			targ_extra_libpath=$targ_extra_emuls ;;
-cris-*-linux-gnu*)	targ_emul=crislinux ;;
+cris-*-linux*)		targ_emul=crislinux ;;
 cris-*-*)		targ_emul=criself
 			targ_extra_emuls="crisaout crislinux"
 			targ_extra_libpath=$targ_extra_emuls ;;
@@ -66,7 +66,8 @@
 			tdir_sparclinux=${tdir_elf32_sparc}aout
 			tdir_sun4=sparc-sun-sunos4
 			;;
-sparc*-*-linux-gnu*)	targ_emul=elf32_sparc
+sparc*-*-linux-gnu* | sparc*-*-linux-uclibc*)
+			targ_emul=elf32_sparc
 			targ_extra_emuls="sparclinux elf64_sparc sun4"
 			targ_extra_libpath=elf64_sparc
 			tdir_sparclinux=${targ_alias}aout
@@ -147,7 +148,8 @@
 			tdir_elf_i386=`echo ${targ_alias} | sed -e 's/aout//'`
 			;;
 i[3-7]86-*-linux*oldld)	targ_emul=i386linux; targ_extra_emuls=elf_i386 ;;
-i[3-7]86-*-linux-gnu*)	targ_emul=elf_i386
+i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*)
+			targ_emul=elf_i386
 			targ_extra_emuls=i386linux
 			if test x${want64} = xtrue; then
 			  targ_extra_emuls="$targ_extra_emuls elf_x86_64"
@@ -248,11 +250,12 @@
 arm-*-kaos*)		targ_emul=armelf ;;
 arm9e-*-elf)		targ_emul=armelf ;;
 arm-*-oabi)		targ_emul=armelf_oabi ;;
-arm*b-*-linux-gnu*)	targ_emul=armelfb_linux; targ_extra_emuls=armelfb ;;
-arm*-*-linux-gnu*)	targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
+arm*b-*-linux*)		targ_emul=armelfb_linux; targ_extra_emuls=armelfb ;;
+arm*-*-linux*)		targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
 arm*-*-uclinux*)	targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
 arm*-*-conix*)		targ_emul=armelf ;;
-thumb-*-linux-gnu* | thumb-*-uclinux*)	targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
+thumb-*-linux* | thumb-*-uclinux*)
+			targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
 strongarm-*-coff)	targ_emul=armcoff ;;
 strongarm-*-elf)	targ_emul=armelf ;;
 strongarm-*-kaos*)	targ_emul=armelf ;;
@@ -353,7 +356,8 @@
 			targ_extra_emuls=m68kelf
 			tdir_m68kelf=`echo ${targ_alias} | sed -e 's/aout//'`
 			;;
-m68k-*-linux-gnu*)	targ_emul=m68kelf
+m68k-*-linux-gnu* | m68k-*-linux-uclibc*)
+			targ_emul=m68kelf
 			targ_extra_emuls=m68klinux
 			tdir_m68klinux=`echo ${targ_alias} | sed -e 's/linux/linuxaout/'`
 			;;
@@ -421,10 +425,10 @@
 mips64*-*-linux-gnu*)	targ_emul=elf32btsmipn32
 			targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip"
 			;;
-mips*el-*-linux-gnu*)	targ_emul=elf32ltsmip
+mips*el-*-linux*)	targ_emul=elf32ltsmip
 			targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip"
 			;;
-mips*-*-linux-gnu*)	targ_emul=elf32btsmip
+mips*-*-linux*)		targ_emul=elf32btsmip
 			targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip"
 			;;
 mips*-*-lnews*)		targ_emul=mipslnews ;;
@@ -443,7 +447,7 @@
 alpha*-*-linuxecoff*)	targ_emul=alpha targ_extra_emuls=elf64alpha
 			tdir_elf64alpha=`echo ${targ_alias} | sed -e 's/ecoff//'`
 			;;
-alpha*-*-linux-gnu*)	targ_emul=elf64alpha targ_extra_emuls=alpha
+alpha*-*-linux*)	targ_emul=elf64alpha targ_extra_emuls=alpha
 			tdir_alpha=`echo ${targ_alias} | sed -e 's/linux/linuxecoff/'`
 			;;
 alpha*-*-osf*)		targ_emul=alpha ;;


More information about the uClibc mailing list