summaryrefslogtreecommitdiff
path: root/tools/gccld
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2009-06-02 17:52:33 +0000
committerEd Schouten <ed@FreeBSD.org>2009-06-02 17:52:33 +0000
commit009b1c42aa6266385f2c37e227516b24077e6dd7 (patch)
tree64ba909838c23261cace781ece27d106134ea451 /tools/gccld
Diffstat (limited to 'tools/gccld')
-rw-r--r--tools/gccld/Makefile29
-rw-r--r--tools/gccld/gccld.sh23
2 files changed, 52 insertions, 0 deletions
diff --git a/tools/gccld/Makefile b/tools/gccld/Makefile
new file mode 100644
index 0000000000000..b2d3f734356d4
--- /dev/null
+++ b/tools/gccld/Makefile
@@ -0,0 +1,29 @@
+##===- tools/gccld/Makefile --------------------------------*- Makefile -*-===##
+#
+# The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+LEVEL = ../..
+
+include $(LEVEL)/Makefile.common
+
+install-local:: $(PROJ_bindir)/gccld
+
+$(PROJ_bindir)/gccld : gccld.sh Makefile
+ $(Echo) Installing gccld shell script.
+ $(Verb) sed "s#@TOOLDIR@#$(PROJ_bindir)#" $< > $@
+ $(Verb) chmod 0755 $@
+
+all-local:: $(ToolDir)/gccld
+
+$(ToolDir)/gccld : gccld.sh Makefile
+ $(Echo) Making $(ToolDir)/gccld shell script.
+ $(Verb) sed "s#@TOOLDIR@#$(ToolDir)#" $< > $@
+ $(Verb) chmod 0755 $@
+
+clean-local::
+ $(Verb)$(RM) -f $(ToolDir)/gccld
diff --git a/tools/gccld/gccld.sh b/tools/gccld/gccld.sh
new file mode 100644
index 0000000000000..b092607c72709
--- /dev/null
+++ b/tools/gccld/gccld.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+##===- tools/gccld/gccld.sh ------------------------------------*- bash -*-===##
+#
+# The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+#
+# Synopsis: This shell script is a replacement for the old "gccld" tool that
+# existed in LLVM versions before 2.0. The functionality of gccld has
+# now been moved to llvm-ld. This shell script provides backwards
+# compatibility so build environments invoking gccld can still get
+# link (under the covers) with llvm-ld.
+#
+# Syntax: gccld OPTIONS... (see llvm-ld for details)
+#
+##===----------------------------------------------------------------------===##
+#
+echo "gccld: This tool is deprecated, please use llvm-ld" 1>&2
+TOOLDIR=@TOOLDIR@
+$TOOLDIR/llvm-ld "$@"