Compare commits

..

20 Commits

Author SHA1 Message Date
John Criswell
52a52a9911 Added an answer about running the tests.
llvm-svn: 9498
2003-10-24 20:17:46 +00:00
John Criswell
2eed6e9122 Added note about multilib options.
llvm-svn: 9476
2003-10-24 18:06:42 +00:00
John Criswell
44008a16b7 Fixed the name of the Command Guide index.
llvm-svn: 9471
2003-10-24 16:49:42 +00:00
John Criswell
6e518e6326 Fixed the name of the Command Guide index.
Made everything into hyperlinks.

llvm-svn: 9470
2003-10-24 16:49:29 +00:00
John Criswell
f924987081 HTML version of README.txt
llvm-svn: 9468
2003-10-24 16:19:11 +00:00
John Criswell
4452c27c9a Removed the reference to llvm-request since the source code will be
available for downloading.

llvm-svn: 9466
2003-10-24 15:36:38 +00:00
John Criswell
02e054d107 Added brief information on how to query filed bugs via BugZilla.
Changed all tabs to spaces to ensure that nice LLVM look and feel.

llvm-svn: 9465
2003-10-24 14:37:26 +00:00
John Criswell
9096e27509 Made QMTest run first to ensure that it runs.
llvm-svn: 9464
2003-10-24 14:25:06 +00:00
John Criswell
42260d7716 Merged revision 1.19.
llvm-svn: 9463
2003-10-24 13:42:44 +00:00
John Criswell
faa1d1f04d Merged revision 1.21.
llvm-svn: 9462
2003-10-24 13:28:12 +00:00
John Criswell
0d6d28b38f Merged in revision 1.12.
llvm-svn: 9461
2003-10-24 13:24:02 +00:00
John Criswell
4a0f8ad6f1 Merged in revision 1.4, adjusting tabs to spaces to keep indentation
correct.

llvm-svn: 9458
2003-10-24 03:02:32 +00:00
John Criswell
ccb2261ec3 Updated the design guide to be a newer paper on LLVM.
llvm-svn: 9456
2003-10-24 00:54:03 +00:00
John Criswell
b93e94b748 Fixed the syntax for Solaris /bin/sh.
In pre-historic times, you couldn't assign and export a variable at the
same time in /bin/sh.  Solaris still can't.

llvm-svn: 9455
2003-10-24 00:49:47 +00:00
John Criswell
8b83d1b419 Added information on why someone would want to build the GCC front end.
Added a link to this information from the Getting Started Guide.
Changed the word "wicked" to "elite."  The original sounds much cooler, but
I fear the PR police when I take off my tinfoil hat.

llvm-svn: 9454
2003-10-23 22:15:14 +00:00
John Criswell
188c951004 Added information about fixing the headers on Solaris.
llvm-svn: 9453
2003-10-23 21:22:19 +00:00
John Criswell
cf7c329798 Removing Release Tasks. This belongs in the web site repository.
Added a link to the LLVM home page at the end of each page.

llvm-svn: 9448
2003-10-23 20:23:01 +00:00
John Criswell
3d2a2eb218 Added LLVM copyright header per Vikram's request.
llvm-svn: 9447
2003-10-23 20:03:38 +00:00
John Criswell
6935fa4016 Removed pre-release license.
llvm-svn: 9446
2003-10-23 20:01:36 +00:00
CVS to SVN Conversion
f37a450b62 This commit was manufactured by cvs2svn to create branch 'release_1'.
llvm-svn: 9439
2003-10-23 19:16:12 +00:00
4343 changed files with 159732 additions and 530996 deletions

5
llvm/.cvsignore Normal file
View File

@@ -0,0 +1,5 @@
mklib
Makefile.config
config.log
config.status
cvs.out

View File

@@ -1,7 +1,6 @@
This file is a partial list of people who have contributed to the LLVM
project. If you have contributed a patch or made some other contribution to
LLVM, please submit a patch to this file to add yourself, and it will be
done!
Inspired by the CREDITS file from the Linux source tree, this file is,
likewise, at least a partial list of people who have contributed to the LLVM
project. The format and the next paragraph are stolen directly from that file.
The list is sorted by name and formatted to allow easy grepping and
beautification by scripts. The fields are: name (N), email (E), web-address
@@ -13,210 +12,39 @@ E: vadve@cs.uiuc.edu
W: http://www.cs.uiuc.edu/~vadve/
D: The Sparc64 backend, provider of much wisdom, and motivator for LLVM
N: Owen Anderson
E: resistor@mac.com
D: LCSSA pass and related LoopUnswitch work
D: GVNPRE pass, TargetData refactoring, random improvements
N: Henrik Bach
D: MingW Win32 API portability layer
N: Nate Begeman
E: natebegeman@mac.com
D: PowerPC backend developer
D: Target-independent code generator and analysis improvements
N: Daniel Berlin
E: dberlin@dberlin.org
D: ET-Forest implementation.
D: Sparse bitmap
N: Neil Booth
E: neil@daikokuya.co.uk
D: APFloat implementation.
N: Tanya Brethour
E: tonic@nondot.org
W: http://nondot.org/~tonic/
D: The llvm-ar tool
N: Misha Brukman
E: brukman+llvm@uiuc.edu
W: http://misha.brukman.net
D: Portions of X86 and Sparc JIT compilers, PowerPC backend
D: Incremental bytecode loader
D: Portions of X86 and Sparc JIT compilers, incremental bytecode loader
N: Cameron Buschardt
E: buschard@uiuc.edu
D: The `mem2reg' pass - promotes values stored in memory to registers
N: Chandler Carruth
E: chandlerc@gmail.com
D: LinkTimeOptimizer for Linux, via binutils integration, and C API
N: Casey Carter
E: ccarter@uiuc.edu
D: Fixes to the Reassociation pass, various improvement patches
N: Evan Cheng
E: evan.cheng@apple.com
D: ARM and X86 backends
D: Instruction scheduler improvements
D: Register allocator improvements
D: Loop optimizer improvements
D: Target-independent code generator improvements
N: Jeff Cohen
E: jeffc@jolt-lang.org
W: http://jolt-lang.org
D: Native Win32 API portability layer
N: John T. Criswell
E: criswell@uiuc.edu
D: Original Autoconf support, documentation improvements, bug fixes
N: Rafael Avila de Espindola
E: rafael.espindola@gmail.com
D: The ARM backend
N: Alkis Evlogimenos
E: alkis@evlogimenos.com
D: Linear scan register allocator, many codegen improvements, Java frontend
D: Autoconf support, QMTest database, documentation improvements
N: Brian Gaeke
E: gaeke@uiuc.edu
W: http://www.students.uiuc.edu/~gaeke/
D: Portions of X86 static and JIT compilers; initial SparcV8 backend
D: Dynamic trace optimizer
D: Portions of X86 static and JIT compilers, reoptimizer framework cleanups
D: FreeBSD/X86 compatibility fixes, the llvm-nm tool
N: Nicolas Geoffray
E: nicolas.geoffray@lip6.fr
W: http://www-src.lip6.fr/homepages/Nicolas.Geoffray/
D: PPC backend fixes for Linux
N: Louis Gerbarg
D: Portions of the PowerPC backend
N: Saem Ghani
E: saemghani@gmail.com
D: Callgraph class cleanups
N: Dan Gohman
E: djg@cray.com
D: Miscellaneous bug fixes
N: David Greene
E: greened@obbligato.org
D: Miscellaneous bug fixes
D: Register allocation refactoring
N: Raul Fernandes Herbster
E: raul@dsc.ufcg.edu.br
D: JIT support for ARM
N: Paolo Invernizzi
E: arathorn@fastwebnet.it
D: Visual C++ compatibility fixes
N: Patrick Jenkins
E: patjenk@wam.umd.edu
D: Nightly Tester
N: Brad Jones
E: kungfoomaster@nondot.org
D: Support for packed types
N: Dale Johannesen
E: dalej@apple.com
D: ARM constant islands improvements
D: Tail merging improvements
D: Rewrite X87 back end
N: Eric Kidd
W: http://randomhacks.net/
D: llvm-config script
N: Anton Korobeynikov
E: asl@math.spbu.ru
D: Mingw32 fixes, cross-compiling support, stdcall/fastcall calling conv.
D: x86/linux PIC codegen, aliases, regparm/visibility attributes
D: Switch lowering refactoring
N: Sumant Kowshik
E: kowshik@uiuc.edu
D: Author of the original C backend
N: Christopher Lamb
E: christopher.lamb@gmail.com
D: aligned load/store support, parts of noalias and restrict support
D: vreg subreg infrastructure, X86 codegen improvements based on subregs
N: Jim Laskey
E: jlaskey@apple.com
D: Improvements to the PPC backend, instruction scheduling
D: Debug and Dwarf implementation
D: Auto upgrade mangler
D: llvm-gcc4 svn wrangler
N: Chris Lattner
E: sabre@nondot.org
W: http://nondot.org/~sabre/
D: Primary architect of LLVM
N: Tanya Lattner (Tanya Brethour)
E: tonic@nondot.org
W: http://nondot.org/~tonic/
D: The initial llvm-ar tool, converted regression testsuite to dejagnu
D: Modulo scheduling in the SparcV9 backend
D: Release manager (1.7+)
N: Andrew Lenharth
E: alenhar2@cs.uiuc.edu
W: http://www.lenharth.org/~andrewl/
D: Alpha backend
D: Sampling based profiling
N: Nick Lewycky
E: nicholas@mxc.ca
D: PredicateSimplifier pass
N: Bruno Cardoso Lopes
E: bruno.cardoso@gmail.com
W: http://www.brunocardoso.org
D: The Mips backend
N: Duraid Madina
E: duraid@octopus.com.au
W: http://kinoko.c.u-tokyo.ac.jp/~duraid/
D: IA64 backend, BigBlock register allocator
N: Michael McCracken
E: michael.mccracken@gmail.com
D: Line number support for llvmgcc
N: Vladimir Merzliakov
E: wanderer@rsu.ru
D: Test suite fixes for FreeBSD
N: Morten Ofstad
E: morten@hue.no
D: Visual C++ compatibility fixes
N: Devang Patel
E: dpatel@apple.com
D: LTO tool, PassManager rewrite, Loop Pass Manager, Loop Rotate
D: GCC PCH Integration (llvm-gcc), llvm-gcc improvements
D: Optimizer improvements
N: Vladimir Prus
W: http://vladimir_prus.blogspot.com
E: ghost@cs.msu.su
D: Made inst_iterator behave like a proper iterator, LowerConstantExprs pass
N: Roman Samoilov
E: roman@codedgers.com
D: MSIL backend
N: Duncan Sands
E: baldrick@free.fr
D: Ada front-end, exception handling improvements
N: Ruchira Sasanka
E: sasanka@uiuc.edu
D: Graph coloring register allocator for the Sparc64 backend
@@ -225,23 +53,6 @@ N: Anand Shukla
E: ashukla@cs.uiuc.edu
D: The `paths' pass
N: Reid Spencer
E: rspencer@reidspencer.com
W: http://reidspencer.com/
D: Lots of stuff, see: http://wiki.llvm.org/index.php/User:Reid
N: Adam Treat
E: manyoso@yahoo.com
D: C++ bugs filed, and C++ front-end bug fixes.
N: Lauro Ramos Venancio
E: lauro.venancio@indt.org.br
D: ARM backend improvements
D: Thread Local Storage implementation
N: Bill Wendling
E: isanbard@gmail.com
W: http://web.mac.com/bwendling/
D: MMX & SSSE3 instructions
D: SPEC2006 support
E: wendling@isanbard.org
D: The `Lower Setjmp/Longjmp' pass, improvements to the -lowerswitch pass.

View File

@@ -4,8 +4,8 @@ LLVM Release License
University of Illinois/NCSA
Open Source License
Copyright (c) 2003-2007 University of Illinois at Urbana-Champaign.
All rights reserved.
Copyright (c) 2003, University of Illinois at Urbana-Champaign. All rights
reserved.
Developed by:
@@ -13,7 +13,7 @@ Developed by:
University of Illinois at Urbana-Champaign
http://llvm.org
http://llvm.cs.uiuc.edu
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal with
@@ -49,20 +49,3 @@ The LLVM software contains code written by third parties. Such software will
have its own individual LICENSE.TXT file in the directory in which it appears.
This file will describe the copyrights, license, and restrictions which apply
to that code.
The disclaimer of warranty in the University of Illinois Open Source License
applies to all code in the LLVM Distribution, and nothing in any of the
other licenses gives permission to use the names of the LLVM Team or the
University of Illinois to endorse or promote products derived from this
Software.
The following pieces of software have additional or alternate copyrights,
licenses, and/or restrictions:
Program Directory
------- ---------
System Library llvm/lib/System
Compiler Driver llvm/tools/llvmc
Autoconf llvm/autoconf
llvm/projects/ModuleMaker/autoconf
llvm/projects/sample/autoconf

View File

@@ -1,139 +1,36 @@
#===- ./Makefile -------------------------------------------*- Makefile -*--===#
##===- ./Makefile ------------------------------------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file was developed by the LLVM research group and is distributed under
# the University of Illinois Open Source License. See LICENSE.TXT for details.
#
#===------------------------------------------------------------------------===#
##===----------------------------------------------------------------------===##
LEVEL = .
DIRS = lib/Support utils lib tools runtime
OPTIONAL_DIRS = projects
LEVEL := .
include $(LEVEL)/Makefile.common
# Top-Level LLVM Build Stages:
# 1. Build lib/System and lib/Support, which are used by utils (tblgen).
# 2. Build utils, which is used by VMCore.
# 3. Build VMCore, which builds the Intrinsics.inc file used by libs.
# 4. Build libs, which are needed by llvm-config.
# 5. Build llvm-config, which determines inter-lib dependencies for tools.
# 6. Build tools, runtime, docs.
#
DIRS := lib/System lib/Support utils lib/VMCore lib tools/llvm-config \
tools runtime docs
test :: all
cd test; $(MAKE)
OPTIONAL_DIRS := examples projects
EXTRA_DIST := test llvm.spec include win32 Xcode
distclean:: clean
$(VERB) $(RM) -rf $(LEVEL)/Makefile.config \
$(LEVEL)/include/Config/config.h \
$(LEVEL)/autoconf/autom4te.cache \
$(LEVEL)/config.log \
$(LEVEL)/TAGS
include $(LEVEL)/Makefile.config
tools-only:
@for dir in lib/Support utils lib tools; do $(MAKE) -C $$dir; done
# llvm-gcc4 doesn't need runtime libs. llvm-gcc4 is the only supported one.
# FIXME: Remove runtime entirely once we have an understanding of where
# libprofile etc should go.
#ifeq ($(LLVMGCC_MAJVERS),4)
DIRS := $(filter-out runtime, $(DIRS))
#endif
AUTOCONF = autoconf
AUTOHEADER = autoheader
ifeq ($(MAKECMDGOALS),libs-only)
DIRS := $(filter-out tools runtime docs, $(DIRS))
OPTIONAL_DIRS :=
endif
configure: autoconf/configure.ac autoconf/aclocal.m4
cd autoconf && $(AUTOCONF) -o ../configure configure.ac
ifeq ($(MAKECMDGOALS),tools-only)
DIRS := $(filter-out runtime docs, $(DIRS))
OPTIONAL_DIRS :=
endif
# Don't install utils, examples, or projects they are only used to
# build LLVM.
ifeq ($(MAKECMDGOALS),install)
DIRS := $(filter-out utils, $(DIRS))
OPTIONAL_DIRS :=
endif
# Include the main makefile machinery.
include $(LLVM_SRC_ROOT)/Makefile.rules
# Specify options to pass to configure script when we're
# running the dist-check target
DIST_CHECK_CONFIG_OPTIONS = --with-llvmgccdir=$(LLVMGCCDIR)
.PHONY: debug-opt-prof
debug-opt-prof:
$(Echo) Building Debug Version
$(Verb) $(MAKE)
$(Echo)
$(Echo) Building Optimized Version
$(Echo)
$(Verb) $(MAKE) ENABLE_OPTIMIZED=1
$(Echo)
$(Echo) Building Profiling Version
$(Echo)
$(Verb) $(MAKE) ENABLE_PROFILING=1
dist-hook::
$(Echo) Eliminating files constructed by configure
$(Verb) $(RM) -f \
$(TopDistDir)/include/llvm/ADT/hash_map \
$(TopDistDir)/include/llvm/ADT/hash_set \
$(TopDistDir)/include/llvm/ADT/iterator \
$(TopDistDir)/include/llvm/Config/config.h \
$(TopDistDir)/include/llvm/Support/DataTypes.h \
$(TopDistDir)/include/llvm/Support/ThreadSupport.h
tools-only: all
libs-only: all
#------------------------------------------------------------------------
# Make sure the generated headers are up-to-date. This must be kept in
# sync with the AC_CONFIG_HEADER invocations in autoconf/configure.ac
#------------------------------------------------------------------------
FilesToConfig := \
include/llvm/Config/config.h \
include/llvm/Support/DataTypes.h \
include/llvm/ADT/hash_map \
include/llvm/ADT/hash_set \
include/llvm/ADT/iterator
FilesToConfigPATH := $(addprefix $(LLVM_OBJ_ROOT)/,$(FilesToConfig))
all-local:: $(FilesToConfigPATH)
$(FilesToConfigPATH) : $(LLVM_OBJ_ROOT)/% : $(LLVM_SRC_ROOT)/%.in
$(Echo) Regenerating $*
$(Verb) cd $(LLVM_OBJ_ROOT) && $(ConfigStatusScript) $*
.PRECIOUS: $(FilesToConfigPATH)
# NOTE: This needs to remain as the last target definition in this file so
# that it gets executed last.
all::
$(Echo) '*****' Completed $(BuildMode)$(AssertMode) Build
ifeq ($(BuildMode),Debug)
$(Echo) '*****' Note: Debug build can be 10 times slower than an
$(Echo) '*****' optimized build. Use 'make ENABLE_OPTIMIZED=1' to
$(Echo) '*****' make an optimized build.
endif
check-llvm2cpp:
$(Verb)$(MAKE) check TESTSUITE=Feature RUNLLVM2CPP=1
check-one:
$(Verb)$(MAKE) -C test check-one TESTONE=$(TESTONE)
srpm: $(LLVM_OBJ_ROOT)/llvm.spec
rpmbuild -bs $(LLVM_OBJ_ROOT)/llvm.spec
rpm: $(LLVM_OBJ_ROOT)/llvm.spec
rpmbuild -bb --target $(TARGET_TRIPLE) $(LLVM_OBJ_ROOT)/llvm.spec
show-footprint:
$(Verb) du -sk $(LibDir)
$(Verb) du -sk $(ToolDir)
$(Verb) du -sk $(ExmplDir)
$(Verb) du -sk $(ObjDir)
build-for-llvm-top:
$(Verb) if test ! -f ./config.status ; then \
./configure --prefix="$(LLVM_TOP)/install" \
--with-llvm-gcc="$(LLVM_TOP)/llvm-gcc" ; \
fi
$(Verb) $(MAKE) tools-only
.PHONY: srpm rpm
include/Config/config.h.in: autoconf/configure.ac autoconf/aclocal.m4
$(AUTOHEADER) -I autoconf autoconf/configure.ac

View File

@@ -1,11 +1,11 @@
#===-- Makefile.common - Common make rules for LLVM --------*- Makefile -*--===#
#===-- Makefile.common - Common make rules for LLVM -------*- makefile -*--====
#
# The LLVM Compiler Infrastructure
#
# This file was developed by the LLVM research group and is distributed under
# the University of Illinois Open Source License. See LICENSE.TXT for details.
#
#===------------------------------------------------------------------------===#
##===----------------------------------------------------------------------===##
#
# This file is included by all of the LLVM makefiles. This file defines common
# rules to do things like compile a .cpp file or generate dependency info.
@@ -16,7 +16,7 @@
# The variable $(LEVEL) *must* be set:
#
# 1. LEVEL - The level of the current subdirectory from the top of the
# source directory. This level should be expressed as a path, for
# MagicStats view. This level should be expressed as a path, for
# example, ../.. for two levels deep.
#
# 2. DIRS - A list of subdirectories to be built. Fake targets are set up
@@ -39,29 +39,25 @@
#
# 6. LLVM_SRC_ROOT - If specified, points to the top of the LLVM source tree.
#
# 8. PROJ_SRC_DIR - The directory which contains the current set of Makefiles
# 8. BUILD_SRC_DIR - The directory which contains the current set of Makefiles
# and usually the source code too (unless SourceDir is set).
#
# 9. PROJ_SRC_ROOT - The root directory of the source code being compiled.
# 9. BUILD_SRC_ROOT - The root directory of the source code being compiled.
#
# 10. PROJ_OBJ_DIR - The directory where object code should be placed.
# 10. BUILD_OBJ_DIR - The directory where object code should be placed.
#
# 11. PROJ_OBJ_ROOT - The root directory for where object code should be
# 11. BUILD_OBJ_ROOT - The root directory for where object code should be
# placed.
#
# For building,
# LLVM, LLVM_SRC_ROOT = PROJ_SRC_ROOT
# LLVM, LLVM_SRC_ROOT = BUILD_SRC_ROOT
#
#===-----------------------------------------------------------------------====
#
# Configuration file to set paths specific to local installation of LLVM
#
ifndef LLVM_OBJ_ROOT
include $(LEVEL)/Makefile.config
else
include $(LLVM_OBJ_ROOT)/Makefile.config
endif
#
# Include all of the build rules used for making LLVM

View File

@@ -1,21 +1,174 @@
#===-- Makefile.config - Local configuration for LLVM ------*- Makefile -*--===#
#
# The LLVM Compiler Infrastructure
#
# This file was developed by the LLVM research group and is distributed under
# the University of Illinois Open Source License. See LICENSE.TXT for details.
#
#===------------------------------------------------------------------------===#
#===-- Makefile.config - Local configuration for LLVM ------*- makefile -*--====
#
# This file is included by Makefile.common. It defines paths and other
# values specific to a particular installation of LLVM.
#
#===------------------------------------------------------------------------===#
#===-----------------------------------------------------------------------====
# Define LLVM specific info and directories based on the autoconf variables
LLVMPackageName := @PACKAGE_NAME@
LLVMVersion := @PACKAGE_VERSION@
LLVM_CONFIGTIME := @LLVM_CONFIGTIME@
#
# Target operating system for which LLVM will be compiled.
#
OS=@OS@
#
# Target hardware architecture
#
ARCH=@ARCH@
# Path to the C++ compiler to use. This is an optional setting, which defaults
# to whatever your gmake defaults to.
#
# Under Linux, for some reason the compiler driver wants to search the PATH to
# find the system assembler, which breaks if the LLVM assembler is in our path.
# Hack it to use the assembler in /usr/bin directly.
#
CXX = @CXX@
# We have the same problem with the CC binary, which use used by testcases for
# native builds.
#
CC := @CC@
#
# Compilation flags for the C and C++ compilers.
#
#
# Removing the compiler flags for now. They interfere with the test suite
# (which has its own autoconf stuff), and we don't use -DHAVE_CONFIG_H anyway.
#
#CPPFLAGS+=@DEFS@
#CCFLAGS+=@DEFS@
LDFLAGS+=@LDFLAGS@
#
# Removed since it prevents the tests from working properly.
#
#LIBS+=@LIBS@
#
# Libraries needed by tools
#
TOOLLINKOPTS=@LIBS@
#
# Path to the archiver program.
#
AR_PATH = @AR@
#
# The pathnames of the Flex and Bison programs, respectively.
#
BISON = @YACC@
FLEX = @LEX@
#
# Paths to miscellaneous programs.
#
RPWD = @RPWD@
SED = @SED@
RM = @RM@
ECHO = @ECHO@
MKDIR = @abs_top_srcdir@/autoconf/mkinstalldirs
DATE = @DATE@
MV = @MV@
INSTALL = @INSTALL@
DOT = @DOT@
ETAGS = @ETAGS@
#
# Determine the target for which LLVM should generate code.
#
LLVMGCCARCH := @target@/3.4-llvm
# Path to directory where object files should be stored during a build.
# Set OBJ_ROOT to "." if you do not want to use a separate place for
# object files.
#
#OBJ_ROOT = .
OBJ_ROOT := .
# Path to location for LLVM front-end this should only be specified here if you
# want to override the value set in Makefile.$(uname)
#
LLVMGCCDIR := @LLVMGCCDIR@
# When this setting is set to true, programs in the llvm/test/Programs hierarchy
# are not recompiled from source code. Instead, the bytecode for the file is
# pulled from the BYTECODE_REPOSITORY directory. This can be useful when disk
# space is limited or when you just don't want to spend time running the C
# frontend.
#
#USE_PRECOMPILED_BYTECODE := 1
@UPB@
# This path specifies the cannonical location of bytecode files for compiled
# versions of the test/Programs/* programs. This is used as the bytecode source
# when USE_PRECOMPILED_BYTECODE is specified or when source code is not
# available for the program (such as SPEC).
#
BYTECODE_REPOSITORY := @BCR@
# Path to location for purify, this is only needed if you build with
# ENABLE_PURIFY=1
#
PURIFY = @PURIFY@
#
# SPEC benchmarks:
# Set the USE_SPEC variable to enable the use of the SPEC benchmarks.
# You must provide the SPEC benchmarks on your own.
#
@USE_SPEC@
#
# Path to the SPEC benchmarks. If you have the SPEC benchmarks, place the
# path here.
#
#SPEC_ROOT := /home/vadve/shared/benchmarks/speccpu2000/benchspec
SPEC_ROOT := @SPEC_ROOT@
#
# Path to the PAPI code. This is used by the reoptimizer only.
#
#PAPIDIR := /home/vadve/shared/papi-2.3.4.1
PAPIDIR := @PAPIDIR@
# These are options that can either be enabled here, or can be enabled on the
# make command line (ie, make ENABLE_PROFILING=1)
#
# When ENABLE_OPTIMIZED is enabled, Release builds of all of the LLVM code are
# turned on, and Debug builds are turned off.
#
#ENABLE_OPTIMIZED = 1
@ENABLE_OPTIMIZED@
# When ENABLE_PROFILING is enabled, the llvm source base is built with profile
# information to allow gprof to be used to get execution frequencies.
#
#ENABLE_PROFILING = 1
#
# This option tells the Makefiles to produce verbose output.
# It essentially prints the commands that make is executing
#
#VERBOSE = 1
# When ENABLE_PURIFY is set to 1, the LLVM tools are linked with purify (which
# must be locally installed) to allow for some automated memory error debugging.
#
#ENABLE_PURIFY = 1
@ENABLE_PURIFY@
#
# Enable JIT for this platform
#
@JIT@
#
# Disable LLC diffs for testing.
#
@DISABLE_LLC_DIFFS@
###########################################################################
# Directory Configuration
@@ -25,236 +178,65 @@ LLVM_CONFIGTIME := @LLVM_CONFIGTIME@
# o LLVM_SRC_ROOT : The root directory of the LLVM source code.
# o LLVM_OBJ_ROOT : The root directory containing the built LLVM code.
#
# o PROJ_SRC_DIR : The directory containing the code to build.
# o PROJ_SRC_ROOT : The root directory of the code to build.
# o BUILD_SRC_DIR : The directory containing the code to build.
# o BUILD_SRC_ROOT : The root directory of the code to build.
#
# o PROJ_OBJ_DIR : The directory in which compiled code will be placed.
# o PROJ_OBJ_ROOT : The root directory in which compiled code is placed.
# o BUILD_OBJ_DIR : The directory in which compiled code will be placed.
# o BUILD_OBJ_ROOT : The root directory in which compiled code is placed.
#
###########################################################################
PWD := @BINPWD@
# Set the project name to LLVM if its not defined
ifndef PROJECT_NAME
PROJECT_NAME := $(LLVMPackageName)
#
# Set the object build directory. By default, it is the current directory.
#
ifndef BUILD_OBJ_DIR
BUILD_OBJ_DIR := $(subst //,/,$(shell $(RPWD)))
endif
PROJ_OBJ_DIR := $(shell $(PWD))
PROJ_OBJ_ROOT := $(shell cd $(PROJ_OBJ_DIR)/$(LEVEL); $(PWD))
#
# Set the root of the object directory.
#
ifndef BUILD_OBJ_ROOT
BUILD_OBJ_ROOT := $(subst //,/,$(shell cd $(BUILD_OBJ_DIR)/$(LEVEL); $(RPWD)))
endif
ifeq ($(PROJECT_NAME),llvm)
LLVM_SRC_ROOT := $(shell cd @abs_top_srcdir@; $(PWD))
LLVM_OBJ_ROOT := $(shell cd @abs_top_builddir@; $(PWD))
PROJ_SRC_ROOT := $(shell cd $(LLVM_SRC_ROOT); $(PWD))
PROJ_SRC_DIR := $(shell cd $(LLVM_SRC_ROOT)/$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR)); $(PWD))
prefix := @prefix@
PROJ_prefix := $(prefix)
PROJ_VERSION := $(LLVMVersion)
else
ifndef PROJ_SRC_ROOT
$(error Projects must define PROJ_SRC_ROOT)
#
# Set the source build directory. That is almost always the current directory.
#
ifndef BUILD_SRC_DIR
BUILD_SRC_DIR := $(subst //,/,@abs_top_srcdir@/$(patsubst $(BUILD_OBJ_ROOT)%,%,$(BUILD_OBJ_DIR)))
endif
ifndef PROJ_OBJ_ROOT
$(error Projects must define PROJ_OBJ_ROOT)
endif
ifndef PROJ_INSTALL_ROOT
$(error Projects must define PROJ_INSTALL_ROOT)
endif
ifndef LLVM_SRC_ROOT
$(error Projects must define LLVM_SRC_ROOT)
#
# Set the source root directory.
#
ifndef BUILD_SRC_ROOT
BUILD_SRC_ROOT := $(subst //,/,@abs_top_srcdir@)
endif
#
# Set the LLVM object directory.
#
ifndef LLVM_OBJ_ROOT
$(error Projects must define LLVM_OBJ_ROOT)
endif
PROJ_SRC_DIR := $(shell cd $(PROJ_SRC_ROOT)/$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR)); $(PWD))
prefix := $(PROJ_INSTALL_ROOT)
PROJ_prefix := $(prefix)
ifndef PROJ_VERSION
PROJ_VERSION := 1.0
endif
endif
LLVMMAKE := $(LLVM_SRC_ROOT)/make
PROJ_bindir := $(DESTDIR)$(PROJ_prefix)/bin
PROJ_libdir := $(DESTDIR)$(PROJ_prefix)/lib
PROJ_datadir := $(DESTDIR)$(PROJ_prefix)/share
PROJ_docsdir := $(DESTDIR)$(PROJ_prefix)/docs/llvm
PROJ_etcdir := $(DESTDIR)$(PROJ_prefix)/etc/llvm
PROJ_includedir := $(DESTDIR)$(PROJ_prefix)/include
PROJ_infodir := $(DESTDIR)$(PROJ_prefix)/info
PROJ_mandir := $(DESTDIR)$(PROJ_prefix)/share/man
# Determine if we're on a unix type operating system
LLVM_ON_UNIX:=@LLVM_ON_UNIX@
LLVM_ON_WIN32:=@LLVM_ON_WIN32@
# Target operating system for which LLVM will be compiled.
OS=@OS@
# Target hardware architecture
ARCH=@ARCH@
# Indicates, whether we're cross-compiling LLVM or not
LLVM_CROSS_COMPILING=@LLVM_CROSS_COMPILING@
# Executable file extension for build platform (mainly for
# tablegen call if we're cross-compiling).
BUILD_EXEEXT=@BUILD_EXEEXT@
# Target triple (cpu-vendor-os) for which we should generate code
TARGET_TRIPLE=@target@
# Targets that we should build
TARGETS_TO_BUILD=@TARGETS_TO_BUILD@
# Extra options to compile LLVM with
EXTRA_OPTIONS=@EXTRA_OPTIONS@
# Endian-ness of the target
ENDIAN=@ENDIAN@
# Path to the C++ compiler to use. This is an optional setting, which defaults
# to whatever your gmake defaults to.
CXX = @CXX@
# Path to the CC binary, which use used by testcases for native builds.
CC := @CC@
# Linker flags.
LDFLAGS+=@LDFLAGS@
# Path to the library archiver program.
AR_PATH = @AR@
# Path to the nm program
NM_PATH = @NM@
# The pathnames of the programs we require to build
BISON := @BISON@
CMP := @CMP@
CP := @CP@
DATE := @DATE@
FIND := @FIND@
FLEX := @LEX@
GREP := @GREP@
INSTALL := @INSTALL@
MKDIR := $(LLVM_SRC_ROOT)/autoconf/mkinstalldirs
MV := @MV@
RANLIB := @RANLIB@
RM := @RM@
SED := @SED@
TAR := @TAR@
YACC := @YACC@
# Paths to miscellaneous programs we hope are present but might not be
PERL := @PERL@
BZIP2 := @BZIP2@
DOT := @DOT@
DOXYGEN := @DOXYGEN@
ETAGS := @ETAGS@
ETAGSFLAGS := @ETAGSFLAGS@
GROFF := @GROFF@
GZIP := @GZIP@
POD2HTML := @POD2HTML@
POD2MAN := @POD2MAN@
RUNTEST := @RUNTEST@
TCLSH := @TCLSH@
ZIP := @ZIP@
HAVE_PERL := @HAVE_PERL@
HAVE_PTHREAD := @HAVE_PTHREAD@
LIBS := @LIBS@
# Path to location for LLVM C/C++ front-end. You can modify this if you
# want to override the value set by configure.
LLVMGCCDIR := @LLVMGCCDIR@
# Determine the target for which LLVM should generate code.
ifeq (@LLVMGCC_MAJVERS@,3)
LLVMGCCARCH := @target@/3.4-llvm
ifdef LLVM_SRC_ROOT
LLVM_OBJ_ROOT := $(shell cd $(LLVM_SRC_ROOT); $(RPWD))
else
LLVMGCCARCH := @target@/@LLVMGCC_VERSION@
LLVM_OBJ_ROOT := $(BUILD_OBJ_ROOT)
endif
endif
# Determine the path where the library executables are
LLVMGCCLIBEXEC := @LLVMGCCLIBEXEC@
#
# Set the LLVM source directory.
# It is typically the root directory of what we're compiling now.
#
ifndef LLVM_SRC_ROOT
LLVM_SRC_ROOT := $(BUILD_SRC_ROOT)
endif
# Full pathnames of LLVM C/C++ front-end 'cc1' and 'cc1plus' binaries:
LLVMGCC := @LLVMGCC@
LLVMGXX := @LLVMGXX@
LLVMCC1 := @LLVMCC1@
LLVMCC1PLUS := @LLVMCC1PLUS@
LLVMGCC_VERSION := @LLVMGCC_VERSION@
LLVMGCC_MAJVERS := @LLVMGCC_MAJVERS@
LLVMGCC_LANGS := @LLVMGCC_LANGS@
#
# Set SourceDir for backwards compatbility.
#
ifndef SourceDir
SourceDir=$(BUILD_SRC_DIR)
endif
# Path to directory where object files should be stored during a build.
# Set OBJ_ROOT to "." if you do not want to use a separate place for
# object files.
OBJ_ROOT := .
# These are options that can either be enabled here, or can be enabled on the
# make command line (ie, make ENABLE_PROFILING=1):
# When ENABLE_OPTIMIZED is enabled, LLVM code is optimized and output is put
# into the "Release" directories. Otherwise, LLVM code is not optimized and
# output is put in the "Debug" directories.
#ENABLE_OPTIMIZED = 1
@ENABLE_OPTIMIZED@
# When DISABLE_ASSERTIONS is enabled, builds of all of the LLVM code will
# exclude assertion checks, otherwise they are included.
#DISABLE_ASSERTIONS = 1
@DISABLE_ASSERTIONS@
# When ENABLE_EXPENSIVE_CHECKS is enabled, builds of all of the LLVM
# code will include expensive checks, otherwise they are excluded.
#ENABLE_EXPENSIVE_CHECKS = 0
@ENABLE_EXPENSIVE_CHECKS@
# When DEBUG_RUNTIME is enabled, the runtime libraries will retain debug
# symbols.
#DEBUG_RUNTIME = 1
@DEBUG_RUNTIME@
# When ENABLE_PROFILING is enabled, the llvm source base is built with profile
# information to allow gprof to be used to get execution frequencies.
#ENABLE_PROFILING = 1
# When ENABLE_DOXYGEN is enabled, the doxygen documentation will be built
ENABLE_DOXYGEN = @ENABLE_DOXYGEN@
# Do we want to enable threads?
ENABLE_THREADS := @ENABLE_THREADS@
# Do we want to build with position independent code?
ENABLE_PIC := @ENABLE_PIC@
# This option tells the Makefiles to produce verbose output.
# It essentially prints the commands that make is executing
#VERBOSE = 1
# Enable JIT for this platform
TARGET_HAS_JIT = @TARGET_HAS_JIT@
# Shared library extension for host platform.
SHLIBEXT = @SHLIBEXT@
# Executable file extension for host platform.
EXEEXT = @EXEEXT@
# Things we just assume are "there"
ECHO := echo
# Get the options for causing archives to link all their content instead of
# just missing symbols, and the inverse of that. This is used for certain LLVM
# tools that permit loadable modules. It ensures that the LLVM symbols will be
# available to those loadable modules.
LINKALL := @LINKALL@
NOLINKALL := @NOLINKALL@
# Get the value of HUGE_VAL_SANITY which will be either "yes" or "no" depending
# on the check.
HUGE_VAL_SANITY = @HUGE_VAL_SANITY@

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +0,0 @@
DepModule:
BuildCmd: ./build-for-llvm-top.sh
CleanCmd: make clean
InstallCmd: make install

View File

@@ -1,13 +1,129 @@
Low Level Virtual Machine (LLVM)
================================
The LLVM Compiler Infrastructure
http://llvm.cs.uiuc.edu
This directory and its subdirectories contain source code for the Low Level
Virtual Machine, a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.
Welcome to LLVM!
-----------------
This file is intended to do four things:
(1) help you get started using LLVM;
(2) tell you how to get questions about LLVM answered;
(3) tell you where to find documentation for different kinds of questions; and
(4) tell you about three LLVM-related mailing lists.
LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.
Please see the HTML documentation provided in docs/index.html for further
assistance with LLVM.
Getting Started with LLVM
-------------------------
(1) For license information:
llvm/LICENSE.txt
(2) Installing and compiling LLVM:
llvm/docs/GettingStarted.html
(3) Learn about features and limitations of this release:
llvm/docs/ReleaseNotes.html
(4) Learn how to write a pass within the LLVM system:
llvm/docs/WritingAnLLVMPass.html
(5) Learn how to start a new development project using LLVM, where your
new source code can live anywhere (outside or inside the LLVM tree),
while using LLVM header files and libraries:
llvm/docs/Projects.html
Getting Help with LLVM
----------------------
(1) If you have questions or development problems not answered in the
documentation, send e-mail to llvmdev@cs.uiuc.edu. This mailing list is
monitored by all the people in the LLVM group at Illinois, and you should
expect prompt first responses.
(2) To report a bug, submit a bug report as described in the document:
http://llvm.cs.uiuc.edu/docs/HowToSubmitABug.html
(3) We now use Bugzilla to track bugs, so you can check the status of
previous bugs at:
http://llvm.cs.uiuc.edu/bugs/query.cgi
LLVM Documentation
------------------
All the documents mentioned below except the design overview tech report
are included as part of the LLVM release (in llvm/docs/*):
LLVM Design Overview:
LLVM : A Compilation Framework for Lifelong Program Analysis
and Transformation:
http://llvm.cs.uiuc.edu/pubs/2003-09-30-LifelongOptimizationTR.html
LLVM User Guides:
Download and Installation Instructions:
llvm/docs/GettingStarted.html
LLVM Command Guide:
llvm/docs/CommandGuide/index.html
LLVM Assembly Language:
llvm/docs/LangRef.html
LLVM Test Suite Guide:
llvm/docs/TestingGuide.html
LLVM Programming Documentation:
LLVM Programmers Manual:
llvm/docs/ProgrammersManual.html
Writing an LLVM Pass:
llvm/docs/WritingAnLLVMPass.html
Alias Analysis in LLVM:
llvm/docs/AliasAnalysis.html
Command Line Library:
llvm/docs/CommandLine.html
Coding Standards:
llvm/docs/CodingStandards.html
Other LLVM Resources:
Submitting a Bug:
http://llvm.cs.uiuc.edu/docs/HowToSubmitABug.html
Open Projects:
llvm/docs/OpenProjects.html
Creating a new LLVM Project:
llvm/docs/Projects.html
Mailing Lists
--------------
There are three mailing lists for providing LLVM users with information:
(1) LLVM Announcements List:
http://mail.cs.uiuc.edu/mailman/listinfo/llvm-announce
This is a low volume list that provides important announcements regarding
LLVM. It is primarily intended to announce new releases, major updates to
the software, etc. This list is highly recommended for anyone that uses
LLVM.
(2) LLVM Developers List:
http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev
This list is for people who want to be included in technical discussions
of LLVM. People post to this list when they have questions about writing
code for or using the LLVM tools. It is relatively low volume.
(3) LLVM Commits List
http://mail.cs.uiuc.edu/mailman/listinfo/llvm-commits
This list contains all commit messages that are made when LLVM developers
commit code changes to the CVS archive. It is useful for those who want to
stay on the bleeding edge of LLVM development. This list is very high
volume.

File diff suppressed because it is too large Load Diff

View File

@@ -1 +0,0 @@
Xcode project files for LLVM, for Xcode 2.1

View File

@@ -1,48 +0,0 @@
#!/bin/sh
die () {
echo "$@" 1>&2
exit 1
}
### NOTE: ############################################################"
### The below two variables specify the auto* versions
### periods should be escaped with backslash, for use by grep
want_autoconf_version='2\.60'
want_autoheader_version=$want_autoconf_version
### END NOTE #########################################################"
outfile=configure
configfile=configure.ac
want_autoconf_version_clean=`echo $want_autoconf_version | sed -e 's/\\\\//g'`
want_autoheader_version_clean=`echo $want_autoheader_version | sed -e 's/\\\\//g'`
test -d autoconf && test -f autoconf/$configfile && cd autoconf
test -f $configfile || die "Can't find 'autoconf' dir; please cd into it first"
autoconf --version | grep $want_autoconf_version > /dev/null
test $? -eq 0 || die "Your autoconf was not detected as being $want_autoconf_version_clean"
aclocal --version | grep '^aclocal.*1\.9\.6' > /dev/null
test $? -eq 0 || die "Your aclocal was not detected as being 1.9.6"
autoheader --version | grep '^autoheader.*'$want_autoheader_version > /dev/null
test $? -eq 0 || die "Your autoheader was not detected as being $want_autoheader_version_clean"
libtool --version | grep '1\.5\.22' > /dev/null
test $? -eq 0 || die "Your libtool was not detected as being 1.5.22"
echo ""
echo "### NOTE: ############################################################"
echo "### If you get *any* warnings from autoconf below you MUST fix the"
echo "### scripts in the m4 directory because there are future forward"
echo "### compatibility or platform support issues at risk. Please do NOT"
echo "### commit any configure script that was generated with warnings"
echo "### present. You should get just three 'Regenerating..' lines."
echo "######################################################################"
echo ""
echo "Regenerating aclocal.m4 with aclocal 1.9.6"
cwd=`pwd`
aclocal --force -I $cwd/m4 || die "aclocal failed"
echo "Regenerating configure with autoconf $want_autoconf_version_clean"
autoconf --force --warnings=all -o ../$outfile $configfile || die "autoconf failed"
cd ..
echo "Regenerating config.h.in with autoheader $want_autoheader_version_clean"
autoheader --warnings=all -I autoconf -I autoconf/m4 autoconf/$configfile || die "autoheader failed"
exit 0

View File

@@ -1,49 +0,0 @@
Upgrading Libtool
===============================================================================
If you are in the mood to upgrade libtool, you must do the following:
1. Get the new version of libtool and put it in <SRC>
2. configure/build/install libtool with --prefix=<PFX>
3. Copy <SRC>/ltdl.m4 to llvm/autoconf/m4
4. Copy <PFX>/share/aclocal/libtool.m4 to llvm/autoconf/m4/libtool.m4
5. Copy <PFX>/share/libtool/ltmain.sh to llvm/autoconf/ltmain.sh
6. Copy <PFX>/share/libtool/libltdl/ltdl.c to llvm/lib/System
7. Copy <PFX>/share/libtool/libltdl/ltdl.h to llvm/lib/System
8. Edit the ltdl.h file to #include "llvm/Config/config.h" at the very top. You
might also need to resolve some compiler warnings (typically about
comparison of signed vs. unsigned values). But, you won't find out about
those until you build LLVM (step 13).
9. Edit the llvm/autoconf/m4/libtool.m4 file so that:
a) in AC_PROB_LIBTOOL macro, the value of LIBTOOL is set to
$(top_builddir)/mklib, not $(top_builddir)/libtool
b) in AC_LIBTOOL_SETUP macro, the variable default_ofile is set to
"mklib" instead of "libtool"
c) s/AC_ENABLE_SHARED_DEFAULT/enable_shared_default/g
d) s/AC_ENABLE_STATIC_DEFAULT/enable_static_default/g
e) s/AC_ENABLE_FAST_INSTALL_DEFAULT/enable_fast_install_default/g
10. Run "autoupdate libtool.m4 ltdl.m4" in the llvm/autoconf/m4 directory.
This should correctly update the macro definitions in the libtool m4
files to match the version of autoconf that LLVM uses. This converts
AC_HELP_STRING to AS_HELP_STRING and AC_TRY_LINK to AC_LINK_IFELSE, amongst
other things. You may need to manually adjust the files.
11. Run AutoRegen.sh to get the new macros into configure script
12. If there are any warnings from AutoRegen.sh, go to step 9.
13. Rebuild LLVM, making sure it reconfigures
14. Test the JIT which uses libltdl
15. If it all works, only THEN commit the changes.
Upgrading autoconf
===============================================================================
If you are in the mood to upgrade autoconf, you should:
1. Consider not upgrading.
2. No really, this is a hassle, you don't want to do it.
3. Get the new version of autoconf and put it in <SRC>
4. configure/build/install autoconf with --prefix=<PFX>
5. Run autoupdate on all the m4 macros in llvm/autoconf/m4
6. Run autoupdate on llvm/autoconf/configure.ac
7. Regenerate configure script with AutoRegen.sh
8. If there are any warnings from AutoRegen.sh, fix them and go to step 7.
9. Test, test, test.

6198
llvm/autoconf/aclocal.m4 vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,9 +1,9 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
timestamp='2004-09-07'
timestamp='2003-02-22'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -53,7 +53,7 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
@@ -106,7 +106,6 @@ trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
: ${TMPDIR=/tmp} ;
{ tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
dummy=$tmp/dummy ;
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
@@ -197,21 +196,15 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
echo "${machine}-${os}${release}"
exit 0 ;;
amd64:OpenBSD:*:*)
echo x86_64-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
amiga:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
cats:OpenBSD:*:*)
echo arm-unknown-openbsd${UNAME_RELEASE}
arc:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
hp300:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
luna88k:OpenBSD:*:*)
echo m88k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
mac68k:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
@@ -227,33 +220,25 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
mvmeppc:OpenBSD:*:*)
echo powerpc-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
pmax:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
sgi:OpenBSD:*:*)
echo mips64-unknown-openbsd${UNAME_RELEASE}
echo mipseb-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
sun3:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
wgrisc:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
*:OpenBSD:*:*)
echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
*:ekkoBSD:*:*)
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
exit 0 ;;
macppc:MirBSD:*:*)
echo powerppc-unknown-mirbsd${UNAME_RELEASE}
exit 0 ;;
*:MirBSD:*:*)
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
exit 0 ;;
alpha:OSF1:*:*)
case $UNAME_RELEASE in
*4.0)
if test $UNAME_RELEASE = "V4.0"; then
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
;;
*5.*)
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
;;
esac
fi
# According to Compaq, /usr/sbin/psrinfo has been available on
# OSF/1 and Tru64 systems produced since 1995. I hope that
# covers most systems running today. This code pipes the CPU
@@ -291,12 +276,11 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
"EV7.9 (21364A)")
UNAME_MACHINE="alphaev79" ;;
esac
# A Pn.n version is a patched version.
# A Vn.n version is a released version.
# A Tn.n version is a released field test version.
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
exit 0 ;;
Alpha\ *:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
@@ -319,9 +303,6 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:OS/390:*:*)
echo i370-ibm-openedition
exit 0 ;;
*:OS400:*:*)
echo powerpc-ibm-os400
exit 0 ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
exit 0;;
@@ -339,9 +320,6 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
NILE*:*:*:dcosx)
echo pyramid-pyramid-svr4
exit 0 ;;
DRS?6000:unix:4.0:6*)
echo sparc-icl-nx6
exit 0 ;;
DRS?6000:UNIX_SV:4.2*:7*)
case `/usr/bin/uname -p` in
sparc) echo sparc-icl-nx7 && exit 0 ;;
@@ -414,9 +392,6 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
echo m68k-unknown-mint${UNAME_RELEASE}
exit 0 ;;
m68k:machten:*:*)
echo m68k-apple-machten${UNAME_RELEASE}
exit 0 ;;
powerpc:machten:*:*)
echo powerpc-apple-machten${UNAME_RELEASE}
exit 0 ;;
@@ -752,7 +727,7 @@ EOF
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
*:UNICOS/mp:*:*)
echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
@@ -760,11 +735,6 @@ EOF
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit 0 ;;
5000:UNIX_System_V:4.*:*)
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit 0 ;;
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
exit 0 ;;
@@ -775,7 +745,18 @@ EOF
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit 0 ;;
*:FreeBSD:*:*)
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
# Determine whether the default compiler uses glibc.
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#include <features.h>
#if __GLIBC__ >= 2
LIBC=gnu
#else
LIBC=
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
exit 0 ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
@@ -786,8 +767,8 @@ EOF
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit 0 ;;
x86:Interix*:[34]*)
echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
x86:Interix*:3*)
echo i586-pc-interix3
exit 0 ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks
@@ -808,34 +789,17 @@ EOF
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit 0 ;;
*:GNU:*:*)
# the GNU system
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
exit 0 ;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
exit 0 ;;
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
exit 0 ;;
arm*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
cris:Linux:*:*)
echo cris-axis-linux-gnu
exit 0 ;;
crisv32:Linux:*:*)
echo crisv32-axis-linux-gnu
exit 0 ;;
frv:Linux:*:*)
echo frv-unknown-linux-gnu
exit 0 ;;
ia64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
m32r*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
m68*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
@@ -911,9 +875,6 @@ EOF
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux
exit 0 ;;
sh64*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
sh*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
@@ -971,9 +932,6 @@ EOF
LIBC=gnuaout
#endif
#endif
#ifdef __dietlibc__
LIBC=dietlibc
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
@@ -1004,9 +962,6 @@ EOF
i*86:atheos:*:*)
echo ${UNAME_MACHINE}-unknown-atheos
exit 0 ;;
i*86:syllable:*:*)
echo ${UNAME_MACHINE}-pc-syllable
exit 0 ;;
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
echo i386-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
@@ -1076,9 +1031,9 @@ EOF
M680?0:D-NIX:5.3:*)
echo m68k-diab-dnix
exit 0 ;;
M68*:*:R3V[5678]*:*)
M68*:*:R3V[567]*:*)
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0)
OS_REL=''
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
@@ -1176,10 +1131,9 @@ EOF
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
exit 0 ;;
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
case $UNAME_PROCESSOR in
case `uname -p` in
*86) UNAME_PROCESSOR=i686 ;;
unknown) UNAME_PROCESSOR=powerpc ;;
powerpc) UNAME_PROCESSOR=powerpc ;;
esac
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
exit 0 ;;
@@ -1194,7 +1148,7 @@ EOF
*:QNX:*:4*)
echo i386-pc-qnx
exit 0 ;;
NSR-?:NONSTOP_KERNEL:*:*)
NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
echo nsr-tandem-nsk${UNAME_RELEASE}
exit 0 ;;
*:NonStop-UX:*:*)
@@ -1235,19 +1189,6 @@ EOF
*:ITS:*:*)
echo pdp10-unknown-its
exit 0 ;;
SEI:*:*:SEIUX)
echo mips-sei-seiux${UNAME_RELEASE}
exit 0 ;;
*:DragonFly:*:*)
echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
exit 0 ;;
*:*VMS:*:*)
UNAME_MACHINE=`(uname -p) 2>/dev/null`
case "${UNAME_MACHINE}" in
A*) echo alpha-dec-vms && exit 0 ;;
I*) echo ia64-dec-vms && exit 0 ;;
V*) echo vax-dec-vms && exit 0 ;;
esac
esac
#echo '(No uname command or uname output not recognized.)' 1>&2

View File

@@ -1,9 +1,9 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
timestamp='2004-08-29'
timestamp='2003-02-22'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -70,7 +70,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
@@ -118,8 +118,7 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
@@ -145,7 +144,7 @@ case $os in
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-apple | -axis | -knuth | -cray)
-apple | -axis)
os=
basic_machine=$1
;;
@@ -229,15 +228,14 @@ case $basic_machine in
| a29k \
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
| c4x | clipper \
| clipper \
| d10v | d30v | dlx | dsp16xx \
| fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
| m32r | m32rle | m68000 | m68k | m88k | mcore \
| ip2k \
| m32r | m68000 | m68k | m88k | mcore \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
@@ -249,7 +247,6 @@ case $basic_machine in
| mipsisa32 | mipsisa32el \
| mipsisa32r2 | mipsisa32r2el \
| mipsisa64 | mipsisa64el \
| mipsisa64r2 | mipsisa64r2el \
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \
@@ -262,9 +259,9 @@ case $basic_machine in
| pyramid \
| sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \
| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
| strongarm \
| tahoe | thumb | tic4x | tic80 | tron \
| tahoe | thumb | tic80 | tron \
| v850 | v850e \
| we32k \
| x86 | xscale | xstormy16 | xtensa \
@@ -300,15 +297,15 @@ case $basic_machine in
| avr-* \
| bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
| clipper-* | craynv-* | cydra-* \
| clipper-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
| m32r-* | m32rle-* \
| ip2k-* \
| m32r-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | mcore-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
@@ -322,13 +319,11 @@ case $basic_machine in
| mipsisa32-* | mipsisa32el-* \
| mipsisa32r2-* | mipsisa32r2el-* \
| mipsisa64-* | mipsisa64el-* \
| mipsisa64r2-* | mipsisa64r2el-* \
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipstx39-* | mipstx39el-* \
| mmix-* \
| msp430-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
@@ -337,7 +332,7 @@ case $basic_machine in
| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tron-* \
@@ -364,9 +359,6 @@ case $basic_machine in
basic_machine=a29k-amd
os=-udi
;;
abacus)
basic_machine=abacus-unknown
;;
adobe68k)
basic_machine=m68010-adobe
os=-scout
@@ -381,12 +373,6 @@ case $basic_machine in
basic_machine=a29k-none
os=-bsd
;;
amd64)
basic_machine=x86_64-pc
;;
amd64-*)
basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
amdahl)
basic_machine=580-amdahl
os=-sysv
@@ -446,27 +432,12 @@ case $basic_machine in
basic_machine=j90-cray
os=-unicos
;;
craynv)
basic_machine=craynv-cray
os=-unicosmp
;;
cr16c)
basic_machine=cr16c-unknown
os=-elf
;;
crds | unos)
basic_machine=m68k-crds
;;
crisv32 | crisv32-* | etraxfs*)
basic_machine=crisv32-axis
;;
cris | cris-* | etrax*)
basic_machine=cris-axis
;;
crx)
basic_machine=crx-unknown
os=-elf
;;
da30 | da30-*)
basic_machine=m68k-da30
;;
@@ -667,6 +638,10 @@ case $basic_machine in
mips3*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
;;
mmix*)
basic_machine=mmix-knuth
os=-mmixware
;;
monitor)
basic_machine=m68k-rom68k
os=-coff
@@ -747,6 +722,10 @@ case $basic_machine in
np1)
basic_machine=np1-gould
;;
nv1)
basic_machine=nv1-cray
os=-unicosmp
;;
nsr-tandem)
basic_machine=nsr-tandem
;;
@@ -758,10 +737,6 @@ case $basic_machine in
basic_machine=or32-unknown
os=-coff
;;
os400)
basic_machine=powerpc-ibm
os=-os400
;;
OSE68000 | ose68000)
basic_machine=m68000-ericsson
os=-ose
@@ -793,24 +768,18 @@ case $basic_machine in
pentiumpro | p6 | 6x86 | athlon | athlon_*)
basic_machine=i686-pc
;;
pentiumii | pentium2 | pentiumiii | pentium3)
pentiumii | pentium2)
basic_machine=i686-pc
;;
pentium4)
basic_machine=i786-pc
;;
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumpro-* | p6-* | 6x86-* | athlon-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
pentiumii-* | pentium2-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentium4-*)
basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pn)
basic_machine=pn-gould
;;
@@ -869,10 +838,6 @@ case $basic_machine in
sb1el)
basic_machine=mipsisa64sb1el-unknown
;;
sei)
basic_machine=mips-sei
os=-seiux
;;
sequent)
basic_machine=i386-sequent
;;
@@ -880,9 +845,6 @@ case $basic_machine in
basic_machine=sh-hitachi
os=-hms
;;
sh64)
basic_machine=sh64-unknown
;;
sparclite-wrs | simso-wrs)
basic_machine=sparclite-wrs
os=-vxworks
@@ -957,6 +919,10 @@ case $basic_machine in
basic_machine=t90-cray
os=-unicos
;;
tic4x | c4x*)
basic_machine=tic4x-unknown
os=-coff
;;
tic54x | c54x*)
basic_machine=tic54x-unknown
os=-coff
@@ -982,10 +948,6 @@ case $basic_machine in
tower | tower-32)
basic_machine=m68k-ncr
;;
tpf)
basic_machine=s390x-ibm
os=-tpf
;;
udi29k)
basic_machine=a29k-amd
os=-udi
@@ -1059,9 +1021,6 @@ case $basic_machine in
romp)
basic_machine=romp-ibm
;;
mmix)
basic_machine=mmix-knuth
;;
rs6000)
basic_machine=rs6000-ibm
;;
@@ -1084,7 +1043,7 @@ case $basic_machine in
sh64)
basic_machine=sh64-unknown
;;
sparc | sparcv8 | sparcv9 | sparcv9b)
sparc | sparcv9 | sparcv9b)
basic_machine=sparc-sun
;;
cydra)
@@ -1157,20 +1116,19 @@ case $os in
| -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
| -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*)
| -powermax* | -dnix*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1194,9 +1152,6 @@ case $os in
-mac*)
os=`echo $os | sed -e 's|mac|macos|'`
;;
-linux-dietlibc)
os=-linux-dietlibc
;;
-linux*)
os=`echo $os | sed -e 's|linux|linux-gnu|'`
;;
@@ -1209,9 +1164,6 @@ case $os in
-opened*)
os=-openedition
;;
-os400*)
os=-os400
;;
-wince*)
os=-wince
;;
@@ -1233,9 +1185,6 @@ case $os in
-atheos*)
os=-atheos
;;
-syllable*)
os=-syllable
;;
-386bsd)
os=-bsd
;;
@@ -1258,9 +1207,6 @@ case $os in
-sinix*)
os=-sysv4
;;
-tpf*)
os=-tpf
;;
-triton*)
os=-sysv3
;;
@@ -1328,9 +1274,6 @@ case $basic_machine in
arm*-semi)
os=-aout
;;
c4x-* | tic4x-*)
os=-coff
;;
# This must come before the *-dec entry.
pdp10-*)
os=-tops20
@@ -1377,9 +1320,6 @@ case $basic_machine in
*-ibm)
os=-aix
;;
*-knuth)
os=-mmixware
;;
*-wec)
os=-proelf
;;
@@ -1512,15 +1452,9 @@ case $basic_machine in
-mvs* | -opened*)
vendor=ibm
;;
-os400*)
vendor=ibm
;;
-ptx*)
vendor=sequent
;;
-tpf*)
vendor=ibm
;;
-vxsim* | -vxworks* | -windiss*)
vendor=wrs
;;

File diff suppressed because it is too large Load Diff

View File

@@ -1,522 +0,0 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
scriptversion=2004-05-31.23
# Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
case $1 in
'')
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
Run PROGRAMS ARGS to compile a file, generating dependencies
as side-effects.
Environment variables:
depmode Dependency tracking mode.
source Source file read by `PROGRAMS ARGS'.
object Object file output by `PROGRAMS ARGS'.
DEPDIR directory where to store dependencies.
depfile Dependency file to output.
tmpdepfile Temporary file to use when outputing dependencies.
libtool Whether libtool is used (yes/no).
Report bugs to <bug-automake@gnu.org>.
EOF
exit 0
;;
-v | --v*)
echo "depcomp $scriptversion"
exit 0
;;
esac
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
echo "depcomp: Variables source, object and depmode must be set" 1>&2
exit 1
fi
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
depfile=${depfile-`echo "$object" |
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
rm -f "$tmpdepfile"
# Some modes work just like other modes, but use different flags. We
# parameterize here, but still list the modes in the big case below,
# to make depend.m4 easier to write. Note that we *cannot* use a case
# here, because this file can only contain one case statement.
if test "$depmode" = hp; then
# HP compiler uses -M and no extra arg.
gccflag=-M
depmode=gcc
fi
if test "$depmode" = dashXmstdout; then
# This is just like dashmstdout with a different argument.
dashmflag=-xM
depmode=dashmstdout
fi
case "$depmode" in
gcc3)
## gcc 3 implements dependency tracking that does exactly what
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
## it if -MD -MP comes after the -MF stuff. Hmm.
"$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
mv "$tmpdepfile" "$depfile"
;;
gcc)
## There are various ways to get dependency output from gcc. Here's
## why we pick this rather obscure method:
## - Don't want to use -MD because we'd like the dependencies to end
## up in a subdir. Having to rename by hand is ugly.
## (We might end up doing this anyway to support other compilers.)
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
## -MM, not -M (despite what the docs say).
## - Using -M directly means running the compiler twice (even worse
## than renaming).
if test -z "$gccflag"; then
gccflag=-MD,
fi
"$@" -Wp,"$gccflag$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
## The second -e expression handles DOS-style file names with drive letters.
sed -e 's/^[^:]*: / /' \
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
## This next piece of magic avoids the `deleted header file' problem.
## The problem is that when a header file which appears in a .P file
## is deleted, the dependency causes make to die (because there is
## typically no way to rebuild the header). We avoid this by adding
## dummy dependencies for each header file. Too bad gcc doesn't do
## this for us directly.
tr ' ' '
' < "$tmpdepfile" |
## Some versions of gcc put a space before the `:'. On the theory
## that the space means something, we add a space to the output as
## well.
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
hp)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
sgi)
if test "$libtool" = yes; then
"$@" "-Wp,-MDupdate,$tmpdepfile"
else
"$@" -MDupdate "$tmpdepfile"
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
echo "$object : \\" > "$depfile"
# Clip off the initial element (the dependent). Don't try to be
# clever and replace this with sed code, as IRIX sed won't handle
# lines with more than a fixed number of characters (4096 in
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
# the IRIX cc adds comments like `#:fec' to the end of the
# dependency line.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
tr '
' ' ' >> $depfile
echo >> $depfile
# The second pass generates a dummy entry for each header file.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
>> $depfile
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
aix)
# The C for AIX Compiler uses -M and outputs the dependencies
# in a .u file. In older versions, this file always lives in the
# current directory. Also, the AIX compiler puts `$object:' at the
# start of each line; $object doesn't have directory information.
# Version 6 uses the directory in both cases.
stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
tmpdepfile="$stripped.u"
if test "$libtool" = yes; then
"$@" -Wc,-M
else
"$@" -M
fi
stat=$?
if test -f "$tmpdepfile"; then :
else
stripped=`echo "$stripped" | sed 's,^.*/,,'`
tmpdepfile="$stripped.u"
fi
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
if test -f "$tmpdepfile"; then
outname="$stripped.o"
# Each line is of the form `foo.o: dependent.h'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
icc)
# Intel's C compiler understands `-MD -MF file'. However on
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
# ICC 7.0 will fill foo.d with something like
# foo.o: sub/foo.c
# foo.o: sub/foo.h
# which is wrong. We want:
# sub/foo.o: sub/foo.c
# sub/foo.o: sub/foo.h
# sub/foo.c:
# sub/foo.h:
# ICC 7.1 will output
# foo.o: sub/foo.c sub/foo.h
# and will wrap long lines using \ :
# foo.o: sub/foo.c ... \
# sub/foo.h ... \
# ...
"$@" -MD -MF "$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
# Each line is of the form `foo.o: dependent.h',
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
# Some versions of the HPUX 10.20 sed can't process this invocation
# correctly. Breaking it into two sed invocations is a workaround.
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
tru64)
# The Tru64 compiler uses -MD to generate dependencies as a side
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
# dependencies in `foo.d' instead, so we check for that too.
# Subdirectories are respected.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
# Dependencies are output in .lo.d with libtool 1.4.
# With libtool 1.5 they are output both in $dir.libs/$base.o.d
# and in $dir.libs/$base.o.d and $dir$base.o.d. We process the
# latter, because the former will be cleaned when $dir.libs is
# erased.
tmpdepfile1="$dir.libs/$base.lo.d"
tmpdepfile2="$dir$base.o.d"
tmpdepfile3="$dir.libs/$base.d"
"$@" -Wc,-MD
else
tmpdepfile1="$dir$base.o.d"
tmpdepfile2="$dir$base.d"
tmpdepfile3="$dir$base.d"
"$@" -MD
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
exit $stat
fi
if test -f "$tmpdepfile1"; then
tmpdepfile="$tmpdepfile1"
elif test -f "$tmpdepfile2"; then
tmpdepfile="$tmpdepfile2"
else
tmpdepfile="$tmpdepfile3"
fi
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
# That's a tab and a space in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
#nosideeffect)
# This comment above is used by automake to tell side-effect
# dependency tracking mechanisms from slower ones.
dashmstdout)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout, regardless of -o.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
shift
done
shift
fi
# Remove `-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
test -z "$dashmflag" && dashmflag=-M
# Require at least two characters before searching for `:'
# in the target name. This is to cope with DOS-style filenames:
# a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
"$@" $dashmflag |
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
tr ' ' '
' < "$tmpdepfile" | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
dashXmstdout)
# This case only exists to satisfy depend.m4. It is never actually
# run, as this mode is specially recognized in the preamble.
exit 1
;;
makedepend)
"$@" || exit $?
# Remove any Libtool call
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
shift
done
shift
fi
# X makedepend
shift
cleared=no
for arg in "$@"; do
case $cleared in
no)
set ""; shift
cleared=yes ;;
esac
case "$arg" in
-D*|-I*)
set fnord "$@" "$arg"; shift ;;
# Strip any option that makedepend may not understand. Remove
# the object too, otherwise makedepend will parse it as a source file.
-*|$object)
;;
*)
set fnord "$@" "$arg"; shift ;;
esac
done
obj_suffix="`echo $object | sed 's/^.*\././'`"
touch "$tmpdepfile"
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
sed '1,2d' "$tmpdepfile" | tr ' ' '
' | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile" "$tmpdepfile".bak
;;
cpp)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
shift
done
shift
fi
# Remove `-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
"$@" -E |
sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
sed '$ s: \\$::' > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
cat < "$tmpdepfile" >> "$depfile"
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
msvisualcpp)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout, regardless of -o,
# because we must use -o when running libtool.
"$@" || exit $?
IFS=" "
for arg
do
case "$arg" in
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
set fnord "$@"
shift
shift
;;
*)
set fnord "$@" "$arg"
shift
shift
;;
esac
done
"$@" -E |
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
echo " " >> "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
rm -f "$tmpdepfile"
;;
none)
exec "$@"
;;
*)
echo "Unknown depmode $depmode" 1>&2
exit 1
;;
esac
exit 0
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:

View File

@@ -1,38 +1,19 @@
#!/bin/sh
#
# install - install a program, script, or datafile
scriptversion=2004-09-10.20
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license.
# This comes from X11R5 (mit/util/scripts/install.sh).
#
# Copyright (C) 1994 X Consortium
# Copyright 1991 by the Massachusetts Institute of Technology
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
# Except as contained in this notice, the name of the X Consortium shall not
# be used in advertising or otherwise to promote the sale, use or other deal-
# ings in this Software without prior written authorization from the X Consor-
# tium.
#
#
# FSF changes to this file are in the public domain.
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
# copyright notice and this permission notice appear in supporting
# documentation, and that the name of M.I.T. not be used in advertising or
# publicity pertaining to distribution of the software without specific,
# written prior permission. M.I.T. makes no representations about the
# suitability of this software for any purpose. It is provided "as is"
# without express or implied warranty.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
@@ -42,11 +23,13 @@ scriptversion=2004-09-10.20
# from scratch. It can only install one file at a time, a restriction
# shared with many OS's install programs.
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
# put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}"
@@ -58,265 +41,211 @@ stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
transformbasename=""
transform_arg=""
instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
chowncmd=
chgrpcmd=
stripcmd=
chowncmd=""
chgrpcmd=""
stripcmd=""
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=
dst=
dir_arg=
dstarg=
no_target_directory=
src=""
dst=""
dir_arg=""
usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
or: $0 [OPTION]... SRCFILES... DIRECTORY
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
or: $0 [OPTION]... -d DIRECTORIES...
while [ x"$1" != x ]; do
case $1 in
-c) instcmd="$cpprog"
shift
continue;;
In the 1st form, copy SRCFILE to DSTFILE.
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
In the 4th, create DIRECTORIES.
-d) dir_arg=true
shift
continue;;
Options:
-c (ignored)
-d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER.
-s $stripprog installed files.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
--help display this help and exit.
--version display version info and exit.
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
"
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
while test -n "$1"; do
case $1 in
-c) shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
-d) dir_arg=true
shift
continue;;
-s) stripcmd="$stripprog"
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
shift
continue;;
--help) echo "$usage"; exit 0;;
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
shift
continue;;
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
-s) stripcmd=$stripprog
shift
continue;;
-t) dstarg=$2
shift
shift
continue;;
-T) no_target_directory=true
shift
continue;;
--version) echo "$0 $scriptversion"; exit 0;;
*) # When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
test -n "$dir_arg$dstarg" && break
# Otherwise, the last argument is the destination. Remove it from $@.
for arg
do
if test -n "$dstarg"; then
# $@ is not empty: it contains at least $arg.
set fnord "$@" "$dstarg"
shift # fnord
fi
shift # arg
dstarg=$arg
done
break;;
esac
*) if [ x"$src" = x ]
then
src=$1
else
# this colon is to work around a 386BSD /bin/sh bug
:
dst=$1
fi
shift
continue;;
esac
done
if test -z "$1"; then
if test -z "$dir_arg"; then
echo "$0: no input file specified." >&2
exit 1
fi
# It's OK to call `install-sh -d' without argument.
# This can happen when creating conditional directories.
exit 0
if [ x"$src" = x ]
then
echo "install: no input file specified"
exit 1
else
:
fi
for src
do
# Protect names starting with `-'.
case $src in
-*) src=./$src ;;
esac
if [ x"$dir_arg" != x ]; then
dst=$src
src=""
if [ -d $dst ]; then
instcmd=:
chmodcmd=""
else
instcmd=$mkdirprog
fi
else
if test -n "$dir_arg"; then
dst=$src
src=
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if test -d "$dst"; then
mkdircmd=:
chmodcmd=
else
mkdircmd=$mkdirprog
fi
else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if test ! -f "$src" && test ! -d "$src"; then
echo "$0: $src does not exist." >&2
exit 1
fi
if [ -f $src -o -d $src ]
then
:
else
echo "install: $src does not exist"
exit 1
fi
if [ x"$dst" = x ]
then
echo "install: no destination specified"
exit 1
else
:
fi
if test -z "$dstarg"; then
echo "$0: no destination specified." >&2
exit 1
fi
# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic
dst=$dstarg
# Protect names starting with `-'.
case $dst in
-*) dst=./$dst ;;
esac
if [ -d $dst ]
then
dst="$dst"/`basename $src`
else
:
fi
fi
# If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
if test -d "$dst"; then
if test -n "$no_target_directory"; then
echo "$0: $dstarg: Is a directory" >&2
exit 1
fi
dst=$dst/`basename "$src"`
fi
fi
## this sed command emulates the dirname command
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# This sed command emulates the dirname command.
dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# this part is taken from Noah Friedman's mkinstalldirs script
# Make sure that the destination directory exists.
# Skip lots of stat calls in the usual case.
if [ ! -d "$dstdir" ]; then
defaultIFS='
'
IFS="${IFS-${defaultIFS}}"
# Skip lots of stat calls in the usual case.
if test ! -d "$dstdir"; then
defaultIFS='
'
IFS="${IFS-$defaultIFS}"
oIFS="${IFS}"
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
IFS="${oIFS}"
oIFS=$IFS
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
IFS=$oIFS
pathcomp=''
pathcomp=
while [ $# -ne 0 ] ; do
pathcomp="${pathcomp}${1}"
shift
while test $# -ne 0 ; do
pathcomp=$pathcomp$1
shift
if test ! -d "$pathcomp"; then
$mkdirprog "$pathcomp"
# mkdir can fail with a `File exist' error in case several
# install-sh are creating the directory concurrently. This
# is OK.
test -d "$pathcomp" || exit
fi
pathcomp=$pathcomp/
done
fi
if [ ! -d "${pathcomp}" ] ;
then
$mkdirprog "${pathcomp}"
else
:
fi
if test -n "$dir_arg"; then
$doit $mkdircmd "$dst" \
&& { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
&& { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
else
dstfile=`basename "$dst"`
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_
rmtmp=$dstdir/_rm.$$_
# Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
trap '(exit $?); exit' 1 2 13 15
# Copy the file name to the temp name.
$doit $cpprog "$src" "$dsttmp" &&
# and set any options; do chmod last to preserve setuid bits.
#
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $cpprog $src $dsttmp" command.
#
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
&& { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
# Now rename the file to the real destination.
{ $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
|| {
# The rename failed, perhaps because mv can't rename something else
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
# Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
if test -f "$dstdir/$dstfile"; then
$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
|| $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
|| {
echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
(exit 1); exit
}
else
:
fi
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
}
}
fi || { (exit 1); exit; }
pathcomp="${pathcomp}/"
done
fi
# The final little trick to "correctly" pass the exit status to the exit trap.
{
(exit 0); exit
}
if [ x"$dir_arg" != x ]
then
$doit $instcmd $dst &&
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else : ; fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else : ; fi
else
# If we're going to rename the final executable, determine the name now.
if [ x"$transformarg" = x ]
then
dstfile=`basename $dst`
else
dstfile=`basename $dst $transformbasename |
sed $transformarg`$transformbasename
fi
# don't allow the sed command to completely eliminate the filename
if [ x"$dstfile" = x ]
then
dstfile=`basename $dst`
else
:
fi
# Make a temp file name in the proper directory.
dsttmp=$dstdir/#inst.$$#
# Move or copy the file name to the temp name
$doit $instcmd $src $dsttmp &&
trap "rm -f ${dsttmp}" 0 &&
# and set any options; do chmod last to preserve setuid bits
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command.
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else :;fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else :;fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else :;fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else :;fi &&
# Now rename the file to the real destination.
$doit $rmcmd -f $dstdir/$dstfile &&
$doit $mvcmd $dsttmp $dstdir/$dstfile
fi &&
exit 0

File diff suppressed because it is too large Load Diff

View File

@@ -1,15 +0,0 @@
#
# Check for Bison.
#
# This macro verifies that Bison is installed. If successful, then
# 1) YACC is set to bison -y (to emulate YACC calls)
# 2) BISON is set to bison
#
AC_DEFUN([AC_PROG_BISON],
[AC_CACHE_CHECK([],[llvm_cv_has_bison],[AC_PROG_YACC()])
if test "$YACC" != "bison -y"; then
AC_SUBST(BISON,[])
AC_MSG_WARN([bison not found, can't rebuild grammars])
else
AC_SUBST(BISON,[bison])
fi])

View File

@@ -1,42 +0,0 @@
# Check for the extension used for executables on build platform.
# This is necessary for cross-compiling where the build platform
# may differ from the host platform.
AC_DEFUN([AC_BUILD_EXEEXT],
[
AC_MSG_CHECKING([for executable suffix on build platform])
AC_CACHE_VAL(ac_cv_build_exeext,
[if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
ac_cv_build_exeext=.exe
else
ac_build_prefix=${build_alias}-
AC_CHECK_PROG(BUILD_CC, ${ac_build_prefix}gcc, ${ac_build_prefix}gcc)
if test -z "$BUILD_CC"; then
AC_CHECK_PROG(BUILD_CC, gcc, gcc)
if test -z "$BUILD_CC"; then
AC_CHECK_PROG(BUILD_CC, cc, cc, , , /usr/ucb/cc)
fi
fi
test -z "$BUILD_CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
ac_build_link='${BUILD_CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AS_MESSAGE_LOG_FD'
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_build_exeext=
if AC_TRY_EVAL(ac_build_link); then
for file in conftest.*; do
case $file in
*.c | *.o | *.obj) ;;
*) ac_cv_build_exeext=`echo $file | sed -e s/conftest//` ;;
esac
done
else
AC_MSG_ERROR([installation or configuration problem: compiler cannot create executables.])
fi
rm -f conftest*
test x"${ac_cv_build_exeext}" = x && ac_cv_build_exeext=blank
fi])
BUILD_EXEEXT=""
test x"${ac_cv_build_exeext}" != xblank && BUILD_EXEEXT=${ac_cv_build_exeext}
AC_MSG_RESULT(${ac_cv_build_exeext})
ac_build_exeext=$BUILD_EXEEXT
AC_SUBST(BUILD_EXEEXT)])

View File

@@ -1,31 +0,0 @@
#
# Determine if the printf() functions have the %a format character.
# This is modified from:
# http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_ext_slist.html
AC_DEFUN([AC_C_PRINTF_A],
[AC_CACHE_CHECK([if printf has the %a format character],[llvm_cv_c_printf_a],
[AC_LANG_PUSH([C])
AC_RUN_IFELSE([
AC_LANG_PROGRAM([[
#include <stdio.h>
#include <stdlib.h>
]],[[
volatile double A, B;
char Buffer[100];
A = 1;
A /= 10.0;
sprintf(Buffer, "%a", A);
B = atof(Buffer);
if (A != B)
return (1);
if (A != 0x1.999999999999ap-4)
return (1);
return (0);]])],
llvm_cv_c_printf_a=yes,
llvmac_cv_c_printf_a=no,
llvmac_cv_c_printf_a=no)
AC_LANG_POP([C])])
if test "$llvm_cv_c_printf_a" = "yes"; then
AC_DEFINE([HAVE_PRINTF_A],[1],[Define to have the %a format string])
fi
])

View File

@@ -1,26 +0,0 @@
#
# Check for GNU Make. This is originally from
# http://www.gnu.org/software/ac-archive/htmldoc/check_gnu_make.html
#
AC_DEFUN([AC_CHECK_GNU_MAKE],
[AC_CACHE_CHECK([for GNU make],[llvm_cv_gnu_make_command],
dnl Search all the common names for GNU make
[llvm_cv_gnu_make_command=''
for a in "$MAKE" make gmake gnumake ; do
if test -z "$a" ; then continue ; fi ;
if ( sh -c "$a --version" 2> /dev/null | grep GNU 2>&1 > /dev/null )
then
llvm_cv_gnu_make_command=$a ;
break;
fi
done])
dnl If there was a GNU version, then set @ifGNUmake@ to the empty string,
dnl '#' otherwise
if test "x$llvm_cv_gnu_make_command" != "x" ; then
ifGNUmake='' ;
else
ifGNUmake='#' ;
AC_MSG_RESULT("Not found");
fi
AC_SUBST(ifGNUmake)
])

View File

@@ -1,9 +0,0 @@
#
# Configure a Makefile without clobbering it if it exists and is not out of
# date. This macro is unique to LLVM.
#
AC_DEFUN([AC_CONFIG_MAKEFILE],
[AC_CONFIG_COMMANDS($1,
[${llvm_src}/autoconf/mkinstalldirs `dirname $1`
${SHELL} ${llvm_src}/autoconf/install-sh -c ${srcdir}/$1 $1])
])

View File

@@ -1,14 +0,0 @@
#
# Provide the arguments and other processing needed for an LLVM project
#
AC_DEFUN([LLVM_CONFIG_PROJECT],
[AC_ARG_WITH([llvmsrc],
AS_HELP_STRING([--with-llvmsrc],[Location of LLVM Source Code]),
[llvm_src="$withval"],[llvm_src="]$1["])
AC_SUBST(LLVM_SRC,$llvm_src)
AC_ARG_WITH([llvmobj],
AS_HELP_STRING([--with-llvmobj],[Location of LLVM Object Code]),
[llvm_obj="$withval"],[llvm_obj="]$2["])
AC_SUBST(LLVM_OBJ,$llvm_obj)
AC_CONFIG_COMMANDS([setup],,[llvm_src="${LLVM_SRC}"])
])

View File

@@ -1,22 +0,0 @@
#
# Check for bidirectional iterator extension. This is modified from
# http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_ext_hash_set.html
#
AC_DEFUN([AC_CXX_HAVE_BI_ITERATOR],
[AC_CACHE_CHECK(whether the compiler has the bidirectional iterator,
ac_cv_cxx_have_bi_iterator,
[AC_REQUIRE([AC_CXX_NAMESPACES])
AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <iterator>
#ifdef HAVE_NAMESPACES
using namespace std;
#endif]], [[bidirectional_iterator<int,int> t; return 0;]])],[ac_cv_cxx_have_bi_iterator=yes],[ac_cv_cxx_have_bi_iterator=no])
AC_LANG_POP([C++])
])
if test "$ac_cv_cxx_have_bi_iterator" = yes
then
AC_DEFINE(HAVE_BI_ITERATOR,1,[Have bi-directional iterator])
else
AC_DEFINE(HAVE_BI_ITERATOR,0,[Does not have bi-directional iterator])
fi
])

View File

@@ -1,22 +0,0 @@
# Check for forward iterator extension. This is modified from
# http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_ext_hash_set.html
AC_DEFUN([AC_CXX_HAVE_FWD_ITERATOR],
[AC_CACHE_CHECK(whether the compiler has forward iterators,
ac_cv_cxx_have_fwd_iterator,
[AC_REQUIRE([AC_CXX_NAMESPACES])
AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <iterator>
#ifdef HAVE_NAMESPACES
using namespace std;
#endif]], [[forward_iterator<int,int> t; return 0;]])],[ac_cv_cxx_have_fwd_iterator=yes],[ac_cv_cxx_have_fwd_iterator=no])
AC_LANG_POP([C++])
])
if test "$ac_cv_cxx_have_fwd_iterator" = yes
then
AC_DEFINE(HAVE_FWD_ITERATOR,1,[Have forward iterator])
else
AC_DEFINE(HAVE_FWD_ITERATOR,0,[Does not have forward iterator])
fi
])

View File

@@ -1,59 +0,0 @@
# Check for hash_map extension. This is from
# http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_ext_hash_map.html
AC_DEFUN([AC_CXX_HAVE_STD_EXT_HASH_MAP],
[AC_CACHE_CHECK([whether the compiler has <ext/hash_map> defining template class std::hash_map],
ac_cv_cxx_have_std_ext_hash_map,
[AC_REQUIRE([AC_CXX_NAMESPACES])
AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <ext/hash_map>
#ifdef HAVE_NAMESPACES
using namespace std;
#endif]], [[hash_map<int, int> t;]])],[ac_cv_cxx_have_std_ext_hash_map=yes],[ac_cv_cxx_have_std_ext_hash_map=no])
AC_LANG_POP([C++])])
if test "$ac_cv_cxx_have_std_ext_hash_map" = yes
then
AC_DEFINE(HAVE_STD_EXT_HASH_MAP,1,[Have ext/hash_map>])
else
AC_DEFINE(HAVE_STD_EXT_HASH_MAP,0,[Does not have ext/hash_map>])
fi
])
AC_DEFUN([AC_CXX_HAVE_GNU_EXT_HASH_MAP],
[AC_CACHE_CHECK([whether the compiler has <ext/hash_map> defining template class __gnu_cxx::hash_map],
ac_cv_cxx_have_gnu_ext_hash_map,
[AC_REQUIRE([AC_CXX_NAMESPACES])
AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <ext/hash_map>
#ifdef HAVE_NAMESPACES
using namespace __gnu_cxx;
#endif]], [[hash_map<int,int> t; ]])],[ac_cv_cxx_have_gnu_ext_hash_map=yes],[ac_cv_cxx_have_gnu_ext_hash_map=no])
AC_LANG_POP([C++])])
if test "$ac_cv_cxx_have_gnu_ext_hash_map" = yes
then
AC_DEFINE(HAVE_GNU_EXT_HASH_MAP,1,[Have ext/hash_map])
else
AC_DEFINE(HAVE_GNU_EXT_HASH_MAP,0,[Does not have ext/hash_map])
fi
])
AC_DEFUN([AC_CXX_HAVE_GLOBAL_HASH_MAP],
[AC_CACHE_CHECK([whether the compiler has <hash_map> defining template class ::hash_map],
ac_cv_cxx_have_global_hash_map,
[AC_REQUIRE([AC_CXX_NAMESPACES])
AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <hash_map>]], [[hash_map<int,int> t; ]])],[ac_cv_cxx_have_global_hash_map=yes],[ac_cv_cxx_have_global_hash_map=no])
AC_LANG_POP([C++])])
if test "$ac_cv_cxx_have_global_hash_map" = yes
then
AC_DEFINE(HAVE_GLOBAL_HASH_MAP,1,[Have <hash_map>])
else
AC_DEFINE(HAVE_GLOBAL_HASH_MAP,0,[Does not have <hash_map>])
fi
])
AC_DEFUN([AC_CXX_HAVE_HASH_MAP],
[AC_CXX_HAVE_STD_EXT_HASH_MAP
AC_CXX_HAVE_GNU_EXT_HASH_MAP
AC_CXX_HAVE_GLOBAL_HASH_MAP])

View File

@@ -1,60 +0,0 @@
# Check for hash_set extension. This is modified from
# http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_ext_hash_set.html
AC_DEFUN([AC_CXX_HAVE_STD_EXT_HASH_SET],
[AC_CACHE_CHECK([whether the compiler has <ext/hash_set> defining template class std::hash_set],
ac_cv_cxx_have_std_ext_hash_set,
[AC_REQUIRE([AC_CXX_NAMESPACES])
AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <ext/hash_set>
#ifdef HAVE_NAMESPACES
using namespace std;
#endif]], [[hash_set<int> t; ]])],[ac_cv_cxx_have_std_ext_hash_set=yes],[ac_cv_cxx_have_std_ext_hash_set=no])
AC_LANG_POP([C++])])
if test "$ac_cv_cxx_have_std_ext_hash_set" = yes
then
AC_DEFINE(HAVE_STD_EXT_HASH_SET,1,[Have hash_set in std namespace])
else
AC_DEFINE(HAVE_STD_EXT_HASH_SET,0,[Does not have hash_set in std namespace])
fi
])
AC_DEFUN([AC_CXX_HAVE_GNU_EXT_HASH_SET],
[AC_CACHE_CHECK(
[whether the compiler has <ext/hash_set> defining template class __gnu_cxx::hash_set],
ac_cv_cxx_have_gnu_ext_hash_set,
[AC_REQUIRE([AC_CXX_NAMESPACES])
AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <ext/hash_set>
#ifdef HAVE_NAMESPACES
using namespace __gnu_cxx;
#endif]], [[hash_set<int> t; ]])],[ac_cv_cxx_have_gnu_ext_hash_set=yes],[ac_cv_cxx_have_gnu_ext_hash_set=no])
AC_LANG_POP([C++])])
if test "$ac_cv_cxx_have_gnu_ext_hash_set" = yes
then
AC_DEFINE(HAVE_GNU_EXT_HASH_SET,1,[Have hash_set in gnu namespace])
else
AC_DEFINE(HAVE_GNU_EXT_HASH_SET,0,[Does not have hash_set in gnu namespace])
fi
])
AC_DEFUN([AC_CXX_HAVE_GLOBAL_HASH_SET],
[AC_CACHE_CHECK([whether the compiler has <hash_set> defining template class ::hash_set],
ac_cv_cxx_have_global_hash_set,
[AC_REQUIRE([AC_CXX_NAMESPACES])
AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <hash_set>]], [[hash_set<int> t; return 0;]])],[ac_cv_cxx_have_global_hash_set=yes],[ac_cv_cxx_have_global_hash_set=no])
AC_LANG_POP([C++])])
if test "$ac_cv_cxx_have_global_hash_set" = yes
then
AC_DEFINE(HAVE_GLOBAL_HASH_SET,1,[Have hash_set in global namespace])
else
AC_DEFINE(HAVE_GLOBAL_HASH_SET,0,[Does not have hash_set in global namespace])
fi
])
AC_DEFUN([AC_CXX_HAVE_HASH_SET],
[AC_CXX_HAVE_STD_EXT_HASH_SET
AC_CXX_HAVE_GNU_EXT_HASH_SET
AC_CXX_HAVE_GLOBAL_HASH_SET])

View File

@@ -1,19 +0,0 @@
# Check for C++ namespace support. This is from
# http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_namespaces.html
#
AC_DEFUN([AC_CXX_NAMESPACES],
[AC_CACHE_CHECK(whether the compiler implements namespaces,
ac_cv_cxx_namespaces,
[AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[[namespace Outer { namespace Inner { int i = 0; }}]],
[[using namespace Outer::Inner; return i;]])],
ac_cv_cxx_namespaces=yes,
ac_cv_cxx_namespaces=no)
AC_LANG_POP([C++])
])
if test "$ac_cv_cxx_namespaces" = yes; then
AC_DEFINE(HAVE_NAMESPACES,,[define if the compiler implements namespaces])
fi
])

View File

@@ -1,26 +0,0 @@
# Check for standard iterator extension. This is modified from
# http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_ext_hash_set.html
AC_DEFUN([AC_CXX_HAVE_STD_ITERATOR],
[AC_CACHE_CHECK(whether the compiler has the standard iterator,
ac_cv_cxx_have_std_iterator,
[AC_REQUIRE([AC_CXX_NAMESPACES])
AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[[#include <iterator>
#ifdef HAVE_NAMESPACES
using namespace std;
#endif]],
[[iterator<int,int,int> t; return 0;]])],
ac_cv_cxx_have_std_iterator=yes,
ac_cv_cxx_have_std_iterator=no)
AC_LANG_POP([C++])
])
if test "$ac_cv_cxx_have_std_iterator" = yes
then
AC_DEFINE(HAVE_STD_ITERATOR,1,[Have std namespace iterator])
else
AC_DEFINE(HAVE_STD_ITERATOR,0,[Does not have std namespace iterator])
fi
])

View File

@@ -1,118 +0,0 @@
dnl Check for a standard program that has a bin, include and lib directory
dnl
dnl Parameters:
dnl $1 - prefix directory to check
dnl $2 - program name to check
dnl $3 - header file to check
dnl $4 - library file to check
AC_DEFUN([CHECK_STD_PROGRAM],
[m4_define([allcapsname],translit($2,a-z,A-Z))
if test -n "$1" -a -d "$1" -a -n "$2" -a -d "$1/bin" -a -x "$1/bin/$2" ; then
AC_SUBST([USE_]allcapsname(),["USE_]allcapsname()[ = 1"])
AC_SUBST(allcapsname(),[$1/bin/$2])
AC_SUBST(allcapsname()[_BIN],[$1/bin])
AC_SUBST(allcapsname()[_DIR],[$1])
if test -n "$3" -a -d "$1/include" -a -f "$1/include/$3" ; then
AC_SUBST(allcapsname()[_INC],[$1/include])
fi
if test -n "$4" -a -d "$1/lib" -a -f "$1/lib/$4" ; then
AC_SUBST(allcapsname()[_LIB],[$1/lib])
fi
fi
])
dnl Find a program via --with options, in the path, or well known places
dnl
dnl Parameters:
dnl $1 - program's executable name
dnl $2 - header file name to check (optional)
dnl $3 - library file name to check (optional)
dnl $4 - alternate (long) name for the program
AC_DEFUN([FIND_STD_PROGRAM],
[m4_define([allcapsname],translit($1,a-z,A-Z))
m4_define([stdprog_long_name],ifelse($4,,translit($1,[ !@#$%^&*()-+={}[]:;"',./?],[-]),translit($4,[ !@#$%^&*()-+={}[]:;"',./?],[-])))
AC_MSG_CHECKING([for ]stdprog_long_name()[ bin/lib/include locations])
AC_ARG_WITH($1,
AS_HELP_STRING([--with-]stdprog_long_name()[=DIR],
[Specify that the ]stdprog_long_name()[ install prefix is DIR]),
$1[pfxdir=$withval],$1[pfxdir=nada])
AC_ARG_WITH($1[-bin],
AS_HELP_STRING([--with-]stdprog_long_name()[-bin=DIR],
[Specify that the ]stdprog_long_name()[ binary is in DIR]),
$1[bindir=$withval],$1[bindir=nada])
AC_ARG_WITH($1[-lib],
AS_HELP_STRING([--with-]stdprog_long_name()[-lib=DIR],
[Specify that ]stdprog_long_name()[ libraries are in DIR]),
$1[libdir=$withval],$1[libdir=nada])
AC_ARG_WITH($1[-inc],
AS_HELP_STRING([--with-]stdprog_long_name()[-inc=DIR],
[Specify that the ]stdprog_long_name()[ includes are in DIR]),
$1[incdir=$withval],$1[incdir=nada])
eval pfxval=\$\{$1pfxdir\}
eval binval=\$\{$1bindir\}
eval incval=\$\{$1incdir\}
eval libval=\$\{$1libdir\}
if test "${pfxval}" != "nada" ; then
CHECK_STD_PROGRAM(${pfxval},$1,$2,$3)
elif test "${binval}" != "nada" ; then
if test "${libval}" != "nada" ; then
if test "${incval}" != "nada" ; then
if test -d "${binval}" ; then
if test -d "${incval}" ; then
if test -d "${libval}" ; then
AC_SUBST(allcapsname(),${binval}/$1)
AC_SUBST(allcapsname()[_BIN],${binval})
AC_SUBST(allcapsname()[_INC],${incval})
AC_SUBST(allcapsname()[_LIB],${libval})
AC_SUBST([USE_]allcapsname(),["USE_]allcapsname()[ = 1"])
AC_MSG_RESULT([found via --with options])
else
AC_MSG_RESULT([failed])
AC_MSG_ERROR([The --with-]$1[-libdir value must be a directory])
fi
else
AC_MSG_RESULT([failed])
AC_MSG_ERROR([The --with-]$1[-incdir value must be a directory])
fi
else
AC_MSG_RESULT([failed])
AC_MSG_ERROR([The --with-]$1[-bindir value must be a directory])
fi
else
AC_MSG_RESULT([failed])
AC_MSG_ERROR([The --with-]$1[-incdir option must be specified])
fi
else
AC_MSG_RESULT([failed])
AC_MSG_ERROR([The --with-]$1[-libdir option must be specified])
fi
else
tmppfxdir=`which $1 2>&1`
if test -n "$tmppfxdir" -a -d "${tmppfxdir%*$1}" -a \
-d "${tmppfxdir%*$1}/.." ; then
tmppfxdir=`cd "${tmppfxdir%*$1}/.." ; pwd`
CHECK_STD_PROGRAM($tmppfxdir,$1,$2,$3)
AC_MSG_RESULT([found in PATH at ]$tmppfxdir)
else
checkresult="yes"
eval checkval=\$\{"USE_"allcapsname()\}
CHECK_STD_PROGRAM([/usr],$1,$2,$3)
if test -z "${checkval}" ; then
CHECK_STD_PROGRAM([/usr/local],$1,$2,$3)
if test -z "${checkval}" ; then
CHECK_STD_PROGRAM([/sw],$1,$2,$3)
if test -z "${checkval}" ; then
CHECK_STD_PROGRAM([/opt],$1,$2,$3)
if test -z "${checkval}" ; then
CHECK_STD_PROGRAM([/],$1,$2,$3)
if test -z "${checkval}" ; then
checkresult="no"
fi
fi
fi
fi
fi
AC_MSG_RESULT($checkresult)
fi
fi
])

View File

@@ -1,17 +0,0 @@
#
# Check for FLEX.
#
# This macro verifies that flex is installed. If successful, then
# 1) $LEX is set to "flex" (to emulate lex calls)
# 2) BISON is set to bison
AC_DEFUN([AC_PROG_FLEX],
[AC_CACHE_CHECK(,
ac_cv_has_flex,
[AC_PROG_LEX()
])
if test "$LEX" != "flex"; then
AC_MSG_ERROR([flex not found but required])
else
AC_SUBST(FLEX,[flex],[location of flex])
fi
])

View File

@@ -1,36 +0,0 @@
#
# This function determins if the the isinf function isavailable on this
# platform.
#
AC_DEFUN([AC_FUNC_ISINF],[
AC_SINGLE_CXX_CHECK([ac_cv_func_isinf_in_math_h],
[isinf], [<math.h>],
[float f; isinf(f);])
if test "$ac_cv_func_isinf_in_math_h" = "yes" ; then
AC_DEFINE([HAVE_ISINF_IN_MATH_H],1,[Set to 1 if the isinf function is found in <math.h>])
fi
AC_SINGLE_CXX_CHECK([ac_cv_func_isinf_in_cmath],
[isinf], [<cmath>],
[float f; isinf(f);])
if test "$ac_cv_func_isinf_in_cmath" = "yes" ; then
AC_DEFINE([HAVE_ISINF_IN_CMATH],1,[Set to 1 if the isinf function is found in <cmath>])
fi
AC_SINGLE_CXX_CHECK([ac_cv_func_std_isinf_in_cmath],
[std::isinf], [<cmath>],
[float f; std::isinf(f)}])
if test "$ac_cv_func_std_isinf_in_cmath" = "yes" ; then
AC_DEFINE([HAVE_STD_ISINF_IN_CMATH],1,[Set to 1 if the std::isinf function is found in <cmath>])
fi
AC_SINGLE_CXX_CHECK([ac_cv_func_finite_in_ieeefp_h],
[finite], [<ieeefp.h>],
[float f; finite(f);])
if test "$ac_cv_func_finite_in_ieeefp_h" = "yes" ; then
AC_DEFINE([HAVE_FINITE_IN_IEEEFP_H],1,[Set to 1 if the finite function is found in <ieeefp.h>])
fi
])

View File

@@ -1,27 +0,0 @@
#
# This function determines if the isnan function is available on this
# platform.
#
AC_DEFUN([AC_FUNC_ISNAN],[
AC_SINGLE_CXX_CHECK([ac_cv_func_isnan_in_math_h],
[isnan], [<math.h>],
[float f; isnan(f);])
if test "$ac_cv_func_isnan_in_math_h" = "yes" ; then
AC_DEFINE([HAVE_ISNAN_IN_MATH_H],1,[Set to 1 if the isnan function is found in <math.h>])
fi
AC_SINGLE_CXX_CHECK([ac_cv_func_isnan_in_cmath],
[isnan], [<cmath>],
[float f; isnan(f);])
if test "$ac_cv_func_isnan_in_cmath" = "yes" ; then
AC_DEFINE([HAVE_ISNAN_IN_CMATH],1,[Set to 1 if the isnan function is found in <cmath>])
fi
AC_SINGLE_CXX_CHECK([ac_cv_func_std_isnan_in_cmath],
[std::isnan], [<cmath>],
[float f; std::isnan(f);])
if test "$ac_cv_func_std_isnan_in_cmath" = "yes" ; then
AC_DEFINE([HAVE_STD_ISNAN_IN_CMATH],1,[Set to 1 if the std::isnan function is found in <cmath>])
fi
])

View File

@@ -1,26 +0,0 @@
#
# Check for the ability to mmap a file.
#
AC_DEFUN([AC_FUNC_MMAP_FILE],
[AC_CACHE_CHECK(for mmap of files,
ac_cv_func_mmap_file,
[ AC_LANG_PUSH([C])
AC_RUN_IFELSE([
AC_LANG_PROGRAM([[
#include <sys/types.h>
#include <sys/mman.h>
#include <fcntl.h>
]],[[
int fd;
fd = creat ("foo",0777);
fd = (int) mmap (0, 1, PROT_READ, MAP_SHARED, fd, 0);
unlink ("foo");
return (fd != (int) MAP_FAILED);]])],
[ac_cv_func_mmap_file=yes],[ac_cv_func_mmap_file=no],[ac_cv_func_mmap_file=no])
AC_LANG_POP([C])
])
if test "$ac_cv_func_mmap_file" = yes; then
AC_DEFINE([HAVE_MMAP_FILE],[],[Define if mmap() can map files into memory])
AC_SUBST(MMAP_FILE,[yes])
fi
])

View File

@@ -1,21 +0,0 @@
#
# Check for anonymous mmap macros. This is modified from
# http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_ext_slist.html
#
AC_DEFUN([AC_HEADER_MMAP_ANONYMOUS],
[AC_CACHE_CHECK(for MAP_ANONYMOUS vs. MAP_ANON,
ac_cv_header_mmap_anon,
[ AC_LANG_PUSH([C])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[[#include <sys/mman.h>
#include <unistd.h>
#include <fcntl.h>]],
[[mmap (0, 1, PROT_READ, MAP_ANONYMOUS, -1, 0); return (0);]])],
ac_cv_header_mmap_anon=yes,
ac_cv_header_mmap_anon=no)
AC_LANG_POP([C])
])
if test "$ac_cv_header_mmap_anon" = yes; then
AC_DEFINE([HAVE_MMAP_ANONYMOUS],[1],[Define if mmap() uses MAP_ANONYMOUS to map anonymous pages, or undefine if it uses MAP_ANON])
fi
])

View File

@@ -1,18 +0,0 @@
#
# This function determins if the the HUGE_VAL macro is compilable with the
# -pedantic switch or not. XCode < 2.4.1 doesn't get it right.
#
AC_DEFUN([AC_HUGE_VAL_CHECK],[
AC_CACHE_CHECK([for HUGE_VAL sanity], [ac_cv_huge_val_sanity],[
AC_LANG_PUSH([C++])
CXXFLAGS=-pedantic
AC_RUN_IFELSE(
AC_LANG_PROGRAM(
[#include <math.h>],
[double x = HUGE_VAL; return x != x; ]),
[ac_cv_huge_val_sanity=yes],[ac_cv_huge_val_sanity=no],
[ac_cv_huge_val_sanity=yes])
AC_LANG_POP([C++])
])
AC_SUBST(HUGE_VAL_SANITY,$ac_cv_huge_val_sanity)
])

File diff suppressed because it is too large Load Diff

View File

@@ -1,19 +0,0 @@
#
# Determine if the system can handle the -R option being passed to the linker.
#
# This macro is specific to LLVM.
#
AC_DEFUN([AC_LINK_USE_R],
[AC_CACHE_CHECK([for compiler -Wl,-R<path> option],[llvm_cv_link_use_r],
[ AC_LANG_PUSH([C])
oldcflags="$CFLAGS"
CFLAGS="$CFLAGS -Wl,-R."
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[int main() { return 0; }]])],
[llvm_cv_link_use_r=yes],[llvm_cv_link_use_r=no])
CFLAGS="$oldcflags"
AC_LANG_POP([C])
])
if test "$llvm_cv_link_use_r" = yes ; then
AC_DEFINE([HAVE_LINK_R],[1],[Define if you can use -Wl,-R. to pass -R. to the linker, in order to add the current directory to the dynamic linker search path.])
fi
])

View File

@@ -1,418 +0,0 @@
## ltdl.m4 - Configure ltdl for the target system. -*-Autoconf-*-
## Copyright (C) 1999-2000 Free Software Foundation, Inc.
##
## This file is free software; the Free Software Foundation gives
## unlimited permission to copy and/or distribute it, with or without
## modifications, as long as this notice is preserved.
# serial 7 AC_LIB_LTDL
# AC_WITH_LTDL
# ------------
# Clients of libltdl can use this macro to allow the installer to
# choose between a shipped copy of the ltdl sources or a preinstalled
# version of the library.
AC_DEFUN([AC_WITH_LTDL],
[AC_REQUIRE([AC_LIB_LTDL])
AC_SUBST([LIBLTDL])
AC_SUBST([INCLTDL])
# Unless the user asks us to check, assume no installed ltdl exists.
use_installed_libltdl=no
AC_ARG_WITH([included_ltdl],
[ --with-included-ltdl use the GNU ltdl sources included here])
if test "x$with_included_ltdl" != xyes; then
# We are not being forced to use the included libltdl sources, so
# decide whether there is a useful installed version we can use.
AC_CHECK_HEADER([ltdl.h],
[AC_CHECK_LIB([ltdl], [lt_dlcaller_register],
[with_included_ltdl=no],
[with_included_ltdl=yes])
])
fi
if test "x$enable_ltdl_install" != xyes; then
# If the user did not specify an installable libltdl, then default
# to a convenience lib.
AC_LIBLTDL_CONVENIENCE
fi
if test "x$with_included_ltdl" = xno; then
# If the included ltdl is not to be used. then Use the
# preinstalled libltdl we found.
AC_DEFINE([HAVE_LTDL], [1],
[Define this if a modern libltdl is already installed])
LIBLTDL=-lltdl
fi
# Report our decision...
AC_MSG_CHECKING([whether to use included libltdl])
AC_MSG_RESULT([$with_included_ltdl])
AC_CONFIG_SUBDIRS([libltdl])
])# AC_WITH_LTDL
# AC_LIB_LTDL
# -----------
# Perform all the checks necessary for compilation of the ltdl objects
# -- including compiler checks and header checks.
AC_DEFUN([AC_LIB_LTDL],
[AC_PREREQ(2.60)
AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([AC_C_CONST])
AC_REQUIRE([AC_HEADER_STDC])
AC_REQUIRE([AC_HEADER_DIRENT])
AC_REQUIRE([_LT_AC_CHECK_DLFCN])
AC_REQUIRE([AC_LTDL_ENABLE_INSTALL])
AC_REQUIRE([AC_LTDL_SHLIBEXT])
AC_REQUIRE([AC_LTDL_SHLIBPATH])
AC_REQUIRE([AC_LTDL_SYSSEARCHPATH])
AC_REQUIRE([AC_LTDL_OBJDIR])
AC_REQUIRE([AC_LTDL_DLPREOPEN])
AC_REQUIRE([AC_LTDL_DLLIB])
AC_REQUIRE([AC_LTDL_SYMBOL_USCORE])
AC_REQUIRE([AC_LTDL_DLSYM_USCORE])
AC_REQUIRE([AC_LTDL_SYS_DLOPEN_DEPLIBS])
AC_REQUIRE([AC_LTDL_FUNC_ARGZ])
AC_CHECK_HEADERS([assert.h ctype.h errno.h malloc.h memory.h stdlib.h \
stdio.h unistd.h])
AC_CHECK_HEADERS([dl.h sys/dl.h dld.h mach-o/dyld.h])
AC_CHECK_HEADERS([string.h strings.h], [break])
AC_CHECK_FUNCS([strchr index], [break])
AC_CHECK_FUNCS([strrchr rindex], [break])
AC_CHECK_FUNCS([memcpy bcopy], [break])
AC_CHECK_FUNCS([memmove strcmp])
AC_CHECK_FUNCS([closedir opendir readdir])
])# AC_LIB_LTDL
# AC_LTDL_ENABLE_INSTALL
# ----------------------
AC_DEFUN([AC_LTDL_ENABLE_INSTALL],
[AC_ARG_ENABLE([ltdl-install],
[AS_HELP_STRING([--enable-ltdl-install],[install libltdl])])
AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno)
AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno)
])# AC_LTDL_ENABLE_INSTALL
# AC_LTDL_SYS_DLOPEN_DEPLIBS
# --------------------------
AC_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS],
[AC_REQUIRE([AC_CANONICAL_HOST])
AC_CACHE_CHECK([whether deplibs are loaded by dlopen],
[libltdl_cv_sys_dlopen_deplibs],
[# PORTME does your system automatically load deplibs for dlopen?
# or its logical equivalent (e.g. shl_load for HP-UX < 11)
# For now, we just catch OSes we know something about -- in the
# future, we'll try test this programmatically.
libltdl_cv_sys_dlopen_deplibs=unknown
case "$host_os" in
aix3*|aix4.1.*|aix4.2.*)
# Unknown whether this is true for these versions of AIX, but
# we want this `case' here to explicitly catch those versions.
libltdl_cv_sys_dlopen_deplibs=unknown
;;
aix[[45]]*)
libltdl_cv_sys_dlopen_deplibs=yes
;;
darwin*)
# Assuming the user has installed a libdl from somewhere, this is true
# If you are looking for one http://www.opendarwin.org/projects/dlcompat
libltdl_cv_sys_dlopen_deplibs=yes
;;
gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu)
# GNU and its variants, using gnu ld.so (Glibc)
libltdl_cv_sys_dlopen_deplibs=yes
;;
hpux10*|hpux11*)
libltdl_cv_sys_dlopen_deplibs=yes
;;
interix*)
libltdl_cv_sys_dlopen_deplibs=yes
;;
irix[[12345]]*|irix6.[[01]]*)
# Catch all versions of IRIX before 6.2, and indicate that we don't
# know how it worked for any of those versions.
libltdl_cv_sys_dlopen_deplibs=unknown
;;
irix*)
# The case above catches anything before 6.2, and it's known that
# at 6.2 and later dlopen does load deplibs.
libltdl_cv_sys_dlopen_deplibs=yes
;;
netbsd*)
libltdl_cv_sys_dlopen_deplibs=yes
;;
openbsd*)
libltdl_cv_sys_dlopen_deplibs=yes
;;
osf[[1234]]*)
# dlopen did load deplibs (at least at 4.x), but until the 5.x series,
# it did *not* use an RPATH in a shared library to find objects the
# library depends on, so we explictly say `no'.
libltdl_cv_sys_dlopen_deplibs=no
;;
osf5.0|osf5.0a|osf5.1)
# dlopen *does* load deplibs and with the right loader patch applied
# it even uses RPATH in a shared library to search for shared objects
# that the library depends on, but there's no easy way to know if that
# patch is installed. Since this is the case, all we can really
# say is unknown -- it depends on the patch being installed. If
# it is, this changes to `yes'. Without it, it would be `no'.
libltdl_cv_sys_dlopen_deplibs=unknown
;;
osf*)
# the two cases above should catch all versions of osf <= 5.1. Read
# the comments above for what we know about them.
# At > 5.1, deplibs are loaded *and* any RPATH in a shared library
# is used to find them so we can finally say `yes'.
libltdl_cv_sys_dlopen_deplibs=yes
;;
solaris*)
libltdl_cv_sys_dlopen_deplibs=yes
;;
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
libltdl_cv_sys_dlopen_deplibs=yes
;;
esac
])
if test "$libltdl_cv_sys_dlopen_deplibs" != yes; then
AC_DEFINE([LTDL_DLOPEN_DEPLIBS], [1],
[Define if the OS needs help to load dependent libraries for dlopen().])
fi
])# AC_LTDL_SYS_DLOPEN_DEPLIBS
# AC_LTDL_SHLIBEXT
# ----------------
AC_DEFUN([AC_LTDL_SHLIBEXT],
[AC_REQUIRE([AC_LIBTOOL_SYS_DYNAMIC_LINKER])
AC_CACHE_CHECK([which extension is used for loadable modules],
[libltdl_cv_shlibext],
[
module=yes
eval libltdl_cv_shlibext=$shrext_cmds
])
if test -n "$libltdl_cv_shlibext"; then
AC_DEFINE_UNQUOTED([LTDL_SHLIB_EXT], ["$libltdl_cv_shlibext"],
[Define to the extension used for shared libraries, say, ".so".])
fi
])# AC_LTDL_SHLIBEXT
# AC_LTDL_SHLIBPATH
# -----------------
AC_DEFUN([AC_LTDL_SHLIBPATH],
[AC_REQUIRE([AC_LIBTOOL_SYS_DYNAMIC_LINKER])
AC_CACHE_CHECK([which variable specifies run-time library path],
[libltdl_cv_shlibpath_var], [libltdl_cv_shlibpath_var="$shlibpath_var"])
if test -n "$libltdl_cv_shlibpath_var"; then
AC_DEFINE_UNQUOTED([LTDL_SHLIBPATH_VAR], ["$libltdl_cv_shlibpath_var"],
[Define to the name of the environment variable that determines the dynamic library search path.])
fi
])# AC_LTDL_SHLIBPATH
# AC_LTDL_SYSSEARCHPATH
# ---------------------
AC_DEFUN([AC_LTDL_SYSSEARCHPATH],
[AC_REQUIRE([AC_LIBTOOL_SYS_DYNAMIC_LINKER])
AC_CACHE_CHECK([for the default library search path],
[libltdl_cv_sys_search_path],
[libltdl_cv_sys_search_path="$sys_lib_dlsearch_path_spec"])
if test -n "$libltdl_cv_sys_search_path"; then
sys_search_path=
for dir in $libltdl_cv_sys_search_path; do
if test -z "$sys_search_path"; then
sys_search_path="$dir"
else
sys_search_path="$sys_search_path$PATH_SEPARATOR$dir"
fi
done
AC_DEFINE_UNQUOTED([LTDL_SYSSEARCHPATH], ["$sys_search_path"],
[Define to the system default library search path.])
fi
])# AC_LTDL_SYSSEARCHPATH
# AC_LTDL_OBJDIR
# --------------
AC_DEFUN([AC_LTDL_OBJDIR],
[AC_CACHE_CHECK([for objdir],
[libltdl_cv_objdir],
[libltdl_cv_objdir="$objdir"
if test -n "$objdir"; then
:
else
rm -f .libs 2>/dev/null
mkdir .libs 2>/dev/null
if test -d .libs; then
libltdl_cv_objdir=.libs
else
# MS-DOS does not allow filenames that begin with a dot.
libltdl_cv_objdir=_libs
fi
rmdir .libs 2>/dev/null
fi
])
AC_DEFINE_UNQUOTED([LTDL_OBJDIR], ["$libltdl_cv_objdir/"],
[Define to the sub-directory in which libtool stores uninstalled libraries.])
])# AC_LTDL_OBJDIR
# AC_LTDL_DLPREOPEN
# -----------------
AC_DEFUN([AC_LTDL_DLPREOPEN],
[AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])
AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen],
[libltdl_cv_preloaded_symbols],
[if test -n "$lt_cv_sys_global_symbol_pipe"; then
libltdl_cv_preloaded_symbols=yes
else
libltdl_cv_preloaded_symbols=no
fi
])
if test x"$libltdl_cv_preloaded_symbols" = xyes; then
AC_DEFINE([HAVE_PRELOADED_SYMBOLS], [1],
[Define if libtool can extract symbol lists from object files.])
fi
])# AC_LTDL_DLPREOPEN
# AC_LTDL_DLLIB
# -------------
AC_DEFUN([AC_LTDL_DLLIB],
[LIBADD_DL=
AC_SUBST(LIBADD_DL)
AC_LANG_PUSH([C])
AC_CHECK_FUNC([shl_load],
[AC_DEFINE([HAVE_SHL_LOAD], [1],
[Define if you have the shl_load function.])],
[AC_CHECK_LIB([dld], [shl_load],
[AC_DEFINE([HAVE_SHL_LOAD], [1],
[Define if you have the shl_load function.])
LIBADD_DL="$LIBADD_DL -ldld"],
[AC_CHECK_LIB([dl], [dlopen],
[AC_DEFINE([HAVE_LIBDL], [1],
[Define if you have the libdl library or equivalent.])
LIBADD_DL="-ldl" libltdl_cv_lib_dl_dlopen="yes"],
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#if HAVE_DLFCN_H
# include <dlfcn.h>
#endif
]], [[dlopen(0, 0);]])],[AC_DEFINE([HAVE_LIBDL], [1],
[Define if you have the libdl library or equivalent.]) libltdl_cv_func_dlopen="yes"],[AC_CHECK_LIB([svld], [dlopen],
[AC_DEFINE([HAVE_LIBDL], [1],
[Define if you have the libdl library or equivalent.])
LIBADD_DL="-lsvld" libltdl_cv_func_dlopen="yes"],
[AC_CHECK_LIB([dld], [dld_link],
[AC_DEFINE([HAVE_DLD], [1],
[Define if you have the GNU dld library.])
LIBADD_DL="$LIBADD_DL -ldld"],
[AC_CHECK_FUNC([_dyld_func_lookup],
[AC_DEFINE([HAVE_DYLD], [1],
[Define if you have the _dyld_func_lookup function.])])
])
])
])
])
])
])
if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes
then
lt_save_LIBS="$LIBS"
LIBS="$LIBS $LIBADD_DL"
AC_CHECK_FUNCS([dlerror])
LIBS="$lt_save_LIBS"
fi
AC_LANG_POP
])# AC_LTDL_DLLIB
# AC_LTDL_SYMBOL_USCORE
# ---------------------
# does the compiler prefix global symbols with an underscore?
AC_DEFUN([AC_LTDL_SYMBOL_USCORE],
[AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])
AC_CACHE_CHECK([for _ prefix in compiled symbols],
[ac_cv_sys_symbol_underscore],
[ac_cv_sys_symbol_underscore=no
cat > conftest.$ac_ext <<EOF
void nm_test_func(){}
int main(){nm_test_func;return 0;}
EOF
if AC_TRY_EVAL(ac_compile); then
# Now try to grab the symbols.
ac_nlist=conftest.nm
if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
# See whether the symbols have a leading underscore.
if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then
ac_cv_sys_symbol_underscore=yes
else
if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then
:
else
echo "configure: cannot find nm_test_func in $ac_nlist" >&AS_MESSAGE_LOG_FD
fi
fi
else
echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
fi
else
echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
cat conftest.c >&AS_MESSAGE_LOG_FD
fi
rm -rf conftest*
])
])# AC_LTDL_SYMBOL_USCORE
# AC_LTDL_DLSYM_USCORE
# --------------------
AC_DEFUN([AC_LTDL_DLSYM_USCORE],
[AC_REQUIRE([AC_LTDL_SYMBOL_USCORE])
if test x"$ac_cv_sys_symbol_underscore" = xyes; then
if test x"$libltdl_cv_func_dlopen" = xyes ||
test x"$libltdl_cv_lib_dl_dlopen" = xyes ; then
AC_CACHE_CHECK([whether we have to add an underscore for dlsym],
[libltdl_cv_need_uscore],
[libltdl_cv_need_uscore=unknown
save_LIBS="$LIBS"
LIBS="$LIBS $LIBADD_DL"
_LT_AC_TRY_DLOPEN_SELF(
[libltdl_cv_need_uscore=no], [libltdl_cv_need_uscore=yes],
[], [libltdl_cv_need_uscore=cross])
LIBS="$save_LIBS"
])
fi
fi
if test x"$libltdl_cv_need_uscore" = xyes; then
AC_DEFINE([NEED_USCORE], [1],
[Define if dlsym() requires a leading underscore in symbol names.])
fi
])# AC_LTDL_DLSYM_USCORE
# AC_LTDL_FUNC_ARGZ
# -----------------
AC_DEFUN([AC_LTDL_FUNC_ARGZ],
[AC_CHECK_HEADERS([argz.h])
AC_CHECK_TYPES([error_t],
[],
[AC_DEFINE([error_t], [int],
[Define to a type to use for `error_t' if it is not otherwise available.])],
[#if HAVE_ARGZ_H
# include <argz.h>
#endif])
AC_CHECK_FUNCS([argz_append argz_create_sep argz_insert argz_next argz_stringify])
])# AC_LTDL_FUNC_ARGZ

View File

@@ -1,17 +0,0 @@
#
# When allocating RWX memory, check whether we need to use /dev/zero
# as the file descriptor or not.
#
AC_DEFUN([AC_NEED_DEV_ZERO_FOR_MMAP],
[AC_CACHE_CHECK([if /dev/zero is needed for mmap],
ac_cv_need_dev_zero_for_mmap,
[if test "$llvm_cv_os_type" = "Interix" ; then
ac_cv_need_dev_zero_for_mmap=yes
else
ac_cv_need_dev_zero_for_mmap=no
fi
])
if test "$ac_cv_need_dev_zero_for_mmap" = yes; then
AC_DEFINE([NEED_DEV_ZERO_FOR_MMAP],[1],
[Define if /dev/zero should be used when mapping RWX memory, or undefine if its not necessary])
fi])

View File

@@ -1,16 +0,0 @@
dnl Check for a reasonable version of Perl.
dnl $1 - Minimum Perl version. Typically 5.006.
dnl
AC_DEFUN([LLVM_PROG_PERL], [
AC_PATH_PROG(PERL, [perl], [none])
if test "$PERL" != "none"; then
AC_MSG_CHECKING(for Perl $1 or newer)
if $PERL -e 'use $1;' 2>&1 > /dev/null; then
AC_MSG_RESULT(yes)
else
PERL=none
AC_MSG_RESULT(not found)
fi
fi
])

View File

@@ -1,39 +0,0 @@
dnl This macro checks for tclsh which is required to run dejagnu. On some
dnl platforms (notably FreeBSD), tclsh is named tclshX.Y - this handles
dnl that for us so we can get the latest installed tclsh version.
dnl
AC_DEFUN([DJ_AC_PATH_TCLSH], [
no_itcl=true
AC_MSG_CHECKING(for the tclsh program in tclinclude directory)
AC_ARG_WITH(tclinclude,
AS_HELP_STRING([--with-tclinclude],
[directory where tcl headers are]),
[with_tclinclude=${withval}],[with_tclinclude=''])
AC_CACHE_VAL(ac_cv_path_tclsh,[
dnl first check to see if --with-itclinclude was specified
if test x"${with_tclinclude}" != x ; then
if test -f ${with_tclinclude}/tclsh ; then
ac_cv_path_tclsh=`(cd ${with_tclinclude}; pwd)`
elif test -f ${with_tclinclude}/src/tclsh ; then
ac_cv_path_tclsh=`(cd ${with_tclinclude}/src; pwd)`
else
AC_MSG_ERROR([${with_tclinclude} directory doesn't contain tclsh])
fi
fi
dnl see if one is installed
if test x"${ac_cv_path_tclsh}" = x ; then
AC_MSG_RESULT(none)
AC_PATH_PROGS([TCLSH],[tclsh8.4 tclsh8.4.8 tclsh8.4.7 tclsh8.4.6 tclsh8.4.5 tclsh8.4.4 tclsh8.4.3 tclsh8.4.2 tclsh8.4.1 tclsh8.4.0 tclsh8.3 tclsh8.3.5 tclsh8.3.4 tclsh8.3.3 tclsh8.3.2 tclsh8.3.1 tclsh8.3.0 tclsh])
if test x"${TCLSH}" = x ; then
ac_cv_path_tclsh='';
else
ac_cv_path_tclsh="${TCLSH}";
fi
else
AC_MSG_RESULT(${ac_cv_path_tclsh})
TCLSH="${ac_cv_path_tclsh}"
AC_SUBST(TCLSH)
fi
])])

View File

@@ -1,12 +0,0 @@
#
# This function determins if the the srand48,drand48,lrand48 functions are
# available on this platform.
#
AC_DEFUN([AC_FUNC_RAND48],[
AC_SINGLE_CXX_CHECK([ac_cv_func_rand48],
[srand48/lrand48/drand48], [<stdlib.h>],
[srand48(0);lrand48();drand48();])
if test "$ac_cv_func_rand48" = "yes" ; then
AC_DEFINE([HAVE_RAND48],1,[Define to 1 if srand48/lrand48/drand48 exist in <stdlib.h>])
fi
])

View File

@@ -1,31 +0,0 @@
dnl Check a program for version sanity. The test runs a program, passes it an
dnl argument to make it print out some identification string, and filters that
dnl output with a regular expression. If the output is non-empty, the program
dnl passes the sanity check.
dnl $1 - Name or full path of the program to run
dnl $2 - Argument to pass to print out identification string
dnl $3 - grep RE to match identification string
dnl $4 - set to 1 to make errors only a warning
AC_DEFUN([CHECK_PROGRAM_SANITY],
[
AC_MSG_CHECKING([sanity for program ]$1)
sanity="0"
sanity_path=`which $1 2>/dev/null`
if test "$?" -eq 0 -a -x "$sanity_path" ; then
sanity=`$1 $2 2>&1 | grep "$3"`
if test -z "$sanity" ; then
AC_MSG_RESULT([no])
sanity="0"
if test "$4" -eq 1 ; then
AC_MSG_WARN([Program ]$1[ failed to pass sanity check.])
else
AC_MSG_ERROR([Program ]$1[ failed to pass sanity check.])
fi
else
AC_MSG_RESULT([yes])
sanity="1"
fi
else
AC_MSG_RESULT([not found])
fi
])

View File

@@ -1,10 +0,0 @@
dnl AC_SINGLE_CXX_CHECK(CACHEVAR, FUNCTION, HEADER, PROGRAM)
dnl $1, $2, $3, $4,
dnl
AC_DEFUN([AC_SINGLE_CXX_CHECK],
[AC_CACHE_CHECK([for $2 in $3], [$1],
[AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE(AC_LANG_PROGRAM([#include $3],[$4]),[$1=yes],[$1=no])
AC_LANG_POP([C++])])
])

View File

@@ -1,353 +0,0 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
scriptversion=2004-09-07.08
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004
# Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
if test $# -eq 0; then
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
fi
run=:
# In the cases where this matters, `missing' is being run in the
# srcdir already.
if test -f configure.ac; then
configure_ac=configure.ac
else
configure_ac=configure.in
fi
msg="missing on your system"
case "$1" in
--run)
# Try to run requested program, and just exit if it succeeds.
run=
shift
"$@" && exit 0
# Exit code 63 means version mismatch. This often happens
# when the user try to use an ancient version of a tool on
# a file that requires a minimum version. In this case we
# we should proceed has if the program had been absent, or
# if --run hadn't been passed.
if test $? = 63; then
run=:
msg="probably too old"
fi
;;
-h|--h|--he|--hel|--help)
echo "\
$0 [OPTION]... PROGRAM [ARGUMENT]...
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
error status if there is no known handling for PROGRAM.
Options:
-h, --help display this help and exit
-v, --version output version information and exit
--run try to run the given command, and emulate it if it fails
Supported PROGRAM values:
aclocal touch file \`aclocal.m4'
autoconf touch file \`configure'
autoheader touch file \`config.h.in'
automake touch all \`Makefile.in' files
bison create \`y.tab.[ch]', if possible, from existing .[ch]
flex create \`lex.yy.c', if possible, from existing .c
help2man touch the output file
lex create \`lex.yy.c', if possible, from existing .c
makeinfo touch the output file
tar try tar, gnutar, gtar, then tar without non-portable flags
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
Send bug reports to <bug-automake@gnu.org>."
exit 0
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
echo "missing $scriptversion (GNU Automake)"
exit 0
;;
-*)
echo 1>&2 "$0: Unknown \`$1' option"
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
;;
esac
# Now exit if we have it, but it failed. Also exit now if we
# don't have it and --version was passed (most likely to detect
# the program).
case "$1" in
lex|yacc)
# Not GNU programs, they don't have --version.
;;
tar)
if test -n "$run"; then
echo 1>&2 "ERROR: \`tar' requires --run"
exit 1
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
exit 1
fi
;;
*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
# Could not run --version or --help. This is probably someone
# running `$TOOL --version' or `$TOOL --help' to check whether
# $TOOL exists and not knowing $TOOL uses missing.
exit 1
fi
;;
esac
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
case "$1" in
aclocal*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
to install the \`Automake' and \`Perl' packages. Grab them from
any GNU archive site."
touch aclocal.m4
;;
autoconf)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`${configure_ac}'. You might want to install the
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
archive site."
touch configure
;;
autoheader)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`acconfig.h' or \`${configure_ac}'. You might want
to install the \`Autoconf' and \`GNU m4' packages. Grab them
from any GNU archive site."
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
test -z "$files" && files="config.h"
touch_files=
for f in $files; do
case "$f" in
*:*) touch_files="$touch_files "`echo "$f" |
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
*) touch_files="$touch_files $f.in";;
esac
done
touch $touch_files
;;
automake*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
You might want to install the \`Automake' and \`Perl' packages.
Grab them from any GNU archive site."
find . -type f -name Makefile.am -print |
sed 's/\.am$/.in/' |
while read f; do touch "$f"; done
;;
autom4te)
echo 1>&2 "\
WARNING: \`$1' is needed, but is $msg.
You might have modified some files without having the
proper tools for further handling them.
You can get \`$1' as part of \`Autoconf' from any GNU
archive site."
file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
if test -f "$file"; then
touch $file
else
test -z "$file" || exec >$file
echo "#! /bin/sh"
echo "# Created by GNU Automake missing as a replacement of"
echo "# $ $@"
echo "exit 0"
chmod +x $file
exit 1
fi
;;
bison|yacc)
echo 1>&2 "\
WARNING: \`$1' $msg. You should only need it if
you modified a \`.y' file. You may need the \`Bison' package
in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h
if [ $# -ne 1 ]; then
eval LASTARG="\${$#}"
case "$LASTARG" in
*.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.c
fi
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.h
fi
;;
esac
fi
if [ ! -f y.tab.h ]; then
echo >y.tab.h
fi
if [ ! -f y.tab.c ]; then
echo 'main() { return 0; }' >y.tab.c
fi
;;
lex|flex)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.l' file. You may need the \`Flex' package
in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site."
rm -f lex.yy.c
if [ $# -ne 1 ]; then
eval LASTARG="\${$#}"
case "$LASTARG" in
*.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" lex.yy.c
fi
;;
esac
fi
if [ ! -f lex.yy.c ]; then
echo 'main() { return 0; }' >lex.yy.c
fi
;;
help2man)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a dependency of a manual page. You may need the
\`Help2man' package in order for those modifications to take
effect. You can get \`Help2man' from any GNU archive site."
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
fi
if [ -f "$file" ]; then
touch $file
else
test -z "$file" || exec >$file
echo ".ab help2man is required to generate this page"
exit 1
fi
;;
makeinfo)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.texi' or \`.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy \`make' (AIX,
DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site."
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
fi
touch $file
;;
tar)
shift
# We have already tried tar in the generic part.
# Look for gnutar/gtar before invocation to avoid ugly error
# messages.
if (gnutar --version > /dev/null 2>&1); then
gnutar "$@" && exit 0
fi
if (gtar --version > /dev/null 2>&1); then
gtar "$@" && exit 0
fi
firstarg="$1"
if shift; then
case "$firstarg" in
*o*)
firstarg=`echo "$firstarg" | sed s/o//`
tar "$firstarg" "$@" && exit 0
;;
esac
case "$firstarg" in
*h*)
firstarg=`echo "$firstarg" | sed s/h//`
tar "$firstarg" "$@" && exit 0
;;
esac
fi
echo 1>&2 "\
WARNING: I can't seem to be able to run \`tar' with the given arguments.
You may want to install GNU tar or Free paxutils, or check the
command line arguments."
exit 1
;;
*)
echo 1>&2 "\
WARNING: \`$1' is needed, and is $msg.
You might have modified some files without having the
proper tools for further handling them. Check the \`README' file,
it often tells you about the needed prerequisites for installing
this package. You may also peek at any GNU archive site, in case
some other package would contain this missing \`$1' program."
exit 1
;;
esac
exit 0
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:

View File

@@ -1,56 +1,31 @@
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
scriptversion=2004-02-15.20
# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# Public domain.
#
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
# Public domain
# $Id$
errstatus=0
dirmode=""
usage="\
Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
Create each directory DIR (with mode MODE, if specified), including all
leading file name components.
Report bugs to <bug-automake@gnu.org>."
Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
# process command line arguments
while test $# -gt 0 ; do
case $1 in
-h | --help | --h*) # -h for help
echo "$usage"
exit 0
;;
-m) # -m PERM arg
shift
test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
dirmode=$1
shift
;;
--version)
echo "$0 $scriptversion"
exit 0
;;
--) # stop option processing
shift
break
;;
-*) # unknown option
echo "$usage" 1>&2
exit 1
;;
*) # first non-opt arg
break
;;
esac
case "${1}" in
-h | --help | --h* ) # -h for help
echo "${usage}" 1>&2; exit 0 ;;
-m ) # -m PERM arg
shift
test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
dirmode="${1}"
shift ;;
-- ) shift; break ;; # stop option processing
-* ) echo "${usage}" 1>&2; exit 1 ;; # unknown option
* ) break ;; # first non-opt arg
esac
done
for file
@@ -63,88 +38,64 @@ do
done
case $# in
0) exit 0 ;;
0) exit 0 ;;
esac
# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and
# mkdir -p a/c at the same time, both will detect that a is missing,
# one will create a, then the other will try to create a and die with
# a "File exists" error. This is a problem when calling mkinstalldirs
# from a parallel make. We use --version in the probe to restrict
# ourselves to GNU mkdir, which is thread-safe.
case $dirmode in
'')
if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
# echo "mkdir -p -- $*"
exec mkdir -p -- "$@"
else
# On NextStep and OpenStep, the `mkdir' command does not
# recognize any option. It will interpret all options as
# directories to create, and then abort because `.' already
# exists.
test -d ./-p && rmdir ./-p
test -d ./--version && rmdir ./--version
fi
;;
*)
if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
test ! -d ./--version; then
# echo "mkdir -m $dirmode -p -- $*"
exec mkdir -m "$dirmode" -p -- "$@"
else
# Clean up after NextStep and OpenStep mkdir.
for d in ./-m ./-p ./--version "./$dirmode";
do
test -d $d && rmdir $d
done
fi
;;
'')
if mkdir -p -- . 2>/dev/null; then
echo "mkdir -p -- $*"
exec mkdir -p -- "$@"
fi ;;
*)
if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
echo "mkdir -m $dirmode -p -- $*"
exec mkdir -m "$dirmode" -p -- "$@"
fi ;;
esac
for file
do
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
shift
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
shift
pathcomp=
for d
do
pathcomp="$pathcomp$d"
case $pathcomp in
-*) pathcomp=./$pathcomp ;;
esac
pathcomp=
for d
do
pathcomp="$pathcomp$d"
case "$pathcomp" in
-* ) pathcomp=./$pathcomp ;;
esac
if test ! -d "$pathcomp"; then
# echo "mkdir $pathcomp"
if test ! -d "$pathcomp"; then
echo "mkdir $pathcomp"
mkdir "$pathcomp" || lasterr=$?
mkdir "$pathcomp" || lasterr=$?
if test ! -d "$pathcomp"; then
errstatus=$lasterr
else
if test ! -z "$dirmode"; then
# echo "chmod $dirmode $pathcomp"
lasterr=""
chmod "$dirmode" "$pathcomp" || lasterr=$?
if test ! -d "$pathcomp"; then
errstatus=$lasterr
else
if test ! -z "$dirmode"; then
echo "chmod $dirmode $pathcomp"
if test ! -z "$lasterr"; then
errstatus=$lasterr
lasterr=""
chmod "$dirmode" "$pathcomp" || lasterr=$?
if test ! -z "$lasterr"; then
errstatus=$lasterr
fi
fi
fi
fi
fi
fi
pathcomp="$pathcomp/"
done
pathcomp="$pathcomp/"
done
done
exit $errstatus
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# sh-indentation: 3
# End:
# mkinstalldirs ends here

View File

@@ -1,58 +0,0 @@
#!/bin/sh
# This includes the Bourne shell library from llvm-top. Since this file is
# generally only used when building from llvm-top, it is safe to assume that
# llvm is checked out into llvm-top in which case .. just works.
. ../library.sh
# Process the options passed in to us by the build script into standard
# variables.
process_arguments "$@"
# See if we have previously been configured by sensing the presence
# of the config.status scripts
if test ! -x "config.status" ; then
# We must configure so build a list of configure options
config_options="--prefix=$PREFIX --with-llvmgccdir=$PREFIX"
if test "$OPTIMIZED" -eq 1 ; then
config_options="$config_options --enable-optimized"
else
config_options="$config_options --disable-optimized"
fi
if test "$DEBUG" -eq 1 ; then
config_options="$config_options --enable-debug"
else
config_options="$config_options --disable-debug"
fi
if test "$ASSERTIONS" -eq 1 ; then
config_options="$config_options --enable-assertions"
else
config_options="$config_options --disable-assertions"
fi
if test "$CHECKING" -eq 1 ; then
config_options="$config_options --enable-expensive-checks"
else
config_options="$config_options --disable-expensive-checks"
fi
if test "$DOXYGEN" -eq 1 ; then
config_options="$config_options --enable-doxygen"
else
config_options="$config_options --disable-doxygen"
fi
if test "$THREADS" -eq 1 ; then
config_options="$config_options --enable-threads"
else
config_options="$config_options --disable-threads"
fi
config_options="$config_options $OPTIONS_DASH $OPTIONS_DASH_DASH"
msg 0 Configuring $module with:
msg 0 " ./configure" $config_options
$LLVM_TOP/llvm/configure $config_options || \
die $? "Configuring llvm module failed"
else
msg 0 Module $module already configured, ignoring configure options.
fi
msg 0 Building $module with:
msg 0 " make" $OPTIONS_ASSIGN tools-only
make $OPTIONS_ASSIGN tools-only

31709
llvm/configure vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,614 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>LLVM Bitcode File Format</title>
<link rel="stylesheet" href="llvm.css" type="text/css">
</head>
<body>
<div class="doc_title"> LLVM Bitcode File Format </div>
<ol>
<li><a href="#abstract">Abstract</a></li>
<li><a href="#overview">Overview</a></li>
<li><a href="#bitstream">Bitstream Format</a>
<ol>
<li><a href="#magic">Magic Numbers</a></li>
<li><a href="#primitives">Primitives</a></li>
<li><a href="#abbrevid">Abbreviation IDs</a></li>
<li><a href="#blocks">Blocks</a></li>
<li><a href="#datarecord">Data Records</a></li>
<li><a href="#abbreviations">Abbreviations</a></li>
<li><a href="#stdblocks">Standard Blocks</a></li>
</ol>
</li>
<li><a href="#llvmir">LLVM IR Encoding</a>
<ol>
<li><a href="#basics">Basics</a></li>
</ol>
</li>
</ol>
<div class="doc_author">
<p>Written by <a href="mailto:sabre@nondot.org">Chris Lattner</a>.
</p>
</div>
<!-- *********************************************************************** -->
<div class="doc_section"> <a name="abstract">Abstract</a></div>
<!-- *********************************************************************** -->
<div class="doc_text">
<p>This document describes the LLVM bitstream file format and the encoding of
the LLVM IR into it.</p>
</div>
<!-- *********************************************************************** -->
<div class="doc_section"> <a name="overview">Overview</a></div>
<!-- *********************************************************************** -->
<div class="doc_text">
<p>
What is commonly known as the LLVM bitcode file format (also, sometimes
anachronistically known as bytecode) is actually two things: a <a
href="#bitstream">bitstream container format</a>
and an <a href="#llvmir">encoding of LLVM IR</a> into the container format.</p>
<p>
The bitstream format is an abstract encoding of structured data, very
similar to XML in some ways. Like XML, bitstream files contain tags, and nested
structures, and you can parse the file without having to understand the tags.
Unlike XML, the bitstream format is a binary encoding, and unlike XML it
provides a mechanism for the file to self-describe "abbreviations", which are
effectively size optimizations for the content.</p>
<p>This document first describes the LLVM bitstream format, then describes the
record structure used by LLVM IR files.
</p>
</div>
<!-- *********************************************************************** -->
<div class="doc_section"> <a name="bitstream">Bitstream Format</a></div>
<!-- *********************************************************************** -->
<div class="doc_text">
<p>
The bitstream format is literally a stream of bits, with a very simple
structure. This structure consists of the following concepts:
</p>
<ul>
<li>A "<a href="#magic">magic number</a>" that identifies the contents of
the stream.</li>
<li>Encoding <a href="#primitives">primitives</a> like variable bit-rate
integers.</li>
<li><a href="#blocks">Blocks</a>, which define nested content.</li>
<li><a href="#datarecord">Data Records</a>, which describe entities within the
file.</li>
<li>Abbreviations, which specify compression optimizations for the file.</li>
</ul>
<p>Note that the <a
href="CommandGuide/html/llvm-bcanalyzer.html">llvm-bcanalyzer</a> tool can be
used to dump and inspect arbitrary bitstreams, which is very useful for
understanding the encoding.</p>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection"><a name="magic">Magic Numbers</a>
</div>
<div class="doc_text">
<p>The first four bytes of the stream identify the encoding of the file. This
is used by a reader to know what is contained in the file.</p>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection"><a name="primitives">Primitives</a>
</div>
<div class="doc_text">
<p>
A bitstream literally consists of a stream of bits. This stream is made up of a
number of primitive values that encode a stream of unsigned integer values.
These
integers are are encoded in two ways: either as <a href="#fixedwidth">Fixed
Width Integers</a> or as <a href="#variablewidth">Variable Width
Integers</a>.
</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection"> <a name="fixedwidth">Fixed Width Integers</a>
</div>
<div class="doc_text">
<p>Fixed-width integer values have their low bits emitted directly to the file.
For example, a 3-bit integer value encodes 1 as 001. Fixed width integers
are used when there are a well-known number of options for a field. For
example, boolean values are usually encoded with a 1-bit wide integer.
</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection"> <a name="variablewidth">Variable Width
Integers</a></div>
<div class="doc_text">
<p>Variable-width integer (VBR) values encode values of arbitrary size,
optimizing for the case where the values are small. Given a 4-bit VBR field,
any 3-bit value (0 through 7) is encoded directly, with the high bit set to
zero. Values larger than N-1 bits emit their bits in a series of N-1 bit
chunks, where all but the last set the high bit.</p>
<p>For example, the value 27 (0x1B) is encoded as 1011 0011 when emitted as a
vbr4 value. The first set of four bits indicates the value 3 (011) with a
continuation piece (indicated by a high bit of 1). The next word indicates a
value of 24 (011 << 3) with no continuation. The sum (3+24) yields the value
27.
</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection"> <a name="char6">6-bit characters</a></div>
<div class="doc_text">
<p>6-bit characters encode common characters into a fixed 6-bit field. They
represent the following characters with the following 6-bit values:</p>
<ul>
<li>'a' .. 'z' - 0 .. 25</li>
<li>'A' .. 'Z' - 26 .. 52</li>
<li>'0' .. '9' - 53 .. 61</li>
<li>'.' - 62</li>
<li>'_' - 63</li>
</ul>
<p>This encoding is only suitable for encoding characters and strings that
consist only of the above characters. It is completely incapable of encoding
characters not in the set.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection"> <a name="wordalign">Word Alignment</a></div>
<div class="doc_text">
<p>Occasionally, it is useful to emit zero bits until the bitstream is a
multiple of 32 bits. This ensures that the bit position in the stream can be
represented as a multiple of 32-bit words.</p>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection"><a name="abbrevid">Abbreviation IDs</a>
</div>
<div class="doc_text">
<p>
A bitstream is a sequential series of <a href="#blocks">Blocks</a> and
<a href="#datarecord">Data Records</a>. Both of these start with an
abbreviation ID encoded as a fixed-bitwidth field. The width is specified by
the current block, as described below. The value of the abbreviation ID
specifies either a builtin ID (which have special meanings, defined below) or
one of the abbreviation IDs defined by the stream itself.
</p>
<p>
The set of builtin abbrev IDs is:
</p>
<ul>
<li>0 - <a href="#END_BLOCK">END_BLOCK</a> - This abbrev ID marks the end of the
current block.</li>
<li>1 - <a href="#ENTER_SUBBLOCK">ENTER_SUBBLOCK</a> - This abbrev ID marks the
beginning of a new block.</li>
<li>2 - <a href="#DEFINE_ABBREV">DEFINE_ABBREV</a> - This defines a new
abbreviation.</li>
<li>3 - <a href="#UNABBREV_RECORD">UNABBREV_RECORD</a> - This ID specifies the
definition of an unabbreviated record.</li>
</ul>
<p>Abbreviation IDs 4 and above are defined by the stream itself, and specify
an <a href="#abbrev_records">abbreviated record encoding</a>.</p>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection"><a name="blocks">Blocks</a>
</div>
<div class="doc_text">
<p>
Blocks in a bitstream denote nested regions of the stream, and are identified by
a content-specific id number (for example, LLVM IR uses an ID of 12 to represent
function bodies). Nested blocks capture the hierachical structure of the data
encoded in it, and various properties are associated with blocks as the file is
parsed. Block definitions allow the reader to efficiently skip blocks
in constant time if the reader wants a summary of blocks, or if it wants to
efficiently skip data they do not understand. The LLVM IR reader uses this
mechanism to skip function bodies, lazily reading them on demand.
</p>
<p>
When reading and encoding the stream, several properties are maintained for the
block. In particular, each block maintains:
</p>
<ol>
<li>A current abbrev id width. This value starts at 2, and is set every time a
block record is entered. The block entry specifies the abbrev id width for
the body of the block.</li>
<li>A set of abbreviations. Abbreviations may be defined within a block, or
they may be associated with all blocks of a particular ID.
</li>
</ol>
<p>As sub blocks are entered, these properties are saved and the new sub-block
has its own set of abbreviations, and its own abbrev id width. When a sub-block
is popped, the saved values are restored.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection"> <a name="ENTER_SUBBLOCK">ENTER_SUBBLOCK
Encoding</a></div>
<div class="doc_text">
<p><tt>[ENTER_SUBBLOCK, blockid<sub>vbr8</sub>, newabbrevlen<sub>vbr4</sub>,
&lt;align32bits&gt;, blocklen<sub>32</sub>]</tt></p>
<p>
The ENTER_SUBBLOCK abbreviation ID specifies the start of a new block record.
The <tt>blockid</tt> value is encoded as a 8-bit VBR identifier, and indicates
the type of block being entered (which is application specific). The
<tt>newabbrevlen</tt> value is a 4-bit VBR which specifies the
abbrev id width for the sub-block. The <tt>blocklen</tt> is a 32-bit aligned
value that specifies the size of the subblock, in 32-bit words. This value
allows the reader to skip over the entire block in one jump.
</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection"> <a name="END_BLOCK">END_BLOCK
Encoding</a></div>
<div class="doc_text">
<p><tt>[END_BLOCK, &lt;align32bits&gt;]</tt></p>
<p>
The END_BLOCK abbreviation ID specifies the end of the current block record.
Its end is aligned to 32-bits to ensure that the size of the block is an even
multiple of 32-bits.</p>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection"><a name="datarecord">Data Records</a>
</div>
<div class="doc_text">
<p>
Data records consist of a record code and a number of (up to) 64-bit integer
values. The interpretation of the code and values is application specific and
there are multiple different ways to encode a record (with an unabbrev record
or with an abbreviation). In the LLVM IR format, for example, there is a record
which encodes the target triple of a module. The code is MODULE_CODE_TRIPLE,
and the values of the record are the ascii codes for the characters in the
string.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection"> <a name="UNABBREV_RECORD">UNABBREV_RECORD
Encoding</a></div>
<div class="doc_text">
<p><tt>[UNABBREV_RECORD, code<sub>vbr6</sub>, numops<sub>vbr6</sub>,
op0<sub>vbr6</sub>, op1<sub>vbr6</sub>, ...]</tt></p>
<p>An UNABBREV_RECORD provides a default fallback encoding, which is both
completely general and also extremely inefficient. It can describe an arbitrary
record, by emitting the code and operands as vbrs.</p>
<p>For example, emitting an LLVM IR target triple as an unabbreviated record
requires emitting the UNABBREV_RECORD abbrevid, a vbr6 for the
MODULE_CODE_TRIPLE code, a vbr6 for the length of the string (which is equal to
the number of operands), and a vbr6 for each character. Since there are no
letters with value less than 32, each letter would need to be emitted as at
least a two-part VBR, which means that each letter would require at least 12
bits. This is not an efficient encoding, but it is fully general.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection"> <a name="abbrev_records">Abbreviated Record
Encoding</a></div>
<div class="doc_text">
<p><tt>[&lt;abbrevid&gt;, fields...]</tt></p>
<p>An abbreviated record is a abbreviation id followed by a set of fields that
are encoded according to the <a href="#abbreviations">abbreviation
definition</a>. This allows records to be encoded significantly more densely
than records encoded with the <a href="#UNABBREV_RECORD">UNABBREV_RECORD</a>
type, and allows the abbreviation types to be specified in the stream itself,
which allows the files to be completely self describing. The actual encoding
of abbreviations is defined below.
</p>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection"><a name="abbreviations">Abbreviations</a>
</div>
<div class="doc_text">
<p>
Abbreviations are an important form of compression for bitstreams. The idea is
to specify a dense encoding for a class of records once, then use that encoding
to emit many records. It takes space to emit the encoding into the file, but
the space is recouped (hopefully plus some) when the records that use it are
emitted.
</p>
<p>
Abbreviations can be determined dynamically per client, per file. Since the
abbreviations are stored in the bitstream itself, different streams of the same
format can contain different sets of abbreviations if the specific stream does
not need it. As a concrete example, LLVM IR files usually emit an abbreviation
for binary operators. If a specific LLVM module contained no or few binary
operators, the abbreviation does not need to be emitted.
</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection"><a name="DEFINE_ABBREV">DEFINE_ABBREV
Encoding</a></div>
<div class="doc_text">
<p><tt>[DEFINE_ABBREV, numabbrevops<sub>vbr5</sub>, abbrevop0, abbrevop1,
...]</tt></p>
<p>An abbreviation definition consists of the DEFINE_ABBREV abbrevid followed
by a VBR that specifies the number of abbrev operands, then the abbrev
operands themselves. Abbreviation operands come in three forms. They all start
with a single bit that indicates whether the abbrev operand is a literal operand
(when the bit is 1) or an encoding operand (when the bit is 0).</p>
<ol>
<li>Literal operands - <tt>[1<sub>1</sub>, litvalue<sub>vbr8</sub>]</tt> -
Literal operands specify that the value in the result
is always a single specific value. This specific value is emitted as a vbr8
after the bit indicating that it is a literal operand.</li>
<li>Encoding info without data - <tt>[0<sub>1</sub>, encoding<sub>3</sub>]</tt>
- Operand encodings that do not have extra data are just emitted as their code.
</li>
<li>Encoding info with data - <tt>[0<sub>1</sub>, encoding<sub>3</sub>,
value<sub>vbr5</sub>]</tt> - Operand encodings that do have extra data are
emitted as their code, followed by the extra data.
</li>
</ol>
<p>The possible operand encodings are:</p>
<ul>
<li>1 - Fixed - The field should be emitted as a <a
href="#fixedwidth">fixed-width value</a>, whose width
is specified by the encoding operand.</li>
<li>2 - VBR - The field should be emitted as a <a
href="#variablewidth">variable-width value</a>, whose width
is specified by the encoding operand.</li>
<li>3 - Array - This field is an array of values. The element type of the array
is specified by the next encoding operand.</li>
<li>4 - Char6 - This field should be emitted as a <a href="#char6">char6-encoded
value</a>.</li>
</ul>
<p>For example, target triples in LLVM modules are encoded as a record of the
form <tt>[TRIPLE, 'a', 'b', 'c', 'd']</tt>. Consider if the bitstream emitted
the following abbrev entry:</p>
<ul>
<li><tt>[0, Fixed, 4]</tt></li>
<li><tt>[0, Array]</tt></li>
<li><tt>[0, Char6]</tt></li>
</ul>
<p>When emitting a record with this abbreviation, the above entry would be
emitted as:</p>
<p><tt>[4<sub>abbrevwidth</sub>, 2<sub>4</sub>, 4<sub>vbr6</sub>,
0<sub>6</sub>, 1<sub>6</sub>, 2<sub>6</sub>, 3<sub>6</sub>]</tt></p>
<p>These values are:</p>
<ol>
<li>The first value, 4, is the abbreviation ID for this abbreviation.</li>
<li>The second value, 2, is the code for TRIPLE in LLVM IR files.</li>
<li>The third value, 4, is the length of the array.</li>
<li>The rest of the values are the char6 encoded values for "abcd".</li>
</ol>
<p>With this abbreviation, the triple is emitted with only 37 bits (assuming a
abbrev id width of 3). Without the abbreviation, significantly more space would
be required to emit the target triple. Also, since the TRIPLE value is not
emitted as a literal in the abbreviation, the abbreviation can also be used for
any other string value.
</p>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection"><a name="stdblocks">Standard Blocks</a>
</div>
<div class="doc_text">
<p>
In addition to the basic block structure and record encodings, the bitstream
also defines specific builtin block types. These block types specify how the
stream is to be decoded or other metadata. In the future, new standard blocks
may be added.
</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection"><a name="BLOCKINFO">#0 - BLOCKINFO
Block</a></div>
<div class="doc_text">
<p>The BLOCKINFO block allows the description of metadata for other blocks. The
currently specified records are:</p>
<ul>
<li><tt>[SETBID (#1), blockid]</tt></li>
<li><tt>[DEFINE_ABBREV, ...]</tt></li>
</ul>
<p>
The SETBID record indicates which block ID is being described. The standard
DEFINE_ABBREV record specifies an abbreviation. The abbreviation is associated
with the record ID, and any records with matching ID automatically get the
abbreviation.
</p>
</div>
<!-- *********************************************************************** -->
<div class="doc_section"> <a name="llvmir">LLVM IR Encoding</a></div>
<!-- *********************************************************************** -->
<div class="doc_text">
<p>LLVM IR is encoded into a bitstream by defining blocks and records. It uses
blocks for things like constant pools, functions, symbol tables, etc. It uses
records for things like instructions, global variable descriptors, type
descriptions, etc. This document does not describe the set of abbreviations
that the writer uses, as these are fully self-described in the file, and the
reader is not allowed to build in any knowledge of this.</p>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection"><a name="basics">Basics</a>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection"><a name="ir_magic">LLVM IR Magic Number</a></div>
<div class="doc_text">
<p>
The magic number for LLVM IR files is:
</p>
<p><tt>['B'<sub>8</sub>, 'C'<sub>8</sub>, 0x0<sub>4</sub>, 0xC<sub>4</sub>,
0xE<sub>4</sub>, 0xD<sub>4</sub>]</tt></p>
<p>When viewed as bytes, this is "BC 0xC0DE".</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection"><a name="ir_signed_vbr">Signed VBRs</a></div>
<div class="doc_text">
<p>
<a href="#variablewidth">Variable Width Integers</a> are an efficient way to
encode arbitrary sized unsigned values, but is an extremely inefficient way to
encode signed values (as signed values are otherwise treated as maximally large
unsigned values).</p>
<p>As such, signed vbr values of a specific width are emitted as follows:</p>
<ul>
<li>Positive values are emitted as vbrs of the specified width, but with their
value shifted left by one.</li>
<li>Negative values are emitted as vbrs of the specified width, but the negated
value is shifted left by one, and the low bit is set.</li>
</ul>
<p>With this encoding, small positive and small negative values can both be
emitted efficiently.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection"><a name="ir_blocks">LLVM IR Blocks</a></div>
<div class="doc_text">
<p>
LLVM IR is defined with the following blocks:
</p>
<ul>
<li>8 - MODULE_BLOCK - This is the top-level block that contains the
entire module, and describes a variety of per-module information.</li>
<li>9 - PARAMATTR_BLOCK - This enumerates the parameter attributes.</li>
<li>10 - TYPE_BLOCK - This describes all of the types in the module.</li>
<li>11 - CONSTANTS_BLOCK - This describes constants for a module or
function.</li>
<li>12 - FUNCTION_BLOCK - This describes a function body.</li>
<li>13 - TYPE_SYMTAB_BLOCK - This describes the type symbol table.</li>
<li>14 - VALUE_SYMTAB_BLOCK - This describes a value symbol table.</li>
</ul>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection"><a name="MODULE_BLOCK">MODULE_BLOCK Contents</a>
</div>
<div class="doc_text">
<p>
</p>
</div>
<!-- *********************************************************************** -->
<hr>
<address> <a href="http://jigsaw.w3.org/css-validator/check/referer"><img
src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"></a>
<a href="http://validator.w3.org/check/referer"><img
src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!"></a>
<a href="mailto:sabre@nondot.org">Chris Lattner</a><br>
<a href="http://llvm.org">The LLVM Compiler Infrastructure</a><br>
Last modified: $Date$
</address>
</body>
</html>

View File

@@ -1,244 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>LLVM bugpoint tool: design and usage</title>
<link rel="stylesheet" href="llvm.css" type="text/css">
</head>
<div class="doc_title">
LLVM bugpoint tool: design and usage
</div>
<ul>
<li><a href="#desc">Description</a></li>
<li><a href="#design">Design Philosophy</a>
<ul>
<li><a href="#autoselect">Automatic Debugger Selection</a></li>
<li><a href="#crashdebug">Crash debugger</a></li>
<li><a href="#codegendebug">Code generator debugger</a></li>
<li><a href="#miscompilationdebug">Miscompilation debugger</a></li>
</ul></li>
<li><a href="#advice">Advice for using <tt>bugpoint</tt></a></li>
</ul>
<div class="doc_author">
<p>Written by <a href="mailto:sabre@nondot.org">Chris Lattner</a></p>
</div>
<!-- *********************************************************************** -->
<div class="doc_section">
<a name="desc">Description</a>
</div>
<!-- *********************************************************************** -->
<div class="doc_text">
<p><tt>bugpoint</tt> narrows down the source of problems in LLVM tools and
passes. It can be used to debug three types of failures: optimizer crashes,
miscompilations by optimizers, or bad native code generation (including problems
in the static and JIT compilers). It aims to reduce large test cases to small,
useful ones. For example, if <tt>opt</tt> crashes while optimizing a
file, it will identify the optimization (or combination of optimizations) that
causes the crash, and reduce the file down to a small example which triggers the
crash.</p>
<p>For detailed case scenarios, such as debugging <tt>opt</tt>,
<tt>llvm-ld</tt>, or one of the LLVM code generators, see <a
href="HowToSubmitABug.html">How To Submit a Bug Report document</a>.</p>
</div>
<!-- *********************************************************************** -->
<div class="doc_section">
<a name="design">Design Philosophy</a>
</div>
<!-- *********************************************************************** -->
<div class="doc_text">
<p><tt>bugpoint</tt> is designed to be a useful tool without requiring any
hooks into the LLVM infrastructure at all. It works with any and all LLVM
passes and code generators, and does not need to "know" how they work. Because
of this, it may appear to do stupid things or miss obvious
simplifications. <tt>bugpoint</tt> is also designed to trade off programmer
time for computer time in the compiler-debugging process; consequently, it may
take a long period of (unattended) time to reduce a test case, but we feel it
is still worth it. Note that <tt>bugpoint</tt> is generally very quick unless
debugging a miscompilation where each test of the program (which requires
executing it) takes a long time.</p>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection">
<a name="autoselect">Automatic Debugger Selection</a>
</div>
<div class="doc_text">
<p><tt>bugpoint</tt> reads each <tt>.bc</tt> or <tt>.ll</tt> file specified on
the command line and links them together into a single module, called the test
program. If any LLVM passes are specified on the command line, it runs these
passes on the test program. If any of the passes crash, or if they produce
malformed output (which causes the verifier to abort), <tt>bugpoint</tt> starts
the <a href="#crashdebug">crash debugger</a>.</p>
<p>Otherwise, if the <tt>-output</tt> option was not specified,
<tt>bugpoint</tt> runs the test program with the C backend (which is assumed to
generate good code) to generate a reference output. Once <tt>bugpoint</tt> has
a reference output for the test program, it tries executing it with the
selected code generator. If the selected code generator crashes,
<tt>bugpoint</tt> starts the <a href="#crashdebug">crash debugger</a> on the
code generator. Otherwise, if the resulting output differs from the reference
output, it assumes the difference resulted from a code generator failure, and
starts the <a href="#codegendebug">code generator debugger</a>.</p>
<p>Finally, if the output of the selected code generator matches the reference
output, <tt>bugpoint</tt> runs the test program after all of the LLVM passes
have been applied to it. If its output differs from the reference output, it
assumes the difference resulted from a failure in one of the LLVM passes, and
enters the <a href="#miscompilationdebug">miscompilation debugger</a>.
Otherwise, there is no problem <tt>bugpoint</tt> can debug.</p>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection">
<a name="crashdebug">Crash debugger</a>
</div>
<div class="doc_text">
<p>If an optimizer or code generator crashes, <tt>bugpoint</tt> will try as hard
as it can to reduce the list of passes (for optimizer crashes) and the size of
the test program. First, <tt>bugpoint</tt> figures out which combination of
optimizer passes triggers the bug. This is useful when debugging a problem
exposed by <tt>opt</tt>, for example, because it runs over 38 passes.</p>
<p>Next, <tt>bugpoint</tt> tries removing functions from the test program, to
reduce its size. Usually it is able to reduce a test program to a single
function, when debugging intraprocedural optimizations. Once the number of
functions has been reduced, it attempts to delete various edges in the control
flow graph, to reduce the size of the function as much as possible. Finally,
<tt>bugpoint</tt> deletes any individual LLVM instructions whose absence does
not eliminate the failure. At the end, <tt>bugpoint</tt> should tell you what
passes crash, give you a bitcode file, and give you instructions on how to
reproduce the failure with <tt>opt</tt> or <tt>llc</tt>.</p>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection">
<a name="codegendebug">Code generator debugger</a>
</div>
<div class="doc_text">
<p>The code generator debugger attempts to narrow down the amount of code that
is being miscompiled by the selected code generator. To do this, it takes the
test program and partitions it into two pieces: one piece which it compiles
with the C backend (into a shared object), and one piece which it runs with
either the JIT or the static LLC compiler. It uses several techniques to
reduce the amount of code pushed through the LLVM code generator, to reduce the
potential scope of the problem. After it is finished, it emits two bitcode
files (called "test" [to be compiled with the code generator] and "safe" [to be
compiled with the C backend], respectively), and instructions for reproducing
the problem. The code generator debugger assumes that the C backend produces
good code.</p>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection">
<a name="miscompilationdebug">Miscompilation debugger</a>
</div>
<div class="doc_text">
<p>The miscompilation debugger works similarly to the code generator debugger.
It works by splitting the test program into two pieces, running the
optimizations specified on one piece, linking the two pieces back together, and
then executing the result. It attempts to narrow down the list of passes to
the one (or few) which are causing the miscompilation, then reduce the portion
of the test program which is being miscompiled. The miscompilation debugger
assumes that the selected code generator is working properly.</p>
</div>
<!-- *********************************************************************** -->
<div class="doc_section">
<a name="advice">Advice for using bugpoint</a>
</div>
<!-- *********************************************************************** -->
<div class="doc_text">
<tt>bugpoint</tt> can be a remarkably useful tool, but it sometimes works in
non-obvious ways. Here are some hints and tips:<p>
<ol>
<li>In the code generator and miscompilation debuggers, <tt>bugpoint</tt> only
works with programs that have deterministic output. Thus, if the program
outputs <tt>argv[0]</tt>, the date, time, or any other "random" data,
<tt>bugpoint</tt> may misinterpret differences in these data, when output,
as the result of a miscompilation. Programs should be temporarily modified
to disable outputs that are likely to vary from run to run.
<li>In the code generator and miscompilation debuggers, debugging will go
faster if you manually modify the program or its inputs to reduce the
runtime, but still exhibit the problem.
<li><tt>bugpoint</tt> is extremely useful when working on a new optimization:
it helps track down regressions quickly. To avoid having to relink
<tt>bugpoint</tt> every time you change your optimization however, have
<tt>bugpoint</tt> dynamically load your optimization with the
<tt>-load</tt> option.
<li><p><tt>bugpoint</tt> can generate a lot of output and run for a long period
of time. It is often useful to capture the output of the program to file.
For example, in the C shell, you can run:</p>
<div class="doc_code">
<p><tt>bugpoint ... |&amp; tee bugpoint.log</tt></p>
</div>
<p>to get a copy of <tt>bugpoint</tt>'s output in the file
<tt>bugpoint.log</tt>, as well as on your terminal.</p>
<li><tt>bugpoint</tt> cannot debug problems with the LLVM linker. If
<tt>bugpoint</tt> crashes before you see its "All input ok" message,
you might try <tt>llvm-link -v</tt> on the same set of input files. If
that also crashes, you may be experiencing a linker bug.
<li>If your program is <b>supposed</b> to crash, <tt>bugpoint</tt> will be
confused. One way to deal with this is to cause bugpoint to ignore the exit
code from your program, by giving it the <tt>-check-exit-code=false</tt>
option.
<li><tt>bugpoint</tt> is useful for proactively finding bugs in LLVM.
Invoking <tt>bugpoint</tt> with the <tt>-find-bugs</tt> option will cause
the list of specified optimizations to be randomized and applied to the
program. This process will repeat until a bug is found or the user
kills <tt>bugpoint</tt>.
</ol>
</div>
<!-- *********************************************************************** -->
<hr>
<address>
<a href="http://jigsaw.w3.org/css-validator/check/referer"><img
src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"></a>
<a href="http://validator.w3.org/check/referer"><img
src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!"></a>
<a href="mailto:sabre@nondot.org">Chris Lattner</a><br>
<a href="http://llvm.org">LLVM Compiler Infrastructure</a><br>
Last modified: $Date$
</address>
</body>
</html>

View File

@@ -1,97 +1,166 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="llvm.css" type="text/css" media="screen">
<title>Building the LLVM C/C++ Front-End</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" href="llvm.css" type="text/css" media="screen" />
<title>Bootstrapping the C/C++ Front-End</title>
</head>
<body>
<div class="doc_title">
Building the LLVM C/C++ Front-End
Bootstrapping the C/C++ Front-End
</div>
<ol>
<li><a href="#instructions">Building llvm-gcc 4 from Source</a></li>
<li><a href="#license">License Information</a></li>
</ol>
<p>This document is intended to explain the process of building the LLVM
C/C++ front-end, based on GCC 3.4, from source.</p>
<div class="doc_author">
<p>Written by the LLVM Team</p>
</div>
<p><b>NOTE:</b> This is currently a somewhat fragile, error-prone
process, and you should only try to do it if
<ul>
<li>(A) you really, really, really can't use the binaries we distribute
<li>(B) you need GCC to fix some of the header files on your system
<li>(C) you are an elite GCC hacker.</p>
</ul>
<p>We welcome patches to help make this process simpler.</p>
<!-- *********************************************************************** -->
<div class="doc_section">
<a name="instructions">Building llvm-gcc 4 from Source</a>
<a name="instructions">Instructions</a>
</div>
<!-- *********************************************************************** -->
<div class="doc_text">
<p>This section describes how to aquire and build llvm-gcc4, which is based on
the GCC 4.0.1 front-end. This front-end supports C, C++, Objective-C, and
Objective-C++. Note that the instructions for building this front-end are
completely different (and much easier!) than those for building llvm-gcc3 in
the past.</p>
<p>
<ol>
<li><p>Retrieve the appropriate llvm-gcc4-x.y.source.tar.gz archive from the
<a href="http://llvm.org/releases/">llvm web site</a>.</p>
<p>It is also possible to download the sources of the llvm-gcc4 front end
from a read-only mirror using subversion. To check out the code the
first time use:</p>
<div class="doc_code">
<li><p>Configure and build the LLVM libraries and tools using:</p>
<pre>
svn co http://llvm.org/svn/llvm-project/llvm-gcc-4.0/trunk <i>dst-directory</i>
% cd llvm
% ./configure [options...]
% gmake tools-only
</pre>
</div>
<p>The use of the non-default target "tools-only" means that the
LLVM tools and libraries will build, and the binaries will be
deposited in llvm/tools/Debug, but the runtime (bytecode)
libraries will not build.</p></li>
<p>After that, the code can be be updated in the destination directory
using:</p>
<li><p>Add the directory containing the tools to your PATH.</p>
<pre>
% set path = ( `cd llvm/tools/Debug &amp;&amp; pwd` $path )
</pre></li>
<div class="doc_code">
<pre>svn update</pre>
</div>
<li><p>Unpack the C/C++ front-end source into cfrontend/src.</p></li>
<p>The mirror is brought up to date every evening.</p></li>
<li><p>Edit src/configure. Change the first line (starting w/ #!) to
contain the correct full pathname of sh.</p></li>
<li>Follow the directions in the top-level <tt>README.LLVM</tt> file for
up-to-date instructions on how to build llvm-gcc4.</li>
<li><p>Make "build" and "install" directories as siblings of the "src"
tree.</p>
<pre>
% pwd
/usr/local/example/cfrontend/src
% cd ..
% mkdir build install
% set CFEINSTALL = `pwd`/install
</pre></li>
<li><p>Configure, build and install the C front-end:</p>
<pre>
% cd build
% ../src/configure --prefix=$CFEINSTALL --disable-nls --disable-shared \
--enable-languages=c,c++
% gmake all-gcc
% setenv LLVM_LIB_SEARCH_PATH `pwd`/gcc
% gmake all; gmake install
</pre>
<p><b>Common Problem:</b> You may get error messages regarding the fact
that LLVM does not support inline assembly. Here are two common
fixes:</p>
<ul>
<li><p><b>Fix 1:</b> If you have system header files that include
inline assembly, you may have to modify them to remove the inline
assembly, and install the modified versions in
<code>$CFEINSTALL/<i>target-triplet</i>/sys-include</code>.</p></li>
<li><b>Fix 2:</b> If you are building the C++ front-end on a CPU we
haven't tried yet, you will probably have to edit the appropriate
version of atomicity.h under
<code>src/libstdc++-v3/config/cpu/<i>name-of-cpu</i>/atomicity.h</code>
and apply a patch so that it does not use inline assembly.</p></li>
</ul>
<p><b>Porting to a new architecture:</b> If you are porting the new front-end
to a new architecture, or compiling in a different configuration that we have
previously, there are probably several changes you will have to make to the GCC
target to get it to work correctly. These include:<p>
<ul>
<li>Often targets include special or assembler linker flags which
<tt>gccas</tt>/<tt>gccld</tt> does not understand. In general, these can
just be removed.</li>
<li>LLVM currently does not support any floating point values other than
32-bit and 64-bit IEEE floating point. The primary effect of this is
that you may have to map "long double" onto "double".</li>
<li>The profiling hooks in GCC do not apply at all to the LLVM front-end.
These may need to be disabled.</li>
<li>No inline assembly for position independent code. At the LLVM level,
everything is position independent.</li>
<li>We handle <tt>.init</tt> and <tt>.fini</tt> differently.</li>
<li>You may have to disable multilib support in your target. Using multilib
support causes the GCC compiler driver to add a lot of "<tt>-L</tt>"
options to the link line, which do not relate to LLVM and confuse
<tt>gccld</tt>. To disable multilibs, delete any
<tt>MULTILIB_OPTIONS</tt> lines from your target files.</li>
<li>Did we mention that we don't support inline assembly? You'll probably
have to add some fixinclude hacks to disable it in the system
headers.</li>
</ul>
</li>
<li><p>Go back into the LLVM source tree proper. Edit Makefile.config
to redefine <code>LLVMGCCDIR</code> to the full pathname of the
<code>$CFEINSTALL</code> directory, which is the directory you just
installed the C front-end into. (The ./configure script is likely to
have set this to a directory which does not exist on your system.)</p></li>
<li><p>If you edited header files during the C/C++ front-end build as
described in "Fix 1" above, you must now copy those header files from
<code>$CFEINSTALL/<i>target-triplet</i>/sys-include</code> to
<code>$CFEINSTALL/lib/gcc/<i>target-triplet</i>/3.4-llvm/include</code>.
(This should be the "include" directory in the same directory as the
libgcc.a library, which you can find by running
<code>$CFEINSTALL/bin/gcc --print-libgcc-file-name</code>.)</p></li>
<li><p>Build and install the runtime (bytecode) libraries by running:</p>
<pre>
% gmake -C runtime
% mkdir $CFEINSTALL/bytecode-libs
% gmake -C runtime install
% setenv LLVM_LIB_SEARCH_PATH $CFEINSTALL/bytecode-libs
</pre></li>
<li><p>Test the newly-installed C frontend by one or more of the
following means:</p>
<ul>
<li> compiling and running a "hello, LLVM" program in C and C++.</li>
<li> running the tests under <tt>test/Programs</tt> using <code>gmake -C
test/Programs</code></li>
</ul>
</p>
</li>
</ol>
</div>
<!-- *********************************************************************** -->
<div class="doc_section">
<a name="license">License Information</a>
</div>
<div class="doc_text">
<p>
The LLVM GCC frontend is licensed to you under the GNU General Public License
and the GNU Lesser General Public License. Please see the files COPYING and
COPYING.LIB for more details.
</p>
<p>
More information is <a href="FAQ.html#license">available in the FAQ</a>.
</p>
</div>
<!-- *********************************************************************** -->
<hr>
<address>
<a href="http://jigsaw.w3.org/css-validator/check/referer"><img
src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"></a>
<a href="http://validator.w3.org/check/referer"><img
src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!"></a>
<a href="http://llvm.org">LLVM Compiler Infrastructure</a><br>
Last modified: $Date$
</address>
<hr><font size="-1">
<address><a href="mailto:gaeke -at- uiuc.edu">Brian Gaeke</a></address>
<a href="http://llvm.cs.uiuc.edu">The LLVM Compiler Infrastructure</a>
<br>
Last modified: $Date$
</font>
</body>
</html>

15
llvm/docs/ChrisNotes.txt Normal file
View File

@@ -0,0 +1,15 @@
* Rewrite the llvm parser/lexer in http://www.antlr.org when time permits.
They actually do C++. Imagine that.
* Need a way to attach bytecode block info at various levels of asm code.
* Recognize and save comments in assembly and bytecode format
* Encode line number table in bytecode (like #line), optional table
* Encode negative relative offsets in the bytecode file
* Apparently bison has a %pure_parser option. Maybe useful for AsmParser
* Implement the following derived types:
* "packed format", like this: [4 x sbyte]: Packed SIMD datatype
* Bytecode reader should use extensions that may or may not be linked into the
application to read blocks. Thus an easy way to ignore symbol table info
would be to not link in that reader into the app.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,101 +0,0 @@
##===- docs/CommandGuide/Makefile --------------------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file was developed by the LLVM research group and is distributed under
# the University of Illinois Open Source License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
ifdef BUILD_FOR_WEBSITE
# This special case is for keeping the CommandGuide on the LLVM web site
# up to date automatically as the documents are checked in. It must build
# the POD files to HTML only and keep them in the src directories. It must also
# build in an unconfigured tree, hence the ifdef. To use this, run
# make -s BUILD_FOR_WEBSITE=1 inside the cvs commit script.
POD := $(wildcard *.pod)
HTML := $(patsubst %.pod, html/%.html, $(POD))
MAN := $(patsubst %.pod, man/man1/%.1, $(POD))
PS := $(patsubst %.pod, ps/%.ps, $(POD))
all: $(HTML) $(MAN) $(PS)
.SUFFIXES:
.SUFFIXES: .html .pod .1 .ps
html/%.html: %.pod
pod2html --css=manpage.css --htmlroot=. \
--podpath=. --noindex --infile=$< --outfile=$@ --title=$*
man/man1/%.1: %.pod
pod2man --release=CVS --center="LLVM Command Guide" $< $@
ps/%.ps: man/man1/%.1
groff -Tps -man $< > $@
clean:
rm -f pod2htm*.*~~ $(HTML) $(MAN) $(PS)
else
LEVEL := ../..
include $(LEVEL)/Makefile.common
POD := $(wildcard $(PROJ_SRC_DIR)/*.pod)
EXTRA_DIST := $(POD) index.html
HTML = $(patsubst $(PROJ_SRC_DIR)/%.pod, $(PROJ_OBJ_DIR)/%.html, $(POD))
MAN = $(patsubst $(PROJ_SRC_DIR)/%.pod, $(PROJ_OBJ_DIR)/%.1, $(POD))
PS = $(patsubst $(PROJ_SRC_DIR)/%.pod, $(PROJ_OBJ_DIR)/%.ps, $(POD))
.SUFFIXES:
.SUFFIXES: .html .pod .1 .ps
$(HTML) : html/.dir man/.dir man/man1/.dir ps/.dir
html: $(HTML)
$(PROJ_OBJ_DIR)/%.html: %.pod
$(POD2HTML) --css=manpage.css --htmlroot=. --podpath=. \
--noindex --infile=$< --outfile=$@ --title=$*
$(PROJ_OBJ_DIR)/%.1: %.pod
$(POD2MAN) --release=$(LLVMVersion) \
--center="LLVM Command Guide" $< $@
$(PROJ_OBJ_DIR)/%.ps: $(PROJ_OBJ_DIR)/%.1
$(GROFF) -Tps -man $< > $@
clean-local::
$(Verb) $(RM) -f pod2htm*.*~~ $(HTML) $(MAN) $(PS)
HTML_DIR := $(PROJ_docsdir)/html/CommandGuide
MAN_DIR := $(PROJ_mandir)/man1
PS_DIR := $(PROJ_docsdir)/ps
install-local:: $(HTML) $(MAN) $(PS)
$(Echo) Installing HTML CommandGuide Documentation
$(Verb) $(MKDIR) $(HTML_DIR)
$(Verb) $(DataInstall) $(HTML) $(HTML_DIR)
$(Verb) $(DataInstall) $(PROJ_SRC_DIR)/index.html $(HTML_DIR)
$(Verb) $(DataInstall) $(PROJ_SRC_DIR)/manpage.css $(HTML_DIR)
$(Echo) Installing MAN CommandGuide Documentation
$(Verb) $(MKDIR) $(MAN_DIR)
$(Verb) $(DataInstall) $(MAN) $(MAN_DIR)
$(Echo) Installing PS CommandGuide Documentation
$(Verb) $(MKDIR) $(PS_DIR)
$(Verb) $(DataInstall) $(PS) $(PS_DIR)
uninstall-local::
$(Echo) Uninstalling Documentation
$(Verb) $(RM) -rf $(LLVM_DOCSDIR)
printvars::
$(Echo) "POD : " '$(POD)'
$(Echo) "HTML : " '$(HTML)'
endif

View File

@@ -0,0 +1,81 @@
<html>
<title>
LLVM: analyze tool
</title>
<body bgcolor=white>
<center><h1>LLVM: <tt>analyze</tt> tool</h1></center>
<HR>
<h3>NAME</h3>
<tt>analyze</tt>
<h3>SYNOPSIS</h3>
<tt>analyze [options] [filename]</tt>
<h3>DESCRIPTION</h3>
The <tt>analyze</tt> command performs various analysis of LLVM assembly code or
bytecode. It will usually print the results on standard output, but in a few
cases, it will print output to standard error or generate a file with the
analysis output (which is usually done when the output is meant for another
program).
<p>
If filename is omitted or is -, <tt>analyze</tt> reads its input from standard
input. It first attempts to interpret its input as LLVM bytecode. If it
encounters an error, it then attempts to parse the input as LLVM assembly
language.
<h3>OPTIONS</h3>
<ul>
<li> -help
<br>
Print a summary of command line options.
<p>
<li> -stats
<br>
Print statistics.
<p>
<li> -time-passes
<br>
Record the amount of time needed for each pass and print it to standard
error.
<p>
<li> -q
<br>
Quiet mode. With this option, analysis pass names are not printed.
<p>
<li> -load &lt;plugin.so&gt;
<br>
Load the specified dynamic object with name plugin.so. This file
should contain additional analysis passes that register themselves with
the <tt>analyze</tt> program after being loaded.
<p>
After being loaded, additional command line options are made available
for running the passes made available by plugin.so. Use
'<tt><tt>analyze</tt> -load &lt;plugin.so&gt; -help</tt>' to see the new
list of available analysis passes.
<p>
</ul>
<h3>EXIT STATUS</h3>
If <tt>analyze</tt> succeeds, it will exit with 0. Otherwise, if an error
occurs, it will exit with a non-zero value.
<h3>SEE ALSO</h3>
<a href="opt.html"><tt>opt</tt></a>
<HR>
Maintained by the <a href="http://llvm.cs.uiuc.edu">LLVM Team</a>.
</body>
</html>

View File

@@ -0,0 +1,228 @@
<html>
<title>LLVM: bugpoint tool</title>
<body bgcolor=white>
<center><h1>LLVM: <tt>bugpoint</tt> tool</h1></center>
<HR>
<h3>NAME</h3>
<tt>bugpoint</tt>
<h3>SYNOPSIS</h3>
<tt>bugpoint [options] [input LLVM ll/bc files] [LLVM passes] --args &lt;program arguments&gt;...</tt>
<img src="../Debugging.gif" width=444 height=314 align=right>
<h3>DESCRIPTION</h3>
The <tt>bugpoint</tt> tool narrows down the source of
problems in LLVM tools and passes. It can be used to debug three types of
failures: optimizer crashes, miscompilations by optimizers, or invalid native
code generation. It aims to reduce large test cases to small, useful ones.
For example,
if <tt><a href="gccas.html">gccas</a></tt> crashes while optimizing a file, it
will identify the optimization (or combination of optimizations) that causes the
crash, and reduce the file down to a small example which triggers the crash.<p>
<a name="designphilosophy">
<h4>Design Philosophy</h4>
<tt>bugpoint</tt> is designed to be a useful tool without requiring any
hooks into the LLVM infrastructure at all. It works with any and all LLVM
passes and code generators, and does not need to "know" how they work. Because
of this, it may appear to do a lot of stupid things or miss obvious
simplifications. <tt>bugpoint</tt> is also designed to trade off programmer
time for computer time in the compiler-debugging process; consequently, it may
take a long period of (unattended) time to reduce a test case, but we feel it
is still worth it. :-) <p>
<a name="automaticdebuggerselection">
<h4>Automatic Debugger Selection</h4>
<tt>bugpoint</tt> reads each <tt>.bc</tt> or <tt>.ll</tt> file
specified on the command line and links them together into a single module,
called the test program. If any LLVM passes are
specified on the command line, it runs these passes on the test program. If
any of the passes crash, or if they produce malformed output,
<tt>bugpoint</tt> starts the <a href="#crashdebug">crash debugger</a>.<p>
Otherwise, if the <a href="#opt_output"><tt>-output</tt></a> option was not
specified, <tt>bugpoint</tt> runs the test program with the C backend (which
is assumed to generate good code) to generate a reference output. Once
<tt>bugpoint</tt> has a reference output for the test program, it tries
executing it
with the <a href="#opt_run-">selected</a> code generator. If
the resulting output differs from the reference output, it assumes the
difference resulted from a code generator failure, and starts the
<a href="#codegendebug">code generator debugger</a>.<p>
Otherwise, <tt>bugpoint</tt> runs the test program after all of the LLVM passes
have been applied to it. If its output differs from the reference output,
it assumes the difference resulted from a failure in one of the LLVM passes,
and enters the
<a href="#miscompilationdebug">miscompilation debugger</a>. Otherwise,
there is no problem <tt>bugpoint</tt> can debug.<p>
<a name="crashdebug">
<h4>Crash debugger</h4>
If an optimizer crashes, <tt>bugpoint</tt> will try as hard as it can to
reduce the list of passes and the size of the test program. First,
<tt>bugpoint</tt> figures out which combination of passes triggers the bug. This
is useful when debugging a problem exposed by <tt>gccas</tt>, for example,
because it runs over 25 optimizations.<p>
Next, <tt>bugpoint</tt> tries removing functions from the test program, to
reduce its
size. Usually it is able to reduce a test program
to a single function, when debugging intraprocedural optimizations. Once the
number of
functions has been reduced, it attempts to delete various edges in the control
flow graph, to reduce the size of the function as much as possible. Finally,
<tt>bugpoint</tt> deletes any individual LLVM instructions whose absence does
not eliminate the failure. At the end, <tt>bugpoint</tt> should tell you what
passes crash, give you a bytecode file, and give you instructions on how to
reproduce the failure with <tt><a href="opt.html">opt</a></tt> or
<tt><a href="analyze.html">analyze</a></tt>.<p>
<a name="codegendebug">
<h4>Code generator debugger</h4>
The code generator debugger attempts to narrow down the amount of code that is
being miscompiled by the <a href="#opt_run-">selected</a> code generator. To do
this, it takes the test program and partitions it into two pieces: one piece
which it compiles with the C backend (into a shared object), and one piece which
it runs with either the JIT or the static LLC compiler. It uses several
techniques to reduce the amount of code pushed through the LLVM code generator,
to reduce the potential scope of the problem. After it is finished, it emits
two bytecode files (called "test" [to be compiled with the code generator] and
"safe" [to be compiled with the C backend] respectively), and instructions for
reproducing the problem. The code generator debugger assumes that the C
backend produces good code.<p>
If you are using the code generator debugger and get an error message that
says "UNSUPPORTED: external function used as a global initializer!", try using
the <tt>-run-llc</tt> option instead of the <tt>-run-jit</tt> option. This is
due to an unimplemented feature in the code generator debugger.<p>
<a name="miscompilationdebug">
<h4>Miscompilation debugger</h4>
The miscompilation debugger works similarly to the code generator
debugger. It works by splitting the test program into two pieces, running the
optimizations specified on one piece, linking the two pieces back together,
and then executing the result.
It attempts to narrow down the list of passes to the one (or few) which are
causing the miscompilation, then reduce the portion of the test program which is
being miscompiled. The miscompilation debugger assumes that the selected
code generator is working properly.<p>
<a name="bugpoint notes">
<h4>Advice for using <tt>bugpoint</tt></h4>
<tt>bugpoint</tt> can be a remarkably useful tool, but it sometimes works in
non-obvious ways. Here are some hints and tips:<p>
<ol>
<li>In the code generator and miscompilation debuggers, <tt>bugpoint</tt> only
works with programs that have deterministic output. Thus, if the program
outputs the date, time, or any other "random" data, <tt>bugpoint</tt> may
misinterpret differences in these data, when output, as the result of a
miscompilation. Programs should be temporarily modified to disable
outputs that are likely to vary from run to run.
<li>In the code generator and miscompilation debuggers, debugging will go
faster if you manually modify the program or its inputs to reduce the
runtime, but still exhibit the problem.
<li><tt>bugpoint</tt> is extremely useful when working on a new optimization:
it helps track down regressions quickly. To avoid having to relink
<tt>bugpoint</tt> every time you change your optimization however, have
<tt>bugpoint</tt> dynamically load your optimization with the <a
href="#opt_load"><tt>-load</tt></a> option.
<li><tt>bugpoint</tt> can generate a lot of output and run for a long period of
time. It is often useful to capture the output of the program to file. For
example, in the C shell, you can type:<br>
<tt>bugpoint ..... |&amp; tee bugpoint.log</tt>
<br>to get a copy of <tt>bugpoint</tt>'s output in the file
<tt>bugpoint.log</tt>, as well as on your terminal.
<li><tt>bugpoint</tt> cannot debug problems with the linker. If
<tt>bugpoint</tt> crashes before you see its "All input ok" message,
you might try <tt>llvm-link -v</tt> on the same set of input files. If
that also crashes, you may be experiencing a linker bug.
</ol>
<h3>OPTIONS</h3>
<ul>
<li><tt>-additional-so &lt;library.so&gt;</tt><br>
Load <tt>&lt;library.so&gt;</tt> into the test program whenever it is run.
This is useful if you are debugging programs which depend on non-LLVM
libraries (such as the X or curses libraries) to run.<p>
<li><tt>-args &lt;program args&gt;</tt><br>
Pass all arguments specified after <tt>-args</tt> to the
test program whenever it runs. Note that if any of
the <tt>&lt;program args&gt;</tt> start with a '-', you should use:
<p>
<tt>bugpoint &lt;bugpoint args&gt; -args -- &lt;program args&gt;</tt>
<p>
The "<tt>--</tt>" right after the <tt>-args</tt> option tells
<tt>bugpoint</tt> to consider any options starting with <tt>-</tt> to be
part of the <tt>-args</tt> option, not as options to <tt>bugpoint</tt>
itself.<p>
<li><tt>-disable-{adce,dce,final-cleanup,simplifycfg}</tt><br>
Do not run the specified passes to clean up and reduce the size of the
test program. By default, <tt>bugpoint</tt> uses these passes internally
when attempting to reduce test programs. If you're trying to find
a bug in one of these passes, <tt>bugpoint</tt> may crash.<p>
<li> <tt>-help</tt><br>
Print a summary of command line options.<p>
<a name="opt_input"><li><tt>-input &lt;filename&gt;</tt><br>
Open <tt>&lt;filename&gt;</tt> and redirect the standard input of the
test program, whenever it runs, to come from that file.
<p>
<a name="opt_load"><li> <tt>-load &lt;plugin.so&gt;</tt><br>
Load the dynamic object <tt>&lt;plugin.so&gt;</tt> into <tt>bugpoint</tt>
itself. This object should register new
optimization passes. Once loaded, the object will add new command line
options to enable various optimizations. To see the new complete list
of optimizations, use the -help and -load options together:
<p>
<tt>bugpoint -load &lt;plugin.so&gt; -help</tt>
<p>
<a name="opt_output"><li><tt>-output &lt;filename&gt;</tt><br>
Whenever the test program produces output on its standard output
stream, it should match the contents of <tt>&lt;filename&gt;</tt>
(the "reference output"). If you do not use this option,
<tt>bugpoint</tt> will attempt to generate a reference output by
compiling the program with the C backend and running it.<p>
<a name="opt_run-"><li><tt>-run-{int,jit,llc,cbe}</tt><br>
Whenever the test program is compiled, <tt>bugpoint</tt> should generate
code for it using the specified code generator. These options allow
you to choose the interpreter, the JIT compiler, the static native
code compiler, or the C backend, respectively.<p>
</ul>
<h3>EXIT STATUS</h3>
If <tt>bugpoint</tt> succeeds in finding a problem, it will exit with 0.
Otherwise, if an error occurs, it will exit with a non-zero value.
<h3>SEE ALSO</h3>
<a href="opt.html"><tt>opt</tt></a>,
<a href="analyze.html"><tt>analyze</tt></a>
<HR>
Maintained by the <a href="http://llvm.cs.uiuc.edu">LLVM Team</a>.
</body>
</html>

View File

@@ -1,134 +0,0 @@
=pod
=head1 NAME
bugpoint - automatic test case reduction tool
=head1 SYNOPSIS
B<bugpoint> [I<options>] [I<input LLVM ll/bc files>] [I<LLVM passes>] B<--args>
I<program arguments>
=head1 DESCRIPTION
B<bugpoint> narrows down the source of problems in LLVM tools and passes. It
can be used to debug three types of failures: optimizer crashes, miscompilations
by optimizers, or bad native code generation (including problems in the static
and JIT compilers). It aims to reduce large test cases to small, useful ones.
For more information on the design and inner workings of B<bugpoint>, as well as
advice for using bugpoint, see F<llvm/docs/Bugpoint.html> in the LLVM
distribution.
=head1 OPTIONS
=over
=item B<--additional-so> F<library>
Load the dynamic shared object F<library> into the test program whenever it is
run. This is useful if you are debugging programs which depend on non-LLVM
libraries (such as the X or curses libraries) to run.
=item B<--args> I<program args>
Pass all arguments specified after -args to the test program whenever it runs.
Note that if any of the I<program args> start with a '-', you should use:
bugpoint [bugpoint args] --args -- [program args]
The "--" right after the B<--args> option tells B<bugpoint> to consider any
options starting with C<-> to be part of the B<--args> option, not as options to
B<bugpoint> itself.
=item B<--tool-args> I<tool args>
Pass all arguments specified after --tool-args to the LLVM tool under test
(B<llc>, B<lli>, etc.) whenever it runs. You should use this option in the
following way:
bugpoint [bugpoint args] --tool-args -- [tool args]
The "--" right after the B<--tool-args> option tells B<bugpoint> to consider any
options starting with C<-> to be part of the B<--tool-args> option, not as
options to B<bugpoint> itself. (See B<--args>, above.)
=item B<--check-exit-code>=I<{true,false}>
Assume a non-zero exit code or core dump from the test program is a failure.
Defaults to true.
=item B<--disable-{dce,simplifycfg}>
Do not run the specified passes to clean up and reduce the size of the test
program. By default, B<bugpoint> uses these passes internally when attempting to
reduce test programs. If you're trying to find a bug in one of these passes,
B<bugpoint> may crash.
=item B<--enable-valgrind>
Use valgrind to find faults in the optimization phase. This will allow
bugpoint to find otherwise asymptomatic problems caused by memory
mis-management.
=item B<-find-bugs>
Continually randomize the specified passes and run them on the test program
until a bug is found or the user kills B<bugpoint>.
=item B<--help>
Print a summary of command line options.
=item B<--input> F<filename>
Open F<filename> and redirect the standard input of the test program, whenever
it runs, to come from that file.
=item B<--load> F<plugin>
Load the dynamic object F<plugin> into B<bugpoint> itself. This object should
register new optimization passes. Once loaded, the object will add new command
line options to enable various optimizations. To see the new complete list of
optimizations, use the B<--help> and B<--load> options together; for example:
bugpoint --load myNewPass.so --help
=item B<--mlimit> F<megabytes>
Specifies an upper limit on memory usage of the optimization and codegen. Set
to zero to disable the limit.
=item B<--output> F<filename>
Whenever the test program produces output on its standard output stream, it
should match the contents of F<filename> (the "reference output"). If you
do not use this option, B<bugpoint> will attempt to generate a reference output
by compiling the program with the C backend and running it.
=item B<--profile-info-file> F<filename>
Profile file loaded by B<--profile-loader>.
=item B<--run-{int,jit,llc,cbe}>
Whenever the test program is compiled, B<bugpoint> should generate code for it
using the specified code generator. These options allow you to choose the
interpreter, the JIT compiler, the static native code compiler, or the C
backend, respectively.
=back
=head1 EXIT STATUS
If B<bugpoint> succeeds in finding a problem, it will exit with 0. Otherwise,
if an error occurs, it will exit with a non-zero value.
=head1 SEE ALSO
L<opt|opt>
=head1 AUTHOR
Maintained by the LLVM Team (L<http://llvm.org>).
=cut

View File

@@ -0,0 +1,70 @@
<html>
<title>
LLVM: extract tool
</title>
<body bgcolor=white>
<center>
<h1>LLVM: <tt>extract</tt> tool</h1>
</center>
<HR>
<h3>NAME</h3>
<tt>extract</tt>
<h3>
SYNOPSIS
</h3>
<tt>extract [options] [filename]</tt>
<h3>
DESCRIPTION
</h3>
The <tt>extract</tt> command takes the name of a function and extracts it from
the specified LLVM bytecode file. It is primarily used as a debugging tool to
reduce test cases from larger programs that are triggering a bug.
<p>
In addition to extracting the bytecode of the specified function,
<tt>extract</tt> will also remove unreachable global variables, prototypes, and
unused types.
<p>
The <tt>extract</tt> command reads its input from standard input if filename is
omitted or if filename is -. The output is always written to standard output.
<h3>
OPTIONS
</h3>
<ul>
<li>-func &lt;function&gt;
<br>
Extract the specified function from the LLVM bytecode.
<p>
<li> -help
<br>
Print a summary of command line options.
<p>
</ul>
<h3>
EXIT STATUS
</h3>
If <tt>extract</tt> succeeds, it will exit with 0. Otherwise, if an error
occurs, it will exit with a non-zero value.
<h3>
SEE ALSO
</h3>
<a href="bugpoint.html"><tt>bugpoint</tt></a>
<HR>
Maintained by the <a href="http://llvm.cs.uiuc.edu">LLVM Team</a>.
</body>
</html>

View File

@@ -0,0 +1,79 @@
<html>
<title>LLVM: gccas tool</title>
<body bgcolor=white>
<center>
<h1>LLVM: <tt>gccas</tt> tool</h1>
</center>
<HR>
<h3>NAME</h3>
<tt>gccas</tt>
<h3>SYNOPSIS</h3>
<tt>gccas [options] &lt; filename&gt;</tt>
<h3>DESCRIPTION</h3>
The <tt>gccas</tt> utility takes an LLVM assembly file generated by the <a
href="llvmgcc.html">C</a> or <a href="llvmgxx.html">C++</a> frontends and
converts it into an LLVM bytecode file. It is primarily used by the GCC front
end, and as such, attempts to mimic the interface provided by the default system
assembler so that it can act as a "drop-in" replacement.<p>
<tt>gccas</tt> performs a number of optimizations on the input program.<p>
<h3>
OPTIONS
</h3>
<ul>
<li> -help
<br>
Print a summary of command line options.
<p>
<li> -o &lt;filename&gt;
<br>
Specify the output filename which will hold the assembled bytecode.
<p>
<li>-disable-inlining
<br>
Disable the inlining pass. By default, it is enabled.
<p>
<li> -stats
<br>
Print statistics.
<p>
<li> -time-passes
<br>
Record the amount of time needed for each pass and print it to standard
error.
<p>
<li> -verify
<br>
Verify each pass result.
<p>
</ul>
<h3>
EXIT STATUS
</h3>
If <tt>gccas</tt> succeeds, it will exit with 0. Otherwise, if an error occurs,
it will exit with a non-zero value.
<h3>SEE ALSO</h3>
<a href="llvm-as.html"><tt>llvm-as</tt></a>
<a href="gccld.html"><tt>gccld</tt></a>
<HR>
Maintained by the <a href="http://llvm.cs.uiuc.edu">LLVM Team</a>.
</body>
</html>

View File

@@ -0,0 +1,180 @@
<html>
<title>LLVM: gccld tool</title>
<body bgcolor=white>
<center><h1>LLVM: <tt>gccld</tt> tool</h1></center>
<HR>
<h3>NAME</h3>
<tt>gccld</tt>
<h3>SYNOPSIS</h3>
<tt>gccld [options] &lt; filename&gt; [ filename ...]</tt>
<h3>DESCRIPTION</h3>
The <tt>gccld</tt> utility takes a set of LLVM bytecode files and links them
together into a single LLVM bytecode file. The output bytecode file can be
another bytecode library or an executable bytecode program. Using additional
options, <tt>gccld</tt> is able to produce native code executables.
<p>
The <tt>gccld</tt> utility is primarily used by the <a href="llvmgcc.html">C</a>
and <a href="llvmgxx.html">C++</a> front-ends, and as such, attempts to mimic
the interface provided by the default system linker so that it can act as a
"drop-in" replacement.
<p>
The <tt>gccld</tt> tool performs a small set of interprocedural, post-link,
optimizations on the program.
<h4>Search Order</h4>
When looking for objects specified on the command line, <tt>gccld</tt> will
search for the object first in the current directory and then in the directory
specified by the <tt>LLVM_LIB_SEARCH_PATH</tt> environment variable. If it
cannot find the object, it fails.
<p>
When looking for a library specified with the -l option, <tt>gccld</tt> first
attempts to load a file with that name from the current directory. If that
fails, it looks for lib&lt;library&gt;.bc, lib&lt;library&gt;.a, or
lib&lt;library&gt;.so, in that order, in each directory added to the library
search path with the -L option. These directories are searched in order they
were specified. If the library cannot be located, then <tt>gccld</tt> looks in
the directory specified by the <tt>LLVM_LIB_SEARCH_PATH</tt> environment
variable. If it does not find lib&lt;library&gt;.[bc | a | so] there, it fails.
The -L option is global. It does not matter where it is specified in the list
of command line arguments; the directory is simply added to the search path and
is applied to all libraries, preceding or succeeding, in the command line.
<h4>Link order</h4>
All object files are linked first in the order they were specified on the
command line. All library files are linked next. Some libraries may not be
linked into the object program; see below.
<h4>Library Linkage</h4>
Object files and static bytecode objects are always linked into the output
file. Library archives (.a files) load only the objects within the archive
that define symbols needed by the output file. Hence, libraries should be
listed after the object files and libraries which need them; otherwise, the
library may not be linked in, and the dependent library will not have its
undefined symbols defined.
<h4>Native code generation</h4>
The <tt>gccld</tt> program has limited support for native code generation, when
using the -native option.
<h3>OPTIONS</h3>
<ul>
<li> -help
<br>
Print a summary of command line options.
<p>
<li> -o &lt;filename&gt;
<br>
Specify the output filename which will hold the linked bytecode.
<p>
<li> -stats
<br>
Print statistics.
<p>
<li> -time-passes
<br>
Record the amount of time needed for each pass and print it to standard
error.
<p>
<li> -verify
<br>
Verify each pass result.
<p>
<li> -L=&lt;directory&gt;
<br>
Add directory to the list of directories to search when looking for
libraries.
<p>
<li> -disable-internalize
<br>
Do not mark all symbols as internal.
<p>
<li> -internalize-public-api-file &lt;filename&gt;
<br>
Preserve the list of symbol names in the file filename.
<p>
<li> -internalize-public-api-list &lt;list&gt;
<br>
Preserve the symbol names in list.
<p>
<li> -l=&lt;library&gt;
<br>
Specify libraries to include when linking the output file. When
linking, <tt>gccld</tt> will first attempt to load a file with the
pathname library. If that fails, it will then attempt to load
lib&lt;library&gt;.bc, lib&lt;library&gt;.a, and lib&lt;library&gt;.so,
in that order.
<p>
<li> -link-as-library
<br>
Link the .bc files together as a library, not an executable.
<p>
<li> -native
<br>
Generate a native, machine code executable.
<p>
When generating native executables, <tt>gccld</tt> first checks for a bytecode
version of the library and links it in, if necessary. If the library is
missing, <tt>gccld</tt> skips it. Then, <tt>gccld</tt> links in the same
libraries as native code.
<p>
In this way, <tt>gccld</tt> should be able to link in optimized bytecode
subsets of common libraries and then link in any part of the library that
hasn't been converted to bytecode.
<p>
<li> -s
<br>
Strip symbol information from the generated executable.
<p>
<li> -v
<br>
Print information about actions taken.
</ul>
<h3>EXIT STATUS</h3>
If <tt>gccld</tt> succeeds, it will exit with 0. Otherwise, if an error occurs,
it will exit with a non-zero value.
<h3>SEE ALSO</h3>
<a href="llvm-link.html"><tt>llvm-link</tt></a>
<a href="gccas.html"><tt>gccas</tt></a>
<h3>BUGS</h3>
The -L option cannot be used for find native code libraries when using the
-native option.
<HR>
Maintained by the <a href="http://llvm.cs.uiuc.edu">LLVM Team</a>.
</body>
</html>

View File

@@ -1,256 +0,0 @@
/* Based on http://www.perldoc.com/css/perldoc.css */
@import url("../llvm.css");
body { font-family: Arial,Helvetica; }
blockquote { margin: 10pt; }
h1, a { color: #336699; }
/*** Top menu style ****/
.mmenuon {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #ff6600; font-size: 10pt;
}
.mmenuoff {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #ffffff; font-size: 10pt;
}
.cpyright {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #ffffff; font-size: xx-small;
}
.cpyrightText {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #ffffff; font-size: xx-small;
}
.sections {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #336699; font-size: 11pt;
}
.dsections {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #336699; font-size: 12pt;
}
.slink {
font-family: Arial,Helvetica; font-weight: normal; text-decoration: none;
color: #000000; font-size: 9pt;
}
.slink2 { font-family: Arial,Helvetica; text-decoration: none; color: #336699; }
.maintitle {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #336699; font-size: 18pt;
}
.dblArrow {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #336699; font-size: small;
}
.menuSec {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #336699; font-size: small;
}
.newstext {
font-family: Arial,Helvetica; font-size: small;
}
.linkmenu {
font-family: Arial,Helvetica; color: #000000; font-weight: bold;
text-decoration: none;
}
P {
font-family: Arial,Helvetica;
}
PRE {
font-size: 10pt;
}
.quote {
font-family: Times; text-decoration: none;
color: #000000; font-size: 9pt; font-style: italic;
}
.smstd { font-family: Arial,Helvetica; color: #000000; font-size: x-small; }
.std { font-family: Arial,Helvetica; color: #000000; }
.meerkatTitle {
font-family: sans-serif; font-size: x-small; color: black; }
.meerkatDescription { font-family: sans-serif; font-size: 10pt; color: black }
.meerkatCategory {
font-family: sans-serif; font-size: 9pt; font-weight: bold; font-style: italic;
color: brown; }
.meerkatChannel {
font-family: sans-serif; font-size: 9pt; font-style: italic; color: brown; }
.meerkatDate { font-family: sans-serif; font-size: xx-small; color: #336699; }
.tocTitle {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #333333; font-size: 10pt;
}
.toc-item {
font-family: Arial,Helvetica; font-weight: bold;
color: #336699; font-size: 10pt; text-decoration: underline;
}
.perlVersion {
font-family: Arial,Helvetica; font-weight: bold;
color: #336699; font-size: 10pt; text-decoration: none;
}
.podTitle {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #000000;
}
.docTitle {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #000000; font-size: 10pt;
}
.dotDot {
font-family: Arial,Helvetica; font-weight: bold;
color: #000000; font-size: 9pt;
}
.docSec {
font-family: Arial,Helvetica; font-weight: normal;
color: #333333; font-size: 9pt;
}
.docVersion {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #336699; font-size: 10pt;
}
.docSecs-on {
font-family: Arial,Helvetica; font-weight: normal; text-decoration: none;
color: #ff0000; font-size: 10pt;
}
.docSecs-off {
font-family: Arial,Helvetica; font-weight: normal; text-decoration: none;
color: #333333; font-size: 10pt;
}
h2 {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #336699; font-size: medium;
}
h1 {
font-family: Verdana,Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #336699; font-size: large;
}
DL {
font-family: Arial,Helvetica; font-weight: normal; text-decoration: none;
color: #333333; font-size: 10pt;
}
UL > LI > A {
font-family: Arial,Helvetica; font-weight: bold;
color: #336699; font-size: 10pt;
}
.moduleInfo {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #333333; font-size: 11pt;
}
.moduleInfoSec {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #336699; font-size: 10pt;
}
.moduleInfoVal {
font-family: Arial,Helvetica; font-weight: normal; text-decoration: underline;
color: #000000; font-size: 10pt;
}
.cpanNavTitle {
font-family: Arial,Helvetica; font-weight: bold;
color: #ffffff; font-size: 10pt;
}
.cpanNavLetter {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #333333; font-size: 9pt;
}
.cpanCat {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #336699; font-size: 9pt;
}
.bttndrkblue-bkgd-top {
background-color: #225688;
background-image: url(/global/mvc_objects/images/bttndrkblue_bgtop.gif);
}
.bttndrkblue-bkgd-left {
background-color: #225688;
background-image: url(/global/mvc_objects/images/bttndrkblue_bgleft.gif);
}
.bttndrkblue-bkgd {
padding-top: 0px;
padding-bottom: 0px;
margin-bottom: 0px;
margin-top: 0px;
background-repeat: no-repeat;
background-color: #225688;
background-image: url(/global/mvc_objects/images/bttndrkblue_bgmiddle.gif);
vertical-align: top;
}
.bttndrkblue-bkgd-right {
background-color: #225688;
background-image: url(/global/mvc_objects/images/bttndrkblue_bgright.gif);
}
.bttndrkblue-bkgd-bottom {
background-color: #225688;
background-image: url(/global/mvc_objects/images/bttndrkblue_bgbottom.gif);
}
.bttndrkblue-text a {
color: #ffffff;
text-decoration: none;
}
a.bttndrkblue-text:hover {
color: #ffDD3C;
text-decoration: none;
}
.bg-ltblue {
background-color: #f0f5fa;
}
.border-left-b {
background: #f0f5fa url(/i/corner-leftline.gif) repeat-y;
}
.border-right-b {
background: #f0f5fa url(/i/corner-rightline.gif) repeat-y;
}
.border-top-b {
background: #f0f5fa url(/i/corner-topline.gif) repeat-x;
}
.border-bottom-b {
background: #f0f5fa url(/i/corner-botline.gif) repeat-x;
}
.border-right-w {
background: #ffffff url(/i/corner-rightline.gif) repeat-y;
}
.border-top-w {
background: #ffffff url(/i/corner-topline.gif) repeat-x;
}
.border-bottom-w {
background: #ffffff url(/i/corner-botline.gif) repeat-x;
}
.bg-white {
background-color: #ffffff;
}
.border-left-w {
background: #ffffff url(/i/corner-leftline.gif) repeat-y;
}

View File

@@ -1,160 +1,122 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>LLVM Command Guide</title>
<link rel="stylesheet" href="/docs/llvm.css" type="text/css">
</head>
<body>
<head>
<title>LLVM Command Guide</title>
</head>
<div class="doc_title">
LLVM Command Guide
</div>
<body bgcolor=white>
<div class="doc_text">
<center><h1>LLVM Command Guide<br></h1></center>
<p>These documents are HTML versions of the <a href="man/man1/">man pages</a>
for all of the LLVM tools. These pages describe how to use the LLVM commands
and what their options are. Note that these pages do not describe all of the
options available for all tools. To get a complete listing, pass the
<tt>--help</tt> (general options) or <tt>--help-hidden</tt> (general+debugging
options) arguments to the tool you are interested in.</p>
</div>
<!-- *********************************************************************** -->
<div class="doc_section">
<a name="basic">Basic Commands</a>
</div>
<!-- *********************************************************************** -->
<div class="doc_text">
<ul>
<li><a href="/cmds/llvm-as.html"><b>llvm-as</b></a> -
assemble a human-readable .ll file into bytecode</li>
<li><a href="/cmds/llvm-dis.html"><b>llvm-dis</b></a> -
disassemble a bytecode file into a human-readable .ll file</li>
<li><a href="/cmds/llvm-upgrade.html"><b>llvm-upgrade</b></a> -
upgrade LLVM assembly from previous version</li>
<li><a href="/cmds/opt.html"><b>opt</b></a> -
run a series of LLVM-to-LLVM optimizations on a bytecode file</li>
<li><a href="/cmds/llc.html"><b>llc</b></a> -
generate native machine code for a bytecode file</li>
<li><a href="/cmds/lli.html"><b>lli</b></a> -
directly run a program compiled to bytecode using a JIT compiler or
interpreter</li>
<li><a href="/cmds/llvm-link.html"><b>llvm-link</b></a> -
link several bytecode files into one</li>
<li><a href="/cmds/llvm-ar.html"><b>llvm-ar</b></a> -
archive bytecode files</li>
<li><a href="/cmds/llvm-ranlib.html"><b>llvm-ranlib</b></a> -
create an index for archives made with llvm-ar</li>
<li><a href="/cmds/llvm-nm.html"><b>llvm-nm</b></a> -
print out the names and types of symbols in a bytecode file</li>
<li><a href="/cmds/llvm-prof.html"><b>llvm-prof</b></a> -
format raw `<tt>llvmprof.out</tt>' data into a human-readable report</li>
<li><a href="/cmds/llvmc.html"><b>llvmc</b></a> -
generic and configurable compiler driver</li>
<li><a href="/cmds/llvm-ld.html"><b>llvm-ld</b></a> -
general purpose linker with loadable runtime optimization support</li>
<li><a href="/cmds/llvm-config.html"><b>llvm-config</b></a> -
print out LLVM compilation options, libraries, etc. as configured.</li>
<li><a href="/cmds/llvm2cpp.html"><b>llvm2cpp</b></a> - convert LLVM assembly
into the corresponding LLVM C++ API calls to produce it</li>
</ul>
</div>
<!-- *********************************************************************** -->
<div class="doc_section">
<a name="frontend">C, C++, and Stacker Front-end Commands</a>
</div>
<!-- *********************************************************************** -->
<div class="doc_text">
<ul>
<li><a href="/cmds/llvmgcc.html"><b>llvmgcc</b></a> -
GCC-based C front-end for LLVM
<li><a href="/cmds/llvmgxx.html"><b>llvmg++</b></a> -
GCC-based C++ front-end for LLVM</li>
<li><a href="/cmds/stkrc.html"><b>stkrc</b></a> -
front-end compiler for the <a href="../Stacker.html">Stacker</a>
language</li>
</ul>
</div>
<!-- *********************************************************************** -->
<div class="doc_section">
<a name="debug">Debugging Tools</a>
</div>
<!-- *********************************************************************** -->
This document is the reference manual for the LLVM utilities. It will
show you how to use the LLVM commands and what all of their options
are.
<div class="doc_text">
<ul>
<table width=100% border=0>
<tr><td valign=top width=50%>
<li><a href="/cmds/bugpoint.html"><b>bugpoint</b></a> -
automatic test-case reducer</li>
<!--===============================================================-->
<center><h2><a name="llvmcmds">Basic Commands</a><hr></h2></center>
<!--===============================================================-->
<li><a href="/cmds/llvm-extract.html"><b>llvm-extract</b></a> -
extract a function from an LLVM bytecode file</li>
<dl compact>
<dt><A href="llvm-as.html"><b>llvm-as</b></A>
<dd>
Assemble a human-readable LLVM program into LLVM bytecode.
<p>
<li><a href="/cmds/llvm-bcanalyzer.html"><b>llvm-bcanalyzer</b></a> -
bytecode analyzer (analyzes the binary encoding itself, not the program it
represents)</li>
<dt><A href="llvm-dis.html"><b>llvm-dis</b></A>
<dd>
Disassemble an LLVM bytecode file into human-readable form.
<p>
</ul>
</div>
<dt><A href="llvm-nm.html"><b>llvm-nm</b></A>
<dd>
Print out the names and types of symbols in an LLVM bytecode file.
<p>
<!-- *********************************************************************** -->
<div class="doc_section">
<a name="internal">Internal Tools</a>
</div>
<!-- *********************************************************************** -->
<dt><A href="analyze.html"><b>analyze</b></A>
<dd>
Analyze an LLVM bytecode file.
<p>
<div class="doc_text">
<ul>
<dt><A href="opt.html"><b>opt</b></A>
<dd>
Optimize an LLVM bytecode file.
<p>
<li><a href="/cmds/tblgen.html"><b>tblgen</b></a> -
target description reader and generator</li>
<dt><A href="llvm-link.html"><b>llvm-link</b></A>
<dd>
Link several LLVM bytecode files together into one LLVM
bytecode file.
<p>
</ul>
</div>
<dt><A href="llc.html"><b>llc</b></A>
<dd>
Compile an LLVM bytecode program into native machine code.
<!-- *********************************************************************** -->
<dt><A href="lli.html"><b>lli</b></A>
<dd>
Run an LLVM bytecode program using either an interpreter or a
JIT compiler.
<p>
</dl>
<hr>
<address>
<a href="http://jigsaw.w3.org/css-validator/check/referer"><img
src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"></a>
<a href="http://validator.w3.org/check/referer"><img
src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!"></a>
</td><td valign=top width=50%>
<a href="http://llvm.org">LLVM Compiler Infrastructure</a><br>
Last modified: $Date$
</address>
<!--===============================================================-->
<center><h2><a name="llvmcmds">C and C++ Front-end Commands</a><hr></h2></center>
<!--===============================================================-->
</body>
<dl compact>
<dt><A href="llvmgcc.html"><b>llvmgcc</b></A>
<dd>
GCC-based C front end for LLVM.
<p>
<dt><A href="llvmgxx.html"><b>llvmg++</b></A>
<dd>
GCC-based C++ front end for LLVM.
<p>
<dt><A href="gccas.html"><b>gccas</b></A>
<dd>
LLVM assembler used by GCC and other native compiler tools.
<p>
<dt><A href="gccld.html"><b>gccld</b></A>
<dd>
LLVM linker used by GCC and other native compiler tools.
</dl>
<!--===============================================================-->
<center><h2><a name="llvmcmds">Debugging Tools</a><hr></h2></center>
<!--===============================================================-->
<dl compact>
<dt><A href="bugpoint.html"><b>bugpoint</b></A>
<dd>
Trace an LLVM bytecode program and reduce its failure to a
simple testcase.
<p>
<dt><A href="extract.html"><b>extract</b></A>
<dd>
Extract a function from an LLVM bytecode file.
</dl>
</td></tr></table>
<hr><font size=-1>
Maintained by the
<a href="http://llvm.cs.uiuc.edu">LLVM Team</a>.<br>
<!-- Created: Wed Feb 26 10:40:50 CST 2003 -->
<!-- hhmts start -->
Last modified: Tue Oct 7 15:34:17 CDT 2003
<!-- hhmts end -->
</font>
</body>
</html>

View File

@@ -0,0 +1,198 @@
<html>
<title>LLVM: llc tool</title>
<body bgcolor=white>
<center><h1>LLVM: <tt>llc</tt> tool</h1></center>
<HR>
<h3>NAME</h3>
<tt>llc</tt>
<h3>SYNOPSIS</h3>
<tt>llc [options] [filename]</tt>
<h3>DESCRIPTION</h3>
The <tt>llc</tt> command compiles LLVM bytecode into assembly language for a
specified architecture. The assembly language output can then be passed through
a native assembler and linker to generate native code.
<p>
The choice of architecture for the output assembly code is determined as
follows:
<ul>
<li>
If the user has specified an architecture with the -m option, use that
architecture.
<p>
<li>
Examine the input LLVM bytecode file:
<ul>
<li>
If it specifies little endian and a pointer size of 32 bits, select the
x86 architecture.
<p>
<li>
If it specifies big endian and a pointer size of 64 bit pointers,
select the SparcV9 architecture.
</ul>
<p>
<li>
If <tt>llc</tt> was compiled on an architecture for which it can
generate code, select the architecture upon which <tt>llc</tt> was
compiled.
<p>
<li>
Print a message to the user asking him or her to specify the output
architecture explicitly.
</ul>
<p>
If filename is not specified, or if filename is -, <tt>llc</tt> reads its input
from standard input. Otherwise, it will read its input from filename.
<p>
If the -o option is left unspecified, then <tt>llc</tt> will send its output to standard
output if the input is from standard input. If the -o option specifies -, then
the output will also be sent to standard output.
<p>
If no -o option is specified and an input file other than - is specified, then
<tt>llc</tt> creates the output filename as follows:
<ul>
<li>
If the file ends in .bc, then the .bc suffix is removed, and the .s suffix
is appended.
<p>
<li>
Otherwise, the .s suffix is appended to the input filename.
</ul>
<h3>
OPTIONS
</h3>
<ul>
<li>-f
<br>
Overwrite output files
<p>
<li>-m&lt;arch&gt;
<br>
Specify the architecture for which to generate assembly. Valid
architectures are:
<dl compact>
<di> x86
<dd>IA-32 (Pentium and above)</dd>
<di> sparc
<dd>SPARC V9</dd>
</dl>
<p>
<li>-o &lt;filename&gt;
<br>
Specify the output filename.
<p>
<li> -help
<br>
Print a summary of command line options.
<p>
<li> -stats
<br>
Print statistics.
<p>
<li> -time-passes
<br>
Record the amount of time needed for each pass and print it to standard
error.
<p>
</ul>
<h4>X86 Specific Options</h4>
<ul>
<li>-disable-fp-elim
<br>
Disable frame pointer elimination optimization.
<p>
<li>-disable-pattern-isel
<br>
Use the 'simple' X86 instruction selector (the default).
<p>
<li>-print-machineinstrs
<br>
Print generated machine code.
<p>
<li>-regalloc=&lt;ra&gt;
<br>
Specify the register allocator to use. The default is <i>simple</i>.
Valid register allocators are:
<dl compact>
<di> simple
<dd>Very simple register allocator</dd>
<di> local
<dd>Local register allocator</dd>
</dl>
<p>
</ul>
<h4>Sparc Specific Options</h4>
<ul>
<li>-disable-peephole
<br>
Disable peephole optimization pass.
<p>
<li>-disable-preopt
<br>
Disable optimizations prior to instruction selection.
<p>
<li>-disable-sched
<br>
Disable local scheduling pass.
<p>
<li>-disable-strip
<br>
Do not strip the LLVM bytecode included in executable.
<p>
<li>-enable-maps
<br>
Emit LLVM-to-MachineCode mapping info to assembly.
<p>
</ul>
<h3>EXIT STATUS</h3>
If <tt>llc</tt> succeeds, it will exit with 0. Otherwise, if an error occurs,
it will exit with a non-zero value.
<h3>
SEE ALSO
</h3>
<a href="lli.html"><tt>lli</tt></a>
<HR>
Maintained by the <a href="http://llvm.cs.uiuc.edu">LLVM Team</a>.
</body>
</html>

View File

@@ -1,191 +0,0 @@
=pod
=head1 NAME
llc - LLVM static compiler
=head1 SYNOPSIS
B<llc> [I<options>] [I<filename>]
=head1 DESCRIPTION
The B<llc> command compiles LLVM bitcode into assembly language for a
specified architecture. The assembly language output can then be passed through
a native assembler and linker to generate a native executable.
The choice of architecture for the output assembly code is automatically
determined from the input bitcode file, unless the B<-march> option is used to
override the default.
=head1 OPTIONS
If I<filename> is - or omitted, B<llc> reads LLVM bitcode from standard input.
Otherwise, it will read LLVM bitcode from I<filename>.
If the B<-o> option is omitted, then B<llc> will send its output to standard
output if the input is from standard input. If the B<-o> option specifies -,
then the output will also be sent to standard output.
If no B<-o> option is specified and an input file other than - is specified,
then B<llc> creates the output filename by taking the input filename,
removing any existing F<.bc> extension, and adding a F<.s> suffix.
Other B<llc> options are as follows:
=head2 End-user Options
=over
=item B<--help>
Print a summary of command line options.
=item B<-f>
Overwrite output files. By default, B<llc> will refuse to overwrite
an output file which already exists.
=item B<-mtriple>=I<target triple>
Override the target triple specified in the input bitcode file with the
specified string.
=item B<-march>=I<arch>
Specify the architecture for which to generate assembly, overriding the target
encoded in the bitcode file. See the output of B<llc --help> for a list of
valid architectures. By default this is inferred from the target triple or
autodetected to the current architecture.
=item B<-mcpu>=I<cpuname>
Specify a specific chip in the current architecture to generate code for.
By default this is inferred from the target triple and autodetected to
the current architecture. For a list of available CPUs, use:
B<llvm-as E<lt> /dev/null | llc -march=xyz -mcpu=help>
=item B<-mattr>=I<a1,+a2,-a3,...>
Override or control specific attributes of the target, such as whether SIMD
operations are enabled or not. The default set of attributes is set by the
current CPU. For a list of available attributes, use:
B<llvm-as E<lt> /dev/null | llc -march=xyz -mattr=help>
=item B<--disable-fp-elim>
Disable frame pointer elimination optimization.
=item B<--disable-excess-fp-precision>
Disable optimizations that may produce excess precision for floating point.
Note that this option can dramatically slow down code on some systems
(e.g. X86).
=item B<--enable-unsafe-fp-math>
Enable optimizations that make unsafe assumptions about IEEE math (e.g. that
addition is associative) or may not work for all input ranges. These
optimizations allow the code generator to make use of some instructions which
would otherwise not be usable (such as fsin on X86).
=item B<--enable-correct-eh-support>
Instruct the B<lowerinvoke> pass to insert code for correct exception handling
support. This is expensive and is by default omitted for efficiency.
=item B<--stats>
Print statistics recorded by code-generation passes.
=item B<--time-passes>
Record the amount of time needed for each pass and print a report to standard
error.
=item B<--load>=F<dso_path>
Dynamically load F<dso_path> (a path to a dynamically shared object) that
implements an LLVM target. This will permit the target name to be used with the
B<-march> option so that code can be generated for that target.
=back
=head2 Tuning/Configuration Options
=over
=item B<--print-machineinstrs>
Print generated machine code between compilation phases (useful for debugging).
=item B<--regalloc>=I<allocator>
Specify the register allocator to use. The default I<allocator> is I<local>.
Valid register allocators are:
=over
=item I<simple>
Very simple "always spill" register allocator
=item I<local>
Local register allocator
=item I<linearscan>
Linear scan global register allocator
=item I<iterativescan>
Iterative scan global register allocator
=back
=item B<--spiller>=I<spiller>
Specify the spiller to use for register allocators that support it. Currently
this option is used only by the linear scan register allocator. The default
I<spiller> is I<local>. Valid spillers are:
=over
=item I<simple>
Simple spiller
=item I<local>
Local spiller
=back
=back
=head2 Intel IA-32-specific Options
=over
=item B<--x86-asm-syntax=att|intel>
Specify whether to emit assembly code in AT&T syntax (the default) or intel
syntax.
=back
=head1 EXIT STATUS
If B<llc> succeeds, it will exit with 0. Otherwise, if an error occurs,
it will exit with a non-zero value.
=head1 SEE ALSO
L<lli|lli>
=head1 AUTHORS
Maintained by the LLVM Team (L<http://llvm.org>).
=cut

View File

@@ -0,0 +1,127 @@
<html>
<title>
LLVM: lli tool
</title>
<body bgcolor=white>
<center>
<h1>LLVM: <tt>lli</tt> tool</h1>
</center>
<HR>
<h3>
NAME
</h3>
<tt>lli</tt>
<h3>
SYNOPSIS
</h3>
<tt>lli [options] [filename] [args ...]</tt>
<h3>
DESCRIPTION
</h3>
<tt>lli</tt> directly executes programs in LLVM format.
It takes a program in LLVM
bytecode format and executes it using a just-in-time
compiler, if one is available for the current architecture, or an interpreter.
<tt>lli</tt> takes all of the same code generator options as the
<tt><a href="llc.html">llc</a></tt> tool, but they are only applicable when
the just-in-time compiler is being used.
<p>
If filename is not specified, then <tt>lli</tt> reads the LLVM bytecode for
the program from standard input.
<p>
The optional "args" specified on the command line are passed to the
program as arguments.
<p>
<h3>
OPTIONS
</h3>
<ul>
<li> <tt>-array-checks</tt>
<br>
Enable array bound checks. If an LLVM program attempts to access an
element of an array which is not within the size of that array,
<tt>lli</tt> will print an error message and call <tt>abort(3)</tt>.
This is presently only applicable to the interpreter.
<p>
<li> <tt>-help</tt>
<br>
Print a summary of command line options.
<p>
<li> <tt>-stats</tt>
<br>
Print statistics from the code-generation passes. This is only meaningful
for the just-in-time compiler, at present.
<p>
<li> <tt>-time-passes</tt>
<br>
Record the amount of time needed for each code-generation pass and print
it to standard error.
<p>
<li> <tt>-march=&lt;arch&gt;</tt>
<br>
Use the specified non-default architecture when selecting a code generator
for the just-in-time compiler. This may result in a crash if you pick an
architecture which is not compatible with the hardware you are running
<tt>lli</tt> on.
<p>
<li> <tt>-quiet, -q</tt>
<br>
Do not print any output about the return values of functions.
This is presently only applicable to the interpreter.
<p>
<li> <tt>-force-interpreter={false,true}</tt>
<br>
If set to true, use the interpreter even if a just-in-time compiler is
available for this architecture. Defaults to false.
<p>
<li> <tt>-trace</tt>
<br>
Print an LLVM-instruction-level dynamic execution trace. This is
presently only applicable to the interpreter.
<p>
<li> <tt>-f=&lt;name&gt;</tt>
<br>
Call the function named <tt>&lt;name&gt;</tt> to start the program.
Note: The function is assumed to have the C signature <tt>int
<tt>&lt;name&gt;</tt> (int, char **, char **)</tt>.
If you try to use this option to call a function of incompatible type,
undefined behavior may result. Defaults to "main".
<p>
</ul>
<h3>
EXIT STATUS
</h3>
If <tt>lli</tt> fails to load the program, it will exit with an exit code of 1.
Otherwise, it will return the exit code of the program it executes.
<h3>
SEE ALSO
</h3>
<a href="llc.html"><tt>llc</tt></a>
<HR>
Maintained by the <a href="http://llvm.cs.uiuc.edu">LLVM Team</a>.
</body>
</html>

View File

@@ -1,216 +0,0 @@
=pod
=head1 NAME
lli - directly execute programs from LLVM bitcode
=head1 SYNOPSIS
B<lli> [I<options>] [I<filename>] [I<program args>]
=head1 DESCRIPTION
B<lli> directly executes programs in LLVM bitcode format. It takes a program
in LLVM bitcode format and executes it using a just-in-time compiler, if one is
available for the current architecture, or an interpreter. B<lli> takes all of
the same code generator options as L<llc|llc>, but they are only effective when
B<lli> is using the just-in-time compiler.
If I<filename> is not specified, then B<lli> reads the LLVM bitcode for the
program from standard input.
The optional I<args> specified on the command line are passed to the program as
arguments.
=head1 GENERAL OPTIONS
=over
=item B<-fake-argv0>=I<executable>
Override the C<argv[0]> value passed into the executing program.
=item B<-force-interpreter>=I<{false,true}>
If set to true, use the interpreter even if a just-in-time compiler is available
for this architecture. Defaults to false.
=item B<-help>
Print a summary of command line options.
=item B<-load>=I<puginfilename>
Causes B<lli> to load the plugin (shared object) named I<pluginfilename> and use
it for optimization.
=item B<-stats>
Print statistics from the code-generation passes. This is only meaningful for
the just-in-time compiler, at present.
=item B<-time-passes>
Record the amount of time needed for each code-generation pass and print it to
standard error.
=item B<-version>
Print out the version of B<lli> and exit without doing anything else.
=back
=head1 TARGET OPTIONS
=over
=item B<-mtriple>=I<target triple>
Override the target triple specified in the input bitcode file with the
specified string. This may result in a crash if you pick an
architecture which is not compatible with the current system.
=item B<-march>=I<arch>
Specify the architecture for which to generate assembly, overriding the target
encoded in the bitcode file. See the output of B<llc --help> for a list of
valid architectures. By default this is inferred from the target triple or
autodetected to the current architecture.
=item B<-mcpu>=I<cpuname>
Specify a specific chip in the current architecture to generate code for.
By default this is inferred from the target triple and autodetected to
the current architecture. For a list of available CPUs, use:
B<llvm-as E<lt> /dev/null | llc -march=xyz -mcpu=help>
=item B<-mattr>=I<a1,+a2,-a3,...>
Override or control specific attributes of the target, such as whether SIMD
operations are enabled or not. The default set of attributes is set by the
current CPU. For a list of available attributes, use:
B<llvm-as E<lt> /dev/null | llc -march=xyz -mattr=help>
=back
=head1 FLOATING POINT OPTIONS
=over
=item B<-disable-excess-fp-precision>
Disable optimizations that may increase floating point precision.
=item B<-enable-finite-only-fp-math>
Enable optimizations that assumes only finite floating point math. That is,
there is no NAN or Inf values.
=item B<-enable-unsafe-fp-math>
Causes B<lli> to enable optimizations that may decrease floating point
precision.
=item B<-soft-float>
Causes B<lli> to generate software floating point library calls instead of
equivalent hardware instructions.
=back
=head1 CODE GENERATION OPTIONS
=over
=item B<-code-model>=I<model>
Choose the code model from:
default: Target default code model
small: Small code model
kernel: Kernel code model
medium: Medium code model
large: Large code model
=item B<-disable-post-RA-scheduler>
Disable scheduling after register allocation.
=item B<-disable-spill-fusing>
Disable fusing of spill code into instructions.
=item B<-enable-correct-eh-support>
Make the -lowerinvoke pass insert expensive, but correct, EH code.
=item B<-enable-eh>
Exception handling should be emitted.
=item B<-join-liveintervals>
Coalesce copies (default=true).
=item B<-nozero-initialized-in-bss>
Don't place zero-initialized symbols into the BSS section.
=item B<-pre-RA-sched>=I<scheduler>
Instruction schedulers available (before register allocation):
=default: Best scheduler for the target
=none: No scheduling: breadth first sequencing
=simple: Simple two pass scheduling: minimize critical path and maximize processor utilization
=simple-noitin: Simple two pass scheduling: Same as simple except using generic latency
=list-burr: Bottom-up register reduction list scheduling
=list-tdrr: Top-down register reduction list scheduling
=list-td: Top-down list scheduler -print-machineinstrs - Print generated machine code
=item B<-regalloc>=I<allocator>
Register allocator to use: (default = linearscan)
=bigblock: Big-block register allocator
=linearscan: linear scan register allocator =local - local register allocator
=simple: simple register allocator
=item B<-relocation-model>=I<model>
Choose relocation model from:
=default: Target default relocation model
=static: Non-relocatable code =pic - Fully relocatable, position independent code
=dynamic-no-pic: Relocatable external references, non-relocatable code
=item B<-spiller>
Spiller to use: (default: local)
=simple: simple spiller
=local: local spiller
=item B<-x86-asm-syntax>=I<syntax>
Choose style of code to emit from X86 backend:
=att: Emit AT&T-style assembly
=intel: Emit Intel-style assembly
=back
=head1 EXIT STATUS
If B<lli> fails to load the program, it will exit with an exit code of 1.
Otherwise, it will return the exit code of the program it executes.
=head1 SEE ALSO
L<llc|llc>
=head1 AUTHOR
Maintained by the LLVM Team (L<http://llvm.org>).
=cut

View File

@@ -1,406 +0,0 @@
=pod
=head1 NAME
llvm-ar - LLVM archiver
=head1 SYNOPSIS
B<llvm-ar> [-]{dmpqrtx}[Rabfikouz] [relpos] [count] <archive> [files...]
=head1 DESCRIPTION
The B<llvm-ar> command is similar to the common Unix utility, C<ar>. It
archives several files together into a single file. The intent for this is
to produce archive libraries by LLVM bitcode that can be linked into an
LLVM program. However, the archive can contain any kind of file. By default,
B<llvm-ar> generates a symbol table that makes linking faster because
only the symbol table needs to be consulted, not each individual file member
of the archive.
The B<llvm-ar> command can be used to I<read> both SVR4 and BSD style archive
files. However, it cannot be used to write them. While the B<llvm-ar> command
produces files that are I<almost> identical to the format used by other C<ar>
implementations, it has two significant departures in order to make the
archive appropriate for LLVM. The first departure is that B<llvm-ar> only
uses BSD4.4 style long path names (stored immediately after the header) and
never contains a string table for long names. The second departure is that the
symbol table is formated for efficient construction of an in-memory data
structure that permits rapid (red-black tree) lookups. Consequently, archives
produced with B<llvm-ar> usually won't be readable or editable with any
C<ar> implementation or useful for linking. Using the C<f> modifier to flatten
file names will make the archive readable by other C<ar> implementations
but not for linking because the symbol table format for LLVM is unique. If an
SVR4 or BSD style archive is used with the C<r> (replace) or C<q> (quick
update) operations, the archive will be reconstructed in LLVM format. This
means that the string table will be dropped (in deference to BSD 4.4 long names)
and an LLVM symbol table will be added (by default). The system symbol table
will be retained.
Here's where B<llvm-ar> departs from previous C<ar> implementations:
=over
=item I<Symbol Table>
Since B<llvm-ar> is intended to archive bitcode files, the symbol table
won't make much sense to anything but LLVM. Consequently, the symbol table's
format has been simplified. It consists simply of a sequence of pairs
of a file member index number as an LSB 4byte integer and a null-terminated
string.
=item I<Long Paths>
Some C<ar> implementations (SVR4) use a separate file member to record long
path names (> 15 characters). B<llvm-ar> takes the BSD 4.4 and Mac OS X
approach which is to simply store the full path name immediately preceding
the data for the file. The path name is null terminated and may contain the
slash (/) character.
=item I<Compression>
B<llvm-ar> can compress the members of an archive to save space. The
compression used depends on what's available on the platform and what choices
the LLVM Compressor utility makes. It generally favors bzip2 but will select
between "no compression" or bzip2 depending on what makes sense for the
file's content.
=item I<Directory Recursion>
Most C<ar> implementations do not recurse through directories but simply
ignore directories if they are presented to the program in the F<files>
option. B<llvm-ar>, however, can recurse through directory structures and
add all the files under a directory, if requested.
=item I<TOC Verbose Output>
When B<llvm-ar> prints out the verbose table of contents (C<tv> option), it
precedes the usual output with a character indicating the basic kind of
content in the file. A blank means the file is a regular file. A 'Z' means
the file is compressed. A 'B' means the file is an LLVM bitcode file. An
'S' means the file is the symbol table.
=back
=head1 OPTIONS
The options to B<llvm-ar> are compatible with other C<ar> implementations.
However, there are a few modifiers (F<zR>) that are not found in other
C<ar>s. The options to B<llvm-ar> specify a single basic operation to
perform on the archive, a variety of modifiers for that operation, the
name of the archive file, and an optional list of file names. These options
are used to determine how B<llvm-ar> should process the archive file.
The Operations and Modifiers are explained in the sections below. The minimal
set of options is at least one operator and the name of the archive. Typically
archive files end with a C<.a> suffix, but this is not required. Following
the F<archive-name> comes a list of F<files> that indicate the specific members
of the archive to operate on. If the F<files> option is not specified, it
generally means either "none" or "all" members, depending on the operation.
=head2 Operations
=over
=item d
Delete files from the archive. No modifiers are applicable to this operation.
The F<files> options specify which members should be removed from the
archive. It is not an error if a specified file does not appear in the archive.
If no F<files> are specified, the archive is not modified.
=item m[abi]
Move files from one location in the archive to another. The F<a>, F<b>, and
F<i> modifiers apply to this operation. The F<files> will all be moved
to the location given by the modifiers. If no modifiers are used, the files
will be moved to the end of the archive. If no F<files> are specified, the
archive is not modified.
=item p[k]
Print files to the standard output. The F<k> modifier applies to this
operation. This operation simply prints the F<files> indicated to the
standard output. If no F<files> are specified, the entire archive is printed.
Printing bitcode files is ill-advised as they might confuse your terminal
settings. The F<p> operation never modifies the archive.
=item q[Rfz]
Quickly append files to the end of the archive. The F<R>, F<f>, and F<z>
modifiers apply to this operation. This operation quickly adds the
F<files> to the archive without checking for duplicates that should be
removed first. If no F<files> are specified, the archive is not modified.
Because of the way that B<llvm-ar> constructs the archive file, its dubious
whether the F<q> operation is any faster than the F<r> operation.
=item r[Rabfuz]
Replace or insert file members. The F<R>, F<a>, F<b>, F<f>, F<u>, and F<z>
modifiers apply to this operation. This operation will replace existing
F<files> or insert them at the end of the archive if they do not exist. If no
F<files> are specified, the archive is not modified.
=item t[v]
Print the table of contents. Without any modifiers, this operation just prints
the names of the members to the standard output. With the F<v> modifier,
B<llvm-ar> also prints out the file type (B=bitcode, Z=compressed, S=symbol
table, blank=regular file), the permission mode, the owner and group, the
size, and the date. If any F<files> are specified, the listing is only for
those files. If no F<files> are specified, the table of contents for the
whole archive is printed.
=item x[oP]
Extract archive members back to files. The F<o> modifier applies to this
operation. This operation retrieves the indicated F<files> from the archive
and writes them back to the operating system's file system. If no
F<files> are specified, the entire archive is extract.
=back
=head2 Modifiers (operation specific)
The modifiers below are specific to certain operations. See the Operations
section (above) to determine which modifiers are applicable to which operations.
=over
=item [a]
When inserting or moving member files, this option specifies the destination of
the new files as being C<a>fter the F<relpos> member. If F<relpos> is not found,
the files are placed at the end of the archive.
=item [b]
When inserting or moving member files, this option specifies the destination of
the new files as being C<b>efore the F<relpos> member. If F<relpos> is not
found, the files are placed at the end of the archive. This modifier is
identical to the the F<i> modifier.
=item [f]
Normally, B<llvm-ar> stores the full path name to a file as presented to it on
the command line. With this option, truncated (15 characters max) names are
used. This ensures name compatibility with older versions of C<ar> but may also
thwart correct extraction of the files (duplicates may overwrite). If used with
the F<R> option, the directory recursion will be performed but the file names
will all be C<f>lattened to simple file names.
=item [i]
A synonym for the F<b> option.
=item [k]
Normally, B<llvm-ar> will not print the contents of bitcode files when the
F<p> operation is used. This modifier defeats the default and allows the
bitcode members to be printed.
=item [N]
This option is ignored by B<llvm-ar> but provided for compatibility.
=item [o]
When extracting files, this option will cause B<llvm-ar> to preserve the
original modification times of the files it writes.
=item [P]
use full path names when matching
=item [R]
This modifier instructions the F<r> option to recursively process directories.
Without F<R>, directories are ignored and only those F<files> that refer to
files will be added to the archive. When F<R> is used, any directories specified
with F<files> will be scanned (recursively) to find files to be added to the
archive. Any file whose name begins with a dot will not be added.
=item [u]
When replacing existing files in the archive, only replace those files that have
a time stamp than the time stamp of the member in the archive.
=item [z]
When inserting or replacing any file in the archive, compress the file first.
This
modifier is safe to use when (previously) compressed bitcode files are added to
the archive; the compressed bitcode files will not be doubly compressed.
=back
=head2 Modifiers (generic)
The modifiers below may be applied to any operation.
=over
=item [c]
For all operations, B<llvm-ar> will always create the archive if it doesn't
exist. Normally, B<llvm-ar> will print a warning message indicating that the
archive is being created. Using this modifier turns off that warning.
=item [s]
This modifier requests that an archive index (or symbol table) be added to the
archive. This is the default mode of operation. The symbol table will contain
all the externally visible functions and global variables defined by all the
bitcode files in the archive. Using this modifier is more efficient that using
L<llvm-ranlib|llvm-ranlib> which also creates the symbol table.
=item [S]
This modifier is the opposite of the F<s> modifier. It instructs B<llvm-ar> to
not build the symbol table. If both F<s> and F<S> are used, the last modifier to
occur in the options will prevail.
=item [v]
This modifier instructs B<llvm-ar> to be verbose about what it is doing. Each
editing operation taken against the archive will produce a line of output saying
what is being done.
=back
=head1 STANDARDS
The B<llvm-ar> utility is intended to provide a superset of the IEEE Std 1003.2
(POSIX.2) functionality for C<ar>. B<llvm-ar> can read both SVR4 and BSD4.4 (or
Mac OS X) archives. If the C<f> modifier is given to the C<x> or C<r> operations
then B<llvm-ar> will write SVR4 compatible archives. Without this modifier,
B<llvm-ar> will write BSD4.4 compatible archives that have long names
immediately after the header and indicated using the "#1/ddd" notation for the
name in the header.
=head1 FILE FORMAT
The file format for LLVM Archive files is similar to that of BSD 4.4 or Mac OSX
archive files. In fact, except for the symbol table, the C<ar> commands on those
operating systems should be able to read LLVM archive files. The details of the
file format follow.
Each archive begins with the archive magic number which is the eight printable
characters "!<arch>\n" where \n represents the newline character (0x0A).
Following the magic number, the file is composed of even length members that
begin with an archive header and end with a \n padding character if necessary
(to make the length even). Each file member is composed of a header (defined
below), an optional newline-terminated "long file name" and the contents of
the file.
The fields of the header are described in the items below. All fields of the
header contain only ASCII characters, are left justified and are right padded
with space characters.
=over
=item name - char[16]
This field of the header provides the name of the archive member. If the name is
longer than 15 characters or contains a slash (/) character, then this field
contains C<#1/nnn> where C<nnn> provides the length of the name and the C<#1/>
is literal. In this case, the actual name of the file is provided in the C<nnn>
bytes immediately following the header. If the name is 15 characters or less, it
is contained directly in this field and terminated with a slash (/) character.
=item date - char[12]
This field provides the date of modification of the file in the form of a
decimal encoded number that provides the number of seconds since the epoch
(since 00:00:00 Jan 1, 1970) per Posix specifications.
=item uid - char[6]
This field provides the user id of the file encoded as a decimal ASCII string.
This field might not make much sense on non-Unix systems. On Unix, it is the
same value as the st_uid field of the stat structure returned by the stat(2)
operating system call.
=item gid - char[6]
This field provides the group id of the file encoded as a decimal ASCII string.
This field might not make much sense on non-Unix systems. On Unix, it is the
same value as the st_gid field of the stat structure returned by the stat(2)
operating system call.
=item mode - char[8]
This field provides the access mode of the file encoded as an octal ASCII
string. This field might not make much sense on non-Unix systems. On Unix, it
is the same value as the st_mode field of the stat structure returned by the
stat(2) operating system call.
=item size - char[10]
This field provides the size of the file, in bytes, encoded as a decimal ASCII
string. If the size field is negative (starts with a minus sign, 0x02D), then
the archive member is stored in compressed form. The first byte of the archive
member's data indicates the compression type used. A value of 0 (0x30) indicates
that no compression was used. A value of 2 (0x32) indicates that bzip2
compression was used.
=item fmag - char[2]
This field is the archive file member magic number. Its content is always the
two characters back tick (0x60) and newline (0x0A). This provides some measure
utility in identifying archive files that have been corrupted.
=back
The LLVM symbol table has the special name "#_LLVM_SYM_TAB_#". It is presumed
that no regular archive member file will want this name. The LLVM symbol table
is simply composed of a sequence of triplets: byte offset, length of symbol,
and the symbol itself. Symbols are not null or newline terminated. Here are
the details on each of these items:
=over
=item offset - vbr encoded 32-bit integer
The offset item provides the offset into the archive file where the bitcode
member is stored that is associated with the symbol. The offset value is 0
based at the start of the first "normal" file member. To derive the actual
file offset of the member, you must add the number of bytes occupied by the file
signature (8 bytes) and the symbol tables. The value of this item is encoded
using variable bit rate encoding to reduce the size of the symbol table.
Variable bit rate encoding uses the high bit (0x80) of each byte to indicate
if there are more bytes to follow. The remaining 7 bits in each byte carry bits
from the value. The final byte does not have the high bit set.
=item length - vbr encoded 32-bit integer
The length item provides the length of the symbol that follows. Like this
I<offset> item, the length is variable bit rate encoded.
=item symbol - character array
The symbol item provides the text of the symbol that is associated with the
I<offset>. The symbol is not terminated by any character. Its length is provided
by the I<length> field. Note that is allowed (but unwise) to use non-printing
characters (even 0x00) in the symbol. This allows for multiple encodings of
symbol names.
=back
=head1 EXIT STATUS
If B<llvm-ar> succeeds, it will exit with 0. A usage error, results
in an exit code of 1. A hard (file system typically) error results in an
exit code of 2. Miscellaneous or unknown errors result in an
exit code of 3.
=head1 SEE ALSO
L<llvm-ranlib|llvm-ranlib>, ar(1)
=head1 AUTHORS
Maintained by the LLVM Team (L<http://llvm.org>).
=cut

View File

@@ -0,0 +1,97 @@
<html>
<title>
LLVM: llvm-as tool
</title>
<body bgcolor=white>
<center><h1>LLVM: <tt>llvm-as</tt> tool</h1></center>
<HR>
<h3>NAME</h3>
<tt>llvm-as</tt>
<h3>SYNOPSIS</h3>
<tt>llvm-as [options] [filename]</tt>
<h3>DESCRIPTION</h3>
The <tt>llvm-as</tt> command is the LLVM assembler. It reads a file containing
human readable LLVM assembly language, translates it to LLVM bytecode, and
writes the result into a file or to standard output.
<p>
If filename is omitted or is -, then <tt>llvm-as</tt> reads its input from
standard input.
<p>
If an output file is not specified with the <tt>-o</tt> option, then
<tt>llvm-as</tt> sends its output to a file or standard output by the following
logic:
<ul>
<li>
If the input is standard input, then the output is standard output.
<p>
<li>
If the input is a file that ends with .ll, then the output file is of
the same name, except that the suffix is changed to .bc.
<p>
<li>
If the input is a file that does not end with the .ll suffix, then the
output file has the same name as the input file, except that the .bc
suffix is appended.
<p>
</ul>
<h3>OPTIONS</h3>
<ul>
<li> -f
<br>
Force overwrite. Normally, <tt>llvm-as</tt> will refuse to overwrite an
output file that already exists. With this option, <tt>llvm-as</tt>
will overwrite the output file and replace it with new bytecode.
<p>
<li> -help
<br>
Print a summary of command line options.
<p>
<li> -o &lt;filename&gt;
<br>
Specify the output filename. If filename is -, then <tt>llvm-as</tt>
sends its output to standard output.
<p>
<li> -stats
<br>
Print statistics.
<p>
<li> -time-passes
<br>
Record the amount of time needed for each pass and print it to standard
error.
<p>
</ul>
<h3>EXIT STATUS</h3>
If <tt>llvm-as</tt> succeeds, it will exit with 0. Otherwise, if an error
occurs, it will exit with a non-zero value.
<h3>SEE ALSO</h3>
<a href="llvm-dis.html"><tt>llvm-dis</tt></a>
<a href="gccas.html"><tt>gccas</tt></a>
<HR>
Maintained by the <a href="http://llvm.cs.uiuc.edu">LLVM Team</a>.
</body>
</html>

View File

@@ -1,77 +0,0 @@
=pod
=head1 NAME
llvm-as - LLVM assembler
=head1 SYNOPSIS
B<llvm-as> [I<options>] [I<filename>]
=head1 DESCRIPTION
B<llvm-as> is the LLVM assembler. It reads a file containing human-readable
LLVM assembly language, translates it to LLVM bitcode, and writes the result
into a file or to standard output.
If F<filename> is omitted or is C<->, then B<llvm-as> reads its input from
standard input.
If an output file is not specified with the B<-o> option, then
B<llvm-as> sends its output to a file or standard output by following
these rules:
=over
=item *
If the input is standard input, then the output is standard output.
=item *
If the input is a file that ends with C<.ll>, then the output file is of
the same name, except that the suffix is changed to C<.bc>.
=item *
If the input is a file that does not end with the C<.ll> suffix, then the
output file has the same name as the input file, except that the C<.bc>
suffix is appended.
=back
=head1 OPTIONS
=over
=item B<-f>
Force overwrite. Normally, B<llvm-as> will refuse to overwrite an
output file that already exists. With this option, B<llvm-as>
will overwrite the output file and replace it with new bitcode.
=item B<--help>
Print a summary of command line options.
=item B<-o> F<filename>
Specify the output file name. If F<filename> is C<->, then B<llvm-as>
sends its output to standard output.
=back
=head1 EXIT STATUS
If B<llvm-as> succeeds, it will exit with 0. Otherwise, if an error
occurs, it will exit with a non-zero value.
=head1 SEE ALSO
L<llvm-dis|llvm-dis>, L<gccas|gccas>
=head1 AUTHORS
Maintained by the LLVM Team (L<http://llvm.org>).
=cut

View File

@@ -1,315 +0,0 @@
=pod
=head1 NAME
llvm-bcanalyzer - LLVM bitcode analyzer
=head1 SYNOPSIS
B<llvm-bcanalyzer> [I<options>] [F<filename>]
=head1 DESCRIPTION
The B<llvm-bcanalyzer> command is a small utility for analyzing bitcode files.
The tool reads a bitcode file (such as generated with the B<llvm-as> tool) and
produces a statistical report on the contents of the bitcode file. The tool
can also dump a low level but human readable version of the bitcode file.
This tool is probably not of much interest or utility except for those working
directly with the bitcode file format. Most LLVM users can just ignore
this tool.
If F<filename> is omitted or is C<->, then B<llvm-bcanalyzer> reads its input
from standard input. This is useful for combining the tool into a pipeline.
Output is written to the standard output.
=head1 OPTIONS
=over
=item B<-nodetails>
Causes B<llvm-bcanalyzer> to abbreviate its output by writing out only a module
level summary. The details for individual functions are not displayed.
=item B<-dump>
Causes B<llvm-bcanalyzer> to dump the bitcode in a human readable format. This
format is significantly different from LLVM assembly and provides details about
the encoding of the bitcode file.
=item B<-verify>
Causes B<llvm-bcanalyzer> to verify the module produced by reading the
bitcode. This ensures that the statistics generated are based on a consistent
module.
=item B<--help>
Print a summary of command line options.
=back
=head1 EXIT STATUS
If B<llvm-bcanalyzer> succeeds, it will exit with 0. Otherwise, if an error
occurs, it will exit with a non-zero value, usually 1.
=head1 SUMMARY OUTPUT DEFINITIONS
The following items are always printed by llvm-bcanalyzer. They comprize the
summary output.
=over
=item B<Bitcode Analysis Of Module>
This just provides the name of the module for which bitcode analysis is being
generated.
=item B<Bitcode Version Number>
The bitcode version (not LLVM version) of the file read by the analyzer.
=item B<File Size>
The size, in bytes, of the entire bitcode file.
=item B<Module Bytes>
The size, in bytes, of the module block. Percentage is relative to File Size.
=item B<Function Bytes>
The size, in bytes, of all the function blocks. Percentage is relative to File
Size.
=item B<Global Types Bytes>
The size, in bytes, of the Global Types Pool. Percentage is relative to File
Size. This is the size of the definitions of all types in the bitcode file.
=item B<Constant Pool Bytes>
The size, in bytes, of the Constant Pool Blocks Percentage is relative to File
Size.
=item B<Module Globals Bytes>
Ths size, in bytes, of the Global Variable Definitions and their initializers.
Percentage is relative to File Size.
=item B<Instruction List Bytes>
The size, in bytes, of all the instruction lists in all the functions.
Percentage is relative to File Size. Note that this value is also included in
the Function Bytes.
=item B<Compaction Table Bytes>
The size, in bytes, of all the compaction tables in all the functions.
Percentage is relative to File Size. Note that this value is also included in
the Function Bytes.
=item B<Symbol Table Bytes>
The size, in bytes, of all the symbol tables in all the functions. Percentage is
relative to File Size. Note that this value is also included in the Function
Bytes.
=item B<Dependent Libraries Bytes>
The size, in bytes, of the list of dependent libraries in the module. Percentage
is relative to File Size. Note that this value is also included in the Module
Global Bytes.
=item B<Number Of Bitcode Blocks>
The total number of blocks of any kind in the bitcode file.
=item B<Number Of Functions>
The total number of function definitions in the bitcode file.
=item B<Number Of Types>
The total number of types defined in the Global Types Pool.
=item B<Number Of Constants>
The total number of constants (of any type) defined in the Constant Pool.
=item B<Number Of Basic Blocks>
The total number of basic blocks defined in all functions in the bitcode file.
=item B<Number Of Instructions>
The total number of instructions defined in all functions in the bitcode file.
=item B<Number Of Long Instructions>
The total number of long instructions defined in all functions in the bitcode
file. Long instructions are those taking greater than 4 bytes. Typically long
instructions are GetElementPtr with several indices, PHI nodes, and calls to
functions with large numbers of arguments.
=item B<Number Of Operands>
The total number of operands used in all instructions in the bitcode file.
=item B<Number Of Compaction Tables>
The total number of compaction tables in all functions in the bitcode file.
=item B<Number Of Symbol Tables>
The total number of symbol tables in all functions in the bitcode file.
=item B<Number Of Dependent Libs>
The total number of dependent libraries found in the bitcode file.
=item B<Total Instruction Size>
The total size of the instructions in all functions in the bitcode file.
=item B<Average Instruction Size>
The average number of bytes per instruction across all functions in the bitcode
file. This value is computed by dividing Total Instruction Size by Number Of
Instructions.
=item B<Maximum Type Slot Number>
The maximum value used for a type's slot number. Larger slot number values take
more bytes to encode.
=item B<Maximum Value Slot Number>
The maximum value used for a value's slot number. Larger slot number values take
more bytes to encode.
=item B<Bytes Per Value>
The average size of a Value definition (of any type). This is computed by
dividing File Size by the total number of values of any type.
=item B<Bytes Per Global>
The average size of a global definition (constants and global variables).
=item B<Bytes Per Function>
The average number of bytes per function definition. This is computed by
dividing Function Bytes by Number Of Functions.
=item B<# of VBR 32-bit Integers>
The total number of 32-bit integers encoded using the Variable Bit Rate
encoding scheme.
=item B<# of VBR 64-bit Integers>
The total number of 64-bit integers encoded using the Variable Bit Rate encoding
scheme.
=item B<# of VBR Compressed Bytes>
The total number of bytes consumed by the 32-bit and 64-bit integers that use
the Variable Bit Rate encoding scheme.
=item B<# of VBR Expanded Bytes>
The total number of bytes that would have been consumed by the 32-bit and 64-bit
integers had they not been compressed with the Variable Bit Rage encoding
scheme.
=item B<Bytes Saved With VBR>
The total number of bytes saved by using the Variable Bit Rate encoding scheme.
The percentage is relative to # of VBR Expanded Bytes.
=back
=head1 DETAILED OUTPUT DEFINITIONS
The following definitions occur only if the -nodetails option was not given.
The detailed output provides additional information on a per-function basis.
=over
=item B<Type>
The type signature of the function.
=item B<Byte Size>
The total number of bytes in the function's block.
=item B<Basic Blocks>
The number of basic blocks defined by the function.
=item B<Instructions>
The number of instructions defined by the function.
=item B<Long Instructions>
The number of instructions using the long instruction format in the function.
=item B<Operands>
The number of operands used by all instructions in the function.
=item B<Instruction Size>
The number of bytes consumed by instructions in the function.
=item B<Average Instruction Size>
The average number of bytes consumed by the instructions in the funtion. This
value is computed by dividing Instruction Size by Instructions.
=item B<Bytes Per Instruction>
The average number of bytes used by the function per instruction. This value is
computed by dividing Byte Size by Instructions. Note that this is not the same
as Average Instruction Size. It computes a number relative to the total function
size not just the size of the instruction list.
=item B<Number of VBR 32-bit Integers>
The total number of 32-bit integers found in this function (for any use).
=item B<Number of VBR 64-bit Integers>
The total number of 64-bit integers found in this function (for any use).
=item B<Number of VBR Compressed Bytes>
The total number of bytes in this function consumed by the 32-bit and 64-bit
integers that use the Variable Bit Rate encoding scheme.
=item B<Number of VBR Expanded Bytes>
The total number of bytes in this function that would have been consumed by
the 32-bit and 64-bit integers had they not been compressed with the Variable
Bit Rate encoding scheme.
=item B<Bytes Saved With VBR>
The total number of bytes saved in this function by using the Variable Bit
Rate encoding scheme. The percentage is relative to # of VBR Expanded Bytes.
=back
=head1 SEE ALSO
L<llvm-dis|llvm-dis>, L<http://llvm.org/docs/BitcodeFormat.html>
=head1 AUTHORS
Maintained by the LLVM Team (L<http://llvm.org>).
=cut

View File

@@ -1,131 +0,0 @@
=pod
=head1 NAME
llvm-config - Print LLVM compilation options
=head1 SYNOPSIS
B<llvm-config> I<option> [I<components>...]
=head1 DESCRIPTION
B<llvm-config> makes it easier to build applications that use LLVM. It can
print the compiler flags, linker flags and object libraries needed to link
against LLVM.
=head1 EXAMPLES
To link against the JIT:
g++ `llvm-config --cxxflags` -o HowToUseJIT.o -c HowToUseJIT.cpp
g++ `llvm-config --ldflags` -o HowToUseJIT HowToUseJIT.o \
`llvm-config --libs engine bcreader scalaropts`
=head1 OPTIONS
=over
=item B<--version>
Print the version number of LLVM.
=item B<--help>
Print a summary of B<llvm-config> arguments.
=item B<--prefix>
Print the installation prefix for LLVM.
=item B<--src-root>
Print the source root from which LLVM was built.
=item B<--obj-root>
Print the object root used to build LLVM.
=item B<--bindir>
Print the installation directory for LLVM binaries.
=item B<--includedir>
Print the installation directory for LLVM headers.
=item B<--libdir>
Print the installation directory for LLVM libraries.
=item B<--cxxflags>
Print the C++ compiler flags needed to use LLVM headers.
=item B<--ldflags>
Print the flags needed to link against LLVM libraries.
=item B<--libs>
Print all the libraries needed to link against the specified LLVM
I<components>, including any dependencies.
=item B<--libnames>
Similar to B<--libs>, but prints the bare filenames of the libraries
without B<-l> or pathnames. Useful for linking against a not-yet-installed
copy of LLVM.
=item B<--libfiles>
Similar to B<--libs>, but print the full path to each library file. This is
useful when creating makefile dependencies, to ensure that a tool is relinked if
any library it uses changes.
=item B<--components>
Print all valid component names.
=item B<--targets-built>
Print the component names for all targets supported by this copy of LLVM.
=item B<--build-mode>
Print the build mode used when LLVM was built (e.g. Debug or Release)
=back
=head1 COMPONENTS
To print a list of all available components, run B<llvm-config
--components>. In most cases, components correspond directly to LLVM
libraries. Useful "virtual" components include:
=over
=item B<all>
Includes all LLVM libaries. The default if no components are specified.
=item B<backend>
Includes either a native backend or the C backend.
=item B<engine>
Includes either a native JIT or the bitcode interpreter.
=back
=head1 EXIT STATUS
If B<llvm-config> succeeds, it will exit with 0. Otherwise, if an error
occurs, it will exit with a non-zero value.
=head1 AUTHORS
Maintained by the LLVM Team (L<http://llvm.org>).
=cut

View File

@@ -1,16 +0,0 @@
=pod
=head1 NAME
llvm-db - LLVM debugger (alpha)
=head1 SYNOPSIS
Details coming soon. Please see
L<http://llvm.org/docs/SourceLevelDebugging.html> in the meantime.
=head1 AUTHORS
Maintained by the LLVM Team (L<http://llvm.org>).
=cut

View File

@@ -0,0 +1,99 @@
<html>
<title>
LLVM: llvm-dis tool
</title>
<body bgcolor=white>
<center><h1>LLVM: <tt>llvm-dis</tt> tool</h1></center>
<HR>
<h3>NAME</h3>
<tt>llvm-dis</tt>
<h3>SYNOPSIS</h3>
<tt>llvm-dis [options] [filename]</tt>
<h3>DESCRIPTION</h3>
The <tt>llvm-dis</tt> command is the LLVM disassembler. It takes an LLVM
bytecode file and converts it into LLVM assembly language or C source code with
equivalent functionality.
<p>
If filename is omitted, <tt>llvm-dis</tt> reads its input from standard input.
<p>
The default output file for <tt>llvm-dis</tt> is determined by the following logic:
<ul>
<li>
If the input is standard input or the file -, then the output is
standard output.
<p>
<li>
If the input filename ends in .bc, then the output filename will be
identical, except that the .bc suffix will be replaced by the .ll or .c
suffix (for LLVM assembly language and C code, respectively).
<p>
<li>
If the input filename does not end in .bc, then the output filename will
be identical to the input filename, except that the .ll or .c suffix
will be appended to the filename (for LLVM assembly language and C code,
respectively).
</ul>
<h3>OPTIONS</h3>
<ul>
<li> -llvm
<br>
Instruct <tt>llvm-dis</tt> to generate LLVM assembly code in human
readable format. This is the default behavior.
<p>
<li> -c
<br>
Instruct <tt>llvm-dis</tt> to generate C source code.
<p>
<li> -f
<br>
Force overwrite. Normally, <tt>llvm-dis</tt> will refuse to overwrite
an output file that already exists. With this option, <tt>llvm-dis</tt>
will overwrite the output file.
<p>
<li> -help
<br>
Print a summary of command line options.
<p>
<li> -o &lt;filename&gt;
<br>
Specify the output filename. If filename is -, then the output is sent
to standard output.
<p>
<li> -time-passes
<br>
Record the amount of time needed for each pass and print it to standard
error.
<p>
</ul>
<h3>EXIT STATUS</h3>
If <tt>llvm-dis</tt> succeeds, it will exit with 0. Otherwise, if an error
occurs, it will exit with a non-zero value.
<h3>SEE ALSO</h3>
<a href="llvm-as.html"><tt>llvm-as</tt></a>
<HR>
Maintained by the <a href="http://llvm.cs.uiuc.edu">LLVM Team</a>.
</body>
</html>

View File

@@ -1,60 +0,0 @@
=pod
=head1 NAME
llvm-dis - LLVM disassembler
=head1 SYNOPSIS
B<llvm-dis> [I<options>] [I<filename>]
=head1 DESCRIPTION
The B<llvm-dis> command is the LLVM disassembler. It takes an LLVM
bitcode file and converts it into human-readable LLVM assembly language.
If filename is omitted or specified as C<->, B<llvm-dis> reads its
input from standard input.
If the input is being read from standard input, then B<llvm-dis>
will send its output to standard output by default. Otherwise, the
output will be written to a file named after the input file, with
a C<.ll> suffix added (any existing C<.bc> suffix will first be
removed). You can override the choice of output file using the
B<-o> option.
=head1 OPTIONS
=over
=item B<-f>
Force overwrite. Normally, B<llvm-dis> will refuse to overwrite
an output file that already exists. With this option, B<llvm-dis>
will overwrite the output file.
=item B<--help>
Print a summary of command line options.
=item B<-o> F<filename>
Specify the output file name. If F<filename> is -, then the output is sent
to standard output.
=back
=head1 EXIT STATUS
If B<llvm-dis> succeeds, it will exit with 0. Otherwise, if an error
occurs, it will exit with a non-zero value.
=head1 SEE ALSO
L<llvm-as|llvm-as>
=head1 AUTHORS
Maintained by the LLVM Team (L<http://llvm.org>).
=cut

View File

@@ -1,63 +0,0 @@
=pod
=head1 NAME
llvm-extract - extract a function from an LLVM module
=head1 SYNOPSIS
B<llvm-extract> [I<options>] B<--func> I<function-name> [I<filename>]
=head1 DESCRIPTION
The B<llvm-extract> command takes the name of a function and extracts it from
the specified LLVM bitcode file. It is primarily used as a debugging tool to
reduce test cases from larger programs that are triggering a bug.
In addition to extracting the bitcode of the specified function,
B<llvm-extract> will also remove unreachable global variables, prototypes, and
unused types.
The B<llvm-extract> command reads its input from standard input if filename is
omitted or if filename is -. The output is always written to standard output,
unless the B<-o> option is specified (see below).
=head1 OPTIONS
=over
=item B<-f>
Force overwrite. Normally, B<llvm-extract> will refuse to overwrite an
output file that already exists. With this option, B<llvm-extract>
will overwrite the output file and replace it with new bitcode.
=item B<--func> I<function-name>
Extract the function named I<function-name> from the LLVM bitcode.
=item B<--help>
Print a summary of command line options.
=item B<-o> I<filename>
Specify the output filename. If filename is "-" (the default), then
B<llvm-extract> sends its output to standard output.
=back
=head1 EXIT STATUS
If B<llvm-extract> succeeds, it will exit with 0. Otherwise, if an error
occurs, it will exit with a non-zero value.
=head1 SEE ALSO
L<bugpoint|bugpoint>
=head1 AUTHORS
Maintained by the LLVM Team (L<http://llvm.org>).
=cut

View File

@@ -1,269 +0,0 @@
=pod
=head1 NAME
llvm-ld - LLVM linker
=head1 SYNOPSIS
B<llvm-ld> <options> <files>
=head1 DESCRIPTION
The B<llvm-ld> tool takes a set of LLVM bitcode files and links them
together into a single LLVM bitcode file. The output bitcode file can be
another bitcode file or an executable bitcode program. Using additional
options, B<llvm-ld> is able to produce native code executables.
The B<llvm-ld> tool is the main linker for LLVM. It is used to link together
the output of LLVM front-end compilers and run "link time" optimizations (mostly
the inter-procedural kind).
The B<llvm-ld> tools attempts to mimic the interface provided by the default
system linker so that it can act as a I<drop-in> replacement.
=head2 Search Order
When looking for objects specified on the command line, B<llvm-ld> will search
for the object first in the current directory and then in the directory
specified by the B<LLVM_LIB_SEARCH_PATH> environment variable. If it cannot
find the object, it fails.
When looking for a library specified with the B<-l> option, B<llvm-ld> first
attempts to load a file with that name from the current directory. If that
fails, it looks for libI<library>.bc, libI<library>.a, or libI<library>.I<shared
library extension>, in that order, in each directory added to the library search
path with the B<-L> option. These directories are searched in the order they
are specified. If the library cannot be located, then B<llvm-ld> looks in the
directory specified by the B<LLVM_LIB_SEARCH_PATH> environment variable. If it
does not find a library there, it fails.
The I<shared library extension> may be I<.so>, I<.dyld>, I<.dll>, or something
different, depending upon the system.
The B<-L> option is global. It does not matter where it is specified in the
list of command line arguments; the directory is simply added to the search path
and is applied to all libraries, preceding or succeeding, in the command line.
=head2 Link order
All object and bitcode files are linked first in the order they were
specified on the command line. All library files are linked next.
Some libraries may not be linked into the object program; see below.
=head2 Library Linkage
Object files and static bitcode objects are always linked into the output
file. Library archives (.a files) load only the objects within the archive
that define symbols needed by the output file. Hence, libraries should be
listed after the object files and libraries which need them; otherwise, the
library may not be linked in, and the dependent library will not have its
undefined symbols defined.
=head2 Native code generation
The B<llvm-ld> program has limited support for native code generation, when
using the B<-native> or B<-native-cbe> options. Native code generation is
performed by converting the linked bitcode into native assembly (.s) or C code
and running the system compiler (typically gcc) on the result.
=head1 OPTIONS
=head2 General Options
=over
=item B<-help>
Print a summary of command line options.
=item B<-v>
Specifies verbose mode. In this mode the linker will print additional
information about the actions it takes, programs it executes, etc.
=item B<-stats>
Print statistics.
=item B<-time-passes>
Record the amount of time needed for each pass and print it to standard
error.
=back
=head2 Input/Output Options
=over
=item B<-o> F<filename>
This overrides the default output file and specifies the name of the file that
should be generated by the linker. By default, B<llvm-ld> generates a file named
F<a.out> for compatibility with B<ld>. The output will be written to
F<filename>.
=item B<-l>F<name>
This option specifies the F<name> of a library to search when resolving symbols
for the program. Only the base name should be specified as F<name>, without a
F<lib> prefix or any suffix.
=item B<-L>F<Path>
This option tells B<llvm-ld> to look in F<Path> to find any library subsequently
specified with the B<-l> option. The paths will be searched in the order in
which they are specified on the command line. If the library is still not found,
a small set of system specific directories will also be searched. Note that
libraries specified with the B<-l> option that occur I<before> any B<-L> options
will not search the paths given by the B<-L> options following it.
=item B<-link-as-library>
Link the bitcode files together as a library, not an executable. In this mode,
undefined symbols will be permitted.
=item B<-r>
An alias for -link-as-library.
=item B<-march=>C<target>
Specifies the kind of machine for which code or assembly should be generated.
=item B<-native>
Generate a native machine code executable.
When generating native executables, B<llvm-ld> first checks for a bitcode
version of the library and links it in, if necessary. If the library is
missing, B<llvm-ld> skips it. Then, B<llvm-ld> links in the same
libraries as native code.
In this way, B<llvm-ld> should be able to link in optimized bitcode
subsets of common libraries and then link in any part of the library that
hasn't been converted to bitcode.
=item B<-native-cbe>
Generate a native machine code executable with the LLVM C backend.
This option is identical to the B<-native> option, but uses the
C backend to generate code for the program instead of an LLVM native
code generator.
=back
=head2 Optimization Options
=over
=item B<-O0>
An alias for the -O1 option.
=item B<-O1>
Optimize for linking speed, not execution speed. The optimizer will attempt to
reduce the size of the linked program to reduce I/O but will not otherwise
perform any link-time optimizations.
=item B<-O2>
Perform only the minimal or required set of scalar optimizations.
=item B<-03>
An alias for the -O2 option.
=item B<-04>
Perform the standard link time inter-procedural optimizations. This will
attempt to optimize the program taking the entire program into consideration.
=item B<-O5>
Perform aggressive link time optimizations. This is the same as -O4 but works
more aggressively to optimize the program.
=item B<-disable-inlining>
Do not run the inlining pass. Functions will not be inlined into other
functions.
=item B<-disable-opt>
Completely disable optimization. The various B<-On> options will be ignored and
no link time optimization passes will be run.
=item B<-disable-internalize>
Do not mark all symbols as internal.
=item B<-verify-each>
Run the verification pass after each of the passes to verify intermediate
results.
=item B<-strip-all>
Strip all debug and symbol information from the executable to make it smaller.
=item B<-strip-debug>
Strip all debug information from the executable to make it smaller.
=item B<-s>
An alias for B<-strip-all>.
=item B<-S>
An alias for B<-strip-debug>.
=item B<-export-dynamic>
An alias for B<-disable-internalize>
=item B<-load> F<module>
Load an optimization module, F<module>, which is expected to be a dynamic
library that provides the function name C<RunOptimizations>. This function will
be passed the PassManager, and the optimization level (values 0-5 based on the
B<-On> option). This function may add passes to the PassManager that should be
run. This feature allows the optimization passes of B<llvm-ld> to be extended.
=item B<-post-link-opt>F<Path>
Run post-link optimization program. After linking is completed a bitcode file
will be generated. It will be passed to the program specified by F<Path> as the
first argument. The second argument to the program will be the name of a
temporary file into which the program should place its optimized output. For
example, the "no-op optimization" would be a simple shell script:
#!/bin/bash
cp $1 $2
=back
=head1 EXIT STATUS
If B<llvm-ld> succeeds, it will exit with 0 return code. If an error occurs,
it will exit with a non-zero return code.
=head1 ENVIRONMENT
The C<LLVM_LIB_SEARCH_PATH> environment variable is used to find bitcode
libraries. Any paths specified in this variable will be searched after the C<-L>
options.
=head1 SEE ALSO
L<llvm-link|llvm-link>
=head1 AUTHORS
Maintained by the LLVM Team (L<http://llvm.org>).
=cut

View File

@@ -0,0 +1,88 @@
<html>
<title>
LLVM: llvm-link tool
</title>
<body bgcolor=white>
<center><h1>LLVM: <tt>llvm-link</tt> tool</h1></center>
<HR>
<h3>NAME</h3>
<tt>llvm-link</tt>
<h3>SYNOPSIS</h3>
<tt>llvm-link [options] &lt;filename&gt; [filename ...]</tt>
<h3>DESCRIPTION</h3>
The <tt>llvm-link</tt> command takes several LLVM bytecode files and links them
together into a single LLVM bytecode file. It writes the output file to
standard output, unless the -o option is used to specify a filename.
<p>
The <tt>llvm-link</tt> command attempts to load the input files from the current
directory. If that fails, it looks for each file in each of the
directories specified by the -L options on the command line. The library search
paths are global; each one is searched for every input file if necessary. The
directories are searched in the order they were specified on the command line.
<h3>
OPTIONS
</h3>
<ul>
<li>-L &lt;directory&gt;
<br>
Add the specified directory to the library search path. When looking
for libraries, <tt>llvm-link</tt> will look in pathname for libraries.
This option can be specified multiple times; <tt>llvm-link</tt> will
search inside these directories in the order in which they were
specified on the command line.
<p>
<li>-f
<br>
Overwrite output files. By default, <tt>llvm-link</tt> will not
overwrite an output file if it alreadys exists.
<p>
<li>-o &lt;filename&gt;
<br>
Output filename. If filename is -, then <tt>llvm-link</tt> will write
its output to standard output.
<p>
<li>-d
<br>
If specified, <tt>llvm-link</tt> prints a human-readable version of the
output bytecode file to standard error.
<p>
<li>-help
<br>
Print a summary of command line options.
<p>
<li>-v
<br>
Verbose mode. Print information about what <tt>llvm-link</tt> is doing.
This typically includes a message for each bytecode file linked in
and for each library found.
</ul>
<h3>
EXIT STATUS
</h3>
If <tt>llvm-link</tt> succeeds, it will exit with 0. Otherwise, if an error
occurs, it will exit with a non-zero value.
<h3>SEE ALSO</h3>
<a href="gccld.html"><tt>gccld</tt></a>
<HR>
Maintained by the <a href="http://llvm.cs.uiuc.edu">LLVM Team</a>.
</body>
</html>

View File

@@ -1,74 +0,0 @@
=pod
=head1 NAME
llvm-link - LLVM linker
=head1 SYNOPSIS
B<llvm-link> [I<options>] I<filename ...>
=head1 DESCRIPTION
B<llvm-link> takes several LLVM bitcode files and links them together into a
single LLVM bitcode file. It writes the output file to standard output, unless
the B<-o> option is used to specify a filename.
B<llvm-link> attempts to load the input files from the current directory. If
that fails, it looks for each file in each of the directories specified by the
B<-L> options on the command line. The library search paths are global; each
one is searched for every input file if necessary. The directories are searched
in the order they were specified on the command line.
=head1 OPTIONS
=over
=item B<-L> F<directory>
Add the specified F<directory> to the library search path. When looking for
libraries, B<llvm-link> will look in path name for libraries. This option can be
specified multiple times; B<llvm-link> will search inside these directories in
the order in which they were specified on the command line.
=item B<-f>
Overwrite output files. By default, B<llvm-link> will not overwrite an output
file if it already exists.
=item B<-o> F<filename>
Specify the output file name. If F<filename> is C<->, then B<llvm-link> will
write its output to standard output.
=item B<-d>
If specified, B<llvm-link> prints a human-readable version of the output
bitcode file to standard error.
=item B<--help>
Print a summary of command line options.
=item B<-v>
Verbose mode. Print information about what B<llvm-link> is doing. This
typically includes a message for each bitcode file linked in and for each
library found.
=back
=head1 EXIT STATUS
If B<llvm-link> succeeds, it will exit with 0. Otherwise, if an error
occurs, it will exit with a non-zero value.
=head1 SEE ALSO
L<gccld|gccld>
=head1 AUTHORS
Maintained by the LLVM Team (L<http://llvm.org>).
=cut

View File

@@ -0,0 +1,118 @@
<html>
<title>
LLVM: llvm-nm tool
</title>
<body bgcolor=white>
<center><h1>LLVM: <tt>llvm-nm</tt> tool</h1></center>
<HR>
<h3>NAME</h3>
<tt>llvm-nm</tt>
<h3>SYNOPSIS</h3>
<tt>llvm-nm [options] [filenames...]</tt>
<h3>DESCRIPTION</h3>
<p>The <tt>llvm-nm</tt> utility lists the names of symbols from the
LLVM bytecode files named on the command line, along with some
ancillary information about each symbol. If no filename is specified,
or - is used as a filename, <tt>llvm-nm</tt> reads its input from standard
input.</p>
<p><tt>llvm-nm</tt>'s default output format is the traditional BSD
<tt>nm(1)</tt> output format. Each such output record consists of an
(optional) 8-digit hexadecimal address, followed by a type code
character, followed by a name, for each symbol. One record is printed
per line; fields are separated by spaces. When the address is omitted,
it is replaced by 8 spaces.</p>
<p>Type code characters currently supported, and their meanings, are
as follows:</p>
<table border>
<tr><td>U</td><td>Named object is referenced but undefined in this
bytecode file</td></tr>
<tr><td>C</td><td>Common (multiple defs link together into one
def)</td></tr>
<tr><td>W</td><td>Weak reference (multiple defs link together into zero or
one defs)</td></tr>
<tr><td>t</td><td>Local function (text) object</td></tr>
<tr><td>T</td><td>Global function (text) object</td></tr>
<tr><td>d</td><td>Local data object</td></tr>
<tr><td>D</td><td>Global data object</td></tr>
<tr><td>?</td><td>Something unrecognizable</td></tr>
</table>
<p>Because LLVM bytecode files typically contain objects that are not
considered to have addresses until they are linked into an executable
image or dynamically compiled "just-in-time", <tt>llvm-nm</tt> does
not print an address for any symbol, even symbols which are defined in
the bytecode file.</p>
<h3>OPTIONS</h3>
<ul>
<li> -P
<br>
Use POSIX.2 output format. Alias for --format=posix.
<p>
<li> -B (default)
<br>
Use BSD output format. Alias for --format=bsd.
<p>
<li> -help
<br>
Print a summary of command-line options and their meanings.
<p>
<li> -defined-only
<br>
Print only symbols defined in this bytecode file (as opposed
to symbols which may be referenced by objects in this file,
but not defined in this file.)
<p>
<li> -extern-only, -g
<br>
Print only symbols whose definitions are external; that is,
accessible from other bytecode files.
<p>
<li> -undefined-only, -u
<br>
Print only symbols referenced but not defined in this bytecode
file.
<p>
<li> -format=<i>fmt</i>, -f
<br>
Select an output format; <i>fmt</i> may be sysv, posix, or
bsd. The default is bsd.
<p>
</ul>
<h3>BUGS</h3>
<tt>llvm-nm</tt> cannot currently see inside <tt>ar(1)</tt> library
archive files, like <tt>nm(1)</tt> can. It cannot demangle C++ mangled
names, like GNU <tt>nm(1)</tt> can.
<h3>EXIT STATUS</h3>
<tt>llvm-nm</tt> exits with an exit code of zero.
<h3>SEE ALSO</h3>
<a href="llvm-dis.html"><tt>llvm-dis</tt></a>,
<tt>ar(1)</tt>,
<tt>nm(1)</tt>
<HR>
Maintained by the <a href="http://llvm.cs.uiuc.edu">LLVM Team</a>.
</body>
</html>

View File

@@ -1,122 +0,0 @@
=pod
=head1 NAME
llvm-nm - list LLVM bitcode file's symbol table
=head1 SYNOPSIS
B<llvm-nm> [I<options>] [I<filenames...>]
=head1 DESCRIPTION
The B<llvm-nm> utility lists the names of symbols from the LLVM bitcode files,
or B<ar> archives containing LLVM bitcode files, named on the command line.
Each symbol is listed along with some simple information about its provenance.
If no file name is specified, or I<-> is used as a file name, B<llvm-nm> will
process a bitcode file on its standard input stream.
B<llvm-nm>'s default output format is the traditional BSD B<nm> output format.
Each such output record consists of an (optional) 8-digit hexadecimal address,
followed by a type code character, followed by a name, for each symbol. One
record is printed per line; fields are separated by spaces. When the address is
omitted, it is replaced by 8 spaces.
Type code characters currently supported, and their meanings, are as follows:
=over
=item U
Named object is referenced but undefined in this bitcode file
=item C
Common (multiple definitions link together into one def)
=item W
Weak reference (multiple definitions link together into zero or one definitions)
=item t
Local function (text) object
=item T
Global function (text) object
=item d
Local data object
=item D
Global data object
=item ?
Something unrecognizable
=back
Because LLVM bitcode files typically contain objects that are not considered to
have addresses until they are linked into an executable image or dynamically
compiled "just-in-time", B<llvm-nm> does not print an address for any symbol,
even symbols which are defined in the bitcode file.
=head1 OPTIONS
=over
=item B<-P>
Use POSIX.2 output format. Alias for B<--format=posix>.
=item B<-B> (default)
Use BSD output format. Alias for B<--format=bsd>.
=item B<--help>
Print a summary of command-line options and their meanings.
=item B<--defined-only>
Print only symbols defined in this bitcode file (as opposed to
symbols which may be referenced by objects in this file, but not
defined in this file.)
=item B<--extern-only>, B<-g>
Print only symbols whose definitions are external; that is, accessible
from other bitcode files.
=item B<--undefined-only>, B<-u>
Print only symbols referenced but not defined in this bitcode file.
=item B<--format=>I<fmt>, B<-f>
Select an output format; I<fmt> may be I<sysv>, I<posix>, or I<bsd>. The
default is I<bsd>.
=back
=head1 BUGS
B<llvm-nm> cannot demangle C++ mangled names, like GNU B<nm> can.
=head1 EXIT STATUS
B<llvm-nm> exits with an exit code of zero.
=head1 SEE ALSO
L<llvm-dis|llvm-dis>, ar(1), nm(1)
=head1 AUTHOR
Maintained by the LLVM Team (L<http://llvm.org>).
=cut

View File

@@ -1,57 +0,0 @@
=pod
=head1 NAME
llvm-prof - print execution profile of LLVM program
=head1 SYNOPSIS
B<llvm-prof> [I<options>] [I<bitcode file>] [I<llvmprof.out>]
=head1 DESCRIPTION
The B<llvm-prof> tool reads in an F<llvmprof.out> file (which can
optionally use a specific file with the third program argument), a bitcode file
for the program, and produces a human readable report, suitable for determining
where the program hotspots are.
This program is often used in conjunction with the F<utils/profile.pl>
script. This script automatically instruments a program, runs it with the JIT,
then runs B<llvm-prof> to format a report. To get more information about
F<utils/profile.pl>, execute it with the B<--help> option.
=head1 OPTIONS
=over
=item B<--annotated-llvm> or B<-A>
In addition to the normal report printed, print out the code for the
program, annotated with execution frequency information. This can be
particularly useful when trying to visualize how frequently basic blocks
are executed. This is most useful with basic block profiling
information or better.
=item B<--print-all-code>
Using this option enables the B<--annotated-llvm> option, but it
prints the entire module, instead of just the most commonly executed
functions.
=item B<--time-passes>
Record the amount of time needed for each pass and print it to standard
error.
=back
=head1 EXIT STATUS
B<llvm-prof> returns 1 if it cannot load the bitcode file or the profile
information. Otherwise, it exits with zero.
=head1 AUTHOR
B<llvm-prof> is maintained by the LLVM Team (L<http://llvm.org>).
=cut

View File

@@ -1,52 +0,0 @@
=pod
=head1 NAME
llvm-ranlib - Generate index for LLVM archive
=head1 SYNOPSIS
B<llvm-ranlib> [--version] [--help] <archive-file>
=head1 DESCRIPTION
The B<llvm-ranlib> command is similar to the common Unix utility, C<ranlib>. It
adds or updates the symbol table in an LLVM archive file. Note that using the
B<llvm-ar> modifier F<s> is usually more efficient than running B<llvm-ranlib>
which is only provided only for completness and compatibility. Unlike other
implementations of C<ranlib>, B<llvm-ranlib> indexes LLVM bitcode files, not
native object modules. You can list the contents of the symbol table with the
C<llvm-nm -s> command.
=head1 OPTIONS
=over
=item F<archive-file>
Specifies the archive-file to which the symbol table is added or updated.
=item F<--version>
Print the version of B<llvm-ranlib> and exit without building a symbol table.
=item F<--help>
Print usage help for B<llvm-ranlib> and exit without building a symbol table.
=back
=head1 EXIT STATUS
If B<llvm-ranlib> succeeds, it will exit with 0. If an error occurs, a non-zero
exit code will be returned.
=head1 SEE ALSO
L<llvm-ar|llvm-ar>, ranlib(1)
=head1 AUTHORS
Maintained by the LLVM Team (L<http://llvm.org>).
=cut

View File

@@ -1,66 +0,0 @@
=pod
=head1 NAME
llvm-upgrade - LLVM assembly upgrade tool
=head1 SYNOPSIS
B<llvm-upgrade> [I<options>] [I<filename>]
=head1 DESCRIPTION
B<llvm-upgrade> is the LLVM assembly upgrade tool. It reads a file containing
human-readable LLVM assembly language, and upgrades that assembly to the current
version of LLVM. If the input is in the form currently accepted by LLVM, then
no upgrades are performed.
The expected usage of this tool is as a filter, like this:
=over
B<llvm-1.9/bin/llvm-dis < 1.9.bc | llvm-upgrade | llvm-2.0/bin/llvm-as -o 2.0.bc>
=back
If F<filename> is omitted or is C<->, then B<llvm-upgrade> reads its input from
standard input.
If an output file is not specified with the B<-o> option, then
B<llvm-upgrade> sends its output to standard output.
=head1 OPTIONS
=over
=item B<-f>
Force overwrite. Normally, B<llvm-upgrade> will refuse to overwrite an
output file that already exists. With this option, B<llvm-upgrade>
will overwrite the output file.
=item B<--help>
Print a summary of command line options.
=item B<-o> F<filename>
Specify the output file name. If F<filename> is C<->, then B<llvm-upgrade>
sends its output to standard output.
=back
=head1 EXIT STATUS
If B<llvm-upgrade> succeeds, it will exit with 0. Otherwise, if an error
occurs, it will exit with a non-zero value.
=head1 SEE ALSO
L<llvm-as|llvm-as>, L<llvm-dis|llvm-dis>
=head1 AUTHORS
Maintained by the LLVM Team (L<http://llvm.org>).
=cut

View File

@@ -1,217 +0,0 @@
=pod
=head1 NAME
llvm2xpp - LLVM bitcode to LLVM C++ IR translator
=head1 SYNOPSIS
B<llvm2cpp> [I<options>] [I<filename>]
=head1 DESCRIPTION
B<llvm2cpp> translates from LLVM bitcode (.bc files) to a
corresponding C++ source file that will make calls against the LLVM C++ API to
build the same module as the input. By default, the C++ output is a complete
program that builds the module, verifies it and then emits the module as
LLVM assembly. This technique assists with testing because the input to
B<llvm2cpp> and the output of the generated C++ program should be identical.
If F<filename> is omitted or is C<->, then B<llvm2cpp> reads its input from
standard input.
If an output file is not specified with the B<-o> option, then
B<llvm2cpp> sends its output to a file or standard output by following
these rules:
=over
=item *
If the input is standard input, then the output is standard output.
=item *
If the input is a file that ends with C<.bc>, then the output file is of
the same name, except that the suffix is changed to C<.cpp>.
=item *
If the input is a file that does not end with the C<.bc> suffix, then the
output file has the same name as the input file, except that the C<.cpp>
suffix is appended.
=back
=head1 OPTIONS
=over
=item B<-f>
Force overwrite. Normally, B<llvm2cpp> will refuse to overwrite an
output file that already exists. With this option, B<llvm2cpp>
will overwrite the output file and replace it with new C++ source code.
=item B<--help>
Print a summary of command line options.
=item B<-f>
Normally, B<llvm2cpp> will not overwrite an existing output file. With this
option, that default behavior is changed and the program will overwrite existing
output files.
=item B<-o> F<filename>
Specify the output file name. If F<filename> is C<->, then B<llvm2cpp>
sends its output to standard output.
=item B<-funcname> F<functionName>
Specify the name of the function to be generated. The generated code contains a
single function that produces the input module. By default its name is
I<makeLLVMModule>. The B<-funcname> option overrides this default and allows
you to control the name of the generated function. This is handy in conjunction
with the B<-fragment> option when you only want B<llvm2cpp> to generate a
single function that produces the module. With both options, such generated code
could be I<#included> into another program.
=item B<-for>
Specify the name of the thing for which C++ code should be generated. By default
the entire input module is re-generated. However, use of the various B<-gen-*>
options can restrict what is produced. This option indicates what that
restriction is.
=item B<-gen-program>
Specify that the output should be a complete program. Such program will recreate
B<llvm2cpp>'s input as an LLVM module, verify that module, and then write out
the module in LLVM assembly format. This is useful for doing identity tests
where the output of the generated program is identical to the input to
B<llvm2cpp>. The LLVM DejaGnu test suite can make use of this fact. This is the
default form of generated output.
If the B<-for> option is given with this option, it specifies the module
identifier to use for the module created.
=item B<-gen-module>
Specify that the output should be a function that regenerates the module. It is
assumed that this output will be #included into another program that has already
arranged for the correct header files to be #included. The function generated
takes no arguments and returns a I<Module*>.
If the B<-for> option is given with this option, it specifies the module
identifier to use in creating the module returned by the generated function.
=item B<-gen-contents>
Specify that the output should be a function that adds the contents of the input
module to another module. It is assumed that the output will be #included into
another program that has already arranged for the correct header files to be
#included. The function generated takes a single argument of type I<Module*> and
returns that argument. Note that Module level attributes such as endianess,
pointer size, target triple and inline asm are not passed on from the input
module to the destination module. Only the sub-elements of the module (types,
constants, functions, global variables) will be added to the input module.
If the B<-for> option is given with this option, it specifies the module
identifier to set in the input module by the generated function.
=item B<-gen-function>
Specify that the output should be a function that produces the definitions
necessary for a specific function to be added to a module. It is assumed that
the output will be #included into another program that has already arranged
for the correct header files to be #included. The function generated takes a
single argument of type I<Module*> and returns the I<Function*> that it added to
the module. Note that only those things (types, constants, etc.) directly
needed in the definition of the function will be placed in the generated
function.
The B<-for> option must be given with this option or an error will be produced.
The value of the option must be the name of a function in the input module for
which code should be generated. If the named function does not exist an error
will be produced.
=item B<-gen-inline>
This option is very analagous to B<-gen-function> except that the generated
function will not re-produce the target function's definition. Instead, the body
of the target function is inserted into some other function passed as an
argument to the generated function. Similarly any arguments to the function must
be passed to the generated function. The result of the generated function is the
first basic block of the target function.
The B<-for> option works the same way as it does for B<-gen-function>.
=item B<-gen-variable>
Specify that the output should be a function that produces the definitions
necessary for a specific global variable to be added to a module. It is assumed
that the output will be #included into another program that has already arranged
for the correct header files to be #included. The function generated takes a
single argument of type I<Module*> and returns the I<GlobalVariable*> that it
added to the module. Note that only those things (types, constants, etc.)
directly needed in the definition of the global variable will be placed in the
generated function.
The B<-for> option must be given with this option or an error will be produced.
THe value of the option must be the name of a global variable in the input
module for which code should be generated. If the named global variable does not
exist an error will be produced.
=item B<-gen-type>
Specify that the output should be a function that produces the definitions
necessary for specific type to be added to a module. It is assumed that the
otuput will be #included into another program that has already arranged for the
correct header files to be #included. The function generated take a single
argument of type I<Module*> and returns the I<Type*> that it added to the
module. Note that the generated function will only add the necessary type
definitions to (possibly recursively) define the requested type.
The B<-for> option must be given with this option or an error will be produced.
The value of the option must be the name of a global type in the input module
for which code should be generated. If the named type does not exist an error
will be produced.
=item B<-stats>
Show pass statistics (not interesting in this program).
=item B<-time-passes>
Show pass timing statistics (not interesting in this program).
=item B<-version>
Show the version number of this program.
=back
=head1 EXIT STATUS
If B<llvm2cpp> succeeds, it will exit with 0. Otherwise, if an error
occurs, it will exit with a non-zero value.
=head1 SEE ALSO
L<llvm-as|llvm-as> L<tblgen|tblgen>
=head1 NOTES
This tool may be removed from a future version of LLVM. Instead, its
functionality may be incorporated into the llc tool. It would then act similarly
to other targets except its output would be C++ source that could be compiled to
construct the input program.
=head1 AUTHORS
Written by Reid Spencer (L<http://hlvm.org>).
=cut

View File

@@ -1,431 +0,0 @@
=pod
=head1 NAME
llvmc - The LLVM Compiler Driver (experimental)
=head1 SYNOPSIS
B<llvmc> [I<options>] [I<filenames>...]
=head1 DESCRIPTION
B<llvmc> is a configurable driver for invoking other LLVM (and non-LLVM) tools
in order to compile, optimize and link software for multiple languages. For
those familiar with FSF's B<gcc> tool, it is very similar. Please note that
B<llvmc> is considered an experimental tool. B<llvmc> has the following goals:
=over
=item * provide a single point of access to the LLVM tool set,
=item * hide the complexities of the LLVM tools through a single interface,
=item * make integration of existing non-LLVM tools simple,
=item * extend the capabilities of minimal front ends, and
=item * make the interface for compiling consistent for all languages.
=back
The tool itself does nothing with a user's program. It merely invokes other
tools to get the compilation tasks done.
The options supported by B<llvmc> generalize the compilation process and
provide a consistent and simple interface for multiple programming languages.
This makes it easier for developers to get their software compiled with LLVM.
Without B<llvmc>, developers would need to understand how to invoke the
front-end compiler, optimizer, assembler, and linker in order to compile their
programs. B<llvmc>'s sole mission is to trivialize that process.
=head2 Basic Operation
B<llvmc> always takes the following basic actions:
=over
=item * Command line options and filenames are collected.
The command line options provide the marching orders to B<llvmc> on what actions
it should perform. This is the I<request> the user is making of B<llvmc> and it
is interpreted first.
=item * Configuration files are read.
Based on the options and the suffixes of the filenames presented, a set of
configuration files are read to configure the actions B<llvmc> will take.
Configuration files are provided by either LLVM or the front end compiler tools
that B<llvmc> invokes. Users generally don't need to be concerned with the
contents of the configuration files.
=item * Determine actions to take.
The tool chain needed to complete the task is determined. This is the primary
work of B<llvmc>. It breaks the request specified by the command line options
into a set of basic actions to be done:
=over
=item * Pre-processing: gathering/filtering compiler input (optional).
=item * Translation: source language to bitcode conversion.
=item * Assembly: bitcode to native code conversion.
=item * Optimization: conversion of bitcode to something that runs faster.
=item * Linking: combining multiple bitcode files to produce executable program.
=back
=item * Execute actions.
The actions determined previously are executed sequentially and then
B<llvmc> terminates.
=back
=head1 OPTIONS
=head2 Control Options
Control options tell B<llvmc> what to do at a high level. The
following control options are defined:
=over
=item B<-c> or B<--compile>
This option specifies that the linking phase is not to be run. All
previous phases, if applicable will run. This is generally how a given
bitcode file is compiled and optimized for a source language module.
=item B<-k> or B<--link> or default
This option (or the lack of any control option) specifies that all stages
of compilation, optimization, and linking should be attempted. Source files
specified on the command line will be compiled and linked with objects and
libraries also specified.
=item B<-S>
This option specifies that compilation should end in the creation of
an LLVM assembly file that can be later converted to an LLVM object
file.
=item B<-E>
This option specifies that no compilation or linking should be
performed. Only pre-processing, if applicable to the language being
compiled, is performed. For languages that support it, this will
result in the output containing the raw input to the compiler.
=back
=head2 Optimization Options
Optimization with B<llvmc> is based on goals and specified with
the following -O options. The specific details of which
optimizations run is controlled by the configuration files because
each source language will have different needs.
=over
=item B<-O1> or B<-O0> (default, fast compilation)
Only those optimizations that will hasten the compilation (mostly by reducing
the output) are applied. In general these are extremely fast and simple
optimizations that reduce emitted code size. The goal here is not to make the
resulting program fast but to make the compilation fast. If not specified,
this is the default level of optimization.
=item B<-O2> (basic optimization)
This level of optimization specifies a balance between generating good code
that will execute reasonably quickly and not spending too much time optimizing
the code to get there. For example, this level of optimization may include
things like global common sub-expression elimination, aggressive dead code
elimination, and scalar replication.
=item B<-O3> (aggressive optimization)
This level of optimization aggressively optimizes each set of files compiled
together. However, no link-time inter-procedural optimization is performed.
This level implies all the optimizations of the B<-O1> and B<-O2> optimization
levels, and should also provide loop optimizations and compile time
inter-procedural optimizations. Essentially, this level tries to do as much
as it can with the input it is given but doesn't do any link time IPO.
=item B<-O4> (link time optimization)
In addition to the previous three levels of optimization, this level of
optimization aggressively optimizes each program at link time. It employs
basic analysis and basic link-time inter-procedural optimizations,
considering the program as a whole.
=item B<-O5> (aggressive link time optimization)
This is the same as B<-O4> except it employs aggressive analyses and
aggressive inter-procedural optimization.
=item B<-O6> (profile guided optimization: not implemented)
This is the same as B<-O5> except that it employs profile-guided
re-optimization of the program after it has executed. Note that this implies
a single level of re-optimization based on run time profile analysis. Once
the re-optimization has completed, the profiling instrumentation is
removed and final optimizations are employed.
=item B<-O7> (lifelong optimization: not implemented)
This is the same as B<-O5> and similar to B<-O6> except that re-optimization
is performed through the life of the program. That is, each run will update
the profile by which future re-optimizations are directed.
=back
=head2 Input Options
=over
=item B<-l> I<LIBRARY>
This option instructs B<llvmc> to locate a library named I<LIBRARY> and search
it for unresolved symbols when linking the program.
=item B<-L> F<path>
This option instructs B<llvmc> to add F<path> to the list of places in which
the linker will
=item B<-x> I<LANGUAGE>
This option instructs B<llvmc> to regard the following input files as
containing programs in the language I<LANGUAGE>. Normally, input file languages
are identified by their suffix but this option will override that default
behavior. The B<-x> option stays in effect until the end of the options or
a new B<-x> option is encountered.
=back
=head2 Output Options
=over
=item B<-m>I<arch>
This option selects the back end code generator to use. The I<arch> portion
of the option names the back end to use.
=item B<--native>
Normally, B<llvmc> produces bitcode files at most stages of compilation.
With this option, B<llvmc> will arrange for native object files to be
generated with the B<-c> option, native assembly files to be generated
with the B<-S> option, and native executables to be generated with the
B<--link> option. In the case of the B<-E> option, the output will not
differ as there is no I<native> version of pre-processed output.
=item B<-o> F<filename>
Specify the output file name. The contents of the file depend on other
options.
=back
=head2 Information Options
=over
=item B<-n> or B<--no-op>
This option tells B<llvmc> to do everything but actually execute the
resulting tools. In combination with the B<-v> option, this causes B<llvmc>
to merely print out what it would have done.
=item B<-v> or B<--verbose>
This option will cause B<llvmc> to print out (on standard output) each of the
actions it takes to accomplish the objective. The output will immediately
precede the invocation of other tools.
=item B<--stats>
Print all statistics gathered during the compilation to the standard error.
Note that this option is merely passed through to the sub-tools to do with
as they please.
=item B<--time-passes>
Record the amount of time needed for each optimization pass and print it
to standard error. Like B<--stats> this option is just passed through to
the sub-tools to do with as they please.
=item B<--time-programs>
Record the amount of time each program (compilation tool) takes and print
it to the standard error.
=back
=head2 Language Specific Options
=over
=item B<-T,pre>=I<options>
Pass an arbitrary option to the pre-processor.
=item B<-T,opt>=I<options>
Pass an arbitrary option to the optimizer.
=item B<-T,lnk>=I<options>
Pass an arbitrary option to the linker.
=item B<-T,asm>=I<options>
Pass an arbitrary option to the code generator.
=back
=head2 C/C++ Specific Options
=over
=item B<-I>F<path>
This option is just passed through to a C or C++ front end compiler to tell it
where include files can be found.
=item B<-D>F<symbol>
This option is just passed through to a C or C++ front end compiler to tell it
to define a symbol.
=back
=head2 Miscellaneous Options
=over
=item B<--help>
Print a summary of command line options.
=item B<--version>
This option will cause B<llvmc> to print out its version number and terminate.
=back
=head2 Advanced Options
You better know what you're doing if you use these options. Improper use
of these options can produce drastically wrong results.
=over
=item B<--config-dir> F<dirname>
This option tells B<llvmc> to read configuration data from the I<directory>
named F<dirname>. Data from such directories will be read in the order
specified on the command line after all other standard configuration files have
been read. This allows users or groups of users to conveniently create
their own configuration directories in addition to the standard ones to which
they may not have write access.
=back
=head2 Unimplemented Options
The options below are not currently implemented in B<llvmc> but will be
eventually. They are documented here as "future design".
=over
=item B<--show-config> I<[suffixes...]>
When this option is given, the only action taken by B<llvmc> is to show its
final configuration state in the form of a configuration file. No compilation
tasks will be conducted when this option is given; processing will stop once
the configuration has been printed. The optional (comma separated) list of
suffixes controls what is printed. Without any suffixes, the configuration
for all languages is printed. With suffixes, only the languages pertaining
to those file suffixes will be printed. The configuration information is
printed after all command line options and configuration files have been
read and processed. This allows the user to verify that the correct
configuration data has been read by B<llvmc>.
=item B<--config> :I<section>:I<name>=I<value>
This option instructs B<llvmc> to accept I<value> as the value for configuration
item I<name> in the section named I<section>. This is a quick way to override
a configuration item on the command line without resorting to changing the
configuration files.
=item B<--config-only-from> F<dirname>
This option tells B<llvmc> to skip the normal processing of configuration
files and only configure from the contents of the F<dirname> directory. Multiple
B<--config-only-from> options may be given in which case the directories are
read in the order given on the command line.
=item B<--emit-raw-code>
No optimization is done whatsoever. The compilers invoked by B<llvmc> with
this option given will be instructed to produce raw, unoptimized code. This
option is useful only to front end language developers and therefore does not
participate in the list of B<-O> options. This is distinctly different from
the B<-O0> option (a synonym for B<-O1>) because those optimizations will
reduce code size to make compilation faster. With B<--emit-raw-code>, only
the full raw code produced by the compiler will be generated.
=back
=head1 EXIT STATUS
If B<llvmc> succeeds, it will exit with 0. Otherwise, if an error
occurs, it will exit with a non-zero value and no compilation actions
will be taken. If one of the compilation tools returns a non-zero
status, pending actions will be discarded and B<llvmc> will return the
same result code as the failing compilation tool.
=head1 DEFICIENCIES
B<llvmc> is considered an experimental LLVM tool because it has these
deficiencies:
=over
=item Insufficient support for native linking
Because B<llvm-ld> doesn't handle native linking, neither can B<llvmc>
=item Poor configuration support
The support for configuring new languages, etc. is weak. There are many
command line configurations that cannot be achieved with the current
support. Furthermore the grammar is cumbersome for configuration files.
Please see L<http://llvm.org/PR686> for further details.
=item Does not handle target specific configurations
This is one of the major deficiencies, also addressed in
L<http://llvm.org/PR686>
=back
=head1 SEE ALSO
L<llvm-as|llvm-as>, L<llvm-dis|llvm-dis>, L<llc|llc>, L<llvm-link|llvm-link>
=head1 AUTHORS
Maintained by the LLVM Team (L<http://llvm.org>).
=cut

View File

@@ -0,0 +1,113 @@
<html>
<title>
LLVM: llvmgcc tool
</title>
<body bgcolor=white>
<center>
<h1>LLVM: <tt>llvmgcc</tt> tool</h1>
</center>
<HR>
<h3>NAME</h3>
<tt>llvmgcc</tt>
<h3>
SYNOPSIS
</h3>
<tt>llvmgcc [options] filename</tt>
<h3>
DESCRIPTION
</h3>
The <tt>llvmgcc</tt> command is the LLVM C front end. It is a modified version
of the <a href="http://gcc.gnu.org">GNU Compiler Collection</a> (GCC) that takes
C programs and compiles them into LLVM bytecode or assembly language, depending
upon the options.
<p>
Unless the <tt>-S</tt> option is specified, <tt>llvmgcc</tt> will use the
<a href="gccas.html"><tt>gccas</tt></a> program to perform some optimizations
and create an LLVM bytecode file. Unless the <tt>-c</tt> option is specified,
<tt>llvmgcc</tt> will also use the <a href="gccld.html"><tt>gccld</tt></a>
program to perform further optimizations and link the resulting bytecode
file(s) with support libraries to create an executable program.
<p>
Being derived from GCC, llvmgcc has many of GCC's features and accepts most of
GCC's options. It handles a number of GCC's extensions to the C programming
language.
<p>
Below you will find several commonly used options:
<h3>
OPTIONS
</h3>
<ul>
<li> -S
<br>
Do not generate an LLVM bytecode file. Rather, compile the source file
into an LLVM assembly language file.
<p>
<li> -c
<br>
Do not generate a linked bytecode executable. Rather, compile the source
file into an LLVM bytecode file. This bytecode file can then be linked
with other bytecode files later to generate a full LLVM executable.
<p>
<li> -o <i>filename</i>
<br>
Specify the output file to be <i>filename</i>.
<p>
<li> -I <i>directory</i>
<br>
Add a directory to the header file search path. This option can be
repeated.
<p>
<li> -L <i>directory</i>
<br>
Add <i>directory</i> to the library search path. This option can be
repeated.
<p>
<li> -l<i>name</i>
<br>
Link in the library lib<i>name</i>.[bc | a | so]. This library should
be a bytecode library.
<p>
<li>-Wl,<i>option</i>
<br>
Pass <i>option</i> to the linker program, <a
href="gccld.html"><tt>gccld</tt></a>.
<p>
</ul>
<h3>
EXIT STATUS
</h3>
If <tt>llvmgcc</tt> succeeds, it will exit with 0. Otherwise, if an error
occurs, it will exit with a non-zero value.
<h3>
SEE ALSO
</h3>
<A HREF="llvmgxx.html"><tt>llvmg++</tt></A>,
<A HREF="gccas.html"><tt>gccas</tt></A>,
<A HREF="gccld.html"><tt>gccld</tt></A>,
and the Info documentation for <tt>gcc</tt>.
<HR>
Maintained by the <a href="http://llvm.cs.uiuc.edu">LLVM Team</a>.
</body>
</html>

View File

@@ -1,85 +0,0 @@
=pod
=head1 NAME
llvm-gcc - LLVM C front-end
=head1 SYNOPSIS
B<llvm-gcc> [I<options>] I<filename>
=head1 DESCRIPTION
The B<llvm-gcc> command is the LLVM C front end. It is a modified
version of gcc that compiles C/ObjC programs into native objects, LLVM
bitcode or LLVM assembly language, depending upon the options.
By default, B<llvm-gcc> compiles to native objects just like GCC does. If the
B<-emit-llvm> option is given then it will generate LLVM bitcode files instead.
If B<-S> (assembly) is also given, then it will generate LLVM assembly.
Being derived from the GNU Compiler Collection, B<llvm-gcc> has many
of gcc's features and accepts most of gcc's options. It handles a
number of gcc's extensions to the C programming language.
=head1 OPTIONS
=over
=item B<--help>
Print a summary of command line options.
=item B<-S>
Do not generate an LLVM bitcode file. Rather, compile the source
file into an LLVM assembly language file.
=item B<-c>
Do not generate a linked executable. Rather, compile the source
file into an LLVM bitcode file. This bitcode file can then be
linked with other bitcode files later on to generate a full LLVM
executable.
=item B<-o> I<filename>
Specify the output file to be I<filename>.
=item B<-I> I<directory>
Add a directory to the header file search path. This option can be
repeated.
=item B<-L> I<directory>
Add I<directory> to the library search path. This option can be
repeated.
=item B<-l>I<name>
Link in the library libI<name>.[bc | a | so]. This library should
be a bitcode library.
=item B<-emit-llvm>
Make the output be LLVM bitcode (or assembly) instead of native object (or
assembly).
=back
=head1 EXIT STATUS
If B<llvm-gcc> succeeds, it will exit with 0. Otherwise, if an error
occurs, it will exit with a non-zero value.
=head1 SEE ALSO
L<llvm-g++|llvmgxx>
=head1 AUTHORS
Maintained by the LLVM Team (L<http://llvm.org>).
=cut

View File

@@ -0,0 +1,107 @@
<html>
<title>
LLVM: llvmg++ tool
</title>
<body bgcolor=white>
<center>
<h1>LLVM: <tt>llvmg++</tt> tool</h1>
</center>
<HR>
<h3>NAME</h3>
<tt>llvmg++</tt>
<h3>SYNOPSIS</h3>
<tt>llvmg++ [options] filename</tt>
<h3>DESCRIPTION</h3>
The <tt>llvmg++</tt> command is the LLVM C++ front end. It is a modified
version of g++ that takes C++ programs and compiles them into LLVM bytecode or
assembly language, depending upon the options.
<p>
Unless the <tt>-S</tt> option is specified, <tt>llvmg++</tt> will use the
<a href="gccas.html"><tt>gccas</tt></a> program to perform some optimizations
and create an LLVM bytecode file. Unless the <tt>-c</tt> option is specified,
<tt>llvmg++</tt> will also use the <a href="gccld.html"><tt>gccld</tt></a>
program to perform further optimizations and link the resulting bytecode
file(s) with support libraries to create an executable program.
<p>
Being derived from the <a href="http://gcc.gnu.org">GNU Compiler Collection</a>,
<tt>llvmg++</tt> has many of g++'s features and accepts most of g++'s options.
It handles a number of g++'s extensions to the C++ programming language.
<p>
Below you will find several commonly used options:
<h3>
OPTIONS
</h3>
<ul>
<li> -S
<br>
Do not generate an LLVM bytecode file. Rather, compile the source file
into an LLVM assembly language file.
<p>
<li> -c
<br>
Do not generate a linked executable. Rather, compile the source file
into an LLVM bytecode file. This bytecode file can then be linked with
other bytecode files later on to generate a full LLVM executable.
<p>
<li> -o <i>filename</i>
<br>
Specify the output file to be <i>filename</i>.
<p>
<li> -I <i>directory</i>
<br>
Add a directory to the header file search path. This option can be
repeated.
<p>
<li> -L <i>directory</i>
<br>
Add <i>directory</i> to the library search path. This option can be
repeated.
<p>
<li> -l<i>name</i>
<br>
Link in the library lib<i>name</i>.[bc | a | so]. This library should
be a bytecode library.
<p>
<li>-Wl,<i>option</i>
<br>
Pass <i>option</i> to the linker (usually gccld).
<p>
</ul>
<h3>
EXIT STATUS
</h3>
If <tt>llvmg++</tt> succeeds, it will exit with 0. Otherwise, if an error
occurs, it will exit with a non-zero value.
<h3>
SEE ALSO
</h3>
<A HREF="llvmgcc.html"><tt>llvmg++</tt></A>,
<A HREF="gccas.html"><tt>gccas</tt></A>,
<A HREF="gccld.html"><tt>gccld</tt></A>
<HR>
Maintained by the <a href="http://llvm.cs.uiuc.edu">LLVM Team</a>.
</body>
</html>

View File

@@ -1,85 +0,0 @@
=pod
=head1 NAME
llvm-g++ - LLVM C++ front-end
=head1 SYNOPSIS
B<llvm-g++> [I<options>] I<filename>
=head1 DESCRIPTION
The B<llvm-g++> command is the LLVM C++ front end. It is a modified
version of g++ that compiles C++/ObjC++ programs into native code,
LLVM bitcode or assembly language, depending upon the options.
By default, B<llvm-g++> compiles to native objects just like GCC does. If the
B<-emit-llvm> option is given then it will generate LLVM bitcode files instead.
If B<-S> (assembly) is also given, then it will generate LLVM assembly.
Being derived from the GNU Compiler Collection, B<llvm-g++> has many
of g++'s features and accepts most of g++'s options. It handles a
number of g++'s extensions to the C++ programming language.
=head1 OPTIONS
=over
=item B<--help>
Print a summary of command line options.
=item B<-S>
Do not generate an LLVM bitcode file. Rather, compile the source
file into an LLVM assembly language file.
=item B<-c>
Do not generate a linked executable. Rather, compile the source
file into an LLVM bitcode file. This bitcode file can then be
linked with other bitcode files later on to generate a full LLVM
executable.
=item B<-o> I<filename>
Specify the output file to be I<filename>.
=item B<-I> I<directory>
Add a directory to the header file search path. This option can be
repeated.
=item B<-L> I<directory>
Add I<directory> to the library search path. This option can be
repeated.
=item B<-l>I<name>
Link in the library libI<name>.[bc | a | so]. This library should
be a bitcode library.
=item B<-emit-llvm>
Make the output be LLVM bitcode (or assembly) instead of native object (or
assembly).
=back
=head1 EXIT STATUS
If B<llvm-g++> succeeds, it will exit with 0. Otherwise, if an error
occurs, it will exit with a non-zero value.
=head1 SEE ALSO
L<llvm-gcc|llvmgcc>
=head1 AUTHORS
Maintained by the LLVM Team (L<http://llvm.org>).
=cut

View File

@@ -1,256 +0,0 @@
/* Based on http://www.perldoc.com/css/perldoc.css */
@import url("../llvm.css");
body { font-family: Arial,Helvetica; }
blockquote { margin: 10pt; }
h1, a { color: #336699; }
/*** Top menu style ****/
.mmenuon {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #ff6600; font-size: 10pt;
}
.mmenuoff {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #ffffff; font-size: 10pt;
}
.cpyright {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #ffffff; font-size: xx-small;
}
.cpyrightText {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #ffffff; font-size: xx-small;
}
.sections {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #336699; font-size: 11pt;
}
.dsections {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #336699; font-size: 12pt;
}
.slink {
font-family: Arial,Helvetica; font-weight: normal; text-decoration: none;
color: #000000; font-size: 9pt;
}
.slink2 { font-family: Arial,Helvetica; text-decoration: none; color: #336699; }
.maintitle {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #336699; font-size: 18pt;
}
.dblArrow {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #336699; font-size: small;
}
.menuSec {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #336699; font-size: small;
}
.newstext {
font-family: Arial,Helvetica; font-size: small;
}
.linkmenu {
font-family: Arial,Helvetica; color: #000000; font-weight: bold;
text-decoration: none;
}
P {
font-family: Arial,Helvetica;
}
PRE {
font-size: 10pt;
}
.quote {
font-family: Times; text-decoration: none;
color: #000000; font-size: 9pt; font-style: italic;
}
.smstd { font-family: Arial,Helvetica; color: #000000; font-size: x-small; }
.std { font-family: Arial,Helvetica; color: #000000; }
.meerkatTitle {
font-family: sans-serif; font-size: x-small; color: black; }
.meerkatDescription { font-family: sans-serif; font-size: 10pt; color: black }
.meerkatCategory {
font-family: sans-serif; font-size: 9pt; font-weight: bold; font-style: italic;
color: brown; }
.meerkatChannel {
font-family: sans-serif; font-size: 9pt; font-style: italic; color: brown; }
.meerkatDate { font-family: sans-serif; font-size: xx-small; color: #336699; }
.tocTitle {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #333333; font-size: 10pt;
}
.toc-item {
font-family: Arial,Helvetica; font-weight: bold;
color: #336699; font-size: 10pt; text-decoration: underline;
}
.perlVersion {
font-family: Arial,Helvetica; font-weight: bold;
color: #336699; font-size: 10pt; text-decoration: none;
}
.podTitle {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #000000;
}
.docTitle {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #000000; font-size: 10pt;
}
.dotDot {
font-family: Arial,Helvetica; font-weight: bold;
color: #000000; font-size: 9pt;
}
.docSec {
font-family: Arial,Helvetica; font-weight: normal;
color: #333333; font-size: 9pt;
}
.docVersion {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #336699; font-size: 10pt;
}
.docSecs-on {
font-family: Arial,Helvetica; font-weight: normal; text-decoration: none;
color: #ff0000; font-size: 10pt;
}
.docSecs-off {
font-family: Arial,Helvetica; font-weight: normal; text-decoration: none;
color: #333333; font-size: 10pt;
}
h2 {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #336699; font-size: medium;
}
h1 {
font-family: Verdana,Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #336699; font-size: large;
}
DL {
font-family: Arial,Helvetica; font-weight: normal; text-decoration: none;
color: #333333; font-size: 10pt;
}
UL > LI > A {
font-family: Arial,Helvetica; font-weight: bold;
color: #336699; font-size: 10pt;
}
.moduleInfo {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #333333; font-size: 11pt;
}
.moduleInfoSec {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #336699; font-size: 10pt;
}
.moduleInfoVal {
font-family: Arial,Helvetica; font-weight: normal; text-decoration: underline;
color: #000000; font-size: 10pt;
}
.cpanNavTitle {
font-family: Arial,Helvetica; font-weight: bold;
color: #ffffff; font-size: 10pt;
}
.cpanNavLetter {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #333333; font-size: 9pt;
}
.cpanCat {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #336699; font-size: 9pt;
}
.bttndrkblue-bkgd-top {
background-color: #225688;
background-image: url(/global/mvc_objects/images/bttndrkblue_bgtop.gif);
}
.bttndrkblue-bkgd-left {
background-color: #225688;
background-image: url(/global/mvc_objects/images/bttndrkblue_bgleft.gif);
}
.bttndrkblue-bkgd {
padding-top: 0px;
padding-bottom: 0px;
margin-bottom: 0px;
margin-top: 0px;
background-repeat: no-repeat;
background-color: #225688;
background-image: url(/global/mvc_objects/images/bttndrkblue_bgmiddle.gif);
vertical-align: top;
}
.bttndrkblue-bkgd-right {
background-color: #225688;
background-image: url(/global/mvc_objects/images/bttndrkblue_bgright.gif);
}
.bttndrkblue-bkgd-bottom {
background-color: #225688;
background-image: url(/global/mvc_objects/images/bttndrkblue_bgbottom.gif);
}
.bttndrkblue-text a {
color: #ffffff;
text-decoration: none;
}
a.bttndrkblue-text:hover {
color: #ffDD3C;
text-decoration: none;
}
.bg-ltblue {
background-color: #f0f5fa;
}
.border-left-b {
background: #f0f5fa url(/i/corner-leftline.gif) repeat-y;
}
.border-right-b {
background: #f0f5fa url(/i/corner-rightline.gif) repeat-y;
}
.border-top-b {
background: #f0f5fa url(/i/corner-topline.gif) repeat-x;
}
.border-bottom-b {
background: #f0f5fa url(/i/corner-botline.gif) repeat-x;
}
.border-right-w {
background: #ffffff url(/i/corner-rightline.gif) repeat-y;
}
.border-top-w {
background: #ffffff url(/i/corner-topline.gif) repeat-x;
}
.border-bottom-w {
background: #ffffff url(/i/corner-botline.gif) repeat-x;
}
.bg-white {
background-color: #ffffff;
}
.border-left-w {
background: #ffffff url(/i/corner-leftline.gif) repeat-y;
}

View File

@@ -0,0 +1,120 @@
<html>
<title>LLVM: opt tool</title>
<body bgcolor=white>
<center><h1>LLVM: <tt>opt</tt> tool</h1></center>
<HR>
<h3>NAME</h3>
<tt>opt</tt>
<h3>SYNOPSIS</h3>
<tt>opt [options] [filename]</tt>
<h3>DESCRIPTION</h3>
The <tt>opt</tt> command is the modular LLVM optimizer. It takes LLVM bytecode
as input, runs the specified optimizations on it, and then outputs the optimized
LLVM bytecode.
<p>
The optimizations available via <tt>opt</tt> depend upon what libraries were
linked into it as well as any additional libraries that have been loaded with
the <tt>-load</tt> option. Use the <tt>-help</tt> option to determine what
optimizations you can use.
<p>
If no filename is specified on the command line, <tt>opt</tt> reads its input
from standard input.
<p>
If an output filename is not specified with the <tt>-o</tt> option, <tt>opt</tt>
writes its output to the standard output.
<h3>OPTIONS</h3>
<ul>
<li> -f
<br>
Force overwrite. Normally, <tt>opt</tt> will refuse to overwrite an
output file that already exists. With this option, <tt>opt</tt> will
overwrite the output file and replace it with new bytecode.
<p>
<li> -help
<br>
Print a summary of command line options.
<p>
<li> -o &lt;filename&gt;
<br>
Specify the output filename.
<p>
<li> -stats
<br>
Print statistics.
<p>
<li> -time-passes
<br>
Record the amount of time needed for each pass and print it to standard
error.
<p>
<li> -debug
<br>
If this is a debug build, this option will enable debug printouts from
passes which use the <tt>DEBUG</tt> macro. See the <a
href="../ProgrammersManual.html#DEBUG">Programmer's Manual</a> for more
information.
<p>
<!--
<li> -internalize-public-api-file &lt;filename&gt;
<br>
Preserve the symbol names listed in the file filename.
<p>
<li> -internalize-public-api-list=&lt;list&gt;
<br>
Perserve the symbol names specified.
<p>
-->
<li> -q
<br>
Quiet mode. Do not print messages on whether the program was modified.
<p>
<li> -load &lt;plugin.so&gt;
<br>
Load the dynamic object &lt;plugin.so&gt;. This object should register new
optimization passes. Once loaded, the object will add new command line
options to enable various optimizations. To see the new complete list
of optimizations, use the -help and -load options together:
<p>
<tt>opt -load &lt;plugin.so&gt; -help</tt>
<p>
<li> -p
<br>
Print module after each transformation.
<p>
</ul>
<h3>EXIT STATUS</h3>
If <tt>opt</tt> succeeds, it will exit with 0. Otherwise, if an error occurs,
it will exit with a non-zero value.
<h3>SEE ALSO</h3>
<a href="analyze.html"><tt>analyze</tt></a>
<HR>
Maintained by the <a href="http://llvm.cs.uiuc.edu">LLVM Team</a>.
</body>
</html>

View File

@@ -1,138 +0,0 @@
=pod
=head1 NAME
opt - LLVM optimizer
=head1 SYNOPSIS
B<opt> [I<options>] [I<filename>]
=head1 DESCRIPTION
The B<opt> command is the modular LLVM optimizer and analyzer. It takes LLVM
bitcode as input, runs the specified optimizations or analyses on it, and then
outputs the optimized LLVM bitcode or the analysis results. The function of
B<opt> depends on whether the B<-analyze> option is given.
When B<-analyze> is specified, B<opt> performs various analyses of LLVM
bitcode. It will usually print the results on standard output, but in a few
cases, it will print output to standard error or generate a file with the
analysis output, which is usually done when the output is meant for another
program.
While B<-analyze> is I<not> given, B<opt> attempts to produce an optimized
bitcode file. The optimizations available via B<opt> depend upon what
libraries were linked into it as well as any additional libraries that have
been loaded with the B<-load> option. Use the B<-help> option to determine
what optimizations you can use.
If I<filename> is omitted from the command line or is I<->, B<opt> reads its
input from standard input. The input must be an LLVM bitcode file.
If an output filename is not specified with the B<-o> option, B<opt>
writes its output to the standard output.
=head1 OPTIONS
=over
=item B<-f>
Force overwrite. Normally, B<opt> will refuse to overwrite an
output file that already exists. With this option, B<opt> will
overwrite the output file and replace it with new bitcode.
=item B<-help>
Print a summary of command line options.
=item B<-o> I<filename>
Specify the output filename.
=item B<-{passname}>
B<opt> provides the ability to run any of LLVM's optimization or analysis passes
in any order. The B<-help> option lists all the passes available. The order in
which the options occur on the command line are the order in which they are
executed (within pass constraints).
=item B<-std-compile-opts>
This is short hand for a standard list of I<compile time optimization> passes.
This is typically used to optimize the output from the llvm-gcc front end. It
might be useful for other front end compilers as well. To discover the full set
of options available, use the following command:
llvm-as < /dev/null | opt -std-compile-opts -disable-output -debug-pass=Arguments
=item B<-disable-inlining>
This option is only meaningful when B<-std-compile-opts> is given. It simply
removes the inlining pass from the standard list.
=item B<-disable-opt>
This option is only meaningful when B<-std-compile-opts> is given. It disables
most, but not all, of the B<-std-compile-opts>. The ones that remain are
B<-verify>, B<-lower-setjmp>, and B<-funcresolve>.
=item B<-strip-debug>
This option causes opt to strip debug information from the module before
applying other optimizations. It is essentially the same as B<-strip> but it
ensures that stripping of debug information is done first.
=item B<-verify-each>
This option causes opt to add a verify pass after every pass otherwise specified
on the command line (including B<-verify>). This is useful for cases where it
is suspected that a pass is creating an invalid module but it is not clear which
pass is doing it. The combination of B<-std-compile-opts> and B<-verify-each>
can quickly track down this kind of problem.
=item B<-profile-info-file> I<filename>
Specify the name of the file loaded by the -profile-loader option.
=item B<-stats>
Print statistics.
=item B<-time-passes>
Record the amount of time needed for each pass and print it to standard
error.
=item B<-debug>
If this is a debug build, this option will enable debug printouts
from passes which use the I<DEBUG()> macro. See the B<LLVM Programmer's
Manual>, section I<#DEBUG> for more information.
=item B<-load>=I<plugin>
Load the dynamic object I<plugin>. This object should register new optimization
or analysis passes. Once loaded, the object will add new command line options to
enable various optimizations or analyses. To see the new complete list of
optimizations, use the B<-help> and B<-load> options together. For example:
opt -load=plugin.so -help
=item B<-p>
Print module after each transformation.
=back
=head1 EXIT STATUS
If B<opt> succeeds, it will exit with 0. Otherwise, if an error
occurs, it will exit with a non-zero value.
=head1 AUTHORS
Maintained by the LLVM Team (L<http://llvm.org>).
=cut

View File

@@ -1,96 +0,0 @@
=pod
=head1 NAME
stkrc - Stacker Compiler
=head1 SYNOPSIS
B<stkrc> [I<options>] [I<filename>]
=head1 DESCRIPTION
The B<stkrc> command is the compiler for the Stacker language. Stacker is a
simple stack based, Forth-like language that was written as a demonstration
language for LLVM. For details on the language, please see
L<http://llvm.org/docs/Stacker.html> . The B<stkrc> compiler is fairly
minimal. It compiles to bitcode only and doesn't perform any optimizations.
The output of stkrc (a bitcode file) can be piped through other LLVM tools
for optimization and linking.
If F<filename> is omitted or is C<->, then B<stkrc> reads its input
from standard input. This is useful for combining the tool into a pipeline.
If an output file is not specified with the B<-o> option, then
B<llvm-as> sends its output to a file or standard output by following
these rules:
=over
=item *
If the input is standard input, then the output is standard output.
=item *
If the input is a file that ends with C<.st>, then the output file is of
the same name, except that the suffix is changed to C<.bc>.
=item *
If the input is a file that does not end with the C<.st> suffix, then the
output file has the same name as the input file, except that the C<.bc>
suffix is appended.
=back
=head1 OPTIONS
=over
=item B<-o> F<filename>
Specify the output file name. If F<filename> is C<->, then B<llvm-as>
sends its output to standard output.
=item B<-stats>
Print statistics acquired during compilation.
=item B<-time-passes>
Record the amount of time needed for each pass and print it to standard
error.
=item B<-f>
Force the output to be written. Normally, B<stkrc> won't overwrite an existing
bitcode file. This option overrides that behavior.
=item B<-s> F<stacksize>
Specify the stack size for the program. The default stack size, 1024, should be
sufficient for most programs. For very large programs, especially those that
recurse a lot, you might want to provide a larger value. Each unit of this
value consumes 8 bytes of memory.
=item B<-help>
Print a summary of command line options.
=back
=head1 EXIT STATUS
If B<stkrc> succeeds, it will exit with 0. Otherwise, if an error
occurs, it will exit with a non-zero value, usually 1.
=head1 SEE ALSO
L<llvm-as>, L<http://llvm.org/docs/Stacker.html>
=head1 AUTHORS
Maintained by the LLVM Team (L<http://llvm.org>).
=cut

View File

@@ -1,115 +0,0 @@
=pod
=head1 NAME
tblgen - Target Description To C++ Code Generator
=head1 SYNOPSIS
B<tblgen> [I<options>] [I<filename>]
=head1 DESCRIPTION
B<tblgen> translates from target description (.td) files into C++ code that can
be included in the definition of an LLVM target library. Most users of LLVM will
not need to use this program. It is only for assisting with writing an LLVM
target backend.
The input and output of B<tblgen> is beyond the scope of this short
introduction. Please see the I<CodeGeneration> page in the LLVM documentation.
The F<filename> argument specifies the name of a Target Description (.td) file
to read as input.
=head1 OPTIONS
=over
=item B<--help>
Print a summary of command line options.
=item B<-o> F<filename>
Specify the output file name. If F<filename> is C<->, then B<tblgen>
sends its output to standard output.
=item B<-I> F<directory>
Specify where to find other target description files for inclusion. The
F<directory> value should be a full or partial path to a directory that contains
target description files.
=item B<-asmwriternum> F<N>
Make -gen-asm-writer emit assembly writer number F<N>.
=item B<-class> F<class Name>
Print the enumeration list for this class.
=item B<-print-records>
Print all records to standard output (default).
=item B<-print-enums>
Print enumeration values for a class
=item B<-gen-emitter>
Generate machine code emitter.
=item B<-gen-register-enums>
Generate the enumeration values for all registers.
=item B<-gen-register-desc>
Generate a register info description for each register.
=item B<-gen-register-desc-header>
Generate a register info description header for each register.
=item B<-gen-instr-enums>
Generate enumeration values for instructions.
=item B<-gen-instr-desc>
Generate instruction descriptions.
=item B<-gen-asm-writer>
Generate the assembly writer.
=item B<-gen-dag-isel>
Generate a DAG (Directed Acycle Graph) instruction selector.
=item B<-gen-subtarget>
Generate subtarget enumerations.
=item B<-gen-intrinsic>
Generate intrinsic information.
=item B<-version>
Show the version number of this program.
=back
=head1 EXIT STATUS
If B<tblgen> succeeds, it will exit with 0. Otherwise, if an error
occurs, it will exit with a non-zero value.
=head1 AUTHORS
Maintained by The LLVM Team (L<http://llvm.org>).
=cut

Some files were not shown because too many files have changed in this diff Show More