summaryrefslogtreecommitdiff
path: root/toolchain/elf2flt
diff options
context:
space:
mode:
Diffstat (limited to 'toolchain/elf2flt')
-rw-r--r--toolchain/elf2flt/elf2flt/CVS/Entries8
-rw-r--r--toolchain/elf2flt/elf2flt/Makefile.in6
-rw-r--r--toolchain/elf2flt/elf2flt/configure.in13
-rw-r--r--toolchain/elf2flt/elf2flt/ld-elf2flt.in4
4 files changed, 22 insertions, 9 deletions
diff --git a/toolchain/elf2flt/elf2flt/CVS/Entries b/toolchain/elf2flt/elf2flt/CVS/Entries
index d903840bc..c31d4250d 100644
--- a/toolchain/elf2flt/elf2flt/CVS/Entries
+++ b/toolchain/elf2flt/elf2flt/CVS/Entries
@@ -9,9 +9,9 @@
/elf2flt.ld/1.12/Tue Jan 10 05:12:32 2006/-ko/
/config.sub/1.8/Wed Jan 11 13:36:39 2006/-ko/
/cygwin-elf.h/1.4/Wed Jan 11 13:36:39 2006//
-/Makefile.in/1.14/Thu Jan 12 03:00:33 2006/-ko/
-/configure/1.9/Thu Jan 12 03:00:33 2006/-ko/
-/configure.in/1.7/Thu Jan 12 03:00:33 2006/-ko/
-/ld-elf2flt.in/1.10/Thu Jan 12 03:00:55 2006//
/elf2flt.c/1.38/Fri Jan 13 08:02:22 2006/-ko/
+/Makefile.in/1.15/Result of merge/-ko/
+/configure.in/1.8/Mon Feb 6 05:04:36 2006/-ko/
+/ld-elf2flt.in/1.11/Mon Feb 6 05:04:36 2006//
+/configure/1.9/Mon Feb 6 05:05:05 2006/-ko/
D
diff --git a/toolchain/elf2flt/elf2flt/Makefile.in b/toolchain/elf2flt/elf2flt/Makefile.in
index 24dd96d1e..6e8e3105e 100644
--- a/toolchain/elf2flt/elf2flt/Makefile.in
+++ b/toolchain/elf2flt/elf2flt/Makefile.in
@@ -13,16 +13,16 @@ TARGET = @target_alias@
CFLAGS = @CFLAGS@
INCLUDES = @bfd_include_dir@ @binutils_include_dir@
CPPFLAGS = @CPPFLAGS@
-LDFLAGS = @LDFLAGS@ -static
+LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
INSTALL = @INSTALL@
DEFS = @DEFS@ -DTARGET_$(CPU)
EXEEXT = @EXEEXT@
OBJEXT = @OBJEXT@
-UNAME := $(shell uname -s)
+HOST = @host_alias@
-ifneq (,$(findstring MINGW,$(UNAME)))
+ifneq (,$(findstring mingw32,$(HOST)))
LIBS := $(LIBS) -lws2_32
endif
diff --git a/toolchain/elf2flt/elf2flt/configure.in b/toolchain/elf2flt/elf2flt/configure.in
index b0335d77c..ae5dd270a 100644
--- a/toolchain/elf2flt/elf2flt/configure.in
+++ b/toolchain/elf2flt/elf2flt/configure.in
@@ -25,6 +25,12 @@ AC_ARG_WITH(binutils-include-dir,
[ ac_binutils_include_dir=NONE ]
)
+AC_ARG_WITH(binutils-ldscript-dir,
+ [ --with-binutils-ldscript-dir=<dir> path to install elf2flt.ld ],
+ [ ac_binutils_ldscript_dir=$withval ],
+ [ ac_binutils_ldscript_dir=NONE ]
+)
+
AC_ARG_ENABLE(got-check,
[ --disable-got-check - disable check for GOT (needed on H8) ],
[ got_check=$enableval ],
@@ -62,6 +68,12 @@ if test "$ac_binutils_include_dir" != "NONE"; then
binutils_include_dir="-I$ac_binutils_include_dir"
fi
+binutils_ldscript_dir=
+if test "$ac_binutils_ldscript_dir" = "NONE"; then
+ ac_binutils_ldscript_dir="\${TOOLDIR}/../${target_alias}/lib"
+fi
+binutils_ldscript_dir="$ac_binutils_ldscript_dir"
+
if test "$ac_libbfd" = "NONE" -o "$ac_libiberty" = "NONE" ; then
echo
echo "You need to specify the location of the libfd.a and libiberty.a"
@@ -108,6 +120,7 @@ AC_SUBST(target_os)
AC_SUBST(target_vendor)
AC_SUBST(bfd_include_dir)
AC_SUBST(binutils_include_dir)
+AC_SUBST(binutils_ldscript_dir)
AC_SUBST(got_check)
AC_OUTPUT(Makefile ld-elf2flt)
diff --git a/toolchain/elf2flt/elf2flt/ld-elf2flt.in b/toolchain/elf2flt/elf2flt/ld-elf2flt.in
index 140b4f928..613dcbf97 100644
--- a/toolchain/elf2flt/elf2flt/ld-elf2flt.in
+++ b/toolchain/elf2flt/elf2flt/ld-elf2flt.in
@@ -15,12 +15,12 @@
LINKER="$0.real" # the original renamed-linker
ELF2FLT="`expr $0 : '\(.*\)ld'`elf2flt"
TOOLDIR="`dirname $0`" # let gcc find the tools for us
-LDSCRIPTPATH="${TOOLDIR}/../@target_alias@/lib" # and the scripts
+LDSCRIPTPATH="@binutils_ldscript_dir@" # and the scripts
SHARED_ID=""
NEWLDSCRIPT=""
# check TOOLDIR from prefix/bin/ or prefix/target-alias/bin/
-[ -d "${TOOLDIR}/../@target_alias@/lib" ] || LDSCRIPTPATH="${TOOLDIR}/../lib"
+[ -d "${LDSCRIPTPATH}" ] || LDSCRIPTPATH="${TOOLDIR}/../lib"
#
# if we have the elf2flt options, run it