* Makefile.am (GENSCRIPTS): Pass EMULATION_LIBPATH, not EMUL.

* configure.in (all_emuls): Add targ_extra_libpath.
        (all_libpath, EMULATION_LIBPATH): Define.
        * configure.tgt (powerpc-*-linux-gnu*): Define targ_extra_libpath.
        * genscripts.sh (LIB_PATH): Define if emulation in EMULATION_LIBPATH.
This commit is contained in:
Richard Henderson 1999-06-18 15:25:45 +00:00
parent 49863f82f0
commit 3336653ad1
7 changed files with 439 additions and 241 deletions

View File

@ -1,3 +1,11 @@
Fri Jun 18 15:24:48 1999 Richard Henderson <rth@cygnus.com>
* Makefile.am (GENSCRIPTS): Pass EMULATION_LIBPATH, not EMUL.
* configure.in (all_emuls): Add targ_extra_libpath.
(all_libpath, EMULATION_LIBPATH): Define.
* configure.tgt (powerpc-*-linux-gnu*): Define targ_extra_libpath.
* genscripts.sh (LIB_PATH): Define if emulation in EMULATION_LIBPATH.
Mon Jun 14 10:38:36 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
* ld.texinfo: Fix use of @item vs. @itemx.

View File

@ -260,7 +260,7 @@ ldemul-list.h: Makefile
# These all start with e so 'make clean' can find them.
GENSCRIPTS = $(SHELL) $(srcdir)/genscripts.sh ${srcdir} ${libdir} @host@ @target@ @target_alias@ ${EMUL} "@NATIVE_LIB_DIRS@"
GENSCRIPTS = $(SHELL) $(srcdir)/genscripts.sh ${srcdir} ${libdir} @host@ @target@ @target_alias@ "@EMULATION_LIBPATH@" "@NATIVE_LIB_DIRS@"
GEN_DEPENDS = $(srcdir)/genscripts.sh $(srcdir)/emultempl/stringify.sed
@TDIRS@

View File

@ -1,4 +1,4 @@
# Makefile.in generated automatically by automake 1.4a from Makefile.am
# Makefile.in generated automatically by automake 1.4 from Makefile.am
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
@ -46,10 +46,9 @@ AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_FLAG =
transform = @program_transform_name@
NORMAL_INSTALL = :
@ -71,6 +70,7 @@ CC = @CC@
CC_FOR_BUILD = @CC_FOR_BUILD@
DATADIRNAME = @DATADIRNAME@
DLLTOOL = @DLLTOOL@
EMULATION_LIBPATH = @EMULATION_LIBPATH@
EXEEXT = @EXEEXT@
EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@
GMOFILES = @GMOFILES@
@ -144,19 +144,49 @@ HOSTING_LIBS = @HOSTING_LIBS@
HOSTING_EMU = -m $(EMUL)
# Setup the testing framework, if you have one
EXPECT = `if [ -f $$r/../expect/expect ] ; then echo $$r/../expect/expect ; else echo expect ; fi`
EXPECT = `if [ -f $$r/../expect/expect ] ; \
then echo $$r/../expect/expect ; \
else echo expect ; fi`
RUNTEST = `if [ -f $${srcroot}/../dejagnu/runtest ] ; then echo $${srcroot}/../dejagnu/runtest ; else echo runtest ; fi`
RUNTEST = `if [ -f $${srcroot}/../dejagnu/runtest ] ; \
then echo $${srcroot}/../dejagnu/runtest ; \
else echo runtest ; fi`
RUNTESTFLAGS =
CC_FOR_TARGET = ` if [ -f $$r/../gcc/xgcc ] ; then if [ -f $$r/../newlib/Makefile ] ; then echo $$r/../gcc/xgcc -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc; else echo $$r/../gcc/xgcc -B$$r/../gcc/; fi; else if [ "@host@" = "@target@" ] ; then echo $(CC); else echo gcc | sed '$(transform)'; fi; fi`
CC_FOR_TARGET = ` \
if [ -f $$r/../gcc/xgcc ] ; then \
if [ -f $$r/../newlib/Makefile ] ; then \
echo $$r/../gcc/xgcc -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc; \
else \
echo $$r/../gcc/xgcc -B$$r/../gcc/; \
fi; \
else \
if [ "@host@" = "@target@" ] ; then \
echo $(CC); \
else \
echo gcc | sed '$(transform)'; \
fi; \
fi`
CXX = gcc
CXX_FOR_TARGET = ` if [ -f $$r/../gcc/xgcc ] ; then if [ -f $$r/../newlib/Makefile ] ; then echo $$r/../gcc/xgcc -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc; else echo $$r/../gcc/xgcc -B$$r/../gcc/; fi; else if [ "@host@" = "@target@" ] ; then echo $(CXX); else echo gcc | sed '$(transform)'; fi; fi`
CXX_FOR_TARGET = ` \
if [ -f $$r/../gcc/xgcc ] ; then \
if [ -f $$r/../newlib/Makefile ] ; then \
echo $$r/../gcc/xgcc -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc; \
else \
echo $$r/../gcc/xgcc -B$$r/../gcc/; \
fi; \
else \
if [ "@host@" = "@target@" ] ; then \
echo $(CXX); \
else \
echo gcc | sed '$(transform)'; \
fi; \
fi`
noinst_PROGRAMS = ld-new
@ -169,25 +199,143 @@ INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) -I$(to
BFDLIB = ../bfd/libbfd.la
LIBIBERTY = ../libiberty/libiberty.a
ALL_EMULATIONS = ea29k.o eaixppc.o eaixrs6.o ealpha.o earcelf.o earmelf.o earmelf_oabi.o earmelf_linux.o earmelf_linux26.o earmaoutb.o earmaoutl.o earmcoff.o earmpe.o ecoff_sparc.o ed10velf.o ed30velf.o ed30v_e.o ed30v_o.o edelta68.o eebmon29k.o eelf32_sparc.o eelf32_i960.o eelf32b4300.o eelf32bmip.o eelf32ebmip.o eelf32elmip.o eelf32l4300.o eelf32lmip.o eelf32lppc.o eelf32ppc.o eelf32ppclinux.o eelf_i386.o eelf_i386_be.o egld960.o egld960coff.o eelf32fr30.o eelf32mcore.o ego32.o eh8300.o eh8300h.o eh8300s.o eh8500.o eh8500b.o eh8500c.o eh8500m.o eh8500s.o ehp300bsd.o ehp3hpux.o ehppaelf.o ei386aout.o ei386beos.o ei386bsd.o ei386coff.o ei386go32.o ei386linux.o ei386lynx.o ei386mach.o ei386moss.o ei386msdos.o ei386nbsd.o ei386nw.o ei386pe.o elnk960.o em68k4knbsd.o em68kaout.o em68kaux.o em68kcoff.o em68kelf.o em68klinux.o em68klynx.o em68knbsd.o em68kpsos.o em88kbcs.o emcorepe.o emipsbig.o emipsbsd.o emipsidt.o emipsidtl.o emipslit.o emipslnews.o enews.o ens32knbsd.o epc532macha.o eppcmacos.o eppcnw.o eppcpe.o eriscix.o esa29200.o esh.o eshelf.o eshlelf.o eshl.o esparcaout.o esparclinux.o esparclynx.o esparcnbsd.o est2000.o esun3.o esun4.o etic30aout.o etic30coff.o etic80coff.o evanilla.o evax.o evsta.o ew65.o ez8001.o ez8002.o
ALL_EMULATIONS = \
ea29k.o \
eaixppc.o \
eaixrs6.o \
ealpha.o \
earcelf.o \
earmelf.o \
earmelf_oabi.o \
earmelf_linux.o \
earmelf_linux26.o \
earmaoutb.o \
earmaoutl.o \
earmcoff.o \
earmpe.o \
ecoff_sparc.o \
ed10velf.o \
ed30velf.o \
ed30v_e.o \
ed30v_o.o \
edelta68.o \
eebmon29k.o \
eelf32_sparc.o \
eelf32_i960.o \
eelf32b4300.o \
eelf32bmip.o \
eelf32ebmip.o \
eelf32elmip.o \
eelf32l4300.o \
eelf32lmip.o \
eelf32lppc.o \
eelf32ppc.o \
eelf32ppclinux.o \
eelf_i386.o \
eelf_i386_be.o \
egld960.o \
egld960coff.o \
eelf32fr30.o \
eelf32mcore.o \
ego32.o \
eh8300.o \
eh8300h.o \
eh8300s.o \
eh8500.o \
eh8500b.o \
eh8500c.o \
eh8500m.o \
eh8500s.o \
ehp300bsd.o \
ehp3hpux.o \
ehppaelf.o \
ei386aout.o \
ei386beos.o \
ei386bsd.o \
ei386coff.o \
ei386go32.o \
ei386linux.o \
ei386lynx.o \
ei386mach.o \
ei386moss.o \
ei386msdos.o \
ei386nbsd.o \
ei386nw.o \
ei386pe.o \
elnk960.o \
em68k4knbsd.o \
em68kaout.o \
em68kaux.o \
em68kcoff.o \
em68kelf.o \
em68klinux.o \
em68klynx.o \
em68knbsd.o \
em68kpsos.o \
em88kbcs.o \
emcorepe.o \
emipsbig.o \
emipsbsd.o \
emipsidt.o \
emipsidtl.o \
emipslit.o \
emipslnews.o \
enews.o \
ens32knbsd.o \
epc532macha.o \
eppcmacos.o \
eppcnw.o \
eppcpe.o \
eriscix.o \
esa29200.o \
esh.o \
eshelf.o \
eshlelf.o \
eshl.o \
esparcaout.o \
esparclinux.o \
esparclynx.o \
esparcnbsd.o \
est2000.o \
esun3.o \
esun4.o \
etic30aout.o \
etic30coff.o \
etic80coff.o \
evanilla.o \
evax.o \
evsta.o \
ew65.o \
ez8001.o \
ez8002.o
ALL_64_EMULATIONS = eelf64_sparc.o eelf64alpha.o
ALL_64_EMULATIONS = \
eelf64_sparc.o \
eelf64alpha.o
ALL_EMUL_EXTRA_OFILES = pe-dll.o deffilep.o
ALL_EMUL_EXTRA_OFILES = \
pe-dll.o \
deffilep.o
CFILES = ldctor.c ldemul.c ldexp.c ldfile.c ldlang.c ldmain.c ldmisc.c ldver.c ldwrite.c lexsup.c mri.c ldcref.c pe-dll.c
CFILES = ldctor.c ldemul.c ldexp.c ldfile.c ldlang.c \
ldmain.c ldmisc.c ldver.c ldwrite.c lexsup.c \
mri.c ldcref.c pe-dll.c
HFILES = ld.h ldctor.h ldemul.h ldexp.h ldfile.h ldlang.h ldlex.h ldmain.h ldmisc.h ldver.h ldwrite.h mri.h deffile.h
HFILES = ld.h ldctor.h ldemul.h ldexp.h ldfile.h \
ldlang.h ldlex.h ldmain.h ldmisc.h ldver.h \
ldwrite.h mri.h deffile.h
GENERATED_CFILES = ldgram.c ldlex.c deffilep.c
GENERATED_HFILES = ldgram.h ldemul-list.h deffilep.h
OFILES = ldgram.o ldlex.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o ${EMULATION_OFILES} ${EMUL_EXTRA_OFILES}
OFILES = ldgram.o ldlex.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o \
ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o \
ldfile.o ldcref.o ${EMULATION_OFILES} ${EMUL_EXTRA_OFILES}
STAGESTUFF = *.o ldscripts/* e*.c
@ -200,10 +348,11 @@ POTFILES = $(CFILES) $(HFILES) $(EMULATION_FILES)
# These all start with e so 'make clean' can find them.
GENSCRIPTS = $(SHELL) $(srcdir)/genscripts.sh ${srcdir} ${libdir} @host@ @target@ @target_alias@ ${EMUL} "@NATIVE_LIB_DIRS@"
GENSCRIPTS = $(SHELL) $(srcdir)/genscripts.sh ${srcdir} ${libdir} @host@ @target@ @target_alias@ "@EMULATION_LIBPATH@" "@NATIVE_LIB_DIRS@"
GEN_DEPENDS = $(srcdir)/genscripts.sh $(srcdir)/emultempl/stringify.sed
ld_new_SOURCES = ldgram.y ldlex.l lexsup.c ldlang.c mri.c ldctor.c ldmain.c ldwrite.c ldexp.c ldemul.c ldver.c ldmisc.c ldfile.c ldcref.c
ld_new_SOURCES = ldgram.y ldlex.l lexsup.c ldlang.c mri.c ldctor.c ldmain.c \
ldwrite.c ldexp.c ldemul.c ldver.c ldmisc.c ldfile.c ldcref.c
ld_new_DEPENDENCIES = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) $(BFDLIB) $(LIBIBERTY) $(INTLDEPS)
ld_new_LDADD = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) $(BFDLIB) $(LIBIBERTY) $(INTLLIBS)
@ -213,7 +362,8 @@ TESTBFDLIB = @TESTBFDLIB@
MAINTAINERCLEANFILES = ldver.texi
MOSTLYCLEANFILES = $(STAGESTUFF) ld1$(EXEEXT) ld2$(EXEEXT) ld3$(EXEEXT) ldemul-list.h crtbegin.o crtend.o ld.log ld.sum
MOSTLYCLEANFILES = $(STAGESTUFF) ld1$(EXEEXT) ld2$(EXEEXT) ld3$(EXEEXT) \
ldemul-list.h crtbegin.o crtend.o ld.log ld.sum
CLEANFILES = dep.sed .dep .dep1
@ -648,7 +798,7 @@ distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
cp -pr $$d/$$file $(distdir)/$$file; \
cp -pr $$/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
@ -717,7 +867,7 @@ uninstall: uninstall-recursive
all-am: Makefile $(PROGRAMS) $(MANS) config.h
all-redirect: all-recursive-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
installdirs: installdirs-recursive
installdirs-am:
$(mkinstalldirs) $(DESTDIR)$(mandir)/man1

423
ld/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -100,7 +100,7 @@ do
EMUL=$targ_emul
fi
for i in $targ_emul $targ_extra_emuls; do
for i in $targ_emul $targ_extra_emuls $targ_extra_libpath; do
case " $all_emuls " in
*" e${i}.o "*) ;;
*)
@ -112,6 +112,16 @@ do
esac
done
all_libpath=$targ_emul
for i in $targ_extra_libpath; do
case " $all_libpath " in
*" ${i} "*) ;;
*)
all_libpath="$all_libpath ${i}"
;;
esac
done
for i in $targ_extra_ofiles; do
case " $all_emul_extras " in
*" ${i} "*) ;;
@ -145,6 +155,9 @@ fi
AC_SUBST(EMULATION_OFILES)
AC_SUBST(EMUL_EXTRA_OFILES)
EMULATION_LIBPATH=$all_libpath
AC_SUBST(EMULATION_LIBPATH)
if test x${enable_static} = xno; then
TESTBFDLIB="--rpath ../bfd/.libs ../bfd/.libs/libbfd.so"
else

View File

@ -7,6 +7,7 @@
# following shell variables:
# targ_emul name of linker emulation to use
# targ_extra_emuls additional linker emulations to provide
# targ_extra_libpath additional linker emulations using LIB_PATH
# targ_extra_ofiles additional objects needed by the emulation
targ_extra_emuls=
@ -215,7 +216,8 @@ alpha*-*-netbsd*) targ_emul=elf64alpha ;;
z8k-*-coff) targ_emul=z8002; targ_extra_emuls=z8001 ;;
ns32k-pc532-mach* | ns32k-pc532-ux*) targ_emul=pc532macha ;;
ns32k-pc532-netbsd* | ns32k-pc532-lites*) targ_emul=ns32knbsd ;;
powerpc-*-linux-gnu*) targ_emul=elf32ppclinux; targ_extra_emuls=elf32ppc;;
powerpc-*-linux-gnu*) targ_emul=elf32ppclinux; targ_extra_emuls=elf32ppc;
targ_extra_libpath=elf32ppc ;;
powerpc-*-elf* | powerpc-*-eabi* | powerpc-*-sysv* \
| powerpc-*-netbsd* | powerpc-*-vxworks*)
targ_emul=elf32ppc ;;

View File

@ -14,7 +14,7 @@ libdir=$2
host=$3
target=$4
target_alias=$5
DEFAULT_EMULATION=$6
EMULATION_LIBPATH=$6
NATIVE_LIB_DIRS=$7
EMULATION_NAME=$8
tool_lib=`echo ${libdir} | sed -e 's|/lib$||'`/${9-$target_alias}/lib
@ -36,26 +36,24 @@ fi
# To force a logically empty LIB_PATH, do LIBPATH=":".
if [ "x${LIB_PATH}" = "x" ] ; then
# Cross, or native non-default emulation not requesting LIB_PATH.
LIB_PATH=
if [ "x${host}" = "x${target}" ] ; then
if [ "x${DEFAULT_EMULATION}" = "x${EMULATION_NAME}" ] ; then
# Native.
LIB_PATH=/lib:/usr/lib
if [ -n "${NATIVE_LIB_DIRS}" ]; then
LIB_PATH=${LIB_PATH}:${NATIVE_LIB_DIRS}
fi
if [ "${libdir}" != /usr/lib ]; then
LIB_PATH=${LIB_PATH}:${libdir}
fi
if [ "${libdir}" != /usr/local/lib ] ; then
LIB_PATH=${LIB_PATH}:/usr/local/lib
fi
else
# Native, but not default emulation.
LIB_PATH=
fi
else
# Cross.
LIB_PATH=
case " $EMULATION_LIBPATH " in
*" ${EMULATION_NAME} "*)
# Native, and default or emulation requesting LIB_PATH.
LIB_PATH=/lib:/usr/lib
if [ -n "${NATIVE_LIB_DIRS}" ]; then
LIB_PATH=${LIB_PATH}:${NATIVE_LIB_DIRS}
fi
if [ "${libdir}" != /usr/lib ]; then
LIB_PATH=${LIB_PATH}:${libdir}
fi
if [ "${libdir}" != /usr/local/lib ] ; then
LIB_PATH=${LIB_PATH}:/usr/local/lib
fi
esac
fi
fi
@ -127,7 +125,9 @@ if test -n "$GENERATE_SHLIB_SCRIPT"; then
ldscripts/${EMULATION_NAME}.xs
fi
test "$DEFAULT_EMULATION" = "$EMULATION_NAME" && COMPILE_IN=true
for i in $EMULATION_LIBPATH ; do
test "$i" = "$EMULATION_NAME" && COMPILE_IN=true
done
# Generate e${EMULATION_NAME}.c.
. ${srcdir}/emultempl/${TEMPLATE_NAME-generic}.em