Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Add infrastructure for building MCLinker.
details: https://anonhg.NetBSD.org/src/rev/ff1ac646dffe
branches: trunk
changeset: 785156:ff1ac646dffe
user: joerg <joerg%NetBSD.org@localhost>
date: Wed Feb 27 21:25:05 2013 +0000
description:
Add infrastructure for building MCLinker.
diffstat:
distrib/sets/lists/comp/mi | 3 +-
distrib/sets/sets.subr | 5 +-
external/bsd/llvm/Makefile | 10 +-
external/bsd/llvm/Makefile.inc | 11 +-
external/bsd/llvm/bin/Makefile | 7 +-
external/bsd/llvm/bin/llvm-mcld/Makefile | 76 +++++++++
external/bsd/llvm/config/mclinker/mcld/Config/Config.h | 108 ++++++++++++++
external/bsd/llvm/config/mclinker/mcld/Config/Linkers.def | 28 +++
external/bsd/llvm/config/mclinker/mcld/Config/Targets.def | 28 +++
external/bsd/llvm/lib/Makefile | 23 ++-
external/bsd/llvm/lib/libMCLinkerADT/Makefile | 15 +
external/bsd/llvm/lib/libMCLinkerARMCodeGen/Makefile | 28 +++
external/bsd/llvm/lib/libMCLinkerARMTargetInfo/Makefile | 15 +
external/bsd/llvm/lib/libMCLinkerCodeGen/Makefile | 16 ++
external/bsd/llvm/lib/libMCLinkerCore/Makefile | 25 +++
external/bsd/llvm/lib/libMCLinkerFragment/Makefile | 23 ++
external/bsd/llvm/lib/libMCLinkerLD/Makefile | 63 ++++++++
external/bsd/llvm/lib/libMCLinkerMC/Makefile | 27 +++
external/bsd/llvm/lib/libMCLinkerMipsCodeGen/Makefile | 24 +++
external/bsd/llvm/lib/libMCLinkerMipsTargetInfo/Makefile | 15 +
external/bsd/llvm/lib/libMCLinkerObject/Makefile | 17 ++
external/bsd/llvm/lib/libMCLinkerSupport/Makefile | 33 ++++
external/bsd/llvm/lib/libMCLinkerTarget/Makefile | 24 +++
external/bsd/llvm/lib/libMCLinkerX86CodeGen/Makefile | 25 +++
external/bsd/llvm/lib/libMCLinkerX86TargetInfo/Makefile | 15 +
external/bsd/llvm/link.mk | 8 +-
share/mk/bsd.own.mk | 4 +-
tools/Makefile | 5 +-
tools/llvm-lib/libMCLinkerADT/Makefile | 3 +
tools/llvm-lib/libMCLinkerARMCodeGen/Makefile | 3 +
tools/llvm-lib/libMCLinkerARMTargetInfo/Makefile | 3 +
tools/llvm-lib/libMCLinkerCodeGen/Makefile | 3 +
tools/llvm-lib/libMCLinkerCore/Makefile | 3 +
tools/llvm-lib/libMCLinkerFragment/Makefile | 3 +
tools/llvm-lib/libMCLinkerLD/Makefile | 3 +
tools/llvm-lib/libMCLinkerMC/Makefile | 3 +
tools/llvm-lib/libMCLinkerMipsCodeGen/Makefile | 3 +
tools/llvm-lib/libMCLinkerMipsTargetInfo/Makefile | 3 +
tools/llvm-lib/libMCLinkerObject/Makefile | 3 +
tools/llvm-lib/libMCLinkerSupport/Makefile | 3 +
tools/llvm-lib/libMCLinkerTarget/Makefile | 3 +
tools/llvm-lib/libMCLinkerX86CodeGen/Makefile | 3 +
tools/llvm-lib/libMCLinkerX86TargetInfo/Makefile | 3 +
tools/llvm-mcld/Makefile | 7 +
44 files changed, 721 insertions(+), 12 deletions(-)
diffs (truncated from 1029 to 300 lines):
diff -r e699ac323be7 -r ff1ac646dffe distrib/sets/lists/comp/mi
--- a/distrib/sets/lists/comp/mi Wed Feb 27 21:21:47 2013 +0000
+++ b/distrib/sets/lists/comp/mi Wed Feb 27 21:25:05 2013 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1806 2013/02/22 15:14:29 jmmv Exp $
+# $NetBSD: mi,v 1.1807 2013/02/27 21:25:06 joerg Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@@ -47,6 +47,7 @@
./usr/bin/gettext comp-c-bin
./usr/bin/gettextize comp-obsolete obsolete
./usr/bin/gprof comp-debug-bin binutils
+./usr/bin/ld.mcld comp-c-bin mclinker
./usr/bin/lex comp-c-bin
./usr/bin/lint comp-c-bin
./usr/bin/llvm-tblgen comp-c-bin llvm
diff -r e699ac323be7 -r ff1ac646dffe distrib/sets/sets.subr
--- a/distrib/sets/sets.subr Wed Feb 27 21:21:47 2013 +0000
+++ b/distrib/sets/sets.subr Wed Feb 27 21:25:05 2013 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: sets.subr,v 1.144 2013/02/15 19:49:48 jmmv Exp $
+# $NetBSD: sets.subr,v 1.145 2013/02/27 21:25:05 joerg Exp $
#
#
@@ -179,7 +179,7 @@
# In each file, a record consists of a path and a System Package name,
# separated by whitespace. E.g.,
#
-# # $NetBSD: sets.subr,v 1.144 2013/02/15 19:49:48 jmmv Exp $
+# # $NetBSD: sets.subr,v 1.145 2013/02/27 21:25:05 joerg Exp $
# . base-sys-root [keyword[,...]]
# ./altroot base-sys-root
# ./bin base-sys-root
@@ -234,6 +234,7 @@
# man ${MKMAN} != no
# manpages ${MKMANPAGES} != no
# manz ${MKMANZ} != no
+# mclinker ${MKMCLINKER} != no
# mdns ${MKMDNS} != no
# nls ${MKNLS} != no
# nvi ${MKNVI} != no
diff -r e699ac323be7 -r ff1ac646dffe external/bsd/llvm/Makefile
--- a/external/bsd/llvm/Makefile Wed Feb 27 21:21:47 2013 +0000
+++ b/external/bsd/llvm/Makefile Wed Feb 27 21:25:05 2013 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2012/06/17 16:51:31 joerg Exp $
+# $NetBSD: Makefile,v 1.3 2013/02/27 21:25:08 joerg Exp $
.include <bsd.init.mk>
@@ -20,4 +20,12 @@
svn co -r ${COMPILER_RT_REVISION} ${SVN_ROOT}/compiler-rt/trunk \
${COMPILER_RT_SRCDIR}
+checkout-mclinker:
+ if [ -d ${MCLINKER_SRCDIR}/.git ]; then \
+ cd ${MCLINKER_SRCDIR}; git pull ${MCLINKER_ROOT} ; \
+ else \
+ git clone ${MCLINKER_ROOT} ${MCLINKER_SRCDIR}; \
+ fi
+ cd ${MCLINKER_SRCDIR} && git checkout ${MCLINKER_REVISION}
+
.include <bsd.subdir.mk>
diff -r e699ac323be7 -r ff1ac646dffe external/bsd/llvm/Makefile.inc
--- a/external/bsd/llvm/Makefile.inc Wed Feb 27 21:21:47 2013 +0000
+++ b/external/bsd/llvm/Makefile.inc Wed Feb 27 21:25:05 2013 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.46 2013/02/19 12:35:41 joerg Exp $
+# $NetBSD: Makefile.inc,v 1.47 2013/02/27 21:25:08 joerg Exp $
.if !defined(LLVM_TOPLEVEL_MK)
LLVM_TOPLEVEL_MK=
@@ -12,21 +12,27 @@
CLANG_REVISION= ${COMMON_REVISION}
COMPILER_RT_REVISION= ${COMMON_REVISION}
+MCLINKER_REVISION= a5d978e2561fe37b84aa18b83cbd5fff8b6475a0
+MCLINKER_ROOT= https://code.google.com/p/mclinker/
+
LLVM_VERSION= 3.3
CLANG_VERSION= 3.3
LLVM_SRCDIR:= ${.PARSEDIR}/dist/llvm
CLANG_SRCDIR:= ${.PARSEDIR}/dist/clang
COMPILER_RT_SRCDIR:= ${.PARSEDIR}/dist/compiler-rt
+MCLINKER_SRCDIR:= ${.PARSEDIR}/dist/mclinker
LLVM_TOPLEVEL:= ${.PARSEDIR}
CPPFLAGS+= -I. -I${LLVM_SRCDIR}/include -I${CLANG_SRCDIR}/include \
+ -I${MCLINKER_SRCDIR}/include \
-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS \
-D__STDC_FORMAT_MACROS
.if defined(HOSTLIB) || defined(HOSTPROG)
LLVM_INCLUDE_CONFIG= ${LLVM_TOOLCONF_OBJDIR}/config/include
CLANG_INCLUDE_CONFIG= ${LLVM_TOOLCONF_OBJDIR}/config/tools/clang/include
+MCLINKER_INCLUDE_CONFIG= ${LLVM_TOPLEVEL}/config/mclinker
LLVM_INCLUDE_OBJDIR!= cd ${NETBSDSRCDIR}/tools/llvm-include && ${PRINTOBJDIR}
LLVM_TOOLCONF_OBJDIR!= cd ${NETBSDSRCDIR}/tools/llvm && ${PRINTOBJDIR}
HOST_CPPFLAGS+= ${CPPFLAGS}
@@ -34,12 +40,13 @@
.else
LLVM_INCLUDE_CONFIG= ${LLVM_TOPLEVEL}/config
CLANG_INCLUDE_CONFIG= ${LLVM_TOPLEVEL}/config
+MCLINKER_INCLUDE_CONFIG= ${LLVM_TOPLEVEL}/config/mclinker
LLVM_INCLUDE_OBJDIR!= cd ${LLVM_TOPLEVEL}/include && ${PRINTOBJDIR}
CXXFLAGS+= -fno-rtti -fno-exceptions
.endif
CPPFLAGS+= -I${LLVM_INCLUDE_OBJDIR} -I${LLVM_INCLUDE_CONFIG} \
- -I${CLANG_INCLUDE_CONFIG}
+ -I${CLANG_INCLUDE_CONFIG} -I${MCLINKER_INCLUDE_CONFIG}
LLVM_CONFIGURE_ARGS= \
--enable-targets=x86,powerpc,sparc,aarch64,arm,mips \
diff -r e699ac323be7 -r ff1ac646dffe external/bsd/llvm/bin/Makefile
--- a/external/bsd/llvm/bin/Makefile Wed Feb 27 21:21:47 2013 +0000
+++ b/external/bsd/llvm/bin/Makefile Wed Feb 27 21:25:05 2013 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.7 2013/01/23 15:02:54 joerg Exp $
+# $NetBSD: Makefile,v 1.8 2013/02/27 21:25:08 joerg Exp $
.include <bsd.own.mk>
@@ -6,6 +6,11 @@
clang-tblgen \
tblgen
+.if ${MKMCLINKER} != "no"
+SUBDIR+= \
+ llvm-mcld
+.endif
+
.if defined(LLVM_DEVELOPER)
SUBDIR+= \
bugpoint \
diff -r e699ac323be7 -r ff1ac646dffe external/bsd/llvm/bin/llvm-mcld/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/llvm/bin/llvm-mcld/Makefile Wed Feb 27 21:25:05 2013 +0000
@@ -0,0 +1,76 @@
+# $NetBSD: Makefile,v 1.1 2013/02/27 21:25:08 joerg Exp $
+
+PROG_CXX= ld.mcld
+NOMAN= yes
+
+.include <bsd.init.mk>
+
+.PATH: ${MCLINKER_SRCDIR}/tools/llvm-mcld
+
+SRCS= llvm-mcld.cpp
+
+MCLINKER_LIBS+= \
+ ARMTargetInfo \
+ ARMCodeGen \
+ MipsTargetInfo \
+ MipsCodeGen \
+ X86TargetInfo \
+ X86CodeGen \
+ Target \
+ CodeGen \
+ Core \
+ Object \
+ Fragment \
+ MC \
+ ADT \
+ Support \
+ LD \
+
+LLVM_LIBS+= \
+ AsmParser \
+ BitReader \
+ AArch64CodeGen \
+ AArch64TargetInfo \
+ AArch64AsmParser \
+ AArch64MCTargetDesc \
+ AArch64AsmPrinter \
+ AArch64Utils \
+ ARMCodeGen \
+ ARMTargetInfo \
+ ARMAsmParser \
+ ARMMCTargetDesc \
+ ARMAsmPrinter \
+ MipsCodeGen \
+ MipsTargetInfo \
+ MipsAsmParser \
+ MipsDisassembler \
+ MipsMCTargetDesc \
+ MipsAsmPrinter \
+ PowerPCCodeGen \
+ PowerPCTargetInfo \
+ PowerPCMCTargetDesc \
+ PowerPCAsmPrinter \
+ SparcCodeGen \
+ SparcTargetInfo \
+ SparcMCTargetDesc \
+ X86CodeGen \
+ X86TargetInfo \
+ X86MCTargetDesc \
+ X86AsmParser \
+ X86AsmPrinter \
+ X86Utils \
+ SelectionDAG \
+ CodeGen \
+ Target \
+ ScalarOpts \
+ TransformsUtils \
+ Analysis \
+ AsmPrinter \
+ MCParser \
+ MC \
+ IR \
+ Support
+
+.include "${.PARSEDIR}/../../link.mk"
+
+.include <bsd.prog.mk>
diff -r e699ac323be7 -r ff1ac646dffe external/bsd/llvm/config/mclinker/mcld/Config/Config.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/llvm/config/mclinker/mcld/Config/Config.h Wed Feb 27 21:25:05 2013 +0000
@@ -0,0 +1,108 @@
+/* include/mcld/Config/Config.h. Generated from Config.h.in by configure. */
+/* include/mcld/Config/Config.h.in. Generated from configure.ac by autoheader. */
+
+
+//===- Config.h.in --------------------------------------------------------===//
+//
+// The MCLinker Project
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+#ifndef MCLD_CONFIG_H
+#define MCLD_CONFIG_H
+
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#define HAVE_DLFCN_H 1
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#define HAVE_FCNTL_H 1
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define if you have POSIX threads libraries and header files. */
+#define HAVE_PTHREAD 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+ */
+#define LT_OBJDIR ".libs/"
+
+/* Define if this is Unixish platform */
+#define MCLD_ON_UNIX 1
+
+/* Define if this is Win32ish platform */
+/* #undef MCLD_ON_WIN32 */
+
+/* MCLINKER version */
+#define MCLD_VERSION "2.1.0.0-NanHu"
+
+/* Name of package */
+#define PACKAGE "mclinker"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT "mclinker%googlegroups.com@localhost"
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "MCLinker"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "MCLinker NanHu"
+
+/* Define to the one symbol short name of this package. */
Home |
Main Index |
Thread Index |
Old Index