From baldrick at free.fr Mon May 7 03:15:03 2007 From: baldrick at free.fr (Duncan Sands) Date: Mon, 7 May 2007 10:15:03 +0200 Subject: [llvm-commits] [llvm-gcc] static chain changes for PR1146 In-Reply-To: <1178446045.18852.35.camel@bashful.x10sys.com> References: <1178446045.18852.35.camel@bashful.x10sys.com> Message-ID: <200705071015.04317.baldrick@free.fr> Hi Reid, > I'm working on PR1146. It remove parameter attributes from function > types and places them on functions can call/invoke instructions. > Consequently, some changes are needed in llvm-gcc. One of those changes > I'm unsure about. In llvm-types.cpp, in the ConvertArgListToFnType > function, we have this pice of code: > > if (static_chain) { > // Pass the static chain in a register. > ParamAttrsVector Attrs; > ParamAttrsWithIndex PAWI; PAWI.index = 1; PAWI.attrs = > ParamAttr::InReg; > Attrs.push_back(PAWI); > PAL = ParamAttrsList::get(Attrs); > } > > Obviously this needs to be deleted as a ParamAttrsList is not needed to > instantiate a FunctionType object. The question is, where does this > need to be moved to. The static chain has something to do with nested > functions, right? So, do we need to move this "inreg" attribute to the > place where the call is actually made? Where is that? I think the inreg attribute should not be applied to the static chain parameter at all. The attached patch removes it. This also fixes a bug in which a nested function returning a struct was getting the inreg attribute on the struct return parameter, and the sret attribute on the static chain parameter! I originally marked the static chain inreg because gcc passes it in a register (ecx on x86). Inreg is not needed for correctness or even for compatibility (nested functions are always internal, so cannot be called from code compiled by another compiler). And I doubt it is even needed for efficiency - after all, nested functions end up having the fastcc calling convention because they are internal, which means all the parameters will be passed in registers anyway! Marking it inreg is just trying to second-guess the code generators, and I don't see why the static chain should be favored more than any other parameter. A final comment: gcc is pretty much obliged to pass the static chain in a register, because it is not in the list of function parameters (unlike in LLVM), so it has to pass it specially. So the fact that gcc passes it in a register is not necessarily a sign that using a register is a good idea performance wise. Ciao, Duncan. -------------- next part -------------- A non-text attachment was scrubbed... Name: chain_in_reg.diff Type: text/x-diff Size: 1372 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070507/6488fae8/attachment.bin -------------- next part -------------- A non-text attachment was scrubbed... Name: 2007-05-07-NestedStructReturn.c Type: text/x-csrc Size: 224 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070507/6488fae8/attachment-0001.bin From llvm at cs.uiuc.edu Mon May 7 10:20:46 2007 From: llvm at cs.uiuc.edu (LLVM) Date: Mon, 7 May 2007 10:20:46 -0500 Subject: [llvm-commits] CVS: llvm/win32/Archive/ Message-ID: <200705071520.l47FKkEL019191@zion.cs.uiuc.edu> Changes in directory llvm/win32/Archive: --- Log message: Directory /var/cvs/llvm/llvm/win32/Archive added to the repository --- Diffs of the changes: (+0 -0) 0 files changed From llvm at cs.uiuc.edu Mon May 7 10:22:22 2007 From: llvm at cs.uiuc.edu (LLVM) Date: Mon, 7 May 2007 10:22:22 -0500 Subject: [llvm-commits] CVS: llvm/win32/Bytecode/Bytecode.vcproj Message-ID: <200705071522.l47FMM5d019257@zion.cs.uiuc.edu> Changes in directory llvm/win32/Bytecode: Bytecode.vcproj (r1.7) removed --- Log message: Unbreak VC++ build. --- Diffs of the changes: (+0 -0) 0 files changed From jeffc at jolt-lang.org Mon May 7 10:22:22 2007 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Mon, 7 May 2007 10:22:22 -0500 Subject: [llvm-commits] CVS: llvm/win32/llvm.sln Message-ID: <200705071522.l47FMMbP019262@zion.cs.uiuc.edu> Changes in directory llvm/win32: llvm.sln updated: 1.29 -> 1.30 --- Log message: Unbreak VC++ build. --- Diffs of the changes: (+18 -18) llvm.sln | 36 ++++++++++++++++++------------------ 1 files changed, 18 insertions(+), 18 deletions(-) Index: llvm/win32/llvm.sln diff -u llvm/win32/llvm.sln:1.29 llvm/win32/llvm.sln:1.30 --- llvm/win32/llvm.sln:1.29 Sat May 5 22:12:47 2007 +++ llvm/win32/llvm.sln Mon May 7 10:21:46 2007 @@ -76,7 +76,7 @@ ProjectSection(ProjectDependencies) = postProject {0622E827-8464-489D-8B1C-B0B496F35C08} = {0622E827-8464-489D-8B1C-B0B496F35C08} {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} + {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} = {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897} = {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897} {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} @@ -85,16 +85,11 @@ {144EEBF6-8C9B-4473-B715-2C821666AF6C} = {144EEBF6-8C9B-4473-B715-2C821666AF6C} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Bytecode", "Bytecode\Bytecode.vcproj", "{F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61}" - ProjectSection(ProjectDependencies) = postProject - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - EndProjectSection -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llc", "llc\llc.vcproj", "{ADE86BDC-B04C-43DF-B9BB-90492C7B14AC}" ProjectSection(ProjectDependencies) = postProject {0622E827-8464-489D-8B1C-B0B496F35C08} = {0622E827-8464-489D-8B1C-B0B496F35C08} {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} + {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} = {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897} = {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897} {057777CD-DED5-46DF-BF9A-6B76DE212549} = {057777CD-DED5-46DF-BF9A-6B76DE212549} @@ -107,7 +102,6 @@ ProjectSection(ProjectDependencies) = postProject {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} @@ -117,7 +111,6 @@ ProjectSection(ProjectDependencies) = postProject {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} @@ -134,6 +127,7 @@ {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} + {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} EndProjectSection @@ -143,6 +137,7 @@ {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} + {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} EndProjectSection @@ -151,7 +146,7 @@ ProjectSection(ProjectDependencies) = postProject {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} + {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} {342CF48F-760A-4040-A9A1-7D75AA2471CE} = {342CF48F-760A-4040-A9A1-7D75AA2471CE} {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} @@ -174,7 +169,6 @@ {0622E827-8464-489D-8B1C-B0B496F35C08} = {0622E827-8464-489D-8B1C-B0B496F35C08} {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} = {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} {C59374C1-9FC0-4147-B836-327DFDC52D99} = {C59374C1-9FC0-4147-B836-327DFDC52D99} @@ -186,7 +180,6 @@ ProjectSection(ProjectDependencies) = postProject {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} EndProjectSection @@ -197,6 +190,7 @@ {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} + {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} {342CF48F-760A-4040-A9A1-7D75AA2471CE} = {342CF48F-760A-4040-A9A1-7D75AA2471CE} {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} = {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} {C59374C1-9FC0-4147-B836-327DFDC52D99} = {C59374C1-9FC0-4147-B836-327DFDC52D99} @@ -209,6 +203,7 @@ {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} + {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} EndProjectSection @@ -218,7 +213,7 @@ {0622E827-8464-489D-8B1C-B0B496F35C08} = {0622E827-8464-489D-8B1C-B0B496F35C08} {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} + {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} EndProjectSection @@ -228,7 +223,7 @@ {0622E827-8464-489D-8B1C-B0B496F35C08} = {0622E827-8464-489D-8B1C-B0B496F35C08} {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} + {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} {342CF48F-760A-4040-A9A1-7D75AA2471CE} = {342CF48F-760A-4040-A9A1-7D75AA2471CE} {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} = {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} {C59374C1-9FC0-4147-B836-327DFDC52D99} = {C59374C1-9FC0-4147-B836-327DFDC52D99} @@ -241,6 +236,11 @@ ProjectSection(ProjectDependencies) = postProject EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Archive", "Archive\Archive.vcproj", "{F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61}" + ProjectSection(ProjectDependencies) = postProject + {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} + EndProjectSection +EndProject Global GlobalSection(SolutionConfiguration) = preSolution Debug = Debug @@ -301,10 +301,6 @@ {FB6FFD68-C1E4-4DCF-AB02-36D205D5263E}.Debug.Build.0 = Debug|Win32 {FB6FFD68-C1E4-4DCF-AB02-36D205D5263E}.Release.ActiveCfg = Release|Win32 {FB6FFD68-C1E4-4DCF-AB02-36D205D5263E}.Release.Build.0 = Release|Win32 - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61}.Debug.ActiveCfg = Debug|Win32 - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61}.Debug.Build.0 = Debug|Win32 - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61}.Release.ActiveCfg = Release|Win32 - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61}.Release.Build.0 = Release|Win32 {ADE86BDC-B04C-43DF-B9BB-90492C7B14AC}.Debug.ActiveCfg = Debug|Win32 {ADE86BDC-B04C-43DF-B9BB-90492C7B14AC}.Debug.Build.0 = Debug|Win32 {ADE86BDC-B04C-43DF-B9BB-90492C7B14AC}.Release.ActiveCfg = Release|Win32 @@ -369,6 +365,10 @@ {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62}.Debug.Build.0 = Debug|Win32 {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62}.Release.ActiveCfg = Release|Win32 {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62}.Release.Build.0 = Release|Win32 + {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61}.Debug.ActiveCfg = Debug|Win32 + {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61}.Debug.Build.0 = Debug|Win32 + {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61}.Release.ActiveCfg = Release|Win32 + {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61}.Release.Build.0 = Release|Win32 EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution EndGlobalSection From jeffc at jolt-lang.org Mon May 7 10:22:22 2007 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Mon, 7 May 2007 10:22:22 -0500 Subject: [llvm-commits] CVS: llvm/win32/Support/Support.vcproj Message-ID: <200705071522.l47FMMlC019266@zion.cs.uiuc.edu> Changes in directory llvm/win32/Support: Support.vcproj updated: 1.20 -> 1.21 --- Log message: Unbreak VC++ build. --- Diffs of the changes: (+0 -43) Support.vcproj | 43 ------------------------------------------- 1 files changed, 43 deletions(-) Index: llvm/win32/Support/Support.vcproj diff -u llvm/win32/Support/Support.vcproj:1.20 llvm/win32/Support/Support.vcproj:1.21 --- llvm/win32/Support/Support.vcproj:1.20 Sun Apr 29 09:22:14 2007 +++ llvm/win32/Support/Support.vcproj Mon May 7 10:21:46 2007 @@ -122,15 +122,6 @@ RelativePath="..\..\lib\Support\CommandLine.cpp"> - - - - - - - - - - - - - - - - - - - - - - - - - - - Changes in directory llvm/win32/Archive: Archive.vcproj added (r1.1) --- Log message: Unbreak VC++ build. --- Diffs of the changes: (+135 -0) Archive.vcproj | 135 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 135 insertions(+) Index: llvm/win32/Archive/Archive.vcproj diff -c /dev/null llvm/win32/Archive/Archive.vcproj:1.1 *** /dev/null Mon May 7 10:21:56 2007 --- llvm/win32/Archive/Archive.vcproj Mon May 7 10:21:46 2007 *************** *** 0 **** --- 1,135 ---- + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From jeffc at jolt-lang.org Mon May 7 10:22:23 2007 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Mon, 7 May 2007 10:22:23 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Support/DataTypes.h.in Message-ID: <200705071522.l47FMNcE019274@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Support: DataTypes.h.in updated: 1.27 -> 1.28 --- Log message: Unbreak VC++ build. --- Diffs of the changes: (+1 -0) DataTypes.h.in | 1 + 1 files changed, 1 insertion(+) Index: llvm/include/llvm/Support/DataTypes.h.in diff -u llvm/include/llvm/Support/DataTypes.h.in:1.27 llvm/include/llvm/Support/DataTypes.h.in:1.28 --- llvm/include/llvm/Support/DataTypes.h.in:1.27 Thu Nov 9 02:26:22 2006 +++ llvm/include/llvm/Support/DataTypes.h.in Mon May 7 10:21:45 2007 @@ -84,6 +84,7 @@ #else /* _MSC_VER */ // Visual C++ doesn't provide standard integer headers, but it does provide // built-in data types. +#include #include #include typedef __int64 int64_t; From jeffc at jolt-lang.org Mon May 7 10:22:23 2007 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Mon, 7 May 2007 10:22:23 -0500 Subject: [llvm-commits] CVS: llvm/lib/Support/MemoryBuffer.cpp Message-ID: <200705071522.l47FMNnN019268@zion.cs.uiuc.edu> Changes in directory llvm/lib/Support: MemoryBuffer.cpp updated: 1.5 -> 1.6 --- Log message: Unbreak VC++ build. --- Diffs of the changes: (+2 -0) MemoryBuffer.cpp | 2 ++ 1 files changed, 2 insertions(+) Index: llvm/lib/Support/MemoryBuffer.cpp diff -u llvm/lib/Support/MemoryBuffer.cpp:1.5 llvm/lib/Support/MemoryBuffer.cpp:1.6 --- llvm/lib/Support/MemoryBuffer.cpp:1.5 Sun May 6 18:32:36 2007 +++ llvm/lib/Support/MemoryBuffer.cpp Mon May 7 10:21:46 2007 @@ -14,6 +14,7 @@ #include "llvm/Support/MemoryBuffer.h" #include "llvm/System/MappedFile.h" #include "llvm/System/Process.h" +#include "llvm/System/Program.h" #include #include #include @@ -246,6 +247,7 @@ std::vector FileData; // Read in all of the data from stdin, we cannot mmap stdin. + sys::Program::ChangeStdinToBinary(); while (size_t ReadBytes = fread(Buffer, 1, 4096*4, stdin)) FileData.insert(FileData.end(), Buffer, Buffer+ReadBytes); From lauro.venancio at gmail.com Mon May 7 12:41:10 2007 From: lauro.venancio at gmail.com (Lauro Ramos Venancio) Date: Mon, 7 May 2007 12:41:10 -0500 Subject: [llvm-commits] CVS: llvm-test/MultiSource/Benchmarks/tramp3d-v4/Makefile Message-ID: <200705071741.l47HfAeG021966@zion.cs.uiuc.edu> Changes in directory llvm-test/MultiSource/Benchmarks/tramp3d-v4: Makefile updated: 1.4 -> 1.5 --- Log message: Reduce memory usage. --- Diffs of the changes: (+1 -1) Makefile | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm-test/MultiSource/Benchmarks/tramp3d-v4/Makefile diff -u llvm-test/MultiSource/Benchmarks/tramp3d-v4/Makefile:1.4 llvm-test/MultiSource/Benchmarks/tramp3d-v4/Makefile:1.5 --- llvm-test/MultiSource/Benchmarks/tramp3d-v4/Makefile:1.4 Thu May 3 17:13:28 2007 +++ llvm-test/MultiSource/Benchmarks/tramp3d-v4/Makefile Mon May 7 12:40:51 2007 @@ -4,7 +4,7 @@ CPPFLAGS = -fno-exceptions LDFLAGS = -lstdc++ ifdef SMALL_PROBLEM_SIZE -RUN_OPTIONS = --cartvis 1.0 0.0 --rhomin 1e-8 -n 2 +RUN_OPTIONS = --cartvis 1.0 0.0 --rhomin 1e-8 -n 4 --domain 32 32 32 else RUN_OPTIONS = --cartvis 1.0 0.0 --rhomin 1e-8 -n 25 endif From evan.cheng at apple.com Mon May 7 12:58:32 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 7 May 2007 12:58:32 -0500 Subject: [llvm-commits] CVS: llvm/CREDITS.TXT Message-ID: <200705071758.l47HwWwb022342@zion.cs.uiuc.edu> Changes in directory llvm: CREDITS.TXT updated: 1.79 -> 1.80 --- Log message: Update. --- Diffs of the changes: (+1 -0) CREDITS.TXT | 1 + 1 files changed, 1 insertion(+) Index: llvm/CREDITS.TXT diff -u llvm/CREDITS.TXT:1.79 llvm/CREDITS.TXT:1.80 --- llvm/CREDITS.TXT:1.79 Sun May 6 15:33:02 2007 +++ llvm/CREDITS.TXT Mon May 7 12:58:13 2007 @@ -51,6 +51,7 @@ E: evan.cheng at 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 From reid at x10sys.com Mon May 7 13:50:24 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 7 May 2007 13:50:24 -0500 Subject: [llvm-commits] CVS: llvm/tools/llvm-prof/llvm-prof.cpp Message-ID: <200705071850.l47IoOVt023217@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvm-prof: llvm-prof.cpp updated: 1.34 -> 1.35 --- Log message: Initialize variable to null so it has a value in the off chance that a memory buffer couldn't be allocated. --- Diffs of the changes: (+1 -1) llvm-prof.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/tools/llvm-prof/llvm-prof.cpp diff -u llvm/tools/llvm-prof/llvm-prof.cpp:1.34 llvm/tools/llvm-prof/llvm-prof.cpp:1.35 --- llvm/tools/llvm-prof/llvm-prof.cpp:1.34 Sun May 6 18:45:49 2007 +++ llvm/tools/llvm-prof/llvm-prof.cpp Mon May 7 13:50:07 2007 @@ -117,7 +117,7 @@ // Read in the bytecode file... std::string ErrorMessage; - Module *M; + Module *M = 0; if (MemoryBuffer *Buffer = MemoryBuffer::getFileOrSTDIN(BytecodeFile, &ErrorMessage)) { M = ParseBitcodeFile(Buffer, &ErrorMessage); From criswell at cs.uiuc.edu Mon May 7 14:38:37 2007 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon, 7 May 2007 14:38:37 -0500 Subject: [llvm-commits] CVS: CVSROOT/loginfo Message-ID: <200705071938.OAA24674@choi.cs.uiuc.edu> Changes in directory CVSROOT: loginfo updated: 1.16 -> 1.17 --- Log message: Commits for the internal CVS repository should not be made public. --- Diffs of the changes: (+1 -1) loginfo | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: CVSROOT/loginfo diff -u CVSROOT/loginfo:1.16 CVSROOT/loginfo:1.17 --- CVSROOT/loginfo:1.16 Thu Apr 26 09:44:57 2007 +++ CVSROOT/loginfo Mon May 7 14:38:26 2007 @@ -32,4 +32,4 @@ ^llva /home/vadve/shared/InternalCVS/CVSROOT/commit-diffs.pl %{sVv} criswell at cs.uiuc.edu ^Papers/2007-CCS-PrivBracket /home/vadve/shared/InternalCVS/CVSROOT/commit-diffs.pl %{sVv} criswell at cs.uiuc.edu ^safecode /home/vadve/shared/InternalCVS/CVSROOT/commit-diffs.pl %{sVv} criswell at cs.uiuc.edu -^CVSROOT /home/vadve/shared/PublicCVS/CVSROOT/commit-diffs.pl %{sVv} llvm-commits at cs.uiuc.edu +^CVSROOT /home/vadve/shared/PublicCVS/CVSROOT/commit-diffs.pl %{sVv} llvm-group at cs.uiuc.edu From baldrick at free.fr Mon May 7 15:45:37 2007 From: baldrick at free.fr (Duncan Sands) Date: Mon, 7 May 2007 15:45:37 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/X86/2007-05-07-InvokeSRet.ll Message-ID: <200705072045.l47KjbC7025994@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/X86: 2007-05-07-InvokeSRet.ll added (r1.1) --- Log message: Testcase for PR1398: http://llvm.org/PR1398 . --- Diffs of the changes: (+15 -0) 2007-05-07-InvokeSRet.ll | 15 +++++++++++++++ 1 files changed, 15 insertions(+) Index: llvm/test/CodeGen/X86/2007-05-07-InvokeSRet.ll diff -c /dev/null llvm/test/CodeGen/X86/2007-05-07-InvokeSRet.ll:1.1 *** /dev/null Mon May 7 15:45:30 2007 --- llvm/test/CodeGen/X86/2007-05-07-InvokeSRet.ll Mon May 7 15:45:20 2007 *************** *** 0 **** --- 1,15 ---- + ; RUN: llvm-as < %s | llc -march=x86 -enable-eh -disable-fp-elim | not grep {addl .8, %esp} + ; PR1398 + + %struct.S = type { i32, i32 } + + declare void @invokee(%struct.S* sret ) + + define void @invoker(%struct.S* %name.0.0) { + entry: + invoke void @invokee( %struct.S* %name.0.0 sret ) + to label %return unwind label %return + + return: ; preds = %entry, %entry + ret void + } From baldrick at free.fr Mon May 7 15:49:46 2007 From: baldrick at free.fr (Duncan Sands) Date: Mon, 7 May 2007 15:49:46 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Message-ID: <200705072049.l47KnktR026352@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: SelectionDAGISel.cpp updated: 1.448 -> 1.449 --- Log message: Parameter attributes on invoke calls were being lost due to the wrong attribute index being used. Fix proposed by Anton Korobeynikov, who asked me to implement and commit it for him. This is PR1398: http://llvm.org/PR1398 . --- Diffs of the changes: (+6 -4) SelectionDAGISel.cpp | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.448 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.449 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.448 Sun May 6 15:14:21 2007 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Mon May 7 15:49:28 2007 @@ -2787,10 +2787,12 @@ Value *Arg = I.getOperand(i); SDOperand ArgNode = getValue(Arg); Entry.Node = ArgNode; Entry.Ty = Arg->getType(); - Entry.isSExt = Attrs && Attrs->paramHasAttr(i, ParamAttr::SExt); - Entry.isZExt = Attrs && Attrs->paramHasAttr(i, ParamAttr::ZExt); - Entry.isInReg = Attrs && Attrs->paramHasAttr(i, ParamAttr::InReg); - Entry.isSRet = Attrs && Attrs->paramHasAttr(i, ParamAttr::StructRet); + + unsigned attrInd = i - OpIdx + 1; + Entry.isSExt = Attrs && Attrs->paramHasAttr(attrInd, ParamAttr::SExt); + Entry.isZExt = Attrs && Attrs->paramHasAttr(attrInd, ParamAttr::ZExt); + Entry.isInReg = Attrs && Attrs->paramHasAttr(attrInd, ParamAttr::InReg); + Entry.isSRet = Attrs && Attrs->paramHasAttr(attrInd, ParamAttr::StructRet); Args.push_back(Entry); } From dalej at apple.com Mon May 7 15:57:44 2007 From: dalej at apple.com (Dale Johannesen) Date: Mon, 7 May 2007 15:57:44 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/Generic/2007-05-07-tailmerge-1.c Message-ID: <200705072057.l47Kviin027133@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/Generic: 2007-05-07-tailmerge-1.c added (r1.1) --- Log message: Handle some non-exit blocks in tail merging. --- Diffs of the changes: (+65 -0) 2007-05-07-tailmerge-1.c | 65 +++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 65 insertions(+) Index: llvm/test/CodeGen/Generic/2007-05-07-tailmerge-1.c diff -c /dev/null llvm/test/CodeGen/Generic/2007-05-07-tailmerge-1.c:1.1 *** /dev/null Mon May 7 15:57:31 2007 --- llvm/test/CodeGen/Generic/2007-05-07-tailmerge-1.c Mon May 7 15:57:21 2007 *************** *** 0 **** --- 1,65 ---- + ; RUN: llvm-as < %s | llc -march=arm -enable-tail-merge | grep bl.*baz | wc -l | grep 1 + ; RUN: llvm-as < %s | llc -march=arm -enable-tail-merge | grep bl.*quux | wc -l | grep 1 + ; Check that calls to baz and quux are tail-merged. + + ; ModuleID = 'tail.c' + target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64" + target triple = "i686-apple-darwin8" + + define i32 @f(i32 %i, i32 %q) { + entry: + %i_addr = alloca i32 ; [#uses=2] + %q_addr = alloca i32 ; [#uses=2] + %retval = alloca i32, align 4 ; [#uses=1] + "alloca point" = bitcast i32 0 to i32 ; [#uses=0] + store i32 %i, i32* %i_addr + store i32 %q, i32* %q_addr + %tmp = load i32* %i_addr ; [#uses=1] + %tmp1 = icmp ne i32 %tmp, 0 ; [#uses=1] + %tmp12 = zext i1 %tmp1 to i8 ; [#uses=1] + %toBool = icmp ne i8 %tmp12, 0 ; [#uses=1] + br i1 %toBool, label %cond_true, label %cond_false + + cond_true: ; preds = %entry + %tmp3 = call i32 (...)* @bar( ) ; [#uses=0] + %tmp4 = call i32 (...)* @baz( i32 5, i32 6 ) ; [#uses=0] + br label %cond_next + + cond_false: ; preds = %entry + %tmp5 = call i32 (...)* @foo( ) ; [#uses=0] + %tmp6 = call i32 (...)* @baz( i32 5, i32 6 ) ; [#uses=0] + br label %cond_next + + cond_next: ; preds = %cond_false, %cond_true + %tmp7 = load i32* %q_addr ; [#uses=1] + %tmp8 = icmp ne i32 %tmp7, 0 ; [#uses=1] + %tmp89 = zext i1 %tmp8 to i8 ; [#uses=1] + %toBool10 = icmp ne i8 %tmp89, 0 ; [#uses=1] + br i1 %toBool10, label %cond_true11, label %cond_false15 + + cond_true11: ; preds = %cond_next + %tmp13 = call i32 (...)* @foo( ) ; [#uses=0] + %tmp14 = call i32 (...)* @quux( i32 3, i32 4 ) ; [#uses=0] + br label %cond_next18 + + cond_false15: ; preds = %cond_next + %tmp16 = call i32 (...)* @bar( ) ; [#uses=0] + %tmp17 = call i32 (...)* @quux( i32 3, i32 4 ) ; [#uses=0] + br label %cond_next18 + + cond_next18: ; preds = %cond_false15, %cond_true11 + %tmp19 = call i32 (...)* @bar( ) ; [#uses=0] + br label %return + + return: ; preds = %cond_next18 + %retval20 = load i32* %retval ; [#uses=1] + ret i32 %retval20 + } + + declare i32 @bar(...) + + declare i32 @baz(...) + + declare i32 @foo(...) + + declare i32 @quux(...) From dalej at apple.com Mon May 7 15:57:40 2007 From: dalej at apple.com (Dale Johannesen) Date: Mon, 7 May 2007 15:57:40 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/BranchFolding.cpp Message-ID: <200705072057.l47Kve0e027121@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: BranchFolding.cpp updated: 1.49 -> 1.50 --- Log message: Handle some non-exit blocks in tail merging. --- Diffs of the changes: (+81 -11) BranchFolding.cpp | 92 +++++++++++++++++++++++++++++++++++++++++++++++------- 1 files changed, 81 insertions(+), 11 deletions(-) Index: llvm/lib/CodeGen/BranchFolding.cpp diff -u llvm/lib/CodeGen/BranchFolding.cpp:1.49 llvm/lib/CodeGen/BranchFolding.cpp:1.50 --- llvm/lib/CodeGen/BranchFolding.cpp:1.49 Wed May 2 20:11:53 2007 +++ llvm/lib/CodeGen/BranchFolding.cpp Mon May 7 15:57:21 2007 @@ -50,11 +50,14 @@ private: // Tail Merging. bool TailMergeBlocks(MachineFunction &MF); + bool TryMergeBlocks(MachineBasicBlock* SuccBB, + MachineBasicBlock* PredBB); void ReplaceTailWithBranchTo(MachineBasicBlock::iterator OldInst, MachineBasicBlock *NewDest); MachineBasicBlock *SplitMBBAt(MachineBasicBlock &CurMBB, MachineBasicBlock::iterator BBI1); + std::vector > MergePotentials; const MRegisterInfo *RegInfo; RegScavenger *RS; // Branch optzn. @@ -346,18 +349,18 @@ return MBB1Time < MBB2Time; } -bool BranchFolder::TailMergeBlocks(MachineFunction &MF) { +// See if any of the blocks in MergePotentials (which all have a common single +// successor, or all have no successor) can be tail-merged. If there is a +// successor, any blocks in MergePotentials that are not tail-merged and +// are not immediately before Succ must have an unconditional branch to +// Succ added (but the predecessor/successor lists need no adjustment). +// The lone predecessor of Succ that falls through into Succ, +// if any, is given in PredBB. + +bool BranchFolder::TryMergeBlocks(MachineBasicBlock *SuccBB, + MachineBasicBlock* PredBB) { MadeChange = false; - if (!EnableTailMerge) return false; - - // Find blocks with no successors. - std::vector > MergePotentials; - for (MachineFunction::iterator I = MF.begin(), E = MF.end(); I != E; ++I) { - if (I->succ_empty()) - MergePotentials.push_back(std::make_pair(HashEndOfMBB(I), I)); - } - // Sort by hash value so that blocks with identical end sequences sort // together. std::stable_sort(MergePotentials.begin(), MergePotentials.end()); @@ -371,6 +374,8 @@ // If there is nothing that matches the hash of the current basic block, // give up. if (CurHash != PrevHash) { + if (SuccBB && CurMBB != PredBB) + TII->InsertBranch(*CurMBB, SuccBB, NULL, std::vector()); MergePotentials.pop_back(); continue; } @@ -401,6 +406,9 @@ // If we didn't find anything that has at least two instructions matching // this one, bail out. if (FoundMatch == ~0U) { + // Put the unconditional branch back, if we need one. + if (SuccBB && CurMBB != PredBB) + TII->InsertBranch(*CurMBB, SuccBB, NULL, std::vector()); MergePotentials.pop_back(); continue; } @@ -445,10 +453,72 @@ } MadeChange = true; } - return MadeChange; } +bool BranchFolder::TailMergeBlocks(MachineFunction &MF) { + MadeChange = false; + + if (!EnableTailMerge) return false; + + // First find blocks with no successors. + for (MachineFunction::iterator I = MF.begin(), E = MF.end(); I != E; ++I) { + if (I->succ_empty()) + MergePotentials.push_back(std::make_pair(HashEndOfMBB(I), I)); + } + // See if we can do any crossjumping on those. + MadeChange |= TryMergeBlocks(NULL, NULL); + + MergePotentials.clear(); + // Look at blocks with two predecessors, where each predecessor has either: + // - a single successor, or + // - two successors, where successor I is reached either by ubr or fallthrough. + // The two-successor case where successor I is reached by cbr + // from both blocks is handled by the preceding case (when we consider the + // other, fallthough block). + // FIXME: The two-successor case where I is reached by cbr + // from one block, and by fallthrough/ubr from the other, is not handled yet. + // Beware that sometimes blocks are in the predecessor list, but can't really + // jump to the "successor" we're looking at. Tolerate this. + + for (MachineFunction::iterator I = MF.begin(), E = MF.end(); I != E; ++I) { + if (!I->succ_empty() && I->pred_size() >= 2) { + MachineBasicBlock *IBB = I; + MachineBasicBlock *PredBB = prior(I); + for (MachineBasicBlock::pred_iterator P = I->pred_begin(), E2 = I->pred_end(); + P != E2; ++P) { + MachineBasicBlock* PBB = *P; + MachineBasicBlock *TBB = 0, *FBB = 0; + std::vector Cond; + // Remove the unconditional branch at the end, if any. + if (!TII->AnalyzeBranch(*PBB, TBB, FBB, Cond) && + ((!FBB && Cond.size()==0) || // single successor + (!FBB && TBB!=IBB) || // cbr elsewhere, fallthrough to I + (FBB && FBB==IBB))) { // cbr then branch to I + if (TBB) { + TII->RemoveBranch(*PBB); + if (TBB!=IBB) + // reinsert conditional branch only, for now + TII->InsertBranch(*PBB, TBB, 0, Cond); + } + MergePotentials.push_back(std::make_pair(HashEndOfMBB(PBB), *P)); + } + } + if (MergePotentials.size() >= 2) + MadeChange |= TryMergeBlocks(I, PredBB); + // Reinsert an unconditional branch if needed. + // The 1 below can be either an original single predecessor, or a result + // of removing blocks in TryMergeBlocks. + if (MergePotentials.size()==1 && + (MergePotentials.begin())->second != PredBB) + TII->InsertBranch(*((MergePotentials.begin())->second), I, NULL, + std::vector()); + MergePotentials.clear(); + } + } + + return MadeChange; +} //===----------------------------------------------------------------------===// // Branch Optimization From echeng at apple.com Mon May 7 16:17:06 2007 From: echeng at apple.com (echeng at apple.com) Date: Mon, 7 May 2007 14:17:06 -0700 (PDT) Subject: [llvm-commits] [126991] Unbreak Apple style build. Message-ID: <20070507211706.A530516D4602@src> Revision: 126991 Author: echeng Date: 2007-05-07 14:17:06 -0700 (Mon, 07 May 2007) Log Message: ----------- Unbreak Apple style build. Modified Paths: -------------- apple-local/branches/llvm/gcc/llvm-linker-hack.cpp Modified: apple-local/branches/llvm/gcc/llvm-linker-hack.cpp =================================================================== --- apple-local/branches/llvm/gcc/llvm-linker-hack.cpp 2007-05-07 19:53:14 UTC (rev 126990) +++ apple-local/branches/llvm/gcc/llvm-linker-hack.cpp 2007-05-07 21:17:06 UTC (rev 126991) @@ -40,7 +40,7 @@ void dummy_function() { new llvm::ExistingModuleProvider(0); llvm::createVerifierPass(); - llvm::WriteBitcodeToFile(0, llvm::cout); + llvm::WriteBitcodeToFile(0, *llvm::cout); llvm::ParseBitcodeFile(NULL); llvm::createInstructionCombiningPass(); From evan.cheng at apple.com Mon May 7 16:28:08 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 7 May 2007 16:28:08 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Message-ID: <200705072128.l47LS8k8027858@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: DAGCombiner.cpp updated: 1.299 -> 1.300 --- Log message: Enable a couple of xforms: - (store (bitconvert v)) -> (store v) if resultant store does not require higher alignment - (bitconvert (load v)) -> (load (bitconvert*)v) if resultant load does not require higher alignment --- Diffs of the changes: (+27 -16) DAGCombiner.cpp | 43 +++++++++++++++++++++++++++---------------- 1 files changed, 27 insertions(+), 16 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.299 llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.300 --- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.299 Thu May 3 18:52:19 2007 +++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Mon May 7 16:27:48 2007 @@ -34,7 +34,9 @@ #include "llvm/CodeGen/SelectionDAG.h" #include "llvm/Support/Debug.h" #include "llvm/Support/MathExtras.h" +#include "llvm/Target/TargetData.h" #include "llvm/Target/TargetLowering.h" +#include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetOptions.h" #include "llvm/Support/Compiler.h" #include "llvm/Support/CommandLine.h" @@ -2569,17 +2571,22 @@ return DAG.getNode(ISD::BIT_CONVERT, VT, N0.getOperand(0)); // fold (conv (load x)) -> (load (conv*)x) - // FIXME: These xforms need to know that the resultant load doesn't need a - // higher alignment than the original! - if (0 && ISD::isNON_EXTLoad(N0.Val) && N0.hasOneUse()) { + // If the resultant load doesn't need a higher alignment than the original! + if (ISD::isNON_EXTLoad(N0.Val) && N0.hasOneUse() && + TLI.isOperationLegal(ISD::LOAD, VT)) { LoadSDNode *LN0 = cast(N0); - SDOperand Load = DAG.getLoad(VT, LN0->getChain(), LN0->getBasePtr(), - LN0->getSrcValue(), LN0->getSrcValueOffset(), - LN0->isVolatile(), LN0->getAlignment()); - AddToWorkList(N); - CombineTo(N0.Val, DAG.getNode(ISD::BIT_CONVERT, N0.getValueType(), Load), - Load.getValue(1)); - return Load; + unsigned Align = TLI.getTargetMachine().getTargetData()-> + getPrefTypeAlignment(getTypeForValueType(VT)); + unsigned OrigAlign = LN0->getAlignment(); + if (Align <= OrigAlign) { + SDOperand Load = DAG.getLoad(VT, LN0->getChain(), LN0->getBasePtr(), + LN0->getSrcValue(), LN0->getSrcValueOffset(), + LN0->isVolatile(), LN0->getAlignment()); + AddToWorkList(N); + CombineTo(N0.Val, DAG.getNode(ISD::BIT_CONVERT, N0.getValueType(), Load), + Load.getValue(1)); + return Load; + } } return SDOperand(); @@ -3414,12 +3421,16 @@ SDOperand Value = ST->getValue(); SDOperand Ptr = ST->getBasePtr(); - // If this is a store of a bit convert, store the input value. - // FIXME: This needs to know that the resultant store does not need a - // higher alignment than the original. - if (0 && Value.getOpcode() == ISD::BIT_CONVERT) { - return DAG.getStore(Chain, Value.getOperand(0), Ptr, ST->getSrcValue(), - ST->getSrcValueOffset()); + // If this is a store of a bit convert, store the input value if the + // resultant store does not need a higher alignment than the original. + if (Value.getOpcode() == ISD::BIT_CONVERT) { + unsigned Align = ST->getAlignment(); + MVT::ValueType SVT = Value.getOperand(0).getValueType(); + unsigned OrigAlign = TLI.getTargetMachine().getTargetData()-> + getPrefTypeAlignment(getTypeForValueType(SVT)); + if (Align <= OrigAlign) + return DAG.getStore(Chain, Value.getOperand(0), Ptr, ST->getSrcValue(), + ST->getSrcValueOffset()); } // Turn 'store float 1.0, Ptr' -> 'store int 0x12345678, Ptr' From evan.cheng at apple.com Mon May 7 16:29:59 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 7 May 2007 16:29:59 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMInstrVFP.td Message-ID: <200705072129.l47LTxGO027896@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: ARMInstrVFP.td updated: 1.3 -> 1.4 --- Log message: This is no longer needed after enabling the DAG combiner xform. --- Diffs of the changes: (+0 -5) ARMInstrVFP.td | 5 ----- 1 files changed, 5 deletions(-) Index: llvm/lib/Target/ARM/ARMInstrVFP.td diff -u llvm/lib/Target/ARM/ARMInstrVFP.td:1.3 llvm/lib/Target/ARM/ARMInstrVFP.td:1.4 --- llvm/lib/Target/ARM/ARMInstrVFP.td:1.3 Thu May 3 15:54:42 2007 +++ llvm/lib/Target/ARM/ARMInstrVFP.td Mon May 7 16:29:41 2007 @@ -78,11 +78,6 @@ [(store SPR:$src, addrmode5:$addr)]>; } // isStore -// avoid copying result of FTOUIZ to int reg when we're just storing it -let AddedComplexity = 1 in -def : ARMPat<(store (i32 (bitconvert SPR:$src)), addrmode5:$addr), - (FSTS SPR:$src, addrmode5:$addr)>; - //===----------------------------------------------------------------------===// // Load / store multiple Instructions. // From evan.cheng at apple.com Mon May 7 16:36:25 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 7 May 2007 16:36:25 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Message-ID: <200705072136.l47LaPKe028003@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: DAGCombiner.cpp updated: 1.300 -> 1.301 --- Log message: Forgot a check. --- Diffs of the changes: (+1 -1) DAGCombiner.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.300 llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.301 --- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.300 Mon May 7 16:27:48 2007 +++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Mon May 7 16:36:06 2007 @@ -3428,7 +3428,7 @@ MVT::ValueType SVT = Value.getOperand(0).getValueType(); unsigned OrigAlign = TLI.getTargetMachine().getTargetData()-> getPrefTypeAlignment(getTypeForValueType(SVT)); - if (Align <= OrigAlign) + if (Align <= OrigAlign && TLI.isOperationLegal(ISD::STORE, SVT)) return DAG.getStore(Chain, Value.getOperand(0), Ptr, ST->getSrcValue(), ST->getSrcValueOffset()); } From evan.cheng at apple.com Mon May 7 16:38:24 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 7 May 2007 16:38:24 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/Generic/2007-05-05-Personality.ll Message-ID: <200705072138.l47LcOlK028045@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/Generic: 2007-05-05-Personality.ll updated: 1.1 -> 1.2 --- Log message: Fix test case. --- Diffs of the changes: (+1 -1) 2007-05-05-Personality.ll | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/test/CodeGen/Generic/2007-05-05-Personality.ll diff -u llvm/test/CodeGen/Generic/2007-05-05-Personality.ll:1.1 llvm/test/CodeGen/Generic/2007-05-05-Personality.ll:1.2 --- llvm/test/CodeGen/Generic/2007-05-05-Personality.ll:1.1 Sat May 5 15:22:08 2007 +++ llvm/test/CodeGen/Generic/2007-05-05-Personality.ll Mon May 7 16:38:05 2007 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | llc -march=x86 -enable-eh -o - | grep zPLR +; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -enable-eh -o - | grep zPLR @error = external global i8 ; [#uses=2] From evan.cheng at apple.com Mon May 7 16:49:55 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 7 May 2007 16:49:55 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/ARM/fptoint.ll Message-ID: <200705072149.l47LntnA028256@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/ARM: fptoint.ll updated: 1.1 -> 1.2 --- Log message: Add some tests for (conv (load x)) -> (load (conv*)x) xform. --- Diffs of the changes: (+18 -10) fptoint.ll | 28 ++++++++++++++++++---------- 1 files changed, 18 insertions(+), 10 deletions(-) Index: llvm/test/CodeGen/ARM/fptoint.ll diff -u llvm/test/CodeGen/ARM/fptoint.ll:1.1 llvm/test/CodeGen/ARM/fptoint.ll:1.2 --- llvm/test/CodeGen/ARM/fptoint.ll:1.1 Thu May 3 15:54:42 2007 +++ llvm/test/CodeGen/ARM/fptoint.ll Mon May 7 16:49:35 2007 @@ -1,33 +1,41 @@ -; RUN: llvm-as < %s | llc -march=arm -mattr=+v6,+vfp2 > %t -; RUN: not grep fmrs %t +; RUN: llvm-as < %s | llc -march=arm -mattr=+v6,+vfp2 | not grep fmrs +; RUN: llvm-as < %s | llc -march=arm -mattr=+v6,+vfp2 | not grep fmrrd @i = weak global i32 0 ; [#uses=2] @u = weak global i32 0 ; [#uses=2] +define i32 @foo1(float *%x) { + %tmp1 = load float* %x + %tmp2 = bitcast float %tmp1 to i32 + ret i32 %tmp2 +} + +define i64 @foo2(double *%x) { + %tmp1 = load double* %x + %tmp2 = bitcast double %tmp1 to i64 + ret i64 %tmp2 +} + define void @foo5(float %x) { -entry: - %tmp1 = fptosi float %x to i32 ; [#uses=1] + %tmp1 = fptosi float %x to i32 store i32 %tmp1, i32* @i ret void } define void @foo6(float %x) { -entry: - %tmp1 = fptoui float %x to i32 ; [#uses=1] + %tmp1 = fptoui float %x to i32 store i32 %tmp1, i32* @u ret void } define void @foo7(double %x) { -entry: - %tmp1 = fptosi double %x to i32 ; [#uses=1] + %tmp1 = fptosi double %x to i32 store i32 %tmp1, i32* @i ret void } define void @foo8(double %x) { -entry: - %tmp1 = fptoui double %x to i32 ; [#uses=1] + %tmp1 = fptoui double %x to i32 store i32 %tmp1, i32* @u ret void } From evan.cheng at apple.com Mon May 7 16:50:26 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 7 May 2007 16:50:26 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/ARM/fp.ll fpmem.ll Message-ID: <200705072150.l47LoQBk028289@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/ARM: fp.ll updated: 1.16 -> 1.17 fpmem.ll updated: 1.6 -> 1.7 --- Log message: Fix tests. --- Diffs of the changes: (+7 -9) fp.ll | 3 +-- fpmem.ll | 13 ++++++------- 2 files changed, 7 insertions(+), 9 deletions(-) Index: llvm/test/CodeGen/ARM/fp.ll diff -u llvm/test/CodeGen/ARM/fp.ll:1.16 llvm/test/CodeGen/ARM/fp.ll:1.17 --- llvm/test/CodeGen/ARM/fp.ll:1.16 Mon Apr 16 12:36:06 2007 +++ llvm/test/CodeGen/ARM/fp.ll Mon May 7 16:50:07 2007 @@ -1,12 +1,11 @@ ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 > %t ; RUN: grep fmsr %t | wc -l | grep 4 ; RUN: grep fsitos %t -; RUN: grep fmrs %t +; RUN: grep fmrs %t | wc -l | grep 2 ; RUN: grep fsitod %t ; RUN: grep fmrrd %t | wc -l | grep 5 ; RUN: grep fmdrr %t | wc -l | grep 2 ; RUN: grep fldd %t -; RUN: grep flds %t ; RUN: grep fuitod %t ; RUN: grep fuitos %t ; RUN: grep 1065353216 %t Index: llvm/test/CodeGen/ARM/fpmem.ll diff -u llvm/test/CodeGen/ARM/fpmem.ll:1.6 llvm/test/CodeGen/ARM/fpmem.ll:1.7 --- llvm/test/CodeGen/ARM/fpmem.ll:1.6 Mon Apr 16 12:36:06 2007 +++ llvm/test/CodeGen/ARM/fpmem.ll Mon May 7 16:50:07 2007 @@ -6,18 +6,17 @@ ; RUN: grep {fsts.*\\\[} | wc -l | grep 1 float %f1(float %a) { -entry: ret float 0.000000e+00 } -float %f2(float* %v) { -entry: +float %f2(float* %v, float %u) { %tmp = load float* %v - ret float %tmp + %tmp1 = add float %tmp, %u + ret float %tmp1 } -void %f3(float %a, float* %v) { -entry: - store float %a, float* %v +void %f3(float %a, float %b, float* %v) { + %tmp = add float %a, %b + store float %tmp, float* %v ret void } From evan.cheng at apple.com Mon May 7 17:00:48 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 7 May 2007 17:00:48 -0500 Subject: [llvm-commits] CVS: llvm-test/TEST.llc.Makefile TEST.llc.report Message-ID: <200705072200.l47M0mSM028491@zion.cs.uiuc.edu> Changes in directory llvm-test: TEST.llc.Makefile updated: 1.6 -> 1.7 TEST.llc.report updated: 1.13 -> 1.14 --- Log message: Update. --- Diffs of the changes: (+4 -2) TEST.llc.Makefile | 2 +- TEST.llc.report | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) Index: llvm-test/TEST.llc.Makefile diff -u llvm-test/TEST.llc.Makefile:1.6 llvm-test/TEST.llc.Makefile:1.7 --- llvm-test/TEST.llc.Makefile:1.6 Wed Mar 21 14:58:59 2007 +++ llvm-test/TEST.llc.Makefile Mon May 7 17:00:28 2007 @@ -6,7 +6,7 @@ # ##===----------------------------------------------------------------------===## -LLC_OPTS = $(LLCFLAGS) -f -o=/dev/null -stats -time-passes -regalloc=linearscan +LLC_OPTS = $(LLCFLAGS) -f -o=/dev/null -stats -time-passes CURDIR := $(shell cd .; pwd) PROGDIR := $(PROJ_SRC_ROOT) RELDIR := $(subst $(PROGDIR),,$(CURDIR)) Index: llvm-test/TEST.llc.report diff -u llvm-test/TEST.llc.report:1.13 llvm-test/TEST.llc.report:1.14 --- llvm-test/TEST.llc.report:1.13 Sun Jul 4 06:41:46 2004 +++ llvm-test/TEST.llc.report Mon May 7 17:00:28 2007 @@ -37,7 +37,9 @@ ["#memref", sub { return AddColumns(@_,-1,-3,-4); }], ["#spill" , '([0-9]+).*Number of register spills'], ["#i-mov" , '([0-9]+).*Number of identity moves eliminated'], - ["#peep" , '([0-9]+).*Number of peephole optimization performed'], ["#tot-el", sub { return AddColumns(@_,-1,-2); }], + ["#pre", '([0-9]+).*Number of pre-indexed nodes created'], + ["#post", '([0-9]+).*Number of post-indexed nodes created'], + ["#indexed", sub { return AddColumns(@_,-1,-2); }], [] ); From echeng at apple.com Mon May 7 17:23:43 2007 From: echeng at apple.com (echeng at apple.com) Date: Mon, 7 May 2007 15:23:43 -0700 (PDT) Subject: [llvm-commits] [126993] Unbreak Apple style build. Message-ID: <20070507222343.566A9170C8A8@src> Revision: 126993 Author: echeng Date: 2007-05-07 15:23:43 -0700 (Mon, 07 May 2007) Log Message: ----------- Unbreak Apple style build. Modified Paths: -------------- apple-local/branches/llvm/gcc/llvm-linker-hack.cpp Modified: apple-local/branches/llvm/gcc/llvm-linker-hack.cpp =================================================================== --- apple-local/branches/llvm/gcc/llvm-linker-hack.cpp 2007-05-07 21:53:40 UTC (rev 126992) +++ apple-local/branches/llvm/gcc/llvm-linker-hack.cpp 2007-05-07 22:23:43 UTC (rev 126993) @@ -28,6 +28,7 @@ #include "llvm/Bitcode/ReaderWriter.h" #include "llvm/CodeGen/ScheduleDAG.h" #include "llvm/CodeGen/Passes.h" +#include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/Streams.h" /// dummy_function - This is used when linking the LLVM libraries into a dynamic @@ -40,8 +41,10 @@ void dummy_function() { new llvm::ExistingModuleProvider(0); llvm::createVerifierPass(); + llvm::CreateBitcodeWriterPass(*llvm::cout); llvm::WriteBitcodeToFile(0, *llvm::cout); llvm::ParseBitcodeFile(NULL); + llvm::MemoryBuffer::getNewMemBuffer(0); llvm::createInstructionCombiningPass(); llvm::createScalarReplAggregatesPass(); From dpatel at apple.com Mon May 7 17:27:34 2007 From: dpatel at apple.com (dpatel at apple.com) Date: Mon, 7 May 2007 15:27:34 -0700 (PDT) Subject: [llvm-commits] [126994] Do not apply inreg attribute to static chain. Message-ID: <20070507222734.7CC9D170D606@src> Revision: 126994 Author: dpatel Date: 2007-05-07 15:27:34 -0700 (Mon, 07 May 2007) Log Message: ----------- Do not apply inreg attribute to static chain. Patch by Duncan Sands. Modified Paths: -------------- apple-local/branches/llvm/gcc/llvm-types.cpp Modified: apple-local/branches/llvm/gcc/llvm-types.cpp =================================================================== --- apple-local/branches/llvm/gcc/llvm-types.cpp 2007-05-07 22:23:43 UTC (rev 126993) +++ apple-local/branches/llvm/gcc/llvm-types.cpp 2007-05-07 22:27:34 UTC (rev 126994) @@ -752,17 +752,7 @@ for (; Args && TREE_TYPE(Args) != void_type_node; Args = TREE_CHAIN(Args)) ABIConverter.HandleArgument(TREE_TYPE(Args)); - ParamAttrsList *PAL = 0; - - if (static_chain) { - // Pass the static chain in a register. - ParamAttrsVector Attrs; - ParamAttrsWithIndex PAWI; PAWI.index = 1; PAWI.attrs = ParamAttr::InReg; - Attrs.push_back(PAWI); - PAL = ParamAttrsList::get(Attrs); - } - - return FunctionType::get(RetTy, ArgTys, false, PAL); + return FunctionType::get(RetTy, ArgTys, false, 0); } const FunctionType *TypeConverter::ConvertFunctionType(tree type, @@ -843,12 +833,6 @@ LLVM_TARGET_INIT_REGPARM(lparam, type); #endif // LLVM_TARGET_ENABLE_REGPARM - if (static_chain) { - // Pass the static chain in a register. - ParamAttrsWithIndex PAWI; PAWI.index = Idx++; PAWI.attrs = ParamAttr::InReg; - Attrs.push_back(PAWI); - } - // The struct return attribute must be associated with the first // parameter but that parameter may have other attributes too so we set up // the first Attributes value here based on struct return. This only works From dpatel at apple.com Mon May 7 17:30:24 2007 From: dpatel at apple.com (Devang Patel) Date: Mon, 7 May 2007 15:30:24 -0700 Subject: [llvm-commits] [llvm-gcc] static chain changes for PR1146 In-Reply-To: <200705071015.04317.baldrick@free.fr> References: <1178446045.18852.35.camel@bashful.x10sys.com> <200705071015.04317.baldrick@free.fr> Message-ID: <7B5D15F2-AE09-4392-8325-9383814BDFC6@apple.com> Applied. - Devang On May 7, 2007, at 1:15 AM, Duncan Sands wrote: > Hi Reid, > >> I'm working on PR1146. It remove parameter attributes from function >> types and places them on functions can call/invoke instructions. >> Consequently, some changes are needed in llvm-gcc. One of those >> changes >> I'm unsure about. In llvm-types.cpp, in the ConvertArgListToFnType >> function, we have this pice of code: >> >> if (static_chain) { >> // Pass the static chain in a register. >> ParamAttrsVector Attrs; >> ParamAttrsWithIndex PAWI; PAWI.index = 1; PAWI.attrs = >> ParamAttr::InReg; >> Attrs.push_back(PAWI); >> PAL = ParamAttrsList::get(Attrs); >> } >> >> Obviously this needs to be deleted as a ParamAttrsList is not >> needed to >> instantiate a FunctionType object. The question is, where does this >> need to be moved to. The static chain has something to do with nested >> functions, right? So, do we need to move this "inreg" attribute to >> the >> place where the call is actually made? Where is that? > > I think the inreg attribute should not be applied to the static chain > parameter at all. The attached patch removes it. This also fixes a > bug in which a nested function returning a struct was getting the > inreg > attribute on the struct return parameter, and the sret attribute on > the > static chain parameter! > > I originally marked the static chain inreg because gcc passes it in a > register (ecx on x86). Inreg is not needed for correctness or even > for > compatibility (nested functions are always internal, so cannot be > called > from code compiled by another compiler). And I doubt it is even > needed > for efficiency - after all, nested functions end up having the fastcc > calling convention because they are internal, which means all the > parameters will be passed in registers anyway! Marking it inreg is > just trying to second-guess the code generators, and I don't see why > the static chain should be favored more than any other parameter. A > final comment: gcc is pretty much obliged to pass the static chain in > a register, because it is not in the list of function parameters > (unlike > in LLVM), so it has to pass it specially. So the fact that gcc > passes it > in a register is not necessarily a sign that using a register is a > good > idea performance wise. > > Ciao, > > Duncan. -------------- next part -------------- A non-text attachment was scrubbed... Name: chain_in_reg.diff Type: text/x-diff Size: 1372 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070507/2e303b46/attachment.bin -------------- next part -------------- A non-text attachment was scrubbed... Name: 2007-05-07-NestedStructReturn.c Type: text/x-csrc Size: 224 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070507/2e303b46/attachment-0001.bin -------------- next part -------------- > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From lauro.venancio at gmail.com Mon May 7 18:15:34 2007 From: lauro.venancio at gmail.com (Lauro Ramos Venancio) Date: Mon, 7 May 2007 18:15:34 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMRegisterInfo.cpp Message-ID: <200705072315.l47NFYMp029794@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: ARMRegisterInfo.cpp updated: 1.94 -> 1.95 --- Log message: Fix PR1390: http://llvm.org/PR1390 in a better way. --- Diffs of the changes: (+41 -12) ARMRegisterInfo.cpp | 53 ++++++++++++++++++++++++++++++++++++++++------------ 1 files changed, 41 insertions(+), 12 deletions(-) Index: llvm/lib/Target/ARM/ARMRegisterInfo.cpp diff -u llvm/lib/Target/ARM/ARMRegisterInfo.cpp:1.94 llvm/lib/Target/ARM/ARMRegisterInfo.cpp:1.95 --- llvm/lib/Target/ARM/ARMRegisterInfo.cpp:1.94 Sat May 5 18:44:41 2007 +++ llvm/lib/Target/ARM/ARMRegisterInfo.cpp Mon May 7 18:15:16 2007 @@ -1055,8 +1055,7 @@ if (!STI.isTargetDarwin()) { if (Reg == ARM::LR) LRSpilled = true; - else - CS1Spilled = true; + CS1Spilled = true; continue; } @@ -1131,6 +1130,33 @@ NumGPRSpills++; } + // If stack and double are 8-byte aligned and we are spilling an odd number + // of GPRs. Spill one extra callee save GPR so we won't have to pad between + // the integer and double callee save areas. + unsigned TargetAlign = MF.getTarget().getFrameInfo()->getStackAlignment(); + if (TargetAlign == 8 && (NumGPRSpills & 1)) { + if (CS1Spilled && !UnspilledCS1GPRs.empty()) { + for (unsigned i = 0, e = UnspilledCS1GPRs.size(); i != e; ++i) { + unsigned Reg = UnspilledCS1GPRs[i]; + // Don't spiil high register if the function is thumb + if (!AFI->isThumbFunction() || isLowRegister(Reg) || Reg == ARM::LR) { + MF.setPhysRegUsed(Reg); + AFI->setCSRegisterIsSpilled(Reg); + if (!isReservedReg(MF, Reg)) + ExtraCSSpill = true; + break; + } + } + } else if (!UnspilledCS2GPRs.empty() && + !AFI->isThumbFunction()) { + unsigned Reg = UnspilledCS2GPRs.front(); + MF.setPhysRegUsed(Reg); + AFI->setCSRegisterIsSpilled(Reg); + if (!isReservedReg(MF, Reg)) + ExtraCSSpill = true; + } + } + // Estimate if we might need to scavenge a register at some point in order // to materialize a stack offset. If so, either spill one additiona // callee-saved register or reserve a special spill slot to facilitate @@ -1160,26 +1186,29 @@ if (Size >= Limit) { // If any non-reserved CS register isn't spilled, just spill one or two // extra. That should take care of it! - unsigned Extra; - while (!ExtraCSSpill && !UnspilledCS1GPRs.empty()) { + unsigned NumExtras = TargetAlign / 4; + SmallVector Extras; + while (NumExtras && !UnspilledCS1GPRs.empty()) { unsigned Reg = UnspilledCS1GPRs.back(); UnspilledCS1GPRs.pop_back(); if (!isReservedReg(MF, Reg)) { - Extra = Reg; - ExtraCSSpill = true; + Extras.push_back(Reg); + NumExtras--; } } - while (!ExtraCSSpill && !UnspilledCS2GPRs.empty()) { + while (NumExtras && !UnspilledCS2GPRs.empty()) { unsigned Reg = UnspilledCS2GPRs.back(); UnspilledCS2GPRs.pop_back(); if (!isReservedReg(MF, Reg)) { - Extra = Reg; - ExtraCSSpill = true; + Extras.push_back(Reg); + NumExtras--; } } - if (ExtraCSSpill) { - MF.setPhysRegUsed(Extra); - AFI->setCSRegisterIsSpilled(Extra); + if (Extras.size() && NumExtras == 0) { + for (unsigned i = 0, e = Extras.size(); i != e; ++i) { + MF.setPhysRegUsed(Extras[i]); + AFI->setCSRegisterIsSpilled(Extras[i]); + } } else { // Reserve a slot closest to SP or frame pointer. const TargetRegisterClass *RC = &ARM::GPRRegClass; From evan.cheng at apple.com Mon May 7 18:21:12 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 7 May 2007 16:21:12 -0700 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMRegisterInfo.cpp In-Reply-To: <200705072315.l47NFYMp029794@zion.cs.uiuc.edu> References: <200705072315.l47NFYMp029794@zion.cs.uiuc.edu> Message-ID: <7280A947-ABC4-4FAA-9CDA-909F4F250E43@apple.com> Thanks! Evan On May 7, 2007, at 4:15 PM, Lauro Ramos Venancio wrote: > > > Changes in directory llvm/lib/Target/ARM: > > ARMRegisterInfo.cpp updated: 1.94 -> 1.95 > --- > Log message: > > Fix PR1390: http://llvm.org/PR1390 in a better way. > > > > --- > Diffs of the changes: (+41 -12) > > ARMRegisterInfo.cpp | 53 +++++++++++++++++++++++++++++++++++++++ > +------------ > 1 files changed, 41 insertions(+), 12 deletions(-) > > > Index: llvm/lib/Target/ARM/ARMRegisterInfo.cpp > diff -u llvm/lib/Target/ARM/ARMRegisterInfo.cpp:1.94 llvm/lib/ > Target/ARM/ARMRegisterInfo.cpp:1.95 > --- llvm/lib/Target/ARM/ARMRegisterInfo.cpp:1.94 Sat May 5 > 18:44:41 2007 > +++ llvm/lib/Target/ARM/ARMRegisterInfo.cpp Mon May 7 18:15:16 2007 > @@ -1055,8 +1055,7 @@ > if (!STI.isTargetDarwin()) { > if (Reg == ARM::LR) > LRSpilled = true; > - else > - CS1Spilled = true; > + CS1Spilled = true; > continue; > } > > @@ -1131,6 +1130,33 @@ > NumGPRSpills++; > } > > + // If stack and double are 8-byte aligned and we are spilling > an odd number > + // of GPRs. Spill one extra callee save GPR so we won't have > to pad between > + // the integer and double callee save areas. > + unsigned TargetAlign = MF.getTarget().getFrameInfo()- > >getStackAlignment(); > + if (TargetAlign == 8 && (NumGPRSpills & 1)) { > + if (CS1Spilled && !UnspilledCS1GPRs.empty()) { > + for (unsigned i = 0, e = UnspilledCS1GPRs.size(); i != e; + > +i) { > + unsigned Reg = UnspilledCS1GPRs[i]; > + // Don't spiil high register if the function is thumb > + if (!AFI->isThumbFunction() || isLowRegister(Reg) || Reg > == ARM::LR) { > + MF.setPhysRegUsed(Reg); > + AFI->setCSRegisterIsSpilled(Reg); > + if (!isReservedReg(MF, Reg)) > + ExtraCSSpill = true; > + break; > + } > + } > + } else if (!UnspilledCS2GPRs.empty() && > + !AFI->isThumbFunction()) { > + unsigned Reg = UnspilledCS2GPRs.front(); > + MF.setPhysRegUsed(Reg); > + AFI->setCSRegisterIsSpilled(Reg); > + if (!isReservedReg(MF, Reg)) > + ExtraCSSpill = true; > + } > + } > + > // Estimate if we might need to scavenge a register at some > point in order > // to materialize a stack offset. If so, either spill one > additiona > // callee-saved register or reserve a special spill slot to > facilitate > @@ -1160,26 +1186,29 @@ > if (Size >= Limit) { > // If any non-reserved CS register isn't spilled, just > spill one or two > // extra. That should take care of it! > - unsigned Extra; > - while (!ExtraCSSpill && !UnspilledCS1GPRs.empty()) { > + unsigned NumExtras = TargetAlign / 4; > + SmallVector Extras; > + while (NumExtras && !UnspilledCS1GPRs.empty()) { > unsigned Reg = UnspilledCS1GPRs.back(); > UnspilledCS1GPRs.pop_back(); > if (!isReservedReg(MF, Reg)) { > - Extra = Reg; > - ExtraCSSpill = true; > + Extras.push_back(Reg); > + NumExtras--; > } > } > - while (!ExtraCSSpill && !UnspilledCS2GPRs.empty()) { > + while (NumExtras && !UnspilledCS2GPRs.empty()) { > unsigned Reg = UnspilledCS2GPRs.back(); > UnspilledCS2GPRs.pop_back(); > if (!isReservedReg(MF, Reg)) { > - Extra = Reg; > - ExtraCSSpill = true; > + Extras.push_back(Reg); > + NumExtras--; > } > } > - if (ExtraCSSpill) { > - MF.setPhysRegUsed(Extra); > - AFI->setCSRegisterIsSpilled(Extra); > + if (Extras.size() && NumExtras == 0) { > + for (unsigned i = 0, e = Extras.size(); i != e; ++i) { > + MF.setPhysRegUsed(Extras[i]); > + AFI->setCSRegisterIsSpilled(Extras[i]); > + } > } else { > // Reserve a slot closest to SP or frame pointer. > const TargetRegisterClass *RC = &ARM::GPRRegClass; > > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From dalej at apple.com Mon May 7 20:01:22 2007 From: dalej at apple.com (Dale Johannesen) Date: Mon, 7 May 2007 20:01:22 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp Message-ID: <200705080101.l4811Mvg031553@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: CodeGenPrepare.cpp updated: 1.10 -> 1.11 --- Log message: Don't generate branch to entry block. --- Diffs of the changes: (+3 -1) CodeGenPrepare.cpp | 4 +++- 1 files changed, 3 insertions(+), 1 deletion(-) Index: llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp diff -u llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp:1.10 llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp:1.11 --- llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp:1.10 Sun May 6 08:37:16 2007 +++ llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp Mon May 7 20:01:04 2007 @@ -280,7 +280,9 @@ BranchInst *PredBr = dyn_cast(Pred->getTerminator()); if (!PredBr || !PredBr->isUnconditional() || // Must be empty other than the branch. - &Pred->front() != PredBr) + &Pred->front() != PredBr || + // Cannot be the entry block; its label does not get emitted. + Pred == &(Dest->getParent()->getEntryBlock())) continue; // Finally, since we know that Dest has phi nodes in it, we have to make From lattner at cs.uiuc.edu Mon May 7 21:14:11 2007 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 7 May 2007 21:14:11 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/Generic/2007-05-07-tailmerge-1.c Message-ID: <200705080214.l482EBhw000389@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/Generic: 2007-05-07-tailmerge-1.c (r1.1) removed --- Log message: move to CodeGen/ARM/2007-05-07-tailmerge-1.ll --- Diffs of the changes: (+0 -0) 0 files changed From sabre at nondot.org Mon May 7 21:20:14 2007 From: sabre at nondot.org (Chris Lattner) Date: Mon, 7 May 2007 21:20:14 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/ARM/2007-05-07-tailmerge-1.ll Message-ID: <200705080220.l482KEFF000541@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/ARM: 2007-05-07-tailmerge-1.ll added (r1.1) --- Log message: move this out of Codegen/Generic, because it requires the ARM backend to be linked into llc --- Diffs of the changes: (+65 -0) 2007-05-07-tailmerge-1.ll | 65 ++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 65 insertions(+) Index: llvm/test/CodeGen/ARM/2007-05-07-tailmerge-1.ll diff -c /dev/null llvm/test/CodeGen/ARM/2007-05-07-tailmerge-1.ll:1.1 *** /dev/null Mon May 7 21:20:06 2007 --- llvm/test/CodeGen/ARM/2007-05-07-tailmerge-1.ll Mon May 7 21:19:56 2007 *************** *** 0 **** --- 1,65 ---- + ; RUN: llvm-as < %s | llc -march=arm -enable-tail-merge | grep bl.*baz | wc -l | grep 1 + ; RUN: llvm-as < %s | llc -march=arm -enable-tail-merge | grep bl.*quux | wc -l | grep 1 + ; Check that calls to baz and quux are tail-merged. + + ; ModuleID = 'tail.c' + target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64" + target triple = "i686-apple-darwin8" + + define i32 @f(i32 %i, i32 %q) { + entry: + %i_addr = alloca i32 ; [#uses=2] + %q_addr = alloca i32 ; [#uses=2] + %retval = alloca i32, align 4 ; [#uses=1] + "alloca point" = bitcast i32 0 to i32 ; [#uses=0] + store i32 %i, i32* %i_addr + store i32 %q, i32* %q_addr + %tmp = load i32* %i_addr ; [#uses=1] + %tmp1 = icmp ne i32 %tmp, 0 ; [#uses=1] + %tmp12 = zext i1 %tmp1 to i8 ; [#uses=1] + %toBool = icmp ne i8 %tmp12, 0 ; [#uses=1] + br i1 %toBool, label %cond_true, label %cond_false + + cond_true: ; preds = %entry + %tmp3 = call i32 (...)* @bar( ) ; [#uses=0] + %tmp4 = call i32 (...)* @baz( i32 5, i32 6 ) ; [#uses=0] + br label %cond_next + + cond_false: ; preds = %entry + %tmp5 = call i32 (...)* @foo( ) ; [#uses=0] + %tmp6 = call i32 (...)* @baz( i32 5, i32 6 ) ; [#uses=0] + br label %cond_next + + cond_next: ; preds = %cond_false, %cond_true + %tmp7 = load i32* %q_addr ; [#uses=1] + %tmp8 = icmp ne i32 %tmp7, 0 ; [#uses=1] + %tmp89 = zext i1 %tmp8 to i8 ; [#uses=1] + %toBool10 = icmp ne i8 %tmp89, 0 ; [#uses=1] + br i1 %toBool10, label %cond_true11, label %cond_false15 + + cond_true11: ; preds = %cond_next + %tmp13 = call i32 (...)* @foo( ) ; [#uses=0] + %tmp14 = call i32 (...)* @quux( i32 3, i32 4 ) ; [#uses=0] + br label %cond_next18 + + cond_false15: ; preds = %cond_next + %tmp16 = call i32 (...)* @bar( ) ; [#uses=0] + %tmp17 = call i32 (...)* @quux( i32 3, i32 4 ) ; [#uses=0] + br label %cond_next18 + + cond_next18: ; preds = %cond_false15, %cond_true11 + %tmp19 = call i32 (...)* @bar( ) ; [#uses=0] + br label %return + + return: ; preds = %cond_next18 + %retval20 = load i32* %retval ; [#uses=1] + ret i32 %retval20 + } + + declare i32 @bar(...) + + declare i32 @baz(...) + + declare i32 @foo(...) + + declare i32 @quux(...) From clattner at apple.com Mon May 7 21:22:26 2007 From: clattner at apple.com (Chris Lattner) Date: Mon, 7 May 2007 19:22:26 -0700 Subject: [llvm-commits] CVS: llvm/test/CodeGen/ARM/fp.ll fpmem.ll In-Reply-To: <200705072150.l47LoQBk028289@zion.cs.uiuc.edu> References: <200705072150.l47LoQBk028289@zion.cs.uiuc.edu> Message-ID: nice! -Chris On May 7, 2007, at 2:50 PM, Evan Cheng wrote: > > > Changes in directory llvm/test/CodeGen/ARM: > > fp.ll updated: 1.16 -> 1.17 > fpmem.ll updated: 1.6 -> 1.7 > --- > Log message: > > Fix tests. > > --- > Diffs of the changes: (+7 -9) > > fp.ll | 3 +-- > fpmem.ll | 13 ++++++------- > 2 files changed, 7 insertions(+), 9 deletions(-) > > > Index: llvm/test/CodeGen/ARM/fp.ll > diff -u llvm/test/CodeGen/ARM/fp.ll:1.16 llvm/test/CodeGen/ARM/ > fp.ll:1.17 > --- llvm/test/CodeGen/ARM/fp.ll:1.16 Mon Apr 16 12:36:06 2007 > +++ llvm/test/CodeGen/ARM/fp.ll Mon May 7 16:50:07 2007 > @@ -1,12 +1,11 @@ > ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 > %t > ; RUN: grep fmsr %t | wc -l | grep 4 > ; RUN: grep fsitos %t > -; RUN: grep fmrs %t > +; RUN: grep fmrs %t | wc -l | grep 2 > ; RUN: grep fsitod %t > ; RUN: grep fmrrd %t | wc -l | grep 5 > ; RUN: grep fmdrr %t | wc -l | grep 2 > ; RUN: grep fldd %t > -; RUN: grep flds %t > ; RUN: grep fuitod %t > ; RUN: grep fuitos %t > ; RUN: grep 1065353216 %t > > > Index: llvm/test/CodeGen/ARM/fpmem.ll > diff -u llvm/test/CodeGen/ARM/fpmem.ll:1.6 llvm/test/CodeGen/ARM/ > fpmem.ll:1.7 > --- llvm/test/CodeGen/ARM/fpmem.ll:1.6 Mon Apr 16 12:36:06 2007 > +++ llvm/test/CodeGen/ARM/fpmem.ll Mon May 7 16:50:07 2007 > @@ -6,18 +6,17 @@ > ; RUN: grep {fsts.*\\\[} | wc -l | grep 1 > > float %f1(float %a) { > -entry: > ret float 0.000000e+00 > } > > -float %f2(float* %v) { > -entry: > +float %f2(float* %v, float %u) { > %tmp = load float* %v > - ret float %tmp > + %tmp1 = add float %tmp, %u > + ret float %tmp1 > } > > -void %f3(float %a, float* %v) { > -entry: > - store float %a, float* %v > +void %f3(float %a, float %b, float* %v) { > + %tmp = add float %a, %b > + store float %tmp, float* %v > ret void > } > > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From tonic at nondot.org Mon May 7 23:23:13 2007 From: tonic at nondot.org (Tanya Lattner) Date: Mon, 7 May 2007 23:23:13 -0500 Subject: [llvm-commits] CVS: llvm/autoconf/configure.ac Message-ID: <200705080423.l484ND9h002944@zion.cs.uiuc.edu> Changes in directory llvm/autoconf: configure.ac updated: 1.269 -> 1.270 --- Log message: Bump version number in cvs --- Diffs of the changes: (+1 -1) configure.ac | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/autoconf/configure.ac diff -u llvm/autoconf/configure.ac:1.269 llvm/autoconf/configure.ac:1.270 --- llvm/autoconf/configure.ac:1.269 Sat Apr 21 16:28:12 2007 +++ llvm/autoconf/configure.ac Mon May 7 23:22:59 2007 @@ -31,7 +31,7 @@ dnl===-----------------------------------------------------------------------=== dnl Initialize autoconf and define the package name, version number and dnl email address for reporting bugs. -AC_INIT([[llvm]],[[2.0cvs]],[llvmbugs at cs.uiuc.edu]) +AC_INIT([[llvm]],[[2.1cvs]],[llvmbugs at cs.uiuc.edu]) dnl Provide a copyright substitution and ensure the copyright notice is included dnl in the output of --version option of the generated configure script. From tonic at nondot.org Mon May 7 23:24:31 2007 From: tonic at nondot.org (Tanya Lattner) Date: Mon, 7 May 2007 23:24:31 -0500 Subject: [llvm-commits] CVS: llvm-test/autoconf/configure.ac Message-ID: <200705080424.l484OVbK003002@zion.cs.uiuc.edu> Changes in directory llvm-test/autoconf: configure.ac updated: 1.44 -> 1.45 --- Log message: Bump version number in cvs. --- Diffs of the changes: (+1 -1) configure.ac | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm-test/autoconf/configure.ac diff -u llvm-test/autoconf/configure.ac:1.44 llvm-test/autoconf/configure.ac:1.45 --- llvm-test/autoconf/configure.ac:1.44 Thu Apr 26 12:39:21 2007 +++ llvm-test/autoconf/configure.ac Mon May 7 23:24:16 2007 @@ -1,5 +1,5 @@ dnl Initialize autoconf -AC_INIT([[LLVM-TEST]],[[1.7cvs]],[llvmbugs at cs.uiuc.edu]) +AC_INIT([[LLVM-TEST]],[[2.1cvs]],[llvmbugs at cs.uiuc.edu]) dnl Place all of the extra autoconf files into the config subdirectory AC_CONFIG_AUX_DIR([autoconf]) From tonic at nondot.org Mon May 7 23:32:22 2007 From: tonic at nondot.org (Tanya Lattner) Date: Mon, 7 May 2007 23:32:22 -0500 Subject: [llvm-commits] CVS: llvm/configure Message-ID: <200705080432.l484WMWs004057@zion.cs.uiuc.edu> Changes in directory llvm: configure updated: 1.275 -> 1.276 --- Log message: Bumping cvs version number --- Diffs of the changes: (+9 -9) configure | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-) Index: llvm/configure diff -u llvm/configure:1.275 llvm/configure:1.276 --- llvm/configure:1.275 Sat Apr 21 16:28:52 2007 +++ llvm/configure Mon May 7 23:32:07 2007 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.60 for llvm 2.0cvs. +# Generated by GNU Autoconf 2.60 for llvm 2.1cvs. # # Report bugs to . # @@ -715,8 +715,8 @@ # Identity of this package. PACKAGE_NAME='llvm' PACKAGE_TARNAME='-llvm-' -PACKAGE_VERSION='2.0cvs' -PACKAGE_STRING='llvm 2.0cvs' +PACKAGE_VERSION='2.1cvs' +PACKAGE_STRING='llvm 2.1cvs' PACKAGE_BUGREPORT='llvmbugs at cs.uiuc.edu' ac_unique_file="lib/VMCore/Module.cpp" @@ -1450,7 +1450,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures llvm 2.0cvs to adapt to many kinds of systems. +\`configure' configures llvm 2.1cvs to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1516,7 +1516,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of llvm 2.0cvs:";; + short | recursive ) echo "Configuration of llvm 2.1cvs:";; esac cat <<\_ACEOF @@ -1641,7 +1641,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -llvm configure 2.0cvs +llvm configure 2.1cvs generated by GNU Autoconf 2.60 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1657,7 +1657,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by llvm $as_me 2.0cvs, which was +It was created by llvm $as_me 2.1cvs, which was generated by GNU Autoconf 2.60. Invocation command line was $ $0 $@ @@ -34017,7 +34017,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by llvm $as_me 2.0cvs, which was +This file was extended by llvm $as_me 2.1cvs, which was generated by GNU Autoconf 2.60. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -34070,7 +34070,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -llvm config.status 2.0cvs +llvm config.status 2.1cvs configured by $0, generated by GNU Autoconf 2.60, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" From tonic at nondot.org Mon May 7 23:35:50 2007 From: tonic at nondot.org (Tanya Lattner) Date: Mon, 7 May 2007 23:35:50 -0500 Subject: [llvm-commits] CVS: llvm-test/configure Message-ID: <200705080435.l484ZobB004341@zion.cs.uiuc.edu> Changes in directory llvm-test: configure updated: 1.46 -> 1.47 --- Log message: Bumping version number --- Diffs of the changes: (+36 -36) configure | 72 +++++++++++++++++++++++++++++++------------------------------- 1 files changed, 36 insertions(+), 36 deletions(-) Index: llvm-test/configure diff -u llvm-test/configure:1.46 llvm-test/configure:1.47 --- llvm-test/configure:1.46 Thu Apr 26 12:39:20 2007 +++ llvm-test/configure Mon May 7 23:35:35 2007 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.60 for LLVM-TEST 1.7cvs. +# Generated by GNU Autoconf 2.60 for LLVM-TEST 2.1cvs. # # Report bugs to . # @@ -713,8 +713,8 @@ # Identity of this package. PACKAGE_NAME='LLVM-TEST' PACKAGE_TARNAME='-llvm-test-' -PACKAGE_VERSION='1.7cvs' -PACKAGE_STRING='LLVM-TEST 1.7cvs' +PACKAGE_VERSION='2.1cvs' +PACKAGE_STRING='LLVM-TEST 2.1cvs' PACKAGE_BUGREPORT='llvmbugs at cs.uiuc.edu' ac_unique_file="SingleSource/Benchmarks/Makefile" @@ -1389,7 +1389,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures LLVM-TEST 1.7cvs to adapt to many kinds of systems. +\`configure' configures LLVM-TEST 2.1cvs to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1454,7 +1454,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of LLVM-TEST 1.7cvs:";; + short | recursive ) echo "Configuration of LLVM-TEST 2.1cvs:";; esac cat <<\_ACEOF @@ -1576,7 +1576,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -LLVM-TEST configure 1.7cvs +LLVM-TEST configure 2.1cvs generated by GNU Autoconf 2.60 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1590,7 +1590,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by LLVM-TEST $as_me 1.7cvs, which was +It was created by LLVM-TEST $as_me 2.1cvs, which was generated by GNU Autoconf 2.60. Invocation command line was $ $0 $@ @@ -5239,7 +5239,7 @@ ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 5251 "configure"' > conftest.$ac_ext + echo '#line 5242 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -7404,11 +7404,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7416: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7407: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7420: \$? = $ac_status" >&5 + echo "$as_me:7411: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -7672,11 +7672,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7684: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7675: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7688: \$? = $ac_status" >&5 + echo "$as_me:7679: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -7776,11 +7776,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7788: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7779: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:7792: \$? = $ac_status" >&5 + echo "$as_me:7783: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -9065,7 +9065,7 @@ soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + shrext_cmds='.dylib' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` @@ -10228,7 +10228,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:12699: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:12712: \$? = $ac_status" >&5 + echo "$as_me:12703: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -12800,11 +12800,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12812: $lt_compile\"" >&5) + (eval echo "\"\$as_me:12803: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:12816: \$? = $ac_status" >&5 + echo "$as_me:12807: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -13128,7 +13128,7 @@ soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + shrext_cmds='.dylib' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` @@ -14370,11 +14370,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14382: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14373: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:14386: \$? = $ac_status" >&5 + echo "$as_me:14377: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -14474,11 +14474,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14486: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14477: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:14490: \$? = $ac_status" >&5 + echo "$as_me:14481: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -15743,7 +15743,7 @@ soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + shrext_cmds='.dylib' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` @@ -16709,11 +16709,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16721: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16712: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:16725: \$? = $ac_status" >&5 + echo "$as_me:16716: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -16977,11 +16977,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16989: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16980: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:16993: \$? = $ac_status" >&5 + echo "$as_me:16984: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -17081,11 +17081,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17093: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17084: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:17097: \$? = $ac_status" >&5 + echo "$as_me:17088: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -18370,7 +18370,7 @@ soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + shrext_cmds='.dylib' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` @@ -21254,7 +21254,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by LLVM-TEST $as_me 1.7cvs, which was +This file was extended by LLVM-TEST $as_me 2.1cvs, which was generated by GNU Autoconf 2.60. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -21301,7 +21301,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -LLVM-TEST config.status 1.7cvs +LLVM-TEST config.status 2.1cvs configured by $0, generated by GNU Autoconf 2.60, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" From tonic at nondot.org Mon May 7 23:42:02 2007 From: tonic at nondot.org (Tanya Lattner) Date: Mon, 7 May 2007 23:42:02 -0500 Subject: [llvm-commits] [release_20] CVS: llvm-test/autoconf/configure.ac Message-ID: <200705080442.l484g2Fb004496@zion.cs.uiuc.edu> Changes in directory llvm-test/autoconf: configure.ac updated: 1.44 -> 1.44.2.1 --- Log message: Setting version number --- Diffs of the changes: (+1 -1) configure.ac | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm-test/autoconf/configure.ac diff -u llvm-test/autoconf/configure.ac:1.44 llvm-test/autoconf/configure.ac:1.44.2.1 --- llvm-test/autoconf/configure.ac:1.44 Thu Apr 26 12:39:21 2007 +++ llvm-test/autoconf/configure.ac Mon May 7 23:41:47 2007 @@ -1,5 +1,5 @@ dnl Initialize autoconf -AC_INIT([[LLVM-TEST]],[[1.7cvs]],[llvmbugs at cs.uiuc.edu]) +AC_INIT([[LLVM-TEST]],[[2.0]],[llvmbugs at cs.uiuc.edu]) dnl Place all of the extra autoconf files into the config subdirectory AC_CONFIG_AUX_DIR([autoconf]) From tonic at nondot.org Mon May 7 23:43:13 2007 From: tonic at nondot.org (Tanya Lattner) Date: Mon, 7 May 2007 23:43:13 -0500 Subject: [llvm-commits] [release_20] CVS: llvm-test/configure Message-ID: <200705080443.l484hDks004715@zion.cs.uiuc.edu> Changes in directory llvm-test: configure updated: 1.46 -> 1.46.2.1 --- Log message: Setting release version --- Diffs of the changes: (+36 -36) configure | 72 +++++++++++++++++++++++++++++++------------------------------- 1 files changed, 36 insertions(+), 36 deletions(-) Index: llvm-test/configure diff -u llvm-test/configure:1.46 llvm-test/configure:1.46.2.1 --- llvm-test/configure:1.46 Thu Apr 26 12:39:20 2007 +++ llvm-test/configure Mon May 7 23:42:59 2007 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.60 for LLVM-TEST 1.7cvs. +# Generated by GNU Autoconf 2.60 for LLVM-TEST 2.0. # # Report bugs to . # @@ -713,8 +713,8 @@ # Identity of this package. PACKAGE_NAME='LLVM-TEST' PACKAGE_TARNAME='-llvm-test-' -PACKAGE_VERSION='1.7cvs' -PACKAGE_STRING='LLVM-TEST 1.7cvs' +PACKAGE_VERSION='2.0' +PACKAGE_STRING='LLVM-TEST 2.0' PACKAGE_BUGREPORT='llvmbugs at cs.uiuc.edu' ac_unique_file="SingleSource/Benchmarks/Makefile" @@ -1389,7 +1389,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures LLVM-TEST 1.7cvs to adapt to many kinds of systems. +\`configure' configures LLVM-TEST 2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1454,7 +1454,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of LLVM-TEST 1.7cvs:";; + short | recursive ) echo "Configuration of LLVM-TEST 2.0:";; esac cat <<\_ACEOF @@ -1576,7 +1576,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -LLVM-TEST configure 1.7cvs +LLVM-TEST configure 2.0 generated by GNU Autoconf 2.60 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1590,7 +1590,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by LLVM-TEST $as_me 1.7cvs, which was +It was created by LLVM-TEST $as_me 2.0, which was generated by GNU Autoconf 2.60. Invocation command line was $ $0 $@ @@ -5239,7 +5239,7 @@ ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 5251 "configure"' > conftest.$ac_ext + echo '#line 5242 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -7404,11 +7404,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7416: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7407: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7420: \$? = $ac_status" >&5 + echo "$as_me:7411: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -7672,11 +7672,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7684: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7675: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7688: \$? = $ac_status" >&5 + echo "$as_me:7679: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -7776,11 +7776,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7788: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7779: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:7792: \$? = $ac_status" >&5 + echo "$as_me:7783: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -9065,7 +9065,7 @@ soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + shrext_cmds='.dylib' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` @@ -10228,7 +10228,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:12699: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:12712: \$? = $ac_status" >&5 + echo "$as_me:12703: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -12800,11 +12800,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12812: $lt_compile\"" >&5) + (eval echo "\"\$as_me:12803: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:12816: \$? = $ac_status" >&5 + echo "$as_me:12807: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -13128,7 +13128,7 @@ soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + shrext_cmds='.dylib' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` @@ -14370,11 +14370,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14382: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14373: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:14386: \$? = $ac_status" >&5 + echo "$as_me:14377: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -14474,11 +14474,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14486: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14477: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:14490: \$? = $ac_status" >&5 + echo "$as_me:14481: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -15743,7 +15743,7 @@ soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + shrext_cmds='.dylib' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` @@ -16709,11 +16709,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16721: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16712: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:16725: \$? = $ac_status" >&5 + echo "$as_me:16716: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -16977,11 +16977,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16989: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16980: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:16993: \$? = $ac_status" >&5 + echo "$as_me:16984: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -17081,11 +17081,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17093: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17084: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:17097: \$? = $ac_status" >&5 + echo "$as_me:17088: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -18370,7 +18370,7 @@ soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + shrext_cmds='.dylib' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` @@ -21254,7 +21254,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by LLVM-TEST $as_me 1.7cvs, which was +This file was extended by LLVM-TEST $as_me 2.0, which was generated by GNU Autoconf 2.60. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -21301,7 +21301,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -LLVM-TEST config.status 1.7cvs +LLVM-TEST config.status 2.0 configured by $0, generated by GNU Autoconf 2.60, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" From tonic at nondot.org Mon May 7 23:45:27 2007 From: tonic at nondot.org (Tanya Lattner) Date: Mon, 7 May 2007 23:45:27 -0500 Subject: [llvm-commits] [release_20] CVS: llvm/autoconf/configure.ac Message-ID: <200705080445.l484jRZ2004993@zion.cs.uiuc.edu> Changes in directory llvm/autoconf: configure.ac updated: 1.269 -> 1.269.2.1 --- Log message: Setting version number. --- Diffs of the changes: (+1 -1) configure.ac | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/autoconf/configure.ac diff -u llvm/autoconf/configure.ac:1.269 llvm/autoconf/configure.ac:1.269.2.1 --- llvm/autoconf/configure.ac:1.269 Sat Apr 21 16:28:12 2007 +++ llvm/autoconf/configure.ac Mon May 7 23:45:12 2007 @@ -31,7 +31,7 @@ dnl===-----------------------------------------------------------------------=== dnl Initialize autoconf and define the package name, version number and dnl email address for reporting bugs. -AC_INIT([[llvm]],[[2.0cvs]],[llvmbugs at cs.uiuc.edu]) +AC_INIT([[llvm]],[[2.0]],[llvmbugs at cs.uiuc.edu]) dnl Provide a copyright substitution and ensure the copyright notice is included dnl in the output of --version option of the generated configure script. From tonic at nondot.org Mon May 7 23:45:41 2007 From: tonic at nondot.org (Tanya Lattner) Date: Mon, 7 May 2007 23:45:41 -0500 Subject: [llvm-commits] [release_20] CVS: llvm/configure Message-ID: <200705080445.l484jfaf005003@zion.cs.uiuc.edu> Changes in directory llvm: configure updated: 1.275 -> 1.275.2.1 --- Log message: Setting version number --- Diffs of the changes: (+9 -9) configure | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-) Index: llvm/configure diff -u llvm/configure:1.275 llvm/configure:1.275.2.1 --- llvm/configure:1.275 Sat Apr 21 16:28:52 2007 +++ llvm/configure Mon May 7 23:45:26 2007 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.60 for llvm 2.0cvs. +# Generated by GNU Autoconf 2.60 for llvm 2.0. # # Report bugs to . # @@ -715,8 +715,8 @@ # Identity of this package. PACKAGE_NAME='llvm' PACKAGE_TARNAME='-llvm-' -PACKAGE_VERSION='2.0cvs' -PACKAGE_STRING='llvm 2.0cvs' +PACKAGE_VERSION='2.0' +PACKAGE_STRING='llvm 2.0' PACKAGE_BUGREPORT='llvmbugs at cs.uiuc.edu' ac_unique_file="lib/VMCore/Module.cpp" @@ -1450,7 +1450,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures llvm 2.0cvs to adapt to many kinds of systems. +\`configure' configures llvm 2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1516,7 +1516,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of llvm 2.0cvs:";; + short | recursive ) echo "Configuration of llvm 2.0:";; esac cat <<\_ACEOF @@ -1641,7 +1641,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -llvm configure 2.0cvs +llvm configure 2.0 generated by GNU Autoconf 2.60 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1657,7 +1657,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by llvm $as_me 2.0cvs, which was +It was created by llvm $as_me 2.0, which was generated by GNU Autoconf 2.60. Invocation command line was $ $0 $@ @@ -34017,7 +34017,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by llvm $as_me 2.0cvs, which was +This file was extended by llvm $as_me 2.0, which was generated by GNU Autoconf 2.60. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -34070,7 +34070,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -llvm config.status 2.0cvs +llvm config.status 2.0 configured by $0, generated by GNU Autoconf 2.60, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" From sabre at nondot.org Tue May 8 00:38:25 2007 From: sabre at nondot.org (Chris Lattner) Date: Tue, 8 May 2007 00:38:25 -0500 Subject: [llvm-commits] CVS: llvm/lib/Bitcode/Writer/BitcodeWriter.cpp Message-ID: <200705080538.l485cPFj006018@zion.cs.uiuc.edu> Changes in directory llvm/lib/Bitcode/Writer: BitcodeWriter.cpp updated: 1.51 -> 1.52 --- Log message: Make a preemptive bitcode format change to support PR1146: http://llvm.org/PR1146 . This lets us do pr1146: http://llvm.org/PR1146 in llvm 2.1 without ugly code to emulate old behavior. This should be merged into the 2.0 release branch. --- Diffs of the changes: (+23 -4) BitcodeWriter.cpp | 27 +++++++++++++++++++++++---- 1 files changed, 23 insertions(+), 4 deletions(-) Index: llvm/lib/Bitcode/Writer/BitcodeWriter.cpp diff -u llvm/lib/Bitcode/Writer/BitcodeWriter.cpp:1.51 llvm/lib/Bitcode/Writer/BitcodeWriter.cpp:1.52 --- llvm/lib/Bitcode/Writer/BitcodeWriter.cpp:1.51 Sun May 6 14:19:23 2007 +++ llvm/lib/Bitcode/Writer/BitcodeWriter.cpp Tue May 8 00:38:01 2007 @@ -386,6 +386,12 @@ Vals.push_back(F->getCallingConv()); Vals.push_back(F->isDeclaration()); Vals.push_back(getEncodedLinkage(F)); + + // Note: we emit the param attr ID number for the function type of this + // function. In the future, we intend for attrs to be properties of + // functions, instead of on the type. This is to support this future work. + Vals.push_back(VE.getParamAttrID(F->getFunctionType()->getParamAttrs())); + Vals.push_back(Log2_32(F->getAlignment())+1); Vals.push_back(F->hasSection() ? SectionMap[F->getSection()] : 0); Vals.push_back(getEncodedVisibility(F)); @@ -736,15 +742,21 @@ Vals.push_back(VE.getValueID(I.getOperand(i))); break; case Instruction::Invoke: { + const PointerType *PTy = cast(I.getOperand(0)->getType()); + const FunctionType *FTy = cast(PTy->getElementType()); Code = bitc::FUNC_CODE_INST_INVOKE; + + // Note: we emit the param attr ID number for the function type of this + // function. In the future, we intend for attrs to be properties of + // functions, instead of on the type. This is to support this future work. + Vals.push_back(VE.getParamAttrID(FTy->getParamAttrs())); + Vals.push_back(cast(I).getCallingConv()); Vals.push_back(VE.getValueID(I.getOperand(1))); // normal dest Vals.push_back(VE.getValueID(I.getOperand(2))); // unwind dest PushValueAndType(I.getOperand(0), InstID, Vals, VE); // callee // Emit value #'s for the fixed parameters. - const PointerType *PTy = cast(I.getOperand(0)->getType()); - const FunctionType *FTy = cast(PTy->getElementType()); for (unsigned i = 0, e = FTy->getNumParams(); i != e; ++i) Vals.push_back(VE.getValueID(I.getOperand(i+3))); // fixed param. @@ -806,14 +818,21 @@ Vals.push_back(cast(I).isVolatile()); break; case Instruction::Call: { + const PointerType *PTy = cast(I.getOperand(0)->getType()); + const FunctionType *FTy = cast(PTy->getElementType()); + Code = bitc::FUNC_CODE_INST_CALL; + + // Note: we emit the param attr ID number for the function type of this + // function. In the future, we intend for attrs to be properties of + // functions, instead of on the type. This is to support this future work. + Vals.push_back(VE.getParamAttrID(FTy->getParamAttrs())); + Vals.push_back((cast(I).getCallingConv() << 1) | unsigned(cast(I).isTailCall())); PushValueAndType(I.getOperand(0), InstID, Vals, VE); // Callee // Emit value #'s for the fixed parameters. - const PointerType *PTy = cast(I.getOperand(0)->getType()); - const FunctionType *FTy = cast(PTy->getElementType()); for (unsigned i = 0, e = FTy->getNumParams(); i != e; ++i) Vals.push_back(VE.getValueID(I.getOperand(i+1))); // fixed param. From sabre at nondot.org Tue May 8 00:38:25 2007 From: sabre at nondot.org (Chris Lattner) Date: Tue, 8 May 2007 00:38:25 -0500 Subject: [llvm-commits] CVS: llvm/lib/Bitcode/Reader/BitcodeReader.cpp Message-ID: <200705080538.l485cPm3006016@zion.cs.uiuc.edu> Changes in directory llvm/lib/Bitcode/Reader: BitcodeReader.cpp updated: 1.47 -> 1.48 --- Log message: Make a preemptive bitcode format change to support PR1146: http://llvm.org/PR1146 . This lets us do pr1146: http://llvm.org/PR1146 in llvm 2.1 without ugly code to emulate old behavior. This should be merged into the 2.0 release branch. --- Diffs of the changes: (+25 -16) BitcodeReader.cpp | 41 +++++++++++++++++++++++++---------------- 1 files changed, 25 insertions(+), 16 deletions(-) Index: llvm/lib/Bitcode/Reader/BitcodeReader.cpp diff -u llvm/lib/Bitcode/Reader/BitcodeReader.cpp:1.47 llvm/lib/Bitcode/Reader/BitcodeReader.cpp:1.48 --- llvm/lib/Bitcode/Reader/BitcodeReader.cpp:1.47 Sun May 6 14:27:46 2007 +++ llvm/lib/Bitcode/Reader/BitcodeReader.cpp Tue May 8 00:38:01 2007 @@ -985,10 +985,10 @@ GlobalInits.push_back(std::make_pair(NewGV, InitID-1)); break; } - // FUNCTION: [type, callingconv, isproto, linkage, alignment, section, - // visibility] + // FUNCTION: [type, callingconv, isproto, linkage, paramattr, + // alignment, section, visibility] case bitc::MODULE_CODE_FUNCTION: { - if (Record.size() < 7) + if (Record.size() < 8) return Error("Invalid MODULE_CODE_FUNCTION record"); const Type *Ty = getTypeByID(Record[0]); if (!isa(Ty)) @@ -1004,13 +1004,17 @@ Func->setCallingConv(Record[1]); bool isProto = Record[2]; Func->setLinkage(GetDecodedLinkage(Record[3])); - Func->setAlignment((1 << Record[4]) >> 1); - if (Record[5]) { - if (Record[5]-1 >= SectionTable.size()) + + assert(Func->getFunctionType()->getParamAttrs() == + getParamAttrs(Record[4])); + + Func->setAlignment((1 << Record[5]) >> 1); + if (Record[6]) { + if (Record[6]-1 >= SectionTable.size()) return Error("Invalid section ID"); - Func->setSection(SectionTable[Record[5]-1]); + Func->setSection(SectionTable[Record[6]-1]); } - Func->setVisibility(GetDecodedVisibility(Record[6])); + Func->setVisibility(GetDecodedVisibility(Record[7])); ValueList.push_back(Func); @@ -1364,12 +1368,12 @@ } case bitc::FUNC_CODE_INST_INVOKE: { // INVOKE: [cc,fnty, op0,op1,op2, ...] - if (Record.size() < 3) return Error("Invalid INVOKE record"); - unsigned CCInfo = Record[0]; - BasicBlock *NormalBB = getBasicBlock(Record[1]); - BasicBlock *UnwindBB = getBasicBlock(Record[2]); + if (Record.size() < 4) return Error("Invalid INVOKE record"); + unsigned CCInfo = Record[1]; + BasicBlock *NormalBB = getBasicBlock(Record[2]); + BasicBlock *UnwindBB = getBasicBlock(Record[3]); - unsigned OpNum = 3; + unsigned OpNum = 4; Value *Callee; if (getValueTypePair(Record, OpNum, NextValueNo, Callee)) return Error("Invalid INVOKE record"); @@ -1383,6 +1387,8 @@ Record.size() < OpNum+FTy->getNumParams()) return Error("Invalid INVOKE record"); + assert(FTy->getParamAttrs() == getParamAttrs(Record[0])); + SmallVector Ops; for (unsigned i = 0, e = FTy->getNumParams(); i != e; ++i, ++OpNum) { Ops.push_back(getFnValueByID(Record[OpNum], FTy->getParamType(i))); @@ -1484,11 +1490,12 @@ break; } case bitc::FUNC_CODE_INST_CALL: { // CALL: [cc, fnty, fnid, arg0, arg1...] - if (Record.size() < 1) + if (Record.size() < 2) return Error("Invalid CALL record"); - unsigned CCInfo = Record[0]; - unsigned OpNum = 1; + unsigned CCInfo = Record[1]; + + unsigned OpNum = 2; Value *Callee; if (getValueTypePair(Record, OpNum, NextValueNo, Callee)) return Error("Invalid CALL record"); @@ -1499,6 +1506,8 @@ if (!FTy || Record.size() < FTy->getNumParams()+OpNum) return Error("Invalid CALL record"); + assert(FTy->getParamAttrs() == getParamAttrs(Record[0])); + SmallVector Args; // Read the fixed params. for (unsigned i = 0, e = FTy->getNumParams(); i != e; ++i, ++OpNum) { From sabre at nondot.org Tue May 8 00:38:50 2007 From: sabre at nondot.org (Chris Lattner) Date: Tue, 8 May 2007 00:38:50 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Bitcode/LLVMBitCodes.h Message-ID: <200705080538.l485cobV006038@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Bitcode: LLVMBitCodes.h updated: 1.19 -> 1.20 --- Log message: update comments, no functionality change --- Diffs of the changes: (+4 -4) LLVMBitCodes.h | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) Index: llvm/include/llvm/Bitcode/LLVMBitCodes.h diff -u llvm/include/llvm/Bitcode/LLVMBitCodes.h:1.19 llvm/include/llvm/Bitcode/LLVMBitCodes.h:1.20 --- llvm/include/llvm/Bitcode/LLVMBitCodes.h:1.19 Sat May 5 20:50:11 2007 +++ llvm/include/llvm/Bitcode/LLVMBitCodes.h Tue May 8 00:38:32 2007 @@ -50,8 +50,8 @@ // linkage, alignment, section, visibility, threadlocal] MODULE_CODE_GLOBALVAR = 7, - // FUNCTION: [type, callingconv, isproto, linkage, alignment, section, - // visibility] + // FUNCTION: [type, callingconv, isproto, linkage, paramattrs, alignment, + // section, visibility] MODULE_CODE_FUNCTION = 8, // ALIAS: [alias type, aliasee val#, linkage] @@ -176,7 +176,7 @@ FUNC_CODE_INST_RET = 10, // RET: [opty,opval] FUNC_CODE_INST_BR = 11, // BR: [bb#, bb#, cond] or [bb#] FUNC_CODE_INST_SWITCH = 12, // SWITCH: [opty, opval, n, n x ops] - FUNC_CODE_INST_INVOKE = 13, // INVOKE: [fnty, op0,op1,op2, ...] + FUNC_CODE_INST_INVOKE = 13, // INVOKE: [attr, fnty, op0,op1, ...] FUNC_CODE_INST_UNWIND = 14, // UNWIND FUNC_CODE_INST_UNREACHABLE = 15, // UNREACHABLE @@ -186,7 +186,7 @@ FUNC_CODE_INST_ALLOCA = 19, // ALLOCA: [instty, op, align] FUNC_CODE_INST_LOAD = 20, // LOAD: [opty, op, align, vol] FUNC_CODE_INST_STORE = 21, // STORE: [ptrty,val,ptr, align, vol] - FUNC_CODE_INST_CALL = 22, // CALL: [fnty, fnid, arg0, arg1...] + FUNC_CODE_INST_CALL = 22, // CALL: [attr, fnty, fnid, args...] FUNC_CODE_INST_VAARG = 23 // VAARG: [valistty, valist, instty] }; } // End bitc namespace From dpatel at apple.com Tue May 8 01:10:30 2007 From: dpatel at apple.com (Devang Patel) Date: Tue, 8 May 2007 01:10:30 -0500 Subject: [llvm-commits] CVS: llvm/test/CFrontend/2007-05-07-PaddingElements.c Message-ID: <200705080610.l486AUP9006599@zion.cs.uiuc.edu> Changes in directory llvm/test/CFrontend: 2007-05-07-PaddingElements.c added (r1.1) --- Log message: New test. --- Diffs of the changes: (+12 -0) 2007-05-07-PaddingElements.c | 12 ++++++++++++ 1 files changed, 12 insertions(+) Index: llvm/test/CFrontend/2007-05-07-PaddingElements.c diff -c /dev/null llvm/test/CFrontend/2007-05-07-PaddingElements.c:1.1 *** /dev/null Tue May 8 01:10:22 2007 --- llvm/test/CFrontend/2007-05-07-PaddingElements.c Tue May 8 01:10:12 2007 *************** *** 0 **** --- 1,12 ---- + // PR 1278 + // RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | not grep "4 x i8] zeroinitializer" + // RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | not grep "i32 0, i32 2" + struct s { + double d1; + int s1; + }; + + struct s foo(void) { + struct s S = {1.1, 2}; + return S; + } From dpatel at apple.com Tue May 8 01:15:09 2007 From: dpatel at apple.com (dpatel at apple.com) Date: Mon, 7 May 2007 23:15:09 -0700 (PDT) Subject: [llvm-commits] [126997] Fix PR1278. Message-ID: <20070508061509.CB6081807C01@src> Revision: 126997 Author: dpatel Date: 2007-05-07 23:15:09 -0700 (Mon, 07 May 2007) Log Message: ----------- Fix PR1278. - While adding padding elements at the end of LLVM struct use an array of i32 (instead of an array of i8) if possible. - Keep track of padding elements at the end of LLVM struct. Do not copy them while copying aggregates. Modified Paths: -------------- apple-local/branches/llvm/gcc/llvm-convert.cpp apple-local/branches/llvm/gcc/llvm-internal.h apple-local/branches/llvm/gcc/llvm-types.cpp Modified: apple-local/branches/llvm/gcc/llvm-convert.cpp =================================================================== --- apple-local/branches/llvm/gcc/llvm-convert.cpp 2007-05-08 05:09:41 UTC (rev 126996) +++ apple-local/branches/llvm/gcc/llvm-convert.cpp 2007-05-08 06:15:09 UTC (rev 126997) @@ -1085,6 +1085,8 @@ } else if (const StructType *STy = dyn_cast(ElTy)) { Constant *Zero = ConstantInt::get(Type::Int32Ty, 0); for (unsigned i = 0, e = STy->getNumElements(); i != e; ++i) { + if (isPaddingElement(STy, i)) + continue; Constant *Idx = ConstantInt::get(Type::Int32Ty, i); Value *DElPtr = new GetElementPtrInst(DestPtr, Zero, Idx, "tmp", CurBB); Value *SElPtr = new GetElementPtrInst(SrcPtr, Zero, Idx, "tmp", CurBB); Modified: apple-local/branches/llvm/gcc/llvm-internal.h =================================================================== --- apple-local/branches/llvm/gcc/llvm-internal.h 2007-05-08 05:09:41 UTC (rev 126996) +++ apple-local/branches/llvm/gcc/llvm-internal.h 2007-05-08 06:15:09 UTC (rev 126997) @@ -96,6 +96,10 @@ struct StructTypeConversionInfo; +/// Return true if and only if field no. N from struct type T is a padding +/// element added to match llvm struct type size and gcc struct type size. +bool isPaddingElement(const Type *T, unsigned N); + /// TypeConverter - Implement the converter from GCC types to LLVM types. /// class TypeConverter { Modified: apple-local/branches/llvm/gcc/llvm-types.cpp =================================================================== --- apple-local/branches/llvm/gcc/llvm-types.cpp 2007-05-08 05:09:41 UTC (rev 126996) +++ apple-local/branches/llvm/gcc/llvm-types.cpp 2007-05-08 06:15:09 UTC (rev 126997) @@ -893,6 +893,7 @@ std::vector Elements; std::vector ElementOffsetInBytes; std::vector ElementSizeInBytes; + std::vector PaddingElement; // True if field is used for padding const TargetData &TD; unsigned GCCStructAlignmentInBytes; bool Packed; // True if struct is packed @@ -1071,10 +1072,12 @@ /// addElement - Add an element to the structure with the specified type, /// offset and size. - void addElement(const Type *Ty, uint64_t Offset, uint64_t Size) { + void addElement(const Type *Ty, uint64_t Offset, uint64_t Size, + bool ExtraPadding = false) { Elements.push_back(Ty); ElementOffsetInBytes.push_back(Offset); ElementSizeInBytes.push_back(Size); + PaddingElement.push_back(ExtraPadding); lastFieldStartsAtNonByteBoundry(false); ExtraBitsAvailable = 0; } @@ -1223,7 +1226,25 @@ } } +std::map StructTypeInfoMap; +/// Return true if and only if field no. N from struct type T is a padding +/// element added to match llvm struct type size and gcc struct type size. +bool isPaddingElement(const Type *Ty, unsigned index) { + + StructTypeConversionInfo *Info = StructTypeInfoMap[Ty]; + + // If info is not available then be conservative and return false. + if (!Info) + return false; + + assert ( Info->Elements.size() == Info->PaddingElement.size() + && "Invalid StructTypeConversionInfo"); + assert ( index < Info->PaddingElement.size() + && "Invalid PaddingElement index"); + return Info->PaddingElement[index]; +} + /// getFieldOffsetInBits - Return the offset (in bits) of a FIELD_DECL in a /// structure. static unsigned getFieldOffsetInBits(tree Field) { @@ -1417,29 +1438,46 @@ ConvertType(BINFO_TYPE(BINFO_BASE_BINFO(binfo, i))); } - StructTypeConversionInfo Info(*TheTarget, TYPE_ALIGN_UNIT(type), - TYPE_PACKED(type)); + StructTypeConversionInfo *Info = + new StructTypeConversionInfo(*TheTarget, TYPE_ALIGN_UNIT(type), + TYPE_PACKED(type)); + // Convert over all of the elements of the struct. for (tree Field = TYPE_FIELDS(type); Field; Field = TREE_CHAIN(Field)) - DecodeStructFields(Field, Info); + DecodeStructFields(Field, *Info); - Info.RemoveExtraBytes(); + Info->RemoveExtraBytes(); // If the LLVM struct requires explicit tail padding to be the same size as // the GCC struct, insert tail padding now. This handles, e.g., "{}" in C++. if (TYPE_SIZE(type) && TREE_CODE(TYPE_SIZE(type)) == INTEGER_CST) { - uint64_t LLVMStructSize = Info.getSizeAsLLVMStruct(); + uint64_t LLVMStructSize = Info->getSizeAsLLVMStruct(); uint64_t GCCTypeSize = ((uint64_t)TREE_INT_CST_LOW(TYPE_SIZE(type))+7)/8; if (LLVMStructSize != GCCTypeSize) { assert(LLVMStructSize < GCCTypeSize && "LLVM type size doesn't match GCC type size!"); - uint64_t LLVMLastElementEnd = Info.getNewElementByteOffset(1); - const Type *PadTy = Type::Int8Ty; - if (GCCTypeSize-LLVMLastElementEnd != 1) - PadTy = ArrayType::get(PadTy, GCCTypeSize-LLVMStructSize); - Info.addElement(PadTy, GCCTypeSize-LLVMLastElementEnd, - GCCTypeSize-LLVMLastElementEnd); + uint64_t LLVMLastElementEnd = Info->getNewElementByteOffset(1); + + // If only one byte is needed then insert i8. + if (GCCTypeSize-LLVMLastElementEnd == 1) + Info->addElement(Type::Int8Ty, 1, 1); + else { + if ( ((GCCTypeSize-LLVMStructSize) % 4) == 0) { + // insert array of i32 + unsigned Int32ArraySize = (GCCTypeSize-LLVMStructSize)/4; + const Type *PadTy = ArrayType::get(Type::Int32Ty, Int32ArraySize); + Info->addElement(PadTy, GCCTypeSize - LLVMLastElementEnd, + Int32ArraySize, true /* Padding Element */); + } else { + const Type *PadTy = + ArrayType::get(Type::Int8Ty, GCCTypeSize-LLVMStructSize); + Info->addElement(PadTy, GCCTypeSize - LLVMLastElementEnd, + GCCTypeSize - LLVMLastElementEnd, + true /* Padding Element */); + + } + } } } @@ -1460,7 +1498,7 @@ if (tree DeclaredType = DECL_BIT_FIELD_TYPE(Field)) { // If this is a bitfield, the declared type must be an integral type. const Type *DeclFieldTy = ConvertType(DeclaredType); - unsigned DeclBitAlignment = Info.getTypeAlignment(DeclFieldTy)*8; + unsigned DeclBitAlignment = Info->getTypeAlignment(DeclFieldTy)*8; FieldOffsetInBits &= ~(DeclBitAlignment-1ULL); } @@ -1471,11 +1509,12 @@ integer_zerop(TYPE_SIZE(FieldType)); unsigned FieldNo = - Info.getLLVMFieldFor(FieldOffsetInBits, CurFieldNo, isZeroSizeField); + Info->getLLVMFieldFor(FieldOffsetInBits, CurFieldNo, isZeroSizeField); SET_DECL_LLVM(Field, ConstantInt::get(Type::Int32Ty, FieldNo)); } - const Type *ResultTy = Info.getLLVMType(); + const Type *ResultTy = Info->getLLVMType(); + StructTypeInfoMap[ResultTy] = Info; const OpaqueType *OldTy = cast_or_null(GET_TYPE_LLVM(type)); TypeDB.setType(type, ResultTy); From tonic at nondot.org Tue May 8 01:36:21 2007 From: tonic at nondot.org (Tanya Lattner) Date: Tue, 8 May 2007 01:36:21 -0500 Subject: [llvm-commits] [release_20] CVS: llvm/lib/Bitcode/Writer/BitcodeWriter.cpp Message-ID: <200705080636.l486aLqh007225@zion.cs.uiuc.edu> Changes in directory llvm/lib/Bitcode/Writer: BitcodeWriter.cpp updated: 1.51 -> 1.51.2.1 --- Log message: Merging from mainline. --- Diffs of the changes: (+23 -4) BitcodeWriter.cpp | 27 +++++++++++++++++++++++---- 1 files changed, 23 insertions(+), 4 deletions(-) Index: llvm/lib/Bitcode/Writer/BitcodeWriter.cpp diff -u llvm/lib/Bitcode/Writer/BitcodeWriter.cpp:1.51 llvm/lib/Bitcode/Writer/BitcodeWriter.cpp:1.51.2.1 --- llvm/lib/Bitcode/Writer/BitcodeWriter.cpp:1.51 Sun May 6 14:19:23 2007 +++ llvm/lib/Bitcode/Writer/BitcodeWriter.cpp Tue May 8 01:36:05 2007 @@ -386,6 +386,12 @@ Vals.push_back(F->getCallingConv()); Vals.push_back(F->isDeclaration()); Vals.push_back(getEncodedLinkage(F)); + + // Note: we emit the param attr ID number for the function type of this + // function. In the future, we intend for attrs to be properties of + // functions, instead of on the type. This is to support this future work. + Vals.push_back(VE.getParamAttrID(F->getFunctionType()->getParamAttrs())); + Vals.push_back(Log2_32(F->getAlignment())+1); Vals.push_back(F->hasSection() ? SectionMap[F->getSection()] : 0); Vals.push_back(getEncodedVisibility(F)); @@ -736,15 +742,21 @@ Vals.push_back(VE.getValueID(I.getOperand(i))); break; case Instruction::Invoke: { + const PointerType *PTy = cast(I.getOperand(0)->getType()); + const FunctionType *FTy = cast(PTy->getElementType()); Code = bitc::FUNC_CODE_INST_INVOKE; + + // Note: we emit the param attr ID number for the function type of this + // function. In the future, we intend for attrs to be properties of + // functions, instead of on the type. This is to support this future work. + Vals.push_back(VE.getParamAttrID(FTy->getParamAttrs())); + Vals.push_back(cast(I).getCallingConv()); Vals.push_back(VE.getValueID(I.getOperand(1))); // normal dest Vals.push_back(VE.getValueID(I.getOperand(2))); // unwind dest PushValueAndType(I.getOperand(0), InstID, Vals, VE); // callee // Emit value #'s for the fixed parameters. - const PointerType *PTy = cast(I.getOperand(0)->getType()); - const FunctionType *FTy = cast(PTy->getElementType()); for (unsigned i = 0, e = FTy->getNumParams(); i != e; ++i) Vals.push_back(VE.getValueID(I.getOperand(i+3))); // fixed param. @@ -806,14 +818,21 @@ Vals.push_back(cast(I).isVolatile()); break; case Instruction::Call: { + const PointerType *PTy = cast(I.getOperand(0)->getType()); + const FunctionType *FTy = cast(PTy->getElementType()); + Code = bitc::FUNC_CODE_INST_CALL; + + // Note: we emit the param attr ID number for the function type of this + // function. In the future, we intend for attrs to be properties of + // functions, instead of on the type. This is to support this future work. + Vals.push_back(VE.getParamAttrID(FTy->getParamAttrs())); + Vals.push_back((cast(I).getCallingConv() << 1) | unsigned(cast(I).isTailCall())); PushValueAndType(I.getOperand(0), InstID, Vals, VE); // Callee // Emit value #'s for the fixed parameters. - const PointerType *PTy = cast(I.getOperand(0)->getType()); - const FunctionType *FTy = cast(PTy->getElementType()); for (unsigned i = 0, e = FTy->getNumParams(); i != e; ++i) Vals.push_back(VE.getValueID(I.getOperand(i+1))); // fixed param. From tonic at nondot.org Tue May 8 01:37:50 2007 From: tonic at nondot.org (Tanya Lattner) Date: Tue, 8 May 2007 01:37:50 -0500 Subject: [llvm-commits] [release_20] CVS: llvm/lib/Bitcode/Reader/BitcodeReader.cpp Message-ID: <200705080637.l486boUQ007267@zion.cs.uiuc.edu> Changes in directory llvm/lib/Bitcode/Reader: BitcodeReader.cpp updated: 1.47 -> 1.47.2.1 --- Log message: Merge from mainline --- Diffs of the changes: (+25 -16) BitcodeReader.cpp | 41 +++++++++++++++++++++++++---------------- 1 files changed, 25 insertions(+), 16 deletions(-) Index: llvm/lib/Bitcode/Reader/BitcodeReader.cpp diff -u llvm/lib/Bitcode/Reader/BitcodeReader.cpp:1.47 llvm/lib/Bitcode/Reader/BitcodeReader.cpp:1.47.2.1 --- llvm/lib/Bitcode/Reader/BitcodeReader.cpp:1.47 Sun May 6 14:27:46 2007 +++ llvm/lib/Bitcode/Reader/BitcodeReader.cpp Tue May 8 01:37:35 2007 @@ -985,10 +985,10 @@ GlobalInits.push_back(std::make_pair(NewGV, InitID-1)); break; } - // FUNCTION: [type, callingconv, isproto, linkage, alignment, section, - // visibility] + // FUNCTION: [type, callingconv, isproto, linkage, paramattr, + // alignment, section, visibility] case bitc::MODULE_CODE_FUNCTION: { - if (Record.size() < 7) + if (Record.size() < 8) return Error("Invalid MODULE_CODE_FUNCTION record"); const Type *Ty = getTypeByID(Record[0]); if (!isa(Ty)) @@ -1004,13 +1004,17 @@ Func->setCallingConv(Record[1]); bool isProto = Record[2]; Func->setLinkage(GetDecodedLinkage(Record[3])); - Func->setAlignment((1 << Record[4]) >> 1); - if (Record[5]) { - if (Record[5]-1 >= SectionTable.size()) + + assert(Func->getFunctionType()->getParamAttrs() == + getParamAttrs(Record[4])); + + Func->setAlignment((1 << Record[5]) >> 1); + if (Record[6]) { + if (Record[6]-1 >= SectionTable.size()) return Error("Invalid section ID"); - Func->setSection(SectionTable[Record[5]-1]); + Func->setSection(SectionTable[Record[6]-1]); } - Func->setVisibility(GetDecodedVisibility(Record[6])); + Func->setVisibility(GetDecodedVisibility(Record[7])); ValueList.push_back(Func); @@ -1364,12 +1368,12 @@ } case bitc::FUNC_CODE_INST_INVOKE: { // INVOKE: [cc,fnty, op0,op1,op2, ...] - if (Record.size() < 3) return Error("Invalid INVOKE record"); - unsigned CCInfo = Record[0]; - BasicBlock *NormalBB = getBasicBlock(Record[1]); - BasicBlock *UnwindBB = getBasicBlock(Record[2]); + if (Record.size() < 4) return Error("Invalid INVOKE record"); + unsigned CCInfo = Record[1]; + BasicBlock *NormalBB = getBasicBlock(Record[2]); + BasicBlock *UnwindBB = getBasicBlock(Record[3]); - unsigned OpNum = 3; + unsigned OpNum = 4; Value *Callee; if (getValueTypePair(Record, OpNum, NextValueNo, Callee)) return Error("Invalid INVOKE record"); @@ -1383,6 +1387,8 @@ Record.size() < OpNum+FTy->getNumParams()) return Error("Invalid INVOKE record"); + assert(FTy->getParamAttrs() == getParamAttrs(Record[0])); + SmallVector Ops; for (unsigned i = 0, e = FTy->getNumParams(); i != e; ++i, ++OpNum) { Ops.push_back(getFnValueByID(Record[OpNum], FTy->getParamType(i))); @@ -1484,11 +1490,12 @@ break; } case bitc::FUNC_CODE_INST_CALL: { // CALL: [cc, fnty, fnid, arg0, arg1...] - if (Record.size() < 1) + if (Record.size() < 2) return Error("Invalid CALL record"); - unsigned CCInfo = Record[0]; - unsigned OpNum = 1; + unsigned CCInfo = Record[1]; + + unsigned OpNum = 2; Value *Callee; if (getValueTypePair(Record, OpNum, NextValueNo, Callee)) return Error("Invalid CALL record"); @@ -1499,6 +1506,8 @@ if (!FTy || Record.size() < FTy->getNumParams()+OpNum) return Error("Invalid CALL record"); + assert(FTy->getParamAttrs() == getParamAttrs(Record[0])); + SmallVector Args; // Read the fixed params. for (unsigned i = 0, e = FTy->getNumParams(); i != e; ++i, ++OpNum) { From isanbard at gmail.com Tue May 8 02:49:37 2007 From: isanbard at gmail.com (Bill Wendling) Date: Tue, 8 May 2007 02:49:37 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/LICM/scalar_promote.ll Message-ID: <200705080749.l487nbuc017686@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/LICM: scalar_promote.ll updated: 1.6 -> 1.7 --- Log message: Spare '&' in the RUN line. --- Diffs of the changes: (+1 -1) scalar_promote.ll | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/test/Transforms/LICM/scalar_promote.ll diff -u llvm/test/Transforms/LICM/scalar_promote.ll:1.6 llvm/test/Transforms/LICM/scalar_promote.ll:1.7 --- llvm/test/Transforms/LICM/scalar_promote.ll:1.6 Mon Apr 16 16:57:14 2007 +++ llvm/test/Transforms/LICM/scalar_promote.ll Tue May 8 02:49:07 2007 @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -licm -stats |& \ +; RUN: llvm-upgrade < %s | llvm-as | opt -licm -stats | \ ; RUN: grep {memory locations promoted to register} %X = global int 7 From greened at obbligato.org Tue May 8 09:41:15 2007 From: greened at obbligato.org (David Greene) Date: Tue, 08 May 2007 09:41:15 -0500 Subject: [llvm-commits] Regalloc Refactoring In-Reply-To: <463E6E94.60909@obbligato.org> References: <463E6E94.60909@obbligato.org> Message-ID: <46408C0B.6000200@obbligato.org> David A. Greene wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > This patch splits LiveIntervalAnalysis into separate live interval > analysis and register coalescing phases to facilitate development > of new register allocators and coalescing schemes. > > It passes all tests that do not also fail in the official, unmodified > source tree. No comment on this yet? In? Out? -Dave From reid at x10sys.com Tue May 8 09:41:39 2007 From: reid at x10sys.com (Reid Spencer) Date: Tue, 8 May 2007 09:41:39 -0500 Subject: [llvm-commits] CVS: llvm-stacker/tools/stkrc/Makefile stkrc.cpp Message-ID: <200705081441.l48EfdqT025384@zion.cs.uiuc.edu> Changes in directory llvm-stacker/tools/stkrc: Makefile updated: 1.13 -> 1.14 stkrc.cpp updated: 1.13 -> 1.14 --- Log message: Adjust stkrc for change from Bytecode to Bitcode. --- Diffs of the changes: (+3 -4) Makefile | 2 +- stkrc.cpp | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) Index: llvm-stacker/tools/stkrc/Makefile diff -u llvm-stacker/tools/stkrc/Makefile:1.13 llvm-stacker/tools/stkrc/Makefile:1.14 --- llvm-stacker/tools/stkrc/Makefile:1.13 Sun Feb 4 16:25:16 2007 +++ llvm-stacker/tools/stkrc/Makefile Tue May 8 09:41:21 2007 @@ -15,7 +15,7 @@ # Define the link components USEDLIBS=stkr_compiler -LINK_COMPONENTS = asmparser bcwriter ipo scalaropts \ +LINK_COMPONENTS = asmparser bitwriter ipo scalaropts \ transformutils ipa analysis target $(TARGETS_TO_BUILD) core # Define our configuration files Index: llvm-stacker/tools/stkrc/stkrc.cpp diff -u llvm-stacker/tools/stkrc/stkrc.cpp:1.13 llvm-stacker/tools/stkrc/stkrc.cpp:1.14 --- llvm-stacker/tools/stkrc/stkrc.cpp:1.13 Wed Dec 6 19:30:31 2006 +++ llvm-stacker/tools/stkrc/stkrc.cpp Tue May 8 09:41:21 2007 @@ -19,7 +19,7 @@ #include "../../lib/compiler/StackerCompiler.h" #include "llvm/Assembly/Parser.h" -#include "llvm/Bytecode/Writer.h" +#include "llvm/Bitcode/ReaderWriter.h" #include "llvm/Analysis/Verifier.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/Streams.h" @@ -163,8 +163,7 @@ throw std::string("error opening ") + OutputFilename + "!"; } - OStream L(*Out); - WriteBytecodeToFile(M.get(), L); + WriteBitcodeToFile(M.get(), *Out); } catch (const ParseError &E) { cerr << argv[0] << ": " << E.getMessage() << "\n"; return 1; From djg at cray.com Tue May 8 10:14:37 2007 From: djg at cray.com (Dan Gohman) Date: Tue, 8 May 2007 10:14:37 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnroll.cpp Message-ID: <200705081514.l48FEbYK025988@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: LoopUnroll.cpp updated: 1.44 -> 1.45 --- Log message: Correct the comment for ApproximateLoopSize to reflect what it actually does. --- Diffs of the changes: (+1 -2) LoopUnroll.cpp | 3 +-- 1 files changed, 1 insertion(+), 2 deletions(-) Index: llvm/lib/Transforms/Scalar/LoopUnroll.cpp diff -u llvm/lib/Transforms/Scalar/LoopUnroll.cpp:1.44 llvm/lib/Transforms/Scalar/LoopUnroll.cpp:1.45 --- llvm/lib/Transforms/Scalar/LoopUnroll.cpp:1.44 Sat May 5 13:49:57 2007 +++ llvm/lib/Transforms/Scalar/LoopUnroll.cpp Tue May 8 10:14:19 2007 @@ -72,8 +72,7 @@ LoopPass *llvm::createLoopUnrollPass() { return new LoopUnroll(); } -/// ApproximateLoopSize - Approximate the size of the loop after it has been -/// unrolled. +/// ApproximateLoopSize - Approximate the size of the loop. static unsigned ApproximateLoopSize(const Loop *L) { unsigned Size = 0; for (unsigned i = 0, e = L->getBlocks().size(); i != e; ++i) { From djg at cray.com Tue May 8 10:19:37 2007 From: djg at cray.com (Dan Gohman) Date: Tue, 8 May 2007 10:19:37 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnroll.cpp Message-ID: <200705081519.l48FJbO8026083@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: LoopUnroll.cpp updated: 1.45 -> 1.46 --- Log message: Fix various whitespace inconsistencies. --- Diffs of the changes: (+10 -10) LoopUnroll.cpp | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-) Index: llvm/lib/Transforms/Scalar/LoopUnroll.cpp diff -u llvm/lib/Transforms/Scalar/LoopUnroll.cpp:1.45 llvm/lib/Transforms/Scalar/LoopUnroll.cpp:1.46 --- llvm/lib/Transforms/Scalar/LoopUnroll.cpp:1.45 Tue May 8 10:14:19 2007 +++ llvm/lib/Transforms/Scalar/LoopUnroll.cpp Tue May 8 10:19:19 2007 @@ -50,10 +50,10 @@ LoopInfo *LI; // The current loop information public: static char ID; // Pass ID, replacement for typeid - LoopUnroll() : LoopPass((intptr_t)&ID) {} + LoopUnroll() : LoopPass((intptr_t)&ID) {} bool runOnLoop(Loop *L, LPPassManager &LPM); - BasicBlock* FoldBlockIntoPredecessor(BasicBlock* BB); + BasicBlock *FoldBlockIntoPredecessor(BasicBlock *BB); /// This transformation requires natural loop information & requires that /// loop preheaders be inserted into the CFG... @@ -114,7 +114,7 @@ // FoldBlockIntoPredecessor - Folds a basic block into its predecessor if it // only has one predecessor, and that predecessor only has one successor. // Returns the new combined block. -BasicBlock* LoopUnroll::FoldBlockIntoPredecessor(BasicBlock* BB) { +BasicBlock *LoopUnroll::FoldBlockIntoPredecessor(BasicBlock *BB) { // Merge basic blocks into their predecessor if there is only one distinct // pred, and if there is only one distinct successor of the predecessor, and // if there are no PHI nodes. @@ -165,8 +165,8 @@ bool Changed = false; LI = &getAnalysis(); - BasicBlock* Header = L->getHeader(); - BasicBlock* LatchBlock = L->getLoopLatch(); + BasicBlock *Header = L->getHeader(); + BasicBlock *LatchBlock = L->getLoopLatch(); BranchInst *BI = dyn_cast(LatchBlock->getTerminator()); if (BI == 0) return Changed; // Must end in a conditional branch @@ -262,10 +262,10 @@ if (*BB != LatchBlock) for (Value::use_iterator UI = (*BB)->use_begin(), UE = (*BB)->use_end(); UI != UE; ++UI) { - Instruction* UseInst = cast(*UI); + Instruction *UseInst = cast(*UI); if (isa(UseInst) && !L->contains(UseInst->getParent())) { - PHINode* phi = cast(UseInst); - Value* Incoming = phi->getIncomingValueForBlock(*BB); + PHINode *phi = cast(UseInst); + Value *Incoming = phi->getIncomingValueForBlock(*BB); if (isa(Incoming)) Incoming = LastValueMap[Incoming]; @@ -298,7 +298,7 @@ SmallPtrSet Users; for (Value::use_iterator UI = LatchBlock->use_begin(), UE = LatchBlock->use_end(); UI != UE; ++UI) - if (PHINode* phi = dyn_cast(*UI)) + if (PHINode *phi = dyn_cast(*UI)) Users.insert(phi); BasicBlock *LastIterationBB = cast(LastValueMap[LatchBlock]); @@ -328,7 +328,7 @@ // Insert the branches that link the different iterations together for (unsigned i = 0; i < Latches.size()-1; ++i) { new BranchInst(Headers[i+1], Latches[i]); - if(BasicBlock* Fold = FoldBlockIntoPredecessor(Headers[i+1])) { + if (BasicBlock *Fold = FoldBlockIntoPredecessor(Headers[i+1])) { std::replace(Latches.begin(), Latches.end(), Headers[i+1], Fold); std::replace(Headers.begin(), Headers.end(), Headers[i+1], Fold); } From reid at x10sys.com Tue May 8 10:23:18 2007 From: reid at x10sys.com (Reid Spencer) Date: Tue, 8 May 2007 10:23:18 -0500 Subject: [llvm-commits] CVS: llvm-stacker/autoconf/AutoRegen.sh configure.ac Message-ID: <200705081523.l48FNIRF026164@zion.cs.uiuc.edu> Changes in directory llvm-stacker/autoconf: AutoRegen.sh updated: 1.1 -> 1.2 configure.ac updated: 1.4 -> 1.5 --- Log message: CHanges for autconf 2.60 --- Diffs of the changes: (+62 -22) AutoRegen.sh | 52 +++++++++++++++++++++++++++++++++++++++++++--------- configure.ac | 32 +++++++++++++++++++------------- 2 files changed, 62 insertions(+), 22 deletions(-) Index: llvm-stacker/autoconf/AutoRegen.sh diff -u llvm-stacker/autoconf/AutoRegen.sh:1.1 llvm-stacker/autoconf/AutoRegen.sh:1.2 --- llvm-stacker/autoconf/AutoRegen.sh:1.1 Sat Sep 4 14:48:50 2004 +++ llvm-stacker/autoconf/AutoRegen.sh Tue May 8 10:22:59 2007 @@ -4,15 +4,49 @@ exit 1 } test -d autoconf && test -f autoconf/configure.ac && cd autoconf -[ -f configure.ac ] || die "Can't find 'autoconf' dir; please cd into it first" -echo "Regenerating aclocal.m4 with aclocal" -aclocal || die "aclocal failed" -autoconf --version | egrep '2\.5[0-9]' > /dev/null -if test $? -ne 0 -then - die "Your autoconf was not detected as being 2.5x" +test -f configure.ac || die "Can't find 'autoconf' dir; please cd into it first" +autoconf --version | egrep '2\.6[0-9]' > /dev/null +if test $? -ne 0 ; then + die "Your autoconf was not detected as being 2.6x" +fi +cwd=`pwd` +if test -d ../../../autoconf/m4 ; then + cd ../../../autoconf/m4 + llvm_m4=`pwd` + llvm_src_root=../../.. + llvm_obj_root=../../.. + cd $cwd +elif test -d ../../llvm/autoconf/m4 ; then + cd ../../llvm/autoconf/m4 + llvm_m4=`pwd` + llvm_src_root=../.. + llvm_obj_root=../.. + cd $cwd +else + while true ; do + echo "LLVM source root not found." + read -p "Enter full path to LLVM source:" + if test -d "$REPLY/autoconf/m4" ; then + llvm_src_root="$REPLY" + llvm_m4="$REPLY/autoconf/m4" + read -p "Enter full path to LLVM objects (empty for same as source):" + if test -d "$REPLY" ; then + llvm_obj_root="$REPLY" + else + llvm_obj_root="$llvm_src_root" + fi + break + fi + done fi -echo "Regenerating configure with autoconf 2.5x" -autoconf -o ../configure configure.ac || die "autoconf failed" +# Patch the LLVM_ROOT in configure.ac, if it needs it +cp configure.ac configure.bak +sed -e "s#^LLVM_SRC_ROOT=.*#LLVM_SRC_ROOT=\"$llvm_src_root\"#" \ + -e "s#^LLVM_OBJ_ROOT=.*#LLVM_OBJ_ROOT=\"$llvm_obj_root\"#" configure.bak > configure.ac +echo "Regenerating aclocal.m4 with aclocal" +rm -f aclocal.m4 +aclocal -I $llvm_m4 -I "$llvm_m4/.." || die "aclocal failed" +echo "Regenerating configure with autoconf 2.6x" +autoconf --warnings=all -o ../configure configure.ac || die "autoconf failed" cd .. exit 0 Index: llvm-stacker/autoconf/configure.ac diff -u llvm-stacker/autoconf/configure.ac:1.4 llvm-stacker/autoconf/configure.ac:1.5 --- llvm-stacker/autoconf/configure.ac:1.4 Mon Dec 27 02:51:55 2004 +++ llvm-stacker/autoconf/configure.ac Tue May 8 10:22:59 2007 @@ -1,7 +1,7 @@ dnl ************************************************************************** dnl * Initialize dnl ************************************************************************** -AC_INIT([[[Stacker]]],[[[1.0]]],[rspencer at x10sys.com]) +AC_INIT([[[Stacker]]],[[[2.0]]],[rspencer at reidspencer.com]) dnl Place all of the extra autoconf files into the config subdirectory AC_CONFIG_AUX_DIR([autoconf]) @@ -11,16 +11,6 @@ AC_CONFIG_FILES([Makefile.common]) -dnl Configure Makefiles -dnl List every Makefile that exists within your source tree - -AC_CONFIG_MAKEFILE(Makefile) -AC_CONFIG_MAKEFILE(lib/Makefile) -AC_CONFIG_MAKEFILE(lib/compiler/Makefile) -AC_CONFIG_MAKEFILE(lib/runtime/Makefile) -AC_CONFIG_MAKEFILE(test/Makefile) -AC_CONFIG_MAKEFILE(tools/Makefile) -AC_CONFIG_MAKEFILE(tools/stkrc/Makefile) dnl ************************************************************************** dnl * Determine which system we are building on @@ -68,12 +58,28 @@ dnl ************************************************************************** dnl Location of LLVM source code -AC_ARG_WITH(llvmsrc,AC_HELP_STRING([--with-llvmsrc],[Location of LLVM Source Code]),AC_SUBST(LLVM_SRC,[$withval]),AC_SUBST(LLVM_SRC,[`cd ${srcdir}/../..; pwd`])) +AC_ARG_WITH(llvmsrc,AS_HELP_STRING([--with-llvmsrc],[Location of LLVM Source Code]),AC_SUBST(LLVM_SRC,[$withval]),AC_SUBST(LLVM_SRC,[`cd ${srcdir}/../..; pwd`])) +AC_CONFIG_COMMANDS([llvm_src],[],[llvm_src=$LLVM_SRC]) dnl Location of LLVM object code -AC_ARG_WITH(llvmobj,AC_HELP_STRING([--with-llvmobj],[Location of LLVM Object Code]),AC_SUBST(LLVM_OBJ,[$withval]),AC_SUBST(LLVM_OBJ,[`cd ../..; pwd`])) +AC_ARG_WITH(llvmobj,AS_HELP_STRING([--with-llvmobj],[Location of LLVM Object Code]),AC_SUBST(LLVM_OBJ,[$withval]),AC_SUBST(LLVM_OBJ,[`cd ../..; pwd`])) +AC_CONFIG_COMMANDS([llvm_obj],[],[llvm_obj=$LLVM_OBJ]) + +dnl ************************************************************************** +dnl Configure Makefiles +dnl List every Makefile that exists within your source tree +dnl ************************************************************************** + +AC_CONFIG_MAKEFILE(Makefile) +AC_CONFIG_MAKEFILE(lib/Makefile) +AC_CONFIG_MAKEFILE(lib/compiler/Makefile) +AC_CONFIG_MAKEFILE(lib/runtime/Makefile) +AC_CONFIG_MAKEFILE(test/Makefile) +AC_CONFIG_MAKEFILE(tools/Makefile) +AC_CONFIG_MAKEFILE(tools/stkrc/Makefile) dnl ************************************************************************** dnl * Create the output files dnl ************************************************************************** + AC_OUTPUT From reid at x10sys.com Tue May 8 10:23:55 2007 From: reid at x10sys.com (Reid Spencer) Date: Tue, 8 May 2007 10:23:55 -0500 Subject: [llvm-commits] CVS: llvm-stacker/configure Message-ID: <200705081523.l48FNtpT026186@zion.cs.uiuc.edu> Changes in directory llvm-stacker: configure updated: 1.4 -> 1.5 --- Log message: Regenerate. --- Diffs of the changes: (+6800 -6001) configure |12801 ++++++++++++++++++++++++++++++++------------------------------ 1 files changed, 6800 insertions(+), 6001 deletions(-) Index: llvm-stacker/configure diff -u llvm-stacker/configure:1.4 llvm-stacker/configure:1.5 --- llvm-stacker/configure:1.4 Mon Dec 27 02:51:55 2004 +++ llvm-stacker/configure Tue May 8 10:23:37 2007 @@ -1,10 +1,11 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for [Stacker] [1.0]. +# Generated by GNU Autoconf 2.60 for [Stacker] [2.0]. # -# Report bugs to . +# Report bugs to . # -# Copyright (C) 2003 Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## @@ -18,11 +19,35 @@ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi +BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset @@ -31,8 +56,43 @@ fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + # Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done PS1='$ ' PS2='> ' PS4='+ ' @@ -46,18 +106,19 @@ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - $as_unset $as_var + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -65,157 +126,386 @@ # Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` +# CDPATH. +$as_unset CDPATH -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no fi + if test $as_have_required = yes && (eval ": +(as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=\$LINENO + as_lineno_2=\$LINENO + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && + test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +") 2> /dev/null; then + : +else + as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +for as_dir in /usr/bin/posix$PATH_SEPARATOR/bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in + case $as_dir in /*) - if ("$as_dir/$as_base" -c ' + for as_base in sh bash ksh sh5; do + as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + done;; + esac +done +IFS=$as_save_IFS + + + for as_shell in $as_candidate_shells $SHELL; do + # Try only shells that exist, to save several forks. + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { ("$as_shell") 2> /dev/null <<\_ASEOF +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { "$as_shell" 2> /dev/null <<\_ASEOF +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +: +(as_func_return () { + (exit $1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = "$1" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test $exitcode = 0) || { (exit 1); exit 1; } + +( as_lineno_1=$LINENO as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } + +_ASEOF +}; then + break +fi + +fi + + done + + if test "x$CONFIG_SHELL" != x; then + for as_var in BASH_ENV ENV + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + + if test $as_have_required = no; then + echo This script requires a shell more modern than all the + echo shells that I found on your system. Please install a + echo modern shell, or manually run the script under such a + echo shell if you do have one. + { (exit 1); exit 1; } +fi + + +fi + +fi + + + +(eval "as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0") || { + echo No shell found that supports shell functions. + echo Please tell autoconf at gnu.org about your system, + echo including any error possibly output before this + echo message +} + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop - s,-$,, - s,^['$as_cr_digits']*\n,, + s/-\n.*// ' >$as_me.lineno && - chmod +x $as_me.lineno || + chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" # Exit status is that of the last command. exit } -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.file +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -224,7 +514,19 @@ as_mkdir_p=false fi -as_executable_p="test -f" +# Find out whether ``test -x'' works. Don't use a zero-byte file, as +# systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + as_executable_p="test -x" +else + as_executable_p=: +fi +rm -f conf$$.file # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -233,15 +535,6 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - # Check that we are running under the correct shell. @@ -280,15 +573,15 @@ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. -if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test -z "$ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if (echo_test_string="`eval $cmd`") 2>/dev/null && - echo_test_string="`eval $cmd`" && + if (echo_test_string=`eval $cmd`) 2>/dev/null && + echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break @@ -393,39 +686,36 @@ -tagnames=`echo "$tagnames,CXX" | sed 's/^,//'` +tagnames=${tagnames+${tagnames},}CXX + +tagnames=${tagnames+${tagnames},}F77 -tagnames=`echo "$tagnames,F77" | sed 's/^,//'` +exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` -exec 6>&1 - # # Initializations. # ac_default_prefix=/usr/local +ac_clean_files= ac_config_libobj_dir=. +LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -# This variable seems obsolete. It should probably be removed, and -# only ac_max_sed_lines should be used. -: ${ac_max_here_lines=38} - # Identity of this package. PACKAGE_NAME='[Stacker]' PACKAGE_TARNAME='--stacker--' -PACKAGE_VERSION='[1.0]' -PACKAGE_STRING='[Stacker] [1.0]' -PACKAGE_BUGREPORT='rspencer at x10sys.com' +PACKAGE_VERSION='[2.0]' +PACKAGE_STRING='[Stacker] [2.0]' +PACKAGE_BUGREPORT='rspencer at reidspencer.com' ac_unique_file="lib/compiler/StackerParser.y" # Factoring default headers for most tests. @@ -456,17 +746,103 @@ #endif #if HAVE_INTTYPES_H # include -#else -# if HAVE_STDINT_H -# include -# endif +#endif +#if HAVE_STDINT_H +# include #endif #if HAVE_UNISTD_H # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP CPP CXX CXXFLAGS ac_ct_CXX CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL SHLIBEXT LLVM_SRC LLVM_OBJ LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL +PATH_SEPARATOR +PACKAGE_NAME +PACKAGE_TARNAME +PACKAGE_VERSION +PACKAGE_STRING +PACKAGE_BUGREPORT +exec_prefix +prefix +program_transform_name +bindir +sbindir +libexecdir +datarootdir +datadir +sysconfdir +sharedstatedir +localstatedir +includedir +oldincludedir +docdir +infodir +htmldir +dvidir +pdfdir +psdir +libdir +localedir +mandir +DEFS +ECHO_C +ECHO_N +ECHO_T +LIBS +build_alias +host_alias +target_alias +build +build_cpu +build_vendor +build_os +host +host_cpu +host_vendor +host_os +CC +CFLAGS +LDFLAGS +CPPFLAGS +ac_ct_CC +EXEEXT +OBJEXT +GREP +EGREP +LN_S +ECHO +AR +RANLIB +STRIP +CPP +CXX +CXXFLAGS +ac_ct_CXX +CXXCPP +F77 +FFLAGS +ac_ct_F77 +LIBTOOL +SHLIBEXT +LLVM_SRC +LLVM_OBJ +LIBOBJS +LTLIBOBJS' ac_subst_files='' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +CPPFLAGS +CPP +CXX +CXXFLAGS +CCC +CXXCPP +F77 +FFLAGS' + # Initialize some variables set by options. ac_init_help= @@ -493,34 +869,48 @@ # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' +datarootdir='${prefix}/share' +datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' ac_prev= +ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" + eval $ac_prev=\$ac_option ac_prev= continue fi - ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; + esac # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_option in + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; @@ -542,12 +932,18 @@ --config-cache | -C) cache_file=config.cache ;; - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) + -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. @@ -555,7 +951,17 @@ { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` - eval "enable_$ac_feature=no" ;; + eval enable_$ac_feature=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` @@ -564,11 +970,7 @@ { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - eval "enable_$ac_feature='$ac_optarg'" ;; + eval enable_$ac_feature=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -595,6 +997,12 @@ -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; @@ -619,13 +1027,16 @@ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) + | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) @@ -690,6 +1101,16 @@ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; @@ -746,11 +1167,7 @@ { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - eval "with_$ac_package='$ac_optarg'" ;; + eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` @@ -759,7 +1176,7 @@ { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/-/_/g'` - eval "with_$ac_package=no" ;; + eval with_$ac_package=no ;; --x) # Obsolete; use --with-x. @@ -790,8 +1207,7 @@ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } - ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` - eval "$ac_envvar='$ac_optarg'" + eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) @@ -811,27 +1227,19 @@ { (exit 1); exit 1; }; } fi -# Be sure to have absolute paths. -for ac_var in exec_prefix prefix -do - eval ac_val=$`echo $ac_var` - case $ac_val in - [\\/$]* | ?:[\\/]* | NONE | '' ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; - esac -done - -# Be sure to have absolute paths. -for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ - localstatedir libdir includedir oldincludedir infodir mandir +# Be sure to have absolute directory names. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir do - eval ac_val=$`echo $ac_var` + eval ac_val=\$$ac_var case $ac_val in - [\\/$]* | ?:[\\/]* ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac + { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' @@ -858,94 +1266,76 @@ test "$silent" = yes && exec 6>/dev/null +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + { echo "$as_me: error: Working directory cannot be determined" >&2 + { (exit 1); exit 1; }; } +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + { echo "$as_me: error: pwd does not report name of working directory" >&2 + { (exit 1); exit 1; }; } + + # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_confdir=`(dirname "$0") 2>/dev/null || + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$0" || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X"$0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then + if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 - { (exit 1); exit 1; }; } - else - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } - fi fi -(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || - { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } -srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` -ac_env_build_alias_set=${build_alias+set} -ac_env_build_alias_value=$build_alias -ac_cv_env_build_alias_set=${build_alias+set} -ac_cv_env_build_alias_value=$build_alias -ac_env_host_alias_set=${host_alias+set} -ac_env_host_alias_value=$host_alias -ac_cv_env_host_alias_set=${host_alias+set} -ac_cv_env_host_alias_value=$host_alias -ac_env_target_alias_set=${target_alias+set} -ac_env_target_alias_value=$target_alias -ac_cv_env_target_alias_set=${target_alias+set} -ac_cv_env_target_alias_value=$target_alias -ac_env_CC_set=${CC+set} -ac_env_CC_value=$CC -ac_cv_env_CC_set=${CC+set} -ac_cv_env_CC_value=$CC -ac_env_CFLAGS_set=${CFLAGS+set} -ac_env_CFLAGS_value=$CFLAGS -ac_cv_env_CFLAGS_set=${CFLAGS+set} -ac_cv_env_CFLAGS_value=$CFLAGS -ac_env_LDFLAGS_set=${LDFLAGS+set} -ac_env_LDFLAGS_value=$LDFLAGS -ac_cv_env_LDFLAGS_set=${LDFLAGS+set} -ac_cv_env_LDFLAGS_value=$LDFLAGS -ac_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_env_CPPFLAGS_value=$CPPFLAGS -ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_cv_env_CPPFLAGS_value=$CPPFLAGS -ac_env_CPP_set=${CPP+set} -ac_env_CPP_value=$CPP -ac_cv_env_CPP_set=${CPP+set} -ac_cv_env_CPP_value=$CPP -ac_env_CXX_set=${CXX+set} -ac_env_CXX_value=$CXX -ac_cv_env_CXX_set=${CXX+set} -ac_cv_env_CXX_value=$CXX -ac_env_CXXFLAGS_set=${CXXFLAGS+set} -ac_env_CXXFLAGS_value=$CXXFLAGS -ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set} -ac_cv_env_CXXFLAGS_value=$CXXFLAGS -ac_env_CXXCPP_set=${CXXCPP+set} -ac_env_CXXCPP_value=$CXXCPP -ac_cv_env_CXXCPP_set=${CXXCPP+set} -ac_cv_env_CXXCPP_value=$CXXCPP -ac_env_F77_set=${F77+set} -ac_env_F77_value=$F77 -ac_cv_env_F77_set=${F77+set} -ac_cv_env_F77_value=$F77 -ac_env_FFLAGS_set=${FFLAGS+set} -ac_env_FFLAGS_value=$FFLAGS -ac_cv_env_FFLAGS_set=${FFLAGS+set} -ac_cv_env_FFLAGS_value=$FFLAGS + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done # # Report the --help message. @@ -954,7 +1344,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures [Stacker] [1.0] to adapt to many kinds of systems. +\`configure' configures [Stacker] [2.0] to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -974,9 +1364,6 @@ -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] -_ACEOF - - cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] @@ -994,15 +1381,22 @@ --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] - --infodir=DIR info documentation [PREFIX/info] - --mandir=DIR man documentation [PREFIX/man] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/--stacker--] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF @@ -1015,19 +1409,20 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of [Stacker] [1.0]:";; + short | recursive ) echo "Configuration of [Stacker] [2.0]:";; esac cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-shared[=PKGS] - build shared libraries [default=yes] - --enable-static[=PKGS] - build static libraries [default=yes] + --enable-shared[=PKGS] build shared libraries + [default=enable_shared_default] + --enable-static[=PKGS] build static libraries + [default=enable_static_default] --enable-fast-install[=PKGS] - optimize for fast installation [default=yes] + optimize for fast installation + [default=enable_Fast_install_default] --disable-libtool-lock avoid locking (might break parallel builds) Optional Packages: @@ -1036,8 +1431,7 @@ --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-pic try to use only PIC/non-PIC objects [default=use both] - --with-tags[=TAGS] - include additional configurations [automatic] + --with-tags[=TAGS] include additional configurations [automatic] --with-llvmsrc Location of LLVM Source Code --with-llvmobj Location of LLVM Object Code @@ -1046,8 +1440,8 @@ CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory - CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have - headers in a nonstandard directory + CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + you have headers in a nonstandard directory CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags @@ -1058,122 +1452,88 @@ Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. -Report bugs to . +Report bugs to . _ACEOF +ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. - ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d $ac_dir || continue + test -d "$ac_dir" || continue ac_builddir=. -if test "$ac_dir" != .; then +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac - -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - cd $ac_dir - # Check for guested configure; otherwise get Cygnus style configure. - if test -f $ac_srcdir/configure.gnu; then - echo - $SHELL $ac_srcdir/configure.gnu --help=recursive - elif test -f $ac_srcdir/configure; then - echo - $SHELL $ac_srcdir/configure --help=recursive - elif test -f $ac_srcdir/configure.ac || - test -f $ac_srcdir/configure.in; then - echo - $ac_configure --help + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi - cd $ac_popdir + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } done fi -test -n "$ac_init_help" && exit 0 +test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -[Stacker] configure [1.0] -generated by GNU Autoconf 2.59 +[Stacker] configure [2.0] +generated by GNU Autoconf 2.60 -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF - exit 0 + exit fi -exec 5>config.log -cat >&5 <<_ACEOF +cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by [Stacker] $as_me [1.0], which was -generated by GNU Autoconf 2.59. Invocation command line was +It was created by [Stacker] $as_me [2.0], which was +generated by GNU Autoconf 2.60. Invocation command line was $ $0 $@ _ACEOF +exec 5>>config.log { cat <<_ASUNAME ## --------- ## @@ -1192,7 +1552,7 @@ /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` @@ -1206,6 +1566,7 @@ test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done +IFS=$as_save_IFS } >&5 @@ -1227,7 +1588,6 @@ ac_configure_args= ac_configure_args0= ac_configure_args1= -ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do @@ -1238,7 +1598,7 @@ -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in @@ -1260,9 +1620,7 @@ -* ) ac_must_keep_next=true ;; esac fi - ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" - # Get rid of the leading space. - ac_sep=" " + ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done @@ -1273,8 +1631,8 @@ # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. -# WARNING: Be sure not to use single quotes in there, as some shells, -# such as our DU 5.0 friend, will then `close' the trap. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { @@ -1287,20 +1645,34 @@ _ASBOX echo # The following way of writing the cache mishandles newlines in values, -{ +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done (set) 2>&1 | - case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in - *ac_space=\ *) + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) sed -n \ - "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" - ;; + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( *) - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} + esac | + sort +) echo cat <<\_ASBOX @@ -1311,22 +1683,28 @@ echo for ac_var in $ac_subst_vars do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX -## ------------- ## -## Output files. ## -## ------------- ## +## ------------------- ## +## File substitutions. ## +## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" done | sort echo fi @@ -1338,26 +1716,24 @@ ## ----------- ## _ASBOX echo - sed "/^$/d" confdefs.h | sort + cat confdefs.h echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 - rm -f core *.core && - rm -rf conftest* confdefs* conf$$* $ac_clean_files && + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status - ' 0 +' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo >confdefs.h +rm -f -r conftest* confdefs.h # Predefined preprocessor variables. @@ -1388,14 +1764,17 @@ # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi +if test -n "$CONFIG_SITE"; then + set x "$CONFIG_SITE" +elif test "x$prefix" != xNONE; then + set x "$prefix/share/config.site" "$prefix/etc/config.site" +else + set x "$ac_default_prefix/share/config.site" \ + "$ac_default_prefix/etc/config.site" fi -for ac_site_file in $CONFIG_SITE; do +shift +for ac_site_file +do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} @@ -1411,8 +1790,8 @@ { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in - [\\/]* | ?:[\\/]* ) . $cache_file;; - *) . ./$cache_file;; + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; esac fi else @@ -1424,12 +1803,11 @@ # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false -for ac_var in `(set) 2>&1 | - sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do +for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val="\$ac_cv_env_${ac_var}_value" - eval ac_new_val="\$ac_env_${ac_var}_value" + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 @@ -1454,8 +1832,7 @@ # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -1472,12 +1849,6 @@ { (exit 1); exit 1; }; } fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - @@ -1502,68 +1873,56 @@ +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= -for ac_dir in autoconf $srcdir/autoconf; do - if test -f $ac_dir/install-sh; then +for ac_dir in autoconf "$srcdir"/autoconf; do + if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break - elif test -f $ac_dir/install.sh; then + elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break - elif test -f $ac_dir/shtool; then + elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then - { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in autoconf $srcdir/autoconf" >&5 -echo "$as_me: error: cannot find install-sh or install.sh in autoconf $srcdir/autoconf" >&2;} + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in autoconf \"$srcdir\"/autoconf" >&5 +echo "$as_me: error: cannot find install-sh or install.sh in autoconf \"$srcdir\"/autoconf" >&2;} { (exit 1); exit 1; }; } fi -ac_config_guess="$SHELL $ac_aux_dir/config.guess" -ac_config_sub="$SHELL $ac_aux_dir/config.sub" -ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. - - - - - ac_config_files="$ac_config_files Makefile.common" - - - ac_config_commands="$ac_config_commands Makefile" +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - ac_config_commands="$ac_config_commands lib/Makefile" - ac_config_commands="$ac_config_commands lib/compiler/Makefile" +ac_config_files="$ac_config_files Makefile.common" - ac_config_commands="$ac_config_commands lib/runtime/Makefile" - ac_config_commands="$ac_config_commands test/Makefile" - - ac_config_commands="$ac_config_commands tools/Makefile" - - - ac_config_commands="$ac_config_commands tools/stkrc/Makefile" - - - - -# Check whether --enable-shared or --disable-shared was given. +# Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then - enableval="$enable_shared" - p=${PACKAGE-default} + enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; @@ -1582,12 +1941,12 @@ esac else enable_shared=yes -fi; +fi -# Check whether --enable-static or --disable-static was given. + +# Check whether --enable-static was given. if test "${enable_static+set}" = set; then - enableval="$enable_static" - p=${PACKAGE-default} + enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; @@ -1606,12 +1965,12 @@ esac else enable_static=yes -fi; +fi -# Check whether --enable-fast-install or --disable-fast-install was given. + +# Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then - enableval="$enable_fast_install" - p=${PACKAGE-default} + enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; @@ -1630,60 +1989,90 @@ esac else enable_fast_install=yes -fi; +fi + # Make sure we can run config.sub. -$ac_config_sub sun4 >/dev/null 2>&1 || - { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 -echo "$as_me: error: cannot run $ac_config_sub" >&2;} +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 +echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} { (exit 1); exit 1; }; } -echo "$as_me:$LINENO: checking build system type" >&5 -echo $ECHO_N "checking build system type... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking build system type" >&5 +echo $ECHO_N "checking build system type... $ECHO_C" >&6; } if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_build_alias=$build_alias -test -z "$ac_cv_build_alias" && - ac_cv_build_alias=`$ac_config_guess` -test -z "$ac_cv_build_alias" && + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } -ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || - { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:$LINENO: result: $ac_cv_build" >&5 -echo "${ECHO_T}$ac_cv_build" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +echo "${ECHO_T}$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 +echo "$as_me: error: invalid value of canonical build" >&2;} + { (exit 1); exit 1; }; };; +esac build=$ac_cv_build -build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac -echo "$as_me:$LINENO: checking host system type" >&5 -echo $ECHO_N "checking host system type... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking host system type" >&5 +echo $ECHO_N "checking host system type... $ECHO_C" >&6; } if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_host_alias=$host_alias -test -z "$ac_cv_host_alias" && - ac_cv_host_alias=$ac_cv_build_alias -ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || - { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} { (exit 1); exit 1; }; } +fi fi -echo "$as_me:$LINENO: result: $ac_cv_host" >&5 -echo "${ECHO_T}$ac_cv_host" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +echo "${ECHO_T}$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 +echo "$as_me: error: invalid value of canonical host" >&2;} + { (exit 1); exit 1; }; };; +esac host=$ac_cv_host -host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac ac_ext=c @@ -1694,8 +2083,8 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1708,32 +2097,34 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1746,36 +2137,51 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf at gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf at gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1788,74 +2194,34 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - CC=$ac_ct_CC -else - CC="$ac_cv_prog_CC" -fi + fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1869,7 +2235,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -1880,6 +2246,7 @@ fi done done +IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. @@ -1897,22 +2264,23 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1925,36 +2293,38 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1967,29 +2337,45 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$ac_ct_CC" && break done - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf at gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf at gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi fi fi @@ -2002,21 +2388,35 @@ { (exit 1); exit 1; }; } # Provide some information about the compiler. -echo "$as_me:$LINENO:" \ - "checking for C compiler version" >&5 +echo "$as_me:$LINENO: checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 - (eval $ac_compiler --version &5) 2>&5 +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 - (eval $ac_compiler -v &5) 2>&5 +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 - (eval $ac_compiler -V &5) 2>&5 +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } @@ -2041,46 +2441,70 @@ # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 - (eval $ac_link_default) 2>&5 +# +# List of possible output files, starting from the most likely. +# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) +# only as a last resort. b.out is created by i960 compilers. +ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' +# +# The IRIX 6 linker writes into existing files which may not be +# executable, retaining their permissions. Remove them first so a +# subsequent execution test works. +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { (ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link_default") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - # Find the output, starting from the most likely. This scheme is -# not robust to junk in `.', hence go to wildcards (a.*) only as a last -# resort. - -# Be careful to initialize this variable, since it used to be cached. -# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. -ac_cv_exeext= -# b.out is created by i960 compilers. -for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) - ;; - conftest.$ac_ext ) - # This is the source file. + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - # FIXME: I believe we export ac_cv_exeext for Libtool, - # but it would be cool to find out if it's true. Does anybody - # maintain Libtool? --akim. - export ac_cv_exeext + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. break;; * ) break;; esac done +test "$ac_cv_exeext" = no && ac_cv_exeext= + else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -2093,19 +2517,23 @@ fi ac_exeext=$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6 +{ echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6; } -# Check the compiler produces executables we can run. If not, either +# Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -2124,22 +2552,27 @@ fi fi fi -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check the compiler produces executables we can run. If not, either +# Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 -echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6 - -echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6; } + +{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then @@ -2150,9 +2583,8 @@ for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - export ac_cv_exeext break;; * ) break;; esac @@ -2166,14 +2598,14 @@ fi rm -f conftest$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -echo "$as_me:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2193,14 +2625,20 @@ } _ACEOF rm -f conftest.o conftest.obj -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac @@ -2218,12 +2656,12 @@ rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2246,24 +2684,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -2272,24 +2722,28 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_compiler_gnu=no + ac_compiler_gnu=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -CFLAGS="-g" -echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2305,24 +2759,147 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -2331,12 +2908,20 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_prog_cc_g=no + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag fi -echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -2352,12 +2937,12 @@ CFLAGS= fi fi -echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 -echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_stdc+set}" = set; then +{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_prog_cc_stdc=no + ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2391,12 +2976,17 @@ /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std1 is added to get + as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std1. */ + that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; @@ -2411,213 +3001,82 @@ return 0; } _ACEOF -# Don't try gcc -ansi; that turns off useful extensions and -# breaks some systems' header files. -# AIX -qlanglvl=ansi -# Ultrix and OSF/1 -std1 -# HP-UX 10.20 and later -Ae -# HP-UX older versions -Aa -D_HPUX_SOURCE -# SVR4 -Xc -D__EXTENSIONS__ -for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_prog_cc_stdc=$ac_arg -break + ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break done -rm -f conftest.$ac_ext conftest.$ac_objext +rm -f conftest.$ac_ext CC=$ac_save_CC fi - -case "x$ac_cv_prog_cc_stdc" in - x|xno) - echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6 ;; +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6; } ;; + xno) + { echo "$as_me:$LINENO: result: unsupported" >&5 +echo "${ECHO_T}unsupported" >&6; } ;; *) - echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 - CC="$CC $ac_cv_prog_cc_stdc" ;; + CC="$CC $ac_cv_prog_cc_c89" + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac -# Some people use a C++ compiler to compile C. Since we use `exit', -# in C++ we need to declare it. In case someone uses the same compiler -# for both compiling C and C++ we need to have the C++ compiler decide -# the declaration of exit, since it's the most demanding environment. -cat >conftest.$ac_ext <<_ACEOF -#ifndef __cplusplus - choke me -#endif -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - for ac_declaration in \ - '' \ - 'extern "C" void std::exit (int) throw (); using std::exit;' \ - 'extern "C" void std::exit (int); using std::exit;' \ - 'extern "C" void exit (int) throw ();' \ - 'extern "C" void exit (int);' \ - 'void exit (int);' -do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -#include -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -continue -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest* -if test -n "$ac_declaration"; then - echo '#ifdef __cplusplus' >>confdefs.h - echo $ac_declaration >>confdefs.h - echo '#endif' >>confdefs.h -fi - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 -echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 +echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6; } if test "${lt_cv_path_SED+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2641,7 +3100,7 @@ # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && break + test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in @@ -2666,41 +3125,188 @@ fi done done + +fi + SED=$lt_cv_path_SED +{ echo "$as_me:$LINENO: result: $SED" >&5 +echo "${ECHO_T}$SED" >&6; } + +{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Extract the first word of "grep ggrep" to use in msg output +if test -z "$GREP"; then +set dummy grep ggrep; ac_prog_name=$2 +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_path_GREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_executable_p "$ac_path_GREP"; } || continue + # Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_GREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +GREP="$ac_cv_path_GREP" +if test -z "$GREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_GREP=$GREP +fi + fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +echo "${ECHO_T}$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" -echo "$as_me:$LINENO: result: $SED" >&5 -echo "${ECHO_T}$SED" >&6 -echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6 -if test "${ac_cv_prog_egrep+set}" = set; then +{ echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + # Extract the first word of "egrep" to use in msg output +if test -z "$EGREP"; then +set dummy egrep; ac_prog_name=$2 +if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if echo a | (grep -E '(a|b)') >/dev/null 2>&1 - then ac_cv_prog_egrep='grep -E' - else ac_cv_prog_egrep='egrep' + ac_path_EGREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_executable_p "$ac_path_EGREP"; } || continue + # Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_EGREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +EGREP="$ac_cv_path_EGREP" +if test -z "$EGREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_EGREP=$EGREP +fi + + + fi fi -echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 -echo "${ECHO_T}$ac_cv_prog_egrep" >&6 - EGREP=$ac_cv_prog_egrep +{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" -# Check whether --with-gnu-ld or --without-gnu-ld was given. +# Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then - withval="$with_gnu_ld" - test "$withval" = no || with_gnu_ld=yes + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no -fi; +fi + ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. - echo "$as_me:$LINENO: checking for ld used by $CC" >&5 -echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 +echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw @@ -2712,7 +3318,7 @@ # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the path of ld + # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` @@ -2729,11 +3335,11 @@ ;; esac elif test "$with_gnu_ld" = yes; then - echo "$as_me:$LINENO: checking for GNU ld" >&5 -echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for GNU ld" >&5 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } else - echo "$as_me:$LINENO: checking for non-GNU ld" >&5 -echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } fi if test "${lt_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2746,7 +3352,7 @@ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. + # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 -echo "${ECHO_T}$LD" >&6 + { echo "$as_me:$LINENO: result: $LD" >&5 +echo "${ECHO_T}$LD" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } -echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 -echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - # I'd rather use --version here, but apparently some GNU ld's only accept -v. -case `"$LD" -v 2>&1 &1 &5 -echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 +{ echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5 +echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld -echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 -echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 +echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6; } if test "${lt_cv_ld_reload_flag+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_ld_reload_flag='-r' fi -echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 -echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6 +{ echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 +echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' +case $host_os in + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r $compiler_flags -o $output$reload_objs' + else + reload_cmds='$LD$reload_flag -o $output$reload_objs' + fi + ;; +esac -echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 -echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 +echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6; } if test "${lt_cv_path_NM+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2820,56 +3435,63 @@ # Let the user override the test. lt_cv_path_NM="$NM" else - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/${ac_tool_prefix}nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" break ;; *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac ;; esac - esac - fi + fi + done + IFS="$lt_save_ifs" done - IFS="$lt_save_ifs" test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi fi -echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 -echo "${ECHO_T}$lt_cv_path_NM" >&6 +{ echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 +echo "${ECHO_T}$lt_cv_path_NM" >&6; } NM="$lt_cv_path_NM" -echo "$as_me:$LINENO: checking whether ln -s works" >&5 -echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether ln -s works" >&5 +echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - echo "$as_me:$LINENO: result: no, using $LN_S" >&5 -echo "${ECHO_T}no, using $LN_S" >&6 + { echo "$as_me:$LINENO: result: no, using $LN_S" >&5 +echo "${ECHO_T}no, using $LN_S" >&6; } fi -echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5 -echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5 +echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6; } if test "${lt_cv_deplibs_check_method+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2896,40 +3518,36 @@ lt_cv_deplibs_check_method=pass_all ;; -bsdi4*) +bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; -cygwin* | mingw* | pw32*) - # win32_libid is a shell function defined in ltmain.sh +cygwin*) + # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='win32_libid' + lt_cv_file_magic_cmd='func_win32_libid' + ;; + +mingw* | pw32*) + # Base MSYS/MinGW do not provide the 'file' command needed by + # func_win32_libid shell function, so use a weaker test based on 'objdump'. + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) - # this will be overwritten by pass_all, but leave it in just in case - lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library' - lt_cv_file_magic_cmd='/usr/bin/file -L' - case "$host_os" in - rhapsody* | darwin1.[012]) - lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System` - ;; - *) # Darwin 1.3 on - lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib' - ;; - esac lt_cv_deplibs_check_method=pass_all ;; -freebsd*) +freebsd* | kfreebsd*-gnu | dragonfly*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library' + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; @@ -2945,7 +3563,7 @@ hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file - case "$host_cpu" in + case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so @@ -2961,37 +3579,24 @@ esac ;; +interix3*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' + ;; + irix5* | irix6* | nonstopux*) - case $host_os in - irix5* | nonstopux*) - # this will be overridden with pass_all, but let us keep it just in case - lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" - ;; - *) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - # this will be overridden with pass_all, but let us keep it just in case - lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1" - ;; + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; esac - lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*` lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux*) - case $host_cpu in - alpha* | hppa* | i*86 | ia64* | m68* | mips | mipsel | powerpc* | sparc* | s390* | sh*) - lt_cv_deplibs_check_method=pass_all ;; - *) - # glibc up to 2.1.1 does not perform some relocations on ARM - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; - esac - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` + lt_cv_deplibs_check_method=pass_all ;; netbsd*) @@ -3008,37 +3613,27 @@ lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; -nto-qnx) +nto-qnx*) lt_cv_deplibs_check_method=unknown ;; openbsd*) - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object' + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else - lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library' + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) - # this will be overridden with pass_all, but let us keep it just in case - lt_cv_deplibs_check_method='file_magic COFF format alpha shared library' - lt_cv_file_magic_test_file=/shlib/libc.so - lt_cv_deplibs_check_method=pass_all - ;; - -sco3.2v5*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all - lt_cv_file_magic_test_file=/lib/libc.so ;; -sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) +sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' @@ -3059,17 +3654,20 @@ siemens) lt_cv_deplibs_check_method=pass_all ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; esac ;; -sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7* | sysv4*uw2*) +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac fi -echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 -echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6 +{ echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 +echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6; } file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown @@ -3080,15 +3678,18 @@ # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + # Allow CC to be a program name with arguments. compiler=$CC -# Check whether --enable-libtool-lock or --disable-libtool-lock was given. +# Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then - enableval="$enable_libtool_lock" + enableval=$enable_libtool_lock; +fi -fi; test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good @@ -3115,7 +3716,7 @@ ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 3118 "configure"' > conftest.$ac_ext + echo '#line 3719 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -3158,13 +3759,13 @@ ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - case "`/usr/bin/file conftest.o`" in + case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; - ppc64-*linux*) + ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -3200,8 +3801,8 @@ # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" - echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 -echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 +echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6; } if test "${lt_cv_cc_needs_belf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3227,24 +3828,36 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -3253,9 +3866,10 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -lt_cv_cc_needs_belf=no + lt_cv_cc_needs_belf=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -3264,13 +3878,33 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 -echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6 +{ echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 +echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) LD="${LD-ld} -64" ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + esac @@ -3282,8 +3916,8 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -3317,8 +3951,13 @@ #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -3343,9 +3982,10 @@ # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -3355,8 +3995,13 @@ /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -3383,6 +4028,7 @@ ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done @@ -3400,8 +4046,8 @@ else ac_cv_prog_CPP=$CPP fi -echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6 +{ echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -3424,8 +4070,13 @@ #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -3450,9 +4101,10 @@ # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -3462,8 +4114,13 @@ /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -3490,6 +4147,7 @@ ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done @@ -3512,8 +4170,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3537,24 +4195,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -3563,9 +4233,10 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_header_stdc=no + ac_cv_header_stdc=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. @@ -3621,6 +4292,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include +#include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) @@ -3640,18 +4312,27 @@ for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) - exit(2); - exit (0); + return 2; + return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -3664,12 +4345,14 @@ ( exit $ac_status ) ac_cv_header_stdc=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF @@ -3692,9 +4375,9 @@ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -3708,24 +4391,36 @@ #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -3734,12 +4429,14 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_Header=no" + eval "$as_ac_Header=no" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 @@ -3754,18 +4451,19 @@ for ac_header in dlfcn.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3776,24 +4474,36 @@ #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -3802,15 +4512,16 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3819,8 +4530,13 @@ /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -3844,9 +4560,10 @@ ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3870,25 +4587,24 @@ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ---------------------------------- ## -## Report this to rspencer at x10sys.com ## -## ---------------------------------- ## + ( cat <<\_ASBOX +## --------------------------------------- ## +## Report this to rspencer at reidspencer.com ## +## --------------------------------------- ## _ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -3900,18 +4616,22 @@ done -ac_ext=cc +ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test -n "$ac_tool_prefix"; then - for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC - do +if test -z "$CXX"; then + if test -n "$CCC"; then + CXX=$CCC + else + if test -n "$ac_tool_prefix"; then + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC + do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3924,36 +4644,38 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then - echo "$as_me:$LINENO: result: $CXX" >&5 -echo "${ECHO_T}$CXX" >&6 + { echo "$as_me:$LINENO: result: $CXX" >&5 +echo "${ECHO_T}$CXX" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX - for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3966,55 +4688,85 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then - echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 -echo "${ECHO_T}$ac_ct_CXX" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 +echo "${ECHO_T}$ac_ct_CXX" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$ac_ct_CXX" && break done -test -n "$ac_ct_CXX" || ac_ct_CXX="g++" - CXX=$ac_ct_CXX + if test "x$ac_ct_CXX" = x; then + CXX="g++" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf at gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf at gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CXX=$ac_ct_CXX + fi fi - + fi +fi # Provide some information about the compiler. -echo "$as_me:$LINENO:" \ - "checking for C++ compiler version" >&5 +echo "$as_me:$LINENO: checking for C++ compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 - (eval $ac_compiler --version &5) 2>&5 +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 - (eval $ac_compiler -v &5) 2>&5 +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 - (eval $ac_compiler -V &5) 2>&5 +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; } if test "${ac_cv_cxx_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4037,24 +4789,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4063,24 +4827,28 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_compiler_gnu=no + ac_compiler_gnu=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; } GXX=`test $ac_compiler_gnu = yes && echo yes` ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS -CXXFLAGS="-g" -echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 -echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 +echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cxx_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_save_cxx_werror_flag=$ac_cxx_werror_flag + ac_cxx_werror_flag=yes + ac_cv_prog_cxx_g=no + CXXFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -4096,24 +4864,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4122,70 +4902,53 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_prog_cxx_g=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6 -if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS=$ac_save_CXXFLAGS -elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-g" - fi -else - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi -fi -for ac_declaration in \ - '' \ - 'extern "C" void std::exit (int) throw (); using std::exit;' \ - 'extern "C" void std::exit (int); using std::exit;' \ - 'extern "C" void exit (int) throw ();' \ - 'extern "C" void exit (int);' \ - 'void exit (int);' -do - cat >conftest.$ac_ext <<_ACEOF + CXXFLAGS="" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_declaration -#include + int main () { -exit (42); + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4194,74 +4957,109 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -continue -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF + ac_cxx_werror_flag=$ac_save_cxx_werror_flag + CXXFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_declaration + int main () { -exit (42); + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - break + ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest* -if test -n "$ac_declaration"; then - echo '#ifdef __cplusplus' >>confdefs.h - echo $ac_declaration >>confdefs.h - echo '#endif' >>confdefs.h + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -ac_ext=cc +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cxx_werror_flag=$ac_save_cxx_werror_flag +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; } +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi +fi +ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -ac_ext=cc + + +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 -echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 +echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; } if test -z "$CXXCPP"; then if test "${ac_cv_prog_CXXCPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -4291,8 +5089,13 @@ #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -4317,9 +5120,10 @@ # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -4329,8 +5133,13 @@ /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -4357,6 +5166,7 @@ ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done @@ -4374,8 +5184,8 @@ else ac_cv_prog_CXXCPP=$CXXCPP fi -echo "$as_me:$LINENO: result: $CXXCPP" >&5 -echo "${ECHO_T}$CXXCPP" >&6 +{ echo "$as_me:$LINENO: result: $CXXCPP" >&5 +echo "${ECHO_T}$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do @@ -4398,8 +5208,13 @@ #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -4424,9 +5239,10 @@ # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -4436,8 +5252,13 @@ /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -4464,6 +5285,7 @@ ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done @@ -4479,24 +5301,26 @@ { (exit 1); exit 1; }; } fi -ac_ext=cc +ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +fi + ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test -n "$ac_tool_prefix"; then - for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran + for ac_prog in g77 f77 xlf frt pgf77 cf77 fort77 fl32 af77 f90 xlf90 pgf90 pghpf epcf90 gfortran g95 f95 fort xlf95 ifort ifc efc pgf95 lf95 ftn do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4509,36 +5333,38 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_F77="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi F77=$ac_cv_prog_F77 if test -n "$F77"; then - echo "$as_me:$LINENO: result: $F77" >&5 -echo "${ECHO_T}$F77" >&6 + { echo "$as_me:$LINENO: result: $F77" >&5 +echo "${ECHO_T}$F77" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$F77" && break done fi if test -z "$F77"; then ac_ct_F77=$F77 - for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran + for ac_prog in g77 f77 xlf frt pgf77 cf77 fort77 fl32 af77 f90 xlf90 pgf90 pghpf epcf90 gfortran g95 f95 fort xlf95 ifort ifc efc pgf95 lf95 ftn do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4551,48 +5377,78 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_F77="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi ac_ct_F77=$ac_cv_prog_ac_ct_F77 if test -n "$ac_ct_F77"; then - echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 -echo "${ECHO_T}$ac_ct_F77" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 +echo "${ECHO_T}$ac_ct_F77" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$ac_ct_F77" && break done - F77=$ac_ct_F77 + if test "x$ac_ct_F77" = x; then + F77="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf at gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf at gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + F77=$ac_ct_F77 + fi fi # Provide some information about the compiler. -echo "$as_me:4581:" \ - "checking for Fortran 77 compiler version" >&5 +echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 - (eval $ac_compiler --version &5) 2>&5 +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 - (eval $ac_compiler -v &5) 2>&5 +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 - (eval $ac_compiler -V &5) 2>&5 +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } @@ -4602,8 +5458,8 @@ # input file. (Note that this only needs to work for GNU compilers.) ac_save_ext=$ac_ext ac_ext=F -echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6; } if test "${ac_cv_f77_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4616,24 +5472,36 @@ end _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_f77_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4642,20 +5510,21 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_compiler_gnu=no + ac_compiler_gnu=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_f77_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6; } ac_ext=$ac_save_ext ac_test_FFLAGS=${FFLAGS+set} ac_save_FFLAGS=$FFLAGS FFLAGS= -echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 -echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 +echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_f77_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4666,24 +5535,36 @@ end _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_f77_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4692,13 +5573,14 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_prog_f77_g=no + ac_cv_prog_f77_g=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 -echo "${ECHO_T}$ac_cv_prog_f77_g" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 +echo "${ECHO_T}$ac_cv_prog_f77_g" >&6; } if test "$ac_test_FFLAGS" = set; then FFLAGS=$ac_save_FFLAGS elif test $ac_cv_prog_f77_g = yes; then @@ -4727,13 +5609,13 @@ # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! # find the maximum length of command line arguments -echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 -echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 +echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6; } if test "${lt_cv_sys_max_cmd_len+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else i=0 - testring="ABCD" + teststring="ABCD" case $build_os in msdosdjgpp*) @@ -4762,20 +5644,70 @@ lt_cv_sys_max_cmd_len=8192; ;; - *) + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. - while (test "X"`$CONFIG_SHELL $0 --fallback-echo "X$testring" 2>/dev/null` \ - = "XX$testring") >/dev/null 2>&1 && - new_result=`expr "X$testring" : ".*" 2>&1` && + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ + = "XX$teststring") >/dev/null 2>&1 && + new_result=`expr "X$teststring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` - testring=$testring$testring + teststring=$teststring$teststring done - testring= + teststring= # Add a significant safety factor because C++ compilers can tack on massive # amounts of additional arguments before passing them to the linker. # It appears as though 1/2 is a usable value. @@ -4786,19 +5718,19 @@ fi if test -n $lt_cv_sys_max_cmd_len ; then - echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 -echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6 + { echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 +echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6; } else - echo "$as_me:$LINENO: result: none" >&5 -echo "${ECHO_T}none" >&6 + { echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6; } fi # Check for command to grab the raw symbol name followed by C symbol from nm. -echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 -echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 +echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6; } if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4812,9 +5744,6 @@ # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' -# Transform the above into a raw symbol and a C symbol. -symxfrm='\1 \2\3 \3' - # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" @@ -4836,14 +5765,30 @@ lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; +linux*) + if test "$host_cpu" = ia64; then + symcode='[ABCDGIRSTW]' + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + fi + ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; -solaris* | sysv5*) - symcode='[BDT]' +solaris*) + symcode='[BDRT]' + ;; +sco3.2v5*) + symcode='[DT]' + ;; +sysv4.2uw2*) + symcode='[DT]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' @@ -4861,14 +5806,17 @@ # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) - symcode='[ABCDGISTW]' ;; + symcode='[ABCDGIRSTW]' ;; esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + # Write the raw and C identifiers. - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no @@ -4986,15 +5934,15 @@ lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - echo "$as_me:$LINENO: result: failed" >&5 -echo "${ECHO_T}failed" >&6 + { echo "$as_me:$LINENO: result: failed" >&5 +echo "${ECHO_T}failed" >&6; } else - echo "$as_me:$LINENO: result: ok" >&5 -echo "${ECHO_T}ok" >&6 + { echo "$as_me:$LINENO: result: ok" >&5 +echo "${ECHO_T}ok" >&6; } fi -echo "$as_me:$LINENO: checking for objdir" >&5 -echo $ECHO_N "checking for objdir... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for objdir" >&5 +echo $ECHO_N "checking for objdir... $ECHO_C" >&6; } if test "${lt_cv_objdir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5008,8 +5956,8 @@ fi rmdir .libs 2>/dev/null fi -echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 -echo "${ECHO_T}$lt_cv_objdir" >&6 +{ echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 +echo "${ECHO_T}$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir @@ -5030,7 +5978,7 @@ # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. -Xsed='sed -e s/^X//' +Xsed='sed -e 1s/^X//' sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' # Same as above, but do not quote variable references. @@ -5050,7 +5998,7 @@ default_ofile=mklib can_build_shared=yes -# All known linkers require a `.a' archive for static linking (except M$VC, +# All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" @@ -5060,8 +6008,8 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5074,32 +6022,34 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="${ac_tool_prefix}ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - echo "$as_me:$LINENO: result: $AR" >&5 -echo "${ECHO_T}$AR" >&6 + { echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5112,27 +6062,41 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AR="ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS - test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false" fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then - echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 -echo "${ECHO_T}$ac_ct_AR" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 +echo "${ECHO_T}$ac_ct_AR" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - AR=$ac_ct_AR + if test "x$ac_ct_AR" = x; then + AR="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf at gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf at gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi else AR="$ac_cv_prog_AR" fi @@ -5140,8 +6104,8 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5154,32 +6118,34 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - echo "$as_me:$LINENO: result: $RANLIB" >&5 -echo "${ECHO_T}$RANLIB" >&6 + { echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5192,27 +6158,41 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS - test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -echo "${ECHO_T}$ac_ct_RANLIB" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - RANLIB=$ac_ct_RANLIB + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf at gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf at gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi else RANLIB="$ac_cv_prog_RANLIB" fi @@ -5220,8 +6200,8 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5234,32 +6214,34 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then - echo "$as_me:$LINENO: result: $STRIP" >&5 -echo "${ECHO_T}$STRIP" >&6 + { echo "$as_me:$LINENO: result: $STRIP" >&5 +echo "${ECHO_T}$STRIP" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5272,27 +6254,41 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS - test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then - echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 -echo "${ECHO_T}$ac_ct_STRIP" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +echo "${ECHO_T}$ac_ct_STRIP" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - STRIP=$ac_ct_STRIP + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf at gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf at gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi else STRIP="$ac_cv_prog_STRIP" fi @@ -5307,6 +6303,7 @@ test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" @@ -5326,21 +6323,32 @@ if test -n "$RANLIB"; then case $host_os in openbsd*) - old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) - old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then - echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 -echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 +echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5360,7 +6368,7 @@ if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) - file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then @@ -5392,17 +6400,17 @@ MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then - echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 -echo "${ECHO_T}$MAGIC_CMD" >&6 + { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +echo "${ECHO_T}$MAGIC_CMD" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then - echo "$as_me:$LINENO: checking for file" >&5 -echo $ECHO_N "checking for file... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for file" >&5 +echo $ECHO_N "checking for file... $ECHO_C" >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5422,7 +6430,7 @@ if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) - file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then @@ -5454,11 +6462,11 @@ MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then - echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 -echo "${ECHO_T}$MAGIC_CMD" >&6 + { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +echo "${ECHO_T}$MAGIC_CMD" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi else @@ -5473,21 +6481,21 @@ enable_dlopen=no enable_win32_dll=no -# Check whether --enable-libtool-lock or --disable-libtool-lock was given. +# Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then - enableval="$enable_libtool_lock" + enableval=$enable_libtool_lock; +fi -fi; test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes -# Check whether --with-pic or --without-pic was given. +# Check whether --with-pic was given. if test "${with_pic+set}" = set; then - withval="$with_pic" - pic_mode="$withval" + withval=$with_pic; pic_mode="$withval" else pic_mode=default -fi; +fi + test -z "$pic_mode" && pic_mode=default # Use C for the default configuration in the libtool script @@ -5517,82 +6525,36 @@ # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + # Allow CC to be a program name with arguments. compiler=$CC -# -# Check for any special shared library compilation flags. -# -lt_prog_cc_shlib= -if test "$GCC" = no; then - case $host_os in - sco3.2v5*) - lt_prog_cc_shlib='-belf' - ;; - esac -fi -if test -n "$lt_prog_cc_shlib"; then - { echo "$as_me:$LINENO: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&5 -echo "$as_me: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&2;} - if echo "$old_CC $old_CFLAGS " | grep "[ ]$lt_prog_cc_shlib[ ]" >/dev/null; then : - else - { echo "$as_me:$LINENO: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5 -echo "$as_me: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;} - lt_cv_prog_cc_can_build_shared=no - fi -fi - - -# -# Check to make sure the static flag actually works. -# -echo "$as_me:$LINENO: checking if $compiler static flag $lt_prog_compiler_static works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_prog_compiler_static works... $ECHO_C" >&6 -if test "${lt_prog_compiler_static_works+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_static_works=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_prog_compiler_static" - printf "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - else - lt_prog_compiler_static_works=yes - fi - fi - $rm conftest* - LDFLAGS="$save_LDFLAGS" - -fi -echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 -echo "${ECHO_T}$lt_prog_compiler_static_works" >&6 - -if test x"$lt_prog_compiler_static_works" = xyes; then - : -else - lt_prog_compiler_static= -fi - +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' - echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 + +{ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5606,26 +6568,28 @@ # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:5612: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6574: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:5616: \$? = $ac_status" >&5 + echo "$as_me:6578: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test ! -s conftest.err; then + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $rm conftest* fi -echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6 +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" @@ -5639,8 +6603,8 @@ lt_prog_compiler_pic= lt_prog_compiler_static= -echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' @@ -5678,6 +6642,11 @@ lt_prog_compiler_pic='-fno-common' ;; + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. @@ -5694,7 +6663,7 @@ hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) # +Z the default ;; @@ -5720,6 +6689,16 @@ lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic='-qnocommon' + lt_prog_compiler_wl='-Wl,' + ;; + esac + ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being @@ -5731,7 +6710,7 @@ lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) # +Z the default ;; @@ -5755,13 +6734,20 @@ ;; linux*) - case $CC in - icc|ecc) + case $cc_basename in + icc* | ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; - ccc) + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' @@ -5775,15 +6761,15 @@ lt_prog_compiler_static='-non_shared' ;; - sco3.2v5*) - lt_prog_compiler_pic='-Kpic' - lt_prog_compiler_static='-dn' - ;; - solaris*) - lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; + esac ;; sunos4*) @@ -5792,7 +6778,7 @@ lt_prog_compiler_static='-Bstatic' ;; - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' @@ -5805,6 +6791,17 @@ fi ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_can_build_shared=no + ;; + uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' @@ -5816,15 +6813,16 @@ esac fi -echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic" >&6 +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then - echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6 + +{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6; } if test "${lt_prog_compiler_pic_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5838,26 +6836,28 @@ # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:5844: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6842: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:5848: \$? = $ac_status" >&5 + echo "$as_me:6846: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test ! -s conftest.err; then + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works=yes fi fi $rm conftest* fi -echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6 +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6; } if test x"$lt_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in @@ -5870,7 +6870,7 @@ fi fi -case "$host_os" in +case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= @@ -5880,72 +6880,112 @@ ;; esac -echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 -if test "${lt_cv_prog_compiler_c_o+set}" = set; then +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" +{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_static_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - lt_cv_prog_compiler_c_o=no - $rm -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_prog_compiler_static_works=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + printf "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works=yes + fi + else + lt_prog_compiler_static_works=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" - # According to Tom Tromey, Ian Lance Taylor reported there are C compilers - # that will create temporary files in the current directory regardless of - # the output directory. Thus, making CWD read-only will cause this test - # to fail, enabling locking or at least warning the user not to do parallel - # builds. - chmod -w . +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works" >&6; } - lt_compiler_flag="-o out/conftest2.$ac_objext" +if test x"$lt_prog_compiler_static_works" = xyes; then + : +else + lt_prog_compiler_static= +fi + + +{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_c_o+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:5911: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6946: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:5915: \$? = $ac_status" >&5 + echo "$as_me:6950: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - if test ! -s out/conftest.err; then + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi - chmod u+w . - $rm conftest* out/* - rmdir out + chmod u+w . 2>&5 + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi -echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6 +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user - echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no - echo "$as_me:$LINENO: result: $hard_links" >&5 -echo "${ECHO_T}$hard_links" >&6 + { echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6; } if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} @@ -5955,8 +6995,8 @@ need_locks=no fi -echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } runpath_var= allow_undefined_flag= @@ -5994,6 +7034,16 @@ # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) @@ -6004,6 +7054,10 @@ with_gnu_ld=no fi ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; openbsd*) with_gnu_ld=no ;; @@ -6014,6 +7068,27 @@ # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) @@ -6064,10 +7139,10 @@ allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then @@ -6076,7 +7151,53 @@ echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs=no + fi + ;; + + interix3*) + hardcode_direct=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + linux*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + $echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi else ld_shlibs=no fi @@ -6092,7 +7213,7 @@ fi ;; - solaris* | sysv5*) + solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <&2 @@ -6113,6 +7234,33 @@ fi ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + ;; + sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= @@ -6130,16 +7278,11 @@ ;; esac - if test "$ld_shlibs" = yes; then - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec= - fi + if test "$ld_shlibs" = no; then + runpath_var= + hardcode_libdir_flag_spec= + export_dynamic_flag_spec= + whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) @@ -6151,7 +7294,7 @@ # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes - if test "$GCC" = yes && test -z "$link_static_flag"; then + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported @@ -6185,6 +7328,7 @@ break fi done + ;; esac exp_sym_flag='-bexport' @@ -6203,7 +7347,7 @@ link_all_deplibs=yes if test "$GCC" = yes; then - case $host_os in aix4.012|aix4.012.*) + case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` @@ -6222,8 +7366,12 @@ hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi + ;; esac shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi else # not using gcc if test "$host_cpu" = ia64; then @@ -6231,11 +7379,11 @@ # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else - if test "$aix_use_runtimelinking" = yes; then + if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' - fi + fi fi fi @@ -6263,24 +7411,36 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -6294,18 +7454,20 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" + archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF @@ -6324,24 +7486,36 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -6355,8 +7529,10 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi @@ -6365,13 +7541,11 @@ # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' - # -bexpall does not export symbols beginning with underscore (_) - always_export_symbols=yes # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec=' ' + whole_archive_flag_spec='$convenience' archive_cmds_need_lc=yes - # This is similar to how AIX traditionally builds it's shared libraries. - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; @@ -6384,7 +7558,7 @@ ld_shlibs=no ;; - bsdi4*) + bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; @@ -6398,7 +7572,7 @@ # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. - shrext=".dll" + shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. @@ -6410,43 +7584,52 @@ ;; darwin* | rhapsody*) - if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then - archive_cmds_need_lc=no - case "$host_os" in - rhapsody* | darwin1.[012]) - allow_undefined_flag='-undefined suppress' - ;; - *) # Darwin 1.3 on - test -z ${LD_TWOLEVEL_NAMESPACE} && allow_undefined_flag='-flat_namespace -undefined suppress' - ;; + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; esac - # FIXME: Relying on posixy $() will cause problems for - # cross-compilation, but unfortunately the echo tests do not - # yet detect zsh echo's removal of \ escapes. Also zsh mangles - # `"' quotes if we put them in here... so don't! - lt_int_apple_cc_single_mod=no - output_verbose_link_cmd='echo' - if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then - lt_int_apple_cc_single_mod=yes - fi - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - archive_cmds='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - else - archive_cmds='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - fi - module_cmds='$CC -bundle ${wl}-bind_at_load $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported - whole_archive_flag_spec='-all_load $convenience' + whole_archive_flag_spec='' link_all_deplibs=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs=no + ;; + esac fi ;; @@ -6480,7 +7663,7 @@ ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd*) + freebsd* | kfreebsd*-gnu | dragonfly*) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes @@ -6503,47 +7686,62 @@ export_dynamic_flag_spec='${wl}-E' ;; - hpux10* | hpux11*) + hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case "$host_cpu" in - hppa*64*|ia64*) + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + + hardcode_direct=yes + export_dynamic_flag_spec='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; + ia64*) + archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else - case "$host_cpu" in - hppa*64*|ia64*) - archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' + case $host_cpu in + hppa*64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then - case "$host_cpu" in - hppa*64*) - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + + case $host_cpu in + hppa*64*|ia64*) hardcode_libdir_flag_spec_ld='+b $libdir' - hardcode_libdir_separator=: - hardcode_direct=no - hardcode_shlibpath_var=no - ;; - ia64*) - hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=no hardcode_shlibpath_var=no - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes ;; *) - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: hardcode_direct=yes export_dynamic_flag_spec='${wl}-E' @@ -6591,6 +7789,7 @@ hardcode_shlibpath_var=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else @@ -6636,7 +7835,7 @@ allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' @@ -6644,21 +7843,15 @@ hardcode_libdir_separator=: ;; - sco3.2v5*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='${wl}-Bexport' - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ;; - solaris*) no_undefined_flag=' -z text' if test "$GCC" = yes; then + wlarc='${wl}' archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else + wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' @@ -6667,8 +7860,18 @@ hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; - *) # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; + *) + # The compiler driver will combine linker options so we + # cannot just pass the convience library names through + # without $wl, iff we do not link with $LD. + # Luckily, gcc supports the same syntax we need for Sun Studio. + # Supported since Solaris 2.6 (maybe 2.5.1?) + case $wlarc in + '') + whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; + *) + whole_archive_flag_spec='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; + esac ;; esac link_all_deplibs=yes ;; @@ -6725,36 +7928,45 @@ fi ;; - sysv4.2uw2*) - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=no + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) + no_undefined_flag='${wl}-z,text' + archive_cmds_need_lc=no hardcode_shlibpath_var=no - hardcode_runpath_var=yes - runpath_var=LD_RUN_PATH - ;; + runpath_var='LD_RUN_PATH' - sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) - no_undefined_flag='${wl}-z ${wl}text' if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else - archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no ;; - sysv5*) - no_undefined_flag=' -z text' - # $CC -shared without GNU ld will not create a library from C++ - # object files and a static libstdc++, better avoid it by now - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - hardcode_libdir_flag_spec= + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag='${wl}-z,text' + allow_undefined_flag='${wl}-z,nodefs' + archive_cmds_need_lc=no hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator=':' + link_all_deplibs=yes + export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi ;; uts4*) @@ -6769,15 +7981,10 @@ esac fi -echo "$as_me:$LINENO: result: $ld_shlibs" >&5 -echo "${ECHO_T}$ld_shlibs" >&6 +{ echo "$as_me:$LINENO: result: $ld_shlibs" >&5 +echo "${ECHO_T}$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - # # Do we need to explicitly link libc? # @@ -6795,8 +8002,8 @@ # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. - echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext @@ -6810,6 +8017,7 @@ libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl + pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= @@ -6832,86 +8040,20 @@ cat conftest.err 1>&5 fi $rm conftest* - echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 -echo "${ECHO_T}$archive_cmds_need_lc" >&6 + { echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 +echo "${ECHO_T}$archive_cmds_need_lc" >&6; } ;; esac fi ;; esac -echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 -hardcode_action= -if test -n "$hardcode_libdir_flag_spec" || \ - test -n "$runpath_var " || \ - test "X$hardcode_automatic"="Xyes" ; then - - # We can hardcode non-existant directories. - if test "$hardcode_direct" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no && - test "$hardcode_minus_L" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action=unsupported -fi -echo "$as_me:$LINENO: result: $hardcode_action" >&5 -echo "${ECHO_T}$hardcode_action" >&6 - -if test "$hardcode_action" = relink; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - -striplib= -old_striplib= -echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 -echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 -if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - ;; - *) - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - ;; - esac -fi - -echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } library_names_spec= libname_spec='lib$name' soname_spec= -shrext=".so" +shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= @@ -6999,7 +8141,7 @@ amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) @@ -7008,7 +8150,7 @@ shlibpath_var=LIBRARY_PATH ;; -bsdi4*) +bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -7024,7 +8166,7 @@ cygwin* | mingw* | pw32*) version_type=windows - shrext=".dll" + shrext_cmds=".dll" need_version=no need_lib_prefix=no @@ -7036,7 +8178,8 @@ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' @@ -7046,7 +8189,7 @@ cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/lib /lib/w32api /usr/lib /usr/local/lib" + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix @@ -7066,7 +8209,7 @@ ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; @@ -7085,17 +8228,16 @@ version_type=darwin need_lib_prefix=no need_version=no - # FIXME: Relying on posixy $() will cause problems for - # cross-compilation, but unfortunately the echo tests do not - # yet detect zsh echo's removal of \ escapes. library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH - shrext='$(test .$module = .yes && echo .so || echo .dylib)' + shrext_cmds='.dylib' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. - if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then - sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; @@ -7113,8 +8255,29 @@ dynamic_linker=no ;; -freebsd*) - objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` +kfreebsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) @@ -7132,14 +8295,19 @@ freebsd2*) shlibpath_overrides_runpath=yes ;; - freebsd3.01* | freebsdelf3.01*) + freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; - *) # from 3.2 on + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; + freebsd*) # from 4.6 on + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; esac ;; @@ -7159,9 +8327,9 @@ version_type=sunos need_lib_prefix=no need_version=no - case "$host_cpu" in + case $host_cpu in ia64*) - shrext='.so' + shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH @@ -7176,7 +8344,7 @@ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) - shrext='.sl' + shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH @@ -7187,7 +8355,7 @@ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) - shrext='.sl' + shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH @@ -7199,6 +8367,18 @@ postinstall_cmds='chmod 555 $lib' ;; +interix3*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; @@ -7256,6 +8436,12 @@ # before this can be enabled. hardcode_into_libs=yes + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, @@ -7265,6 +8451,18 @@ dynamic_linker='GNU/Linux ld.so' ;; +knetbsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + netbsd*) version_type=sunos need_lib_prefix=no @@ -7274,7 +8472,7 @@ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} ${libname}${shared_ext}' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi @@ -7290,7 +8488,7 @@ shlibpath_overrides_runpath=yes ;; -nto-qnx) +nto-qnx*) version_type=linux need_lib_prefix=no need_version=no @@ -7302,8 +8500,13 @@ openbsd*) version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no - need_version=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH @@ -7323,7 +8526,7 @@ os2*) libname_spec='$name' - shrext=".dll" + shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' @@ -7341,13 +8544,6 @@ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; -sco3.2v5*) - version_type=osf - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - ;; - solaris*) version_type=linux need_lib_prefix=no @@ -7373,7 +8569,7 @@ need_version=yes ;; -sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) +sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' @@ -7406,21 +8602,115 @@ fi ;; -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH - ;; + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; *) dynamic_linker=no ;; esac -echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -echo "${ECHO_T}$dynamic_linker" >&6 +{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } +hardcode_action= +if test -n "$hardcode_libdir_flag_spec" || \ + test -n "$runpath_var" || \ + test "X$hardcode_automatic" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no && + test "$hardcode_minus_L" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action=unsupported +fi +{ echo "$as_me:$LINENO: result: $hardcode_action" >&5 +echo "${ECHO_T}$hardcode_action" >&6; } + +if test "$hardcode_action" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + +striplib= +old_striplib= +{ echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 +echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6; } +if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + ;; + *) + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + ;; + esac +fi + if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown @@ -7448,8 +8738,8 @@ darwin*) # if libdl is installed we need to link against it - echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7462,40 +8752,52 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char dlopen (); int main () { -dlopen (); +return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -7504,14 +8806,15 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_dl_dlopen=no + ac_cv_lib_dl_dlopen=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else @@ -7525,8 +8828,8 @@ ;; *) - echo "$as_me:$LINENO: checking for shl_load" >&5 -echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for shl_load" >&5 +echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; } if test "${ac_cv_func_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7553,53 +8856,59 @@ #undef shl_load -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char shl_load (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_shl_load) || defined (__stub___shl_load) +#if defined __stub_shl_load || defined __stub___shl_load choke me -#else -char (*f) () = shl_load; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != shl_load; +return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -7608,18 +8917,19 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_shl_load=no + ac_cv_func_shl_load=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 -echo "${ECHO_T}$ac_cv_func_shl_load" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 +echo "${ECHO_T}$ac_cv_func_shl_load" >&6; } if test $ac_cv_func_shl_load = yes; then lt_cv_dlopen="shl_load" else - echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7632,40 +8942,52 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char shl_load (); int main () { -shl_load (); +return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -7674,19 +8996,20 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_dld_shl_load=no + ac_cv_lib_dld_shl_load=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } if test $ac_cv_lib_dld_shl_load = yes; then lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" else - echo "$as_me:$LINENO: checking for dlopen" >&5 -echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for dlopen" >&5 +echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; } if test "${ac_cv_func_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7713,53 +9036,59 @@ #undef dlopen -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char dlopen (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_dlopen) || defined (__stub___dlopen) +#if defined __stub_dlopen || defined __stub___dlopen choke me -#else -char (*f) () = dlopen; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != dlopen; +return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -7768,18 +9097,19 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_dlopen=no + ac_cv_func_dlopen=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 -echo "${ECHO_T}$ac_cv_func_dlopen" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 +echo "${ECHO_T}$ac_cv_func_dlopen" >&6; } if test $ac_cv_func_dlopen = yes; then lt_cv_dlopen="dlopen" else - echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7792,40 +9122,52 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char dlopen (); int main () { -dlopen (); +return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -7834,19 +9176,20 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_dl_dlopen=no + ac_cv_lib_dl_dlopen=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else - echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 -echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 +echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; } if test "${ac_cv_lib_svld_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7859,40 +9202,52 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char dlopen (); int main () { -dlopen (); +return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -7901,19 +9256,20 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_svld_dlopen=no + ac_cv_lib_svld_dlopen=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; } if test $ac_cv_lib_svld_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else - echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 -echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 +echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_dld_link+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7926,40 +9282,52 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char dld_link (); int main () { -dld_link (); +return dld_link (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -7968,14 +9336,15 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_dld_dld_link=no + ac_cv_lib_dld_dld_link=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; } if test $ac_cv_lib_dld_dld_link = yes; then lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" fi @@ -8010,13 +9379,13 @@ test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" - eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" - echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 -echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 +echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6; } if test "${lt_cv_dlopen_self+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8026,7 +9395,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null + (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_unknown|x*) lt_cv_dlopen_self=no ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed @@ -8108,13 +9479,13 @@ fi -echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 -echo "${ECHO_T}$lt_cv_dlopen_self" >&6 +{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 +echo "${ECHO_T}$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then - LDFLAGS="$LDFLAGS $link_static_flag" - echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 -echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + { echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 +echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6; } if test "${lt_cv_dlopen_self_static+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8124,7 +9495,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null + (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed @@ -8206,8 +9579,8 @@ fi -echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 -echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 +{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 +echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" @@ -8228,19 +9601,19 @@ fi -# Report which librarie types wil actually be built -echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 -echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 -echo "$as_me:$LINENO: result: $can_build_shared" >&5 -echo "${ECHO_T}$can_build_shared" >&6 +# Report which library types will actually be built +{ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 +echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $can_build_shared" >&5 +echo "${ECHO_T}$can_build_shared" >&6; } -echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 -echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 +echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. -case "$host_os" in +case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then @@ -8249,49 +9622,21 @@ fi ;; -aix4*) +aix4* | aix5*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi - ;; - darwin* | rhapsody*) - if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then - archive_cmds_need_lc=no - case "$host_os" in - rhapsody* | darwin1.[012]) - allow_undefined_flag='-undefined suppress' - ;; - *) # Darwin 1.3 on - test -z ${LD_TWOLEVEL_NAMESPACE} && allow_undefined_flag='-flat_namespace -undefined suppress' - ;; - esac - # FIXME: Relying on posixy $() will cause problems for - # cross-compilation, but unfortunately the echo tests do not - # yet detect zsh echo's removal of \ escapes. Also zsh mangles - # `"' quotes if we put them in here... so don't! - output_verbose_link_cmd='echo' - archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring' - module_cmds='$CC -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's - archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - hardcode_direct=no - hardcode_automatic=yes - hardcode_shlibpath_var=unsupported - whole_archive_flag_spec='-all_load $convenience' - link_all_deplibs=yes - fi ;; esac -echo "$as_me:$LINENO: result: $enable_shared" >&5 -echo "${ECHO_T}$enable_shared" >&6 +{ echo "$as_me:$LINENO: result: $enable_shared" >&5 +echo "${ECHO_T}$enable_shared" >&6; } -echo "$as_me:$LINENO: checking whether to build static libraries" >&5 -echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether to build static libraries" >&5 +echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes -echo "$as_me:$LINENO: result: $enable_static" >&5 -echo "${ECHO_T}$enable_static" >&6 +{ echo "$as_me:$LINENO: result: $enable_static" >&5 +echo "${ECHO_T}$enable_static" >&6; } # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh @@ -8306,7 +9651,8 @@ # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM SED SHELL \ + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ @@ -8409,7 +9755,7 @@ # # 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. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -8420,11 +9766,11 @@ SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="$SED -e s/^X//" +Xsed="$SED -e 1s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. -if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # The names of the tagged configurations supported by this script. available_tags= @@ -8454,6 +9800,12 @@ # The host system. host_alias=$host_alias host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo @@ -8465,6 +9817,9 @@ # A C compiler. LTCC=$lt_LTCC +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + # A language-specific compiler. CC=$lt_compiler @@ -8484,7 +9839,7 @@ NM=$lt_NM # A symbol stripping program -STRIP=$STRIP +STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD @@ -8515,7 +9870,7 @@ libext="$libext" # Shared library suffix (normally ".so"). -shrext='$shrext' +shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" @@ -8530,7 +9885,7 @@ # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o -# Must we lock files when doing compilation ? +# Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? @@ -8757,7 +10112,10 @@ # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. - test -f Makefile && make "$ltmain" + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi fi @@ -8770,11 +10128,11 @@ CC="$lt_save_CC" -# Check whether --with-tags or --without-tags was given. +# Check whether --with-tags was given. if test "${with_tags+set}" = set; then - withval="$with_tags" - tagnames="$withval" -fi; + withval=$with_tags; tagnames="$withval" +fi + if test -f "$ltmain" && test -n "$tagnames"; then if test ! -f "${ofile}"; then @@ -8792,6 +10150,9 @@ echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} fi fi + if test -z "$LTCFLAGS"; then + eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" + fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. @@ -8822,8 +10183,10 @@ case $tagname in CXX) - if test -n "$CXX" && test "X$CXX" != "Xno"; then - ac_ext=cc + if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -8842,6 +10205,7 @@ hardcode_libdir_flag_spec_ld_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no +hardcode_shlibpath_var_CXX=unsupported hardcode_automatic_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= @@ -8859,7 +10223,7 @@ compiler_lib_search_path_CXX= # Source file extension for C++ test sources. -ac_ext=cc +ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o @@ -8869,17 +10233,34 @@ lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests -lt_simple_link_test_code='int main(int, char *) { return(0); }\n' +lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + # Allow CC to be a program name with arguments. compiler=$CC +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD @@ -8890,18 +10271,27 @@ if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else - unset lt_cv_prog_gnu_ld + $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else - unset lt_cv_path_LD + $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC compiler_CXX=$CC -cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately @@ -8915,18 +10305,18 @@ # Set up default GNU C++ configuration -# Check whether --with-gnu-ld or --without-gnu-ld was given. +# Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then - withval="$with_gnu_ld" - test "$withval" = no || with_gnu_ld=yes + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no -fi; +fi + ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. - echo "$as_me:$LINENO: checking for ld used by $CC" >&5 -echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 +echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw @@ -8938,7 +10328,7 @@ # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the path of ld + # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` @@ -8955,11 +10345,11 @@ ;; esac elif test "$with_gnu_ld" = yes; then - echo "$as_me:$LINENO: checking for GNU ld" >&5 -echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for GNU ld" >&5 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } else - echo "$as_me:$LINENO: checking for non-GNU ld" >&5 -echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } fi if test "${lt_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -8972,7 +10362,7 @@ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. + # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 -echo "${ECHO_T}$LD" >&6 + { echo "$as_me:$LINENO: result: $LD" >&5 +echo "${ECHO_T}$LD" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } -echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 -echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - # I'd rather use --version here, but apparently some GNU ld's only accept -v. -case `"$LD" -v 2>&1 &1 &5 -echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 +{ echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5 +echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld @@ -9052,7 +10442,7 @@ # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists @@ -9067,8 +10457,8 @@ fi # PORTME: fill in a description of your system's C++ link characteristics -echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } ld_shlibs_CXX=yes case $host_os in aix3*) @@ -9097,6 +10487,7 @@ ;; esac done + ;; esac exp_sym_flag='-bexport' @@ -9115,7 +10506,7 @@ link_all_deplibs_CXX=yes if test "$GXX" = yes; then - case $host_os in aix4.012|aix4.012.*) + case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` @@ -9134,8 +10525,12 @@ hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_libdir_separator_CXX= fi + ;; esac shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi else # not using gcc if test "$host_cpu" = ia64; then @@ -9175,24 +10570,36 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -9206,19 +10613,21 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" + archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF @@ -9237,24 +10646,36 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -9268,8 +10689,10 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi @@ -9278,16 +10701,26 @@ # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' ${wl}-bernotok' allow_undefined_flag_CXX=' ${wl}-berok' - # -bexpall does not export symbols beginning with underscore (_) - always_export_symbols_CXX=yes # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_CXX=' ' + whole_archive_flag_spec_CXX='$convenience' archive_cmds_need_lc_CXX=yes - # This is similar to how AIX traditionally builds it's shared libraries. - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_CXX=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_CXX=no + fi + ;; + chorus*) case $cc_basename in *) @@ -9306,7 +10739,7 @@ enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then @@ -9315,57 +10748,81 @@ echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_CXX=no fi ;; - - darwin* | rhapsody*) - if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then - archive_cmds_need_lc_CXX=no - case "$host_os" in - rhapsody* | darwin1.[012]) - allow_undefined_flag_CXX='-undefined suppress' - ;; - *) # Darwin 1.3 on - test -z ${LD_TWOLEVEL_NAMESPACE} && allow_undefined_flag_CXX='-flat_namespace -undefined suppress' - ;; - esac - lt_int_apple_cc_single_mod=no - output_verbose_link_cmd='echo' - if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then - lt_int_apple_cc_single_mod=yes - fi - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - else - archive_cmds_CXX='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes + hardcode_shlibpath_var_CXX=unsupported + whole_archive_flag_spec_CXX='' + link_all_deplibs_CXX=yes + + if test "$GXX" = yes ; then + lt_int_apple_cc_single_mod=no + output_verbose_link_cmd='echo' + if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then + lt_int_apple_cc_single_mod=yes fi - module_cmds_CXX='$CC -bundle ${wl}-bind_at_load $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags' - - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + else + archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + fi + module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else - archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs_CXX=no + ;; + esac fi - module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - hardcode_direct_CXX=no - hardcode_automatic_CXX=yes - hardcode_shlibpath_var_CXX=unsupported - whole_archive_flag_spec_CXX='-all_load $convenience' - link_all_deplibs_CXX=yes - fi - ;; + ;; dgux*) case $cc_basename in - ec++) + ec++*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; - ghcx) + ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no @@ -9376,14 +10833,14 @@ ;; esac ;; - freebsd12*) + freebsd[12]*) # C++ shared libraries reported to be fairly broken before switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; - freebsd*) + freebsd* | kfreebsd*-gnu | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes @@ -9400,11 +10857,11 @@ # location of the library. case $cc_basename in - CC) + CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; - aCC) + aCC*) archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when @@ -9414,7 +10871,7 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then @@ -9428,33 +10885,22 @@ ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then - case "$host_cpu" in - hppa*64*) - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + case $host_cpu in + hppa*64*|ia64*) hardcode_libdir_flag_spec_ld_CXX='+b $libdir' - hardcode_libdir_separator_CXX=: - ;; - ia64*) - hardcode_libdir_flag_spec_CXX='-L$libdir' ;; *) - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' ;; esac fi - case "$host_cpu" in - hppa*64*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - ;; - ia64*) + case $host_cpu in + hppa*64*|ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no - hardcode_minus_L_CXX=yes # Not in the search PATH, - # but as the default - # location of the library. ;; *) hardcode_direct_CXX=yes @@ -9465,14 +10911,17 @@ esac case $cc_basename in - CC) + CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; - aCC) - case "$host_cpu" in - hppa*64*|ia64*) - archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' + aCC*) + case $host_cpu in + hppa*64*) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' @@ -9491,9 +10940,12 @@ *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then - case "$host_cpu" in - ia64*|hppa*64*) - archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' + case $host_cpu in + hppa*64*) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' @@ -9507,11 +10959,25 @@ ;; esac ;; + interix3*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; irix5* | irix6*) case $cc_basename in - CC) + CC*) # SGI C++ - archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is @@ -9522,7 +10988,7 @@ *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi @@ -9535,7 +11001,7 @@ ;; linux*) case $cc_basename in - KCC) + KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file @@ -9560,17 +11026,41 @@ # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; - icpc) + icpc*) # Intel C++ with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac archive_cmds_need_lc_CXX=no - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; - cxx) + pgCC*) + # Portland Group C++ compiler + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' @@ -9601,7 +11091,7 @@ ;; mvs*) case $cc_basename in - cxx) + cxx*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; @@ -9622,9 +11112,25 @@ # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; + openbsd2*) + # C++ shared libraries are fairly broken + ld_shlibs_CXX=no + ;; + openbsd*) + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + export_dynamic_flag_spec_CXX='${wl}-E' + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd='echo' + ;; osf3*) case $cc_basename in - KCC) + KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file @@ -9640,14 +11146,14 @@ old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; - RCC) + RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; - cxx) + cxx*) allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: @@ -9665,7 +11171,7 @@ *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: @@ -9684,7 +11190,7 @@ ;; osf4* | osf5*) case $cc_basename in - KCC) + KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file @@ -9699,17 +11205,17 @@ # the KAI C++ compiler. old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; - RCC) + RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; - cxx) + cxx*) allow_undefined_flag_CXX=' -expect_unresolved \*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ $rm $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' @@ -9728,7 +11234,7 @@ *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: @@ -9749,27 +11255,14 @@ # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; - sco*) - archive_cmds_need_lc_CXX=no - case $cc_basename in - CC) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; sunos4*) case $cc_basename in - CC) + CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; - lcc) + lcc*) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no @@ -9782,36 +11275,33 @@ ;; solaris*) case $cc_basename in - CC) + CC*) # Sun C++ 4.2, 5.x and Centerline C++ + archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no case $host_os in - solaris2.0-5 | solaris2.0-5.*) ;; + solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The C++ compiler is used as linker so we must use $wl # flag to pass the commands to the underlying system - # linker. + # linker. We must also pass each convience library through + # to the system linker between allextract/defaultextract. + # The C++ compiler will combine linker options so we + # cannot just pass the convience library names through + # without $wl. # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac link_all_deplibs_CXX=yes - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[LR]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is @@ -9819,7 +11309,7 @@ # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; - gcx) + gcx*) # Green Hills C++ Compiler archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' @@ -9831,14 +11321,14 @@ if test "$GXX" = yes && test "$with_gnu_ld" = no; then no_undefined_flag_CXX=' ${wl}-z ${wl}defs' if $CC --version | grep -v '^2\.7' > /dev/null; then - archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. @@ -9857,12 +11347,63 @@ ;; esac ;; - sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag_CXX='${wl}-z,text' archive_cmds_need_lc_CXX=no + hardcode_shlibpath_var_CXX=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + # So that behaviour is only enabled if SCOABSPATH is set to a + # non-empty value in the environment. Most likely only useful for + # creating official distributions of packages. + # This is a hack until libtool officially supports absolute path + # names for shared libraries. + no_undefined_flag_CXX='${wl}-z,text' + allow_undefined_flag_CXX='${wl}-z,nodefs' + archive_cmds_need_lc_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + export_dynamic_flag_spec_CXX='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac ;; tandem*) case $cc_basename in - NCC) + NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no @@ -9882,17 +11423,13 @@ ld_shlibs_CXX=no ;; esac -echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 -echo "${ECHO_T}$ld_shlibs_CXX" >&6 +{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 +echo "${ECHO_T}$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no GCC_CXX="$GXX" LD_CXX="$LD" -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... cat > conftest.$ac_ext <&5 -echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then @@ -10042,6 +11602,10 @@ # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic @@ -10050,7 +11614,7 @@ hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) ;; *) @@ -10075,18 +11639,28 @@ ;; chorus*) case $cc_basename in - cxch68) + cxch68*) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic_CXX='-qnocommon' + lt_prog_compiler_wl_CXX='-Wl,' + ;; + esac + ;; dgux*) case $cc_basename in - ec++) + ec++*) lt_prog_compiler_pic_CXX='-KPIC' ;; - ghcx) + ghcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; @@ -10094,22 +11668,22 @@ ;; esac ;; - freebsd*) + freebsd* | kfreebsd*-gnu | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in - CC) + CC*) lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" + lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then lt_prog_compiler_pic_CXX='+Z' fi ;; - aCC) + aCC*) lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" - case "$host_cpu" in + lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' + case $host_cpu in hppa*64*|ia64*) # +Z the default ;; @@ -10122,9 +11696,13 @@ ;; esac ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; irix5* | irix6* | nonstopux*) case $cc_basename in - CC) + CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. @@ -10135,18 +11713,24 @@ ;; linux*) case $cc_basename in - KCC) + KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; - icpc) + icpc* | ecpc*) # Intel C++ lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; - cxx) + pgCC*) + # Portland Group C++ compiler. + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-fpic' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. @@ -10163,7 +11747,7 @@ ;; mvs*) case $cc_basename in - cxx) + cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) @@ -10174,14 +11758,14 @@ ;; osf3* | osf4* | osf5*) case $cc_basename in - KCC) + KCC*) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; - RCC) + RCC*) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; - cxx) + cxx*) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha @@ -10195,24 +11779,15 @@ ;; psos*) ;; - sco*) - case $cc_basename in - CC) - lt_prog_compiler_pic_CXX='-fPIC' - ;; - *) - ;; - esac - ;; solaris*) case $cc_basename in - CC) + CC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; - gcx) + gcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; @@ -10222,12 +11797,12 @@ ;; sunos4*) case $cc_basename in - CC) + CC*) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; - lcc) + lcc*) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; @@ -10237,7 +11812,7 @@ ;; tandem*) case $cc_basename in - NCC) + NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; @@ -10245,7 +11820,14 @@ ;; esac ;; - unixware*) + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + esac ;; vxworks*) ;; @@ -10255,15 +11837,16 @@ esac fi -echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6 +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then - echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 -echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6 + +{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6; } if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10277,26 +11860,28 @@ # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:10283: $lt_compile\"" >&5) + (eval echo "\"\$as_me:11866: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:10287: \$? = $ac_status" >&5 + echo "$as_me:11870: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test ! -s conftest.err; then + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works_CXX=yes fi fi $rm conftest* fi -echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6 +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6; } if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then case $lt_prog_compiler_pic_CXX in @@ -10309,7 +11894,7 @@ fi fi -case "$host_os" in +case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= @@ -10319,8 +11904,50 @@ ;; esac -echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" +{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_static_works_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works_CXX=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + printf "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works_CXX=yes + fi + else + lt_prog_compiler_static_works_CXX=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works_CXX" >&6; } + +if test x"$lt_prog_compiler_static_works_CXX" = xyes; then + : +else + lt_prog_compiler_static_CXX= +fi + + +{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10331,60 +11958,58 @@ mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext - # According to Tom Tromey, Ian Lance Taylor reported there are C compilers - # that will create temporary files in the current directory regardless of - # the output directory. Thus, making CWD read-only will cause this test - # to fail, enabling locking or at least warning the user not to do parallel - # builds. - chmod -w . - lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:10350: $lt_compile\"" >&5) + (eval echo "\"\$as_me:11970: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:10354: \$? = $ac_status" >&5 + echo "$as_me:11974: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - if test ! -s out/conftest.err; then + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi - chmod u+w . - $rm conftest* out/* - rmdir out + chmod u+w . 2>&5 + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi -echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6 +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user - echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no - echo "$as_me:$LINENO: result: $hard_links" >&5 -echo "${ECHO_T}$hard_links" >&6 + { echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6; } if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} @@ -10394,8 +12019,8 @@ need_locks=no fi -echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in @@ -10412,22 +12037,17 @@ export_symbols_cmds_CXX="$ltdll_cmds" ;; cygwin* | mingw*) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([^ ]*\) [^ ]*/\1 DATA/;/^I /d;/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac -echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 -echo "${ECHO_T}$ld_shlibs_CXX" >&6 +{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 +echo "${ECHO_T}$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - # # Do we need to explicitly link libc? # @@ -10445,8 +12065,8 @@ # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. - echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext @@ -10460,6 +12080,7 @@ libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX + pic_flag=$lt_prog_compiler_pic_CXX compiler_flags=-v linker_flags=-v verstring= @@ -10482,86 +12103,20 @@ cat conftest.err 1>&5 fi $rm conftest* - echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 -echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6 + { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6; } ;; esac fi ;; esac -echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 -hardcode_action_CXX= -if test -n "$hardcode_libdir_flag_spec_CXX" || \ - test -n "$runpath_var CXX" || \ - test "X$hardcode_automatic_CXX"="Xyes" ; then - - # We can hardcode non-existant directories. - if test "$hardcode_direct_CXX" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && - test "$hardcode_minus_L_CXX" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action_CXX=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_CXX=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_CXX=unsupported -fi -echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 -echo "${ECHO_T}$hardcode_action_CXX" >&6 - -if test "$hardcode_action_CXX" = relink; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - -striplib= -old_striplib= -echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 -echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 -if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - ;; - *) - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - ;; - esac -fi - -echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } library_names_spec= libname_spec='lib$name' soname_spec= -shrext=".so" +shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= @@ -10649,7 +12204,7 @@ amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) @@ -10658,7 +12213,7 @@ shlibpath_var=LIBRARY_PATH ;; -bsdi4*) +bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -10674,7 +12229,7 @@ cygwin* | mingw* | pw32*) version_type=windows - shrext=".dll" + shrext_cmds=".dll" need_version=no need_lib_prefix=no @@ -10686,7 +12241,8 @@ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' @@ -10696,7 +12252,7 @@ cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/lib /lib/w32api /usr/lib /usr/local/lib" + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix @@ -10716,7 +12272,7 @@ ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; @@ -10735,17 +12291,16 @@ version_type=darwin need_lib_prefix=no need_version=no - # FIXME: Relying on posixy $() will cause problems for - # cross-compilation, but unfortunately the echo tests do not - # yet detect zsh echo's removal of \ escapes. library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH - shrext='$(test .$module = .yes && echo .so || echo .dylib)' + shrext_cmds='.dylib' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. - if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then - sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; @@ -10763,8 +12318,29 @@ dynamic_linker=no ;; -freebsd*) - objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` +kfreebsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) @@ -10782,14 +12358,19 @@ freebsd2*) shlibpath_overrides_runpath=yes ;; - freebsd3.01* | freebsdelf3.01*) + freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; - *) # from 3.2 on + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; + freebsd*) # from 4.6 on + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; esac ;; @@ -10809,9 +12390,9 @@ version_type=sunos need_lib_prefix=no need_version=no - case "$host_cpu" in + case $host_cpu in ia64*) - shrext='.so' + shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH @@ -10826,7 +12407,7 @@ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) - shrext='.sl' + shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH @@ -10837,7 +12418,7 @@ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) - shrext='.sl' + shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH @@ -10849,6 +12430,18 @@ postinstall_cmds='chmod 555 $lib' ;; +interix3*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; @@ -10906,6 +12499,12 @@ # before this can be enabled. hardcode_into_libs=yes + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, @@ -10915,6 +12514,18 @@ dynamic_linker='GNU/Linux ld.so' ;; +knetbsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + netbsd*) version_type=sunos need_lib_prefix=no @@ -10924,7 +12535,7 @@ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} ${libname}${shared_ext}' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi @@ -10940,7 +12551,7 @@ shlibpath_overrides_runpath=yes ;; -nto-qnx) +nto-qnx*) version_type=linux need_lib_prefix=no need_version=no @@ -10952,8 +12563,13 @@ openbsd*) version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no - need_version=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH @@ -10973,7 +12589,7 @@ os2*) libname_spec='$name' - shrext=".dll" + shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' @@ -10991,13 +12607,6 @@ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; -sco3.2v5*) - version_type=osf - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - ;; - solaris*) version_type=linux need_lib_prefix=no @@ -11023,7 +12632,7 @@ need_version=yes ;; -sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) +sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' @@ -11056,6 +12665,29 @@ fi ;; +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -11067,1241 +12699,490 @@ dynamic_linker=no ;; esac -echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -echo "${ECHO_T}$dynamic_linker" >&6 +{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; +{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } +hardcode_action_CXX= +if test -n "$hardcode_libdir_flag_spec_CXX" || \ + test -n "$runpath_var_CXX" || \ + test "X$hardcode_automatic_CXX" = "Xyes" ; then - mingw* | pw32*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; + # We can hardcode non-existant directories. + if test "$hardcode_direct_CXX" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && + test "$hardcode_minus_L_CXX" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_CXX=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_CXX=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_CXX=unsupported +fi +{ echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 +echo "${ECHO_T}$hardcode_action_CXX" >&6; } - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; +if test "$hardcode_action_CXX" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi - darwin*) - # if libdl is installed we need to link against it - echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dlopen (); -int -main () -{ -dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_dl_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # See if we are running on zsh, and set the options which allow our commands through + # without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_CXX \ + CC_CXX \ + LD_CXX \ + lt_prog_compiler_wl_CXX \ + lt_prog_compiler_pic_CXX \ + lt_prog_compiler_static_CXX \ + lt_prog_compiler_no_builtin_flag_CXX \ + export_dynamic_flag_spec_CXX \ + thread_safe_flag_spec_CXX \ + whole_archive_flag_spec_CXX \ + enable_shared_with_static_runtimes_CXX \ + old_archive_cmds_CXX \ + old_archive_from_new_cmds_CXX \ + predep_objects_CXX \ + postdep_objects_CXX \ + predeps_CXX \ + postdeps_CXX \ + compiler_lib_search_path_CXX \ + archive_cmds_CXX \ + archive_expsym_cmds_CXX \ + postinstall_cmds_CXX \ + postuninstall_cmds_CXX \ + old_archive_from_expsyms_cmds_CXX \ + allow_undefined_flag_CXX \ + no_undefined_flag_CXX \ + export_symbols_cmds_CXX \ + hardcode_libdir_flag_spec_CXX \ + hardcode_libdir_flag_spec_ld_CXX \ + hardcode_libdir_separator_CXX \ + hardcode_automatic_CXX \ + module_cmds_CXX \ + module_expsym_cmds_CXX \ + lt_cv_prog_compiler_c_o_CXX \ + exclude_expsyms_CXX \ + include_expsyms_CXX; do -ac_cv_lib_dl_dlopen=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 -if test $ac_cv_lib_dl_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else + case $var in + old_archive_cmds_CXX | \ + old_archive_from_new_cmds_CXX | \ + archive_cmds_CXX | \ + archive_expsym_cmds_CXX | \ + module_cmds_CXX | \ + module_expsym_cmds_CXX | \ + old_archive_from_expsyms_cmds_CXX | \ + export_symbols_cmds_CXX | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac -fi +cfgfile="$ofile" - ;; + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname - *) - echo "$as_me:$LINENO: checking for shl_load" >&5 -echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 -if test "${ac_cv_func_shl_load+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define shl_load to an innocuous variant, in case declares shl_load. - For example, HP-UX 11i declares gettimeofday. */ -#define shl_load innocuous_shl_load +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char shl_load (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL -#ifdef __STDC__ -# include -#else -# include -#endif +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared -#undef shl_load +# Whether or not to build static libraries. +build_old_libs=$enable_static -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char shl_load (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_shl_load) || defined (__stub___shl_load) -choke me -#else -char (*f) () = shl_load; -#endif -#ifdef __cplusplus -} -#endif +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_CXX -int -main () -{ -return f != shl_load; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_shl_load=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX -ac_cv_func_shl_load=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 -echo "${ECHO_T}$ac_cv_func_shl_load" >&6 -if test $ac_cv_func_shl_load = yes; then - lt_cv_dlopen="shl_load" -else - echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 -if test "${ac_cv_lib_dld_shl_load+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char shl_load (); -int -main () -{ -shl_load (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_dld_shl_load=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os -ac_cv_lib_dld_shl_load=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 -if test $ac_cv_lib_dld_shl_load = yes; then - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" -else - echo "$as_me:$LINENO: checking for dlopen" >&5 -echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 -if test "${ac_cv_func_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define dlopen to an innocuous variant, in case declares dlopen. - For example, HP-UX 11i declares gettimeofday. */ -#define dlopen innocuous_dlopen +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char dlopen (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ +# An echo program that does not interpret backslashes. +echo=$lt_echo -#ifdef __STDC__ -# include -#else -# include -#endif +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS -#undef dlopen +# A C compiler. +LTCC=$lt_LTCC -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dlopen (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_dlopen) || defined (__stub___dlopen) -choke me -#else -char (*f) () = dlopen; -#endif -#ifdef __cplusplus -} -#endif +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS -int -main () -{ -return f != dlopen; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +# A language-specific compiler. +CC=$lt_compiler_CXX -ac_cv_func_dlopen=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 -echo "${ECHO_T}$ac_cv_func_dlopen" >&6 -if test $ac_cv_func_dlopen = yes; then - lt_cv_dlopen="dlopen" -else - echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +# Is the compiler the GNU C compiler? +with_gcc=$GCC_CXX -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dlopen (); -int -main () -{ -dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_dl_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +# An ERE matcher. +EGREP=$lt_EGREP -ac_cv_lib_dl_dlopen=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 -if test $ac_cv_lib_dl_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 -echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 -if test "${ac_cv_lib_svld_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +# The linker used to build libraries. +LD=$lt_LD_CXX -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dlopen (); -int -main () -{ -dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_svld_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +# Whether we need hard or soft links. +LN_S=$lt_LN_S -ac_cv_lib_svld_dlopen=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 -if test $ac_cv_lib_svld_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" -else - echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 -echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 -if test "${ac_cv_lib_dld_dld_link+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +# A BSD-compatible nm program. +NM=$lt_NM -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dld_link (); -int -main () -{ -dld_link (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_dld_dld_link=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +# A symbol stripping program +STRIP=$lt_STRIP -ac_cv_lib_dld_dld_link=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 -if test $ac_cv_lib_dld_dld_link = yes; then - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" -fi +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" -fi +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" +# Used on cygwin: assembler. +AS="$AS" -fi +# The name of the directory that contains temporary libtool files. +objdir=$objdir +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds -fi +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_CXX +# Object file suffix (normally "o"). +objext="$ac_objext" -fi +# Old archive suffix (normally "a"). +libext="$libext" +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' -fi +# Executable file suffix (normally ""). +exeext="$exeext" - ;; - esac +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_CXX +pic_mode=$pic_mode - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len - save_LDFLAGS="$LDFLAGS" - eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" +# Must we lock files when doing compilation? +need_locks=$lt_need_locks - echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 -echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 -if test "${lt_cv_dlopen_self+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext < -#endif +# Do we need a version for libraries? +need_version=$need_version -#include +# Whether dlopen is supported. +dlopen_support=$enable_dlopen -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static -#ifdef __cplusplus -extern "C" void exit (int); -#endif +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_CXX -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX - exit (status); -} -EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_unknown|x*) lt_cv_dlopen_self=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self=no - fi -fi -rm -fr conftest* +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX -fi -echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 -echo "${ECHO_T}$lt_cv_dlopen_self" >&6 +# Library versioning type. +version_type=$version_type - if test "x$lt_cv_dlopen_self" = xyes; then - LDFLAGS="$LDFLAGS $link_static_flag" - echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 -echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 -if test "${lt_cv_dlopen_self_static+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self_static=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext < -#endif +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec=$lt_library_names_spec -#include +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_CXX +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX -#ifdef __cplusplus -extern "C" void exit (int); -#endif +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_CXX +archive_expsym_cmds=$lt_archive_expsym_cmds_CXX +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_CXX +module_expsym_cmds=$lt_module_expsym_cmds_CXX - exit (status); -} -EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self_static=no - fi -fi -rm -fr conftest* +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_CXX -fi -echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 -echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 - fi +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_CXX - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_CXX - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_CXX - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_CXX +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM SED SHELL \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler_CXX \ - CC_CXX \ - LD_CXX \ - lt_prog_compiler_wl_CXX \ - lt_prog_compiler_pic_CXX \ - lt_prog_compiler_static_CXX \ - lt_prog_compiler_no_builtin_flag_CXX \ - export_dynamic_flag_spec_CXX \ - thread_safe_flag_spec_CXX \ - whole_archive_flag_spec_CXX \ - enable_shared_with_static_runtimes_CXX \ - old_archive_cmds_CXX \ - old_archive_from_new_cmds_CXX \ - predep_objects_CXX \ - postdep_objects_CXX \ - predeps_CXX \ - postdeps_CXX \ - compiler_lib_search_path_CXX \ - archive_cmds_CXX \ - archive_expsym_cmds_CXX \ - postinstall_cmds_CXX \ - postuninstall_cmds_CXX \ - old_archive_from_expsyms_cmds_CXX \ - allow_undefined_flag_CXX \ - no_undefined_flag_CXX \ - export_symbols_cmds_CXX \ - hardcode_libdir_flag_spec_CXX \ - hardcode_libdir_flag_spec_ld_CXX \ - hardcode_libdir_separator_CXX \ - hardcode_automatic_CXX \ - module_cmds_CXX \ - module_expsym_cmds_CXX \ - lt_cv_prog_compiler_c_o_CXX \ - exclude_expsyms_CXX \ - include_expsyms_CXX; do +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd - case $var in - old_archive_cmds_CXX | \ - old_archive_from_new_cmds_CXX | \ - archive_cmds_CXX | \ - archive_expsym_cmds_CXX | \ - module_cmds_CXX | \ - module_expsym_cmds_CXX | \ - old_archive_from_expsyms_cmds_CXX | \ - export_symbols_cmds_CXX | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_CXX - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_CXX -cfgfile="$ofile" +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds - cat <<__EOF__ >> "$cfgfile" -# ### BEGIN LIBTOOL TAG CONFIG: $tagname +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address -# Whether or not to build static libraries. -build_old_libs=$enable_static +# This is the shared library runtime path variable. +runpath_var=$runpath_var -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_CXX +# This is the shared library path variable. +shlibpath_var=$shlibpath_var -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_CXX -# The host system. -host_alias=$host_alias -host=$host +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs -# An echo program that does not interpret backslashes. -echo=$lt_echo +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX -# A C compiler. -LTCC=$lt_LTCC +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX -# A language-specific compiler. -CC=$lt_compiler_CXX +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_CXX -# Is the compiler the GNU C compiler? -with_gcc=$GCC_CXX +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_CXX -# An ERE matcher. -EGREP=$lt_EGREP +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX -# The linker used to build libraries. -LD=$lt_LD_CXX +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$hardcode_automatic_CXX -# Whether we need hard or soft links. -LN_S=$lt_LN_S +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" -# A BSD-compatible nm program. -NM=$lt_NM +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_CXX -# A symbol stripping program -STRIP=$STRIP +# Compile-time system search path for libraries +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$fix_srcfile_path_CXX" -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_CXX -# Used on cygwin: assembler. -AS="$AS" +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_CXX -# The name of the directory that contains temporary libtool files. -objdir=$objdir +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_CXX -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_CXX +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_CXX -# Object file suffix (normally "o"). -objext="$ac_objext" +# ### END LIBTOOL TAG CONFIG: $tagname -# Old archive suffix (normally "a"). -libext="$libext" +__EOF__ -# Shared library suffix (normally ".so"). -shrext='$shrext' -# Executable file suffix (normally ""). -exeext="$exeext" +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_CXX -pic_mode=$pic_mode -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX +CC=$lt_save_CC +LDCXX=$LD +LD=$lt_save_LD +GCC=$lt_save_GCC +with_gnu_ldcxx=$with_gnu_ld +with_gnu_ld=$lt_save_with_gnu_ld +lt_cv_path_LDCXX=$lt_cv_path_LD +lt_cv_path_LD=$lt_save_path_LD +lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld +lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -# Must we lock files when doing compilation ? -need_locks=$lt_need_locks + else + tagname="" + fi + ;; -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix + F77) + if test -n "$F77" && test "X$F77" != "Xno"; then -# Do we need a version for libraries? -need_version=$need_version - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_CXX - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX - -# Library versioning type. -version_type=$version_type - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_old_archive_cmds_CXX -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX - -# Commands used to build and install a shared archive. -archive_cmds=$lt_archive_cmds_CXX -archive_expsym_cmds=$lt_archive_expsym_cmds_CXX -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_module_cmds_CXX -module_expsym_cmds=$lt_module_expsym_cmds_CXX - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_predep_objects_CXX - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_postdep_objects_CXX - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_predeps_CXX - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_postdeps_CXX - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_CXX - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd=$lt_file_magic_cmd - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_CXX - -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_CXX - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_CXX - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX - -# If ld is used when linking, flag to hardcode \$libdir into -# a binary during linking. This must work even if \$libdir does -# not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX - -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct_CXX - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L_CXX - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX - -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=$hardcode_automatic_CXX - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_CXX - -# Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path="$fix_srcfile_path_CXX" - -# Set to yes if exported symbols are required. -always_export_symbols=$always_export_symbols_CXX - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_CXX - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_CXX - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_CXX - -# ### END LIBTOOL TAG CONFIG: $tagname - -__EOF__ - - -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - test -f Makefile && make "$ltmain" -fi - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -CC=$lt_save_CC -LDCXX=$LD -LD=$lt_save_LD -GCC=$lt_save_GCC -with_gnu_ldcxx=$with_gnu_ld -with_gnu_ld=$lt_save_with_gnu_ld -lt_cv_path_LDCXX=$lt_cv_path_LD -lt_cv_path_LD=$lt_save_path_LD -lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld -lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld - - else - tagname="" - fi - ;; - - F77) - if test -n "$F77" && test "X$F77" != "Xno"; then - -ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu archive_cmds_need_lc_F77=no @@ -12341,29 +13222,55 @@ # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + # Allow CC to be a program name with arguments. compiler=$CC +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${F77-"f77"} compiler=$CC compiler_F77=$CC -cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` -echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 -echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 -echo "$as_me:$LINENO: result: $can_build_shared" >&5 -echo "${ECHO_T}$can_build_shared" >&6 -echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 -echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 +echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $can_build_shared" >&5 +echo "${ECHO_T}$can_build_shared" >&6; } + +{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 +echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. -case "$host_os" in +case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then @@ -12371,21 +13278,21 @@ postinstall_cmds='$RANLIB $lib' fi ;; -aix4*) - test "$enable_shared" = yes && enable_static=no +aix4* | aix5*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi ;; esac -echo "$as_me:$LINENO: result: $enable_shared" >&5 -echo "${ECHO_T}$enable_shared" >&6 +{ echo "$as_me:$LINENO: result: $enable_shared" >&5 +echo "${ECHO_T}$enable_shared" >&6; } -echo "$as_me:$LINENO: checking whether to build static libraries" >&5 -echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether to build static libraries" >&5 +echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes -echo "$as_me:$LINENO: result: $enable_static" >&5 -echo "${ECHO_T}$enable_static" >&6 - -test "$ld_shlibs_F77" = no && can_build_shared=no +{ echo "$as_me:$LINENO: result: $enable_static" >&5 +echo "${ECHO_T}$enable_static" >&6; } GCC_F77="$G77" LD_F77="$LD" @@ -12394,8 +13301,8 @@ lt_prog_compiler_pic_F77= lt_prog_compiler_static_F77= -echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl_F77='-Wl,' @@ -12433,6 +13340,11 @@ lt_prog_compiler_pic_F77='-fno-common' ;; + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. @@ -12449,7 +13361,7 @@ hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) # +Z the default ;; @@ -12475,6 +13387,16 @@ lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' fi ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic_F77='-qnocommon' + lt_prog_compiler_wl_F77='-Wl,' + ;; + esac + ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being @@ -12486,7 +13408,7 @@ lt_prog_compiler_wl_F77='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) # +Z the default ;; @@ -12510,13 +13432,20 @@ ;; linux*) - case $CC in - icc|ecc) + case $cc_basename in + icc* | ecc*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-static' ;; - ccc) + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-fpic' + lt_prog_compiler_static_F77='-Bstatic' + ;; + ccc*) lt_prog_compiler_wl_F77='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_F77='-non_shared' @@ -12530,15 +13459,15 @@ lt_prog_compiler_static_F77='-non_shared' ;; - sco3.2v5*) - lt_prog_compiler_pic_F77='-Kpic' - lt_prog_compiler_static_F77='-dn' - ;; - solaris*) - lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl_F77='-Qoption ld ';; + *) + lt_prog_compiler_wl_F77='-Wl,';; + esac ;; sunos4*) @@ -12547,7 +13476,7 @@ lt_prog_compiler_static_F77='-Bstatic' ;; - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' @@ -12560,26 +13489,38 @@ fi ;; - uts4*) - lt_prog_compiler_pic_F77='-pic' + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; - *) + unicos*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_can_build_shared_F77=no + ;; + + uts4*) + lt_prog_compiler_pic_F77='-pic' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + *) lt_prog_compiler_can_build_shared_F77=no ;; esac fi -echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6 +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_F77"; then - echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 -echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6 + +{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6; } if test "${lt_prog_compiler_pic_works_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12593,26 +13534,28 @@ # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12599: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13540: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:12603: \$? = $ac_status" >&5 + echo "$as_me:13544: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test ! -s conftest.err; then + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works_F77=yes fi fi $rm conftest* fi -echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6 +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6; } if test x"$lt_prog_compiler_pic_works_F77" = xyes; then case $lt_prog_compiler_pic_F77 in @@ -12625,7 +13568,7 @@ fi fi -case "$host_os" in +case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_F77= @@ -12635,8 +13578,50 @@ ;; esac -echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" +{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_static_works_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works_F77=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + printf "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works_F77=yes + fi + else + lt_prog_compiler_static_works_F77=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works_F77" >&6; } + +if test x"$lt_prog_compiler_static_works_F77" = xyes; then + : +else + lt_prog_compiler_static_F77= +fi + + +{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12647,60 +13632,58 @@ mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext - # According to Tom Tromey, Ian Lance Taylor reported there are C compilers - # that will create temporary files in the current directory regardless of - # the output directory. Thus, making CWD read-only will cause this test - # to fail, enabling locking or at least warning the user not to do parallel - # builds. - chmod -w . - lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12666: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13644: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:12670: \$? = $ac_status" >&5 + echo "$as_me:13648: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - if test ! -s out/conftest.err; then + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_F77=yes fi fi - chmod u+w . - $rm conftest* out/* - rmdir out + chmod u+w . 2>&5 + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi -echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6 +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user - echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no - echo "$as_me:$LINENO: result: $hard_links" >&5 -echo "${ECHO_T}$hard_links" >&6 + { echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6; } if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} @@ -12710,8 +13693,8 @@ need_locks=no fi -echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } runpath_var= allow_undefined_flag_F77= @@ -12749,6 +13732,16 @@ # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) @@ -12759,6 +13752,10 @@ with_gnu_ld=no fi ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; openbsd*) with_gnu_ld=no ;; @@ -12769,6 +13766,27 @@ # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_F77='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_F77= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) @@ -12819,10 +13837,10 @@ allow_undefined_flag_F77=unsupported always_export_symbols_F77=no enable_shared_with_static_runtimes_F77=yes - export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then @@ -12831,9 +13849,55 @@ echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else - ld_shlibs=no + ld_shlibs_F77=no + fi + ;; + + interix3*) + hardcode_direct_F77=no + hardcode_shlibpath_var_F77=no + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + export_dynamic_flag_spec_F77='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + linux*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + archive_cmds_F77='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + $echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + else + ld_shlibs_F77=no fi ;; @@ -12847,7 +13911,7 @@ fi ;; - solaris* | sysv5*) + solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_F77=no cat <&2 @@ -12868,6 +13932,33 @@ fi ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs_F77=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; + esac + ;; + sunos4*) archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= @@ -12885,16 +13976,11 @@ ;; esac - if test "$ld_shlibs_F77" = yes; then - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_F77='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec_F77= - fi + if test "$ld_shlibs_F77" = no; then + runpath_var= + hardcode_libdir_flag_spec_F77= + export_dynamic_flag_spec_F77= + whole_archive_flag_spec_F77= fi else # PORTME fill in a description of your system's linker (not GNU ld) @@ -12906,7 +13992,7 @@ # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L_F77=yes - if test "$GCC" = yes && test -z "$link_static_flag"; then + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_F77=unsupported @@ -12940,6 +14026,7 @@ break fi done + ;; esac exp_sym_flag='-bexport' @@ -12958,7 +14045,7 @@ link_all_deplibs_F77=yes if test "$GCC" = yes; then - case $host_os in aix4.012|aix4.012.*) + case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` @@ -12977,8 +14064,12 @@ hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_libdir_separator_F77= fi + ;; esac shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi else # not using gcc if test "$host_cpu" = ia64; then @@ -12986,11 +14077,11 @@ # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else - if test "$aix_use_runtimelinking" = yes; then + if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' - fi + fi fi fi @@ -13008,24 +14099,36 @@ end _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_f77_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -13039,18 +14142,20 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" + archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_F77="-z nodefs" - archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" + archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF @@ -13059,24 +14164,36 @@ end _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_f77_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -13090,8 +14207,10 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi @@ -13100,13 +14219,11 @@ # -berok will link without error, but may produce a broken library. no_undefined_flag_F77=' ${wl}-bernotok' allow_undefined_flag_F77=' ${wl}-berok' - # -bexpall does not export symbols beginning with underscore (_) - always_export_symbols_F77=yes # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_F77=' ' + whole_archive_flag_spec_F77='$convenience' archive_cmds_need_lc_F77=yes - # This is similar to how AIX traditionally builds it's shared libraries. - archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; @@ -13119,7 +14236,7 @@ ld_shlibs_F77=no ;; - bsdi4*) + bsdi[45]*) export_dynamic_flag_spec_F77=-rdynamic ;; @@ -13133,55 +14250,64 @@ # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. - shrext=".dll" + shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_F77='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path='`cygpath -w "$srcfile"`' + fix_srcfile_path_F77='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_F77=yes ;; darwin* | rhapsody*) - if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then - archive_cmds_need_lc_F77=no - case "$host_os" in - rhapsody* | darwin1.[012]) - allow_undefined_flag_F77='-undefined suppress' - ;; - *) # Darwin 1.3 on - test -z ${LD_TWOLEVEL_NAMESPACE} && allow_undefined_flag_F77='-flat_namespace -undefined suppress' - ;; + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; esac - # FIXME: Relying on posixy $() will cause problems for - # cross-compilation, but unfortunately the echo tests do not - # yet detect zsh echo's removal of \ escapes. Also zsh mangles - # `"' quotes if we put them in here... so don't! - lt_int_apple_cc_single_mod=no - output_verbose_link_cmd='echo' - if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then - lt_int_apple_cc_single_mod=yes - fi - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - archive_cmds_F77='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - else - archive_cmds_F77='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - fi - module_cmds_F77='$CC -bundle ${wl}-bind_at_load $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + archive_cmds_need_lc_F77=no hardcode_direct_F77=no hardcode_automatic_F77=yes hardcode_shlibpath_var_F77=unsupported - whole_archive_flag_spec_F77='-all_load $convenience' + whole_archive_flag_spec_F77='' link_all_deplibs_F77=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs_F77=no + ;; + esac fi ;; @@ -13215,7 +14341,7 @@ ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd*) + freebsd* | kfreebsd*-gnu | dragonfly*) archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes @@ -13238,47 +14364,62 @@ export_dynamic_flag_spec_F77='${wl}-E' ;; - hpux10* | hpux11*) + hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case "$host_cpu" in - hppa*64*|ia64*) + archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: + + hardcode_direct_F77=yes + export_dynamic_flag_spec_F77='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; + ia64*) + archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; *) archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else - case "$host_cpu" in - hppa*64*|ia64*) - archive_cmds_F77='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' + case $host_cpu in + hppa*64*) + archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then - case "$host_cpu" in - hppa*64*) - hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: + + case $host_cpu in + hppa*64*|ia64*) hardcode_libdir_flag_spec_ld_F77='+b $libdir' - hardcode_libdir_separator_F77=: - hardcode_direct_F77=no - hardcode_shlibpath_var_F77=no - ;; - ia64*) - hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_direct_F77=no hardcode_shlibpath_var_F77=no - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_F77=yes ;; *) - hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_F77=: hardcode_direct_F77=yes export_dynamic_flag_spec_F77='${wl}-E' @@ -13326,6 +14467,7 @@ hardcode_shlibpath_var_F77=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' export_dynamic_flag_spec_F77='${wl}-E' else @@ -13371,7 +14513,7 @@ allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_F77='-rpath $libdir' @@ -13379,21 +14521,15 @@ hardcode_libdir_separator_F77=: ;; - sco3.2v5*) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_F77=no - export_dynamic_flag_spec_F77='${wl}-Bexport' - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ;; - solaris*) no_undefined_flag_F77=' -z text' if test "$GCC" = yes; then + wlarc='${wl}' archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else + wlarc='' archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' @@ -13402,8 +14538,18 @@ hardcode_shlibpath_var_F77=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; - *) # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;; + *) + # The compiler driver will combine linker options so we + # cannot just pass the convience library names through + # without $wl, iff we do not link with $LD. + # Luckily, gcc supports the same syntax we need for Sun Studio. + # Supported since Solaris 2.6 (maybe 2.5.1?) + case $wlarc in + '') + whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;; + *) + whole_archive_flag_spec_F77='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; + esac ;; esac link_all_deplibs_F77=yes ;; @@ -13460,36 +14606,45 @@ fi ;; - sysv4.2uw2*) - archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=yes - hardcode_minus_L_F77=no + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) + no_undefined_flag_F77='${wl}-z,text' + archive_cmds_need_lc_F77=no hardcode_shlibpath_var_F77=no - hardcode_runpath_var=yes - runpath_var=LD_RUN_PATH - ;; + runpath_var='LD_RUN_PATH' - sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) - no_undefined_flag_F77='${wl}-z ${wl}text' if test "$GCC" = yes; then - archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else - archive_cmds_F77='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var_F77=no ;; - sysv5*) - no_undefined_flag_F77=' -z text' - # $CC -shared without GNU ld will not create a library from C++ - # object files and a static libstdc++, better avoid it by now - archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - hardcode_libdir_flag_spec_F77= + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag_F77='${wl}-z,text' + allow_undefined_flag_F77='${wl}-z,nodefs' + archive_cmds_need_lc_F77=no hardcode_shlibpath_var_F77=no + hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator_F77=':' + link_all_deplibs_F77=yes + export_dynamic_flag_spec_F77='${wl}-Bexport' runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi ;; uts4*) @@ -13504,15 +14659,10 @@ esac fi -echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 -echo "${ECHO_T}$ld_shlibs_F77" >&6 +{ echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 +echo "${ECHO_T}$ld_shlibs_F77" >&6; } test "$ld_shlibs_F77" = no && can_build_shared=no -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - # # Do we need to explicitly link libc? # @@ -13530,8 +14680,8 @@ # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. - echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext @@ -13545,6 +14695,7 @@ libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_F77 + pic_flag=$lt_prog_compiler_pic_F77 compiler_flags=-v linker_flags=-v verstring= @@ -13567,86 +14718,20 @@ cat conftest.err 1>&5 fi $rm conftest* - echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 -echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6 + { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6; } ;; esac fi ;; esac -echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 -hardcode_action_F77= -if test -n "$hardcode_libdir_flag_spec_F77" || \ - test -n "$runpath_var F77" || \ - test "X$hardcode_automatic_F77"="Xyes" ; then - - # We can hardcode non-existant directories. - if test "$hardcode_direct_F77" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && - test "$hardcode_minus_L_F77" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action_F77=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_F77=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_F77=unsupported -fi -echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 -echo "${ECHO_T}$hardcode_action_F77" >&6 - -if test "$hardcode_action_F77" = relink; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - -striplib= -old_striplib= -echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 -echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 -if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - ;; - *) - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - ;; - esac -fi - -echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } library_names_spec= libname_spec='lib$name' soname_spec= -shrext=".so" +shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= @@ -13734,7 +14819,7 @@ amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) @@ -13743,7 +14828,7 @@ shlibpath_var=LIBRARY_PATH ;; -bsdi4*) +bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -13759,7 +14844,7 @@ cygwin* | mingw* | pw32*) version_type=windows - shrext=".dll" + shrext_cmds=".dll" need_version=no need_lib_prefix=no @@ -13771,7 +14856,8 @@ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' @@ -13781,7 +14867,7 @@ cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/lib /lib/w32api /usr/lib /usr/local/lib" + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix @@ -13801,7 +14887,7 @@ ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; @@ -13820,17 +14906,16 @@ version_type=darwin need_lib_prefix=no need_version=no - # FIXME: Relying on posixy $() will cause problems for - # cross-compilation, but unfortunately the echo tests do not - # yet detect zsh echo's removal of \ escapes. library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH - shrext='$(test .$module = .yes && echo .so || echo .dylib)' + shrext_cmds='.dylib' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. - if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then - sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; @@ -13848,8 +14933,29 @@ dynamic_linker=no ;; -freebsd*) - objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` +kfreebsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) @@ -13867,14 +14973,19 @@ freebsd2*) shlibpath_overrides_runpath=yes ;; - freebsd3.01* | freebsdelf3.01*) + freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; - *) # from 3.2 on + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; + freebsd*) # from 4.6 on + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; esac ;; @@ -13894,9 +15005,9 @@ version_type=sunos need_lib_prefix=no need_version=no - case "$host_cpu" in + case $host_cpu in ia64*) - shrext='.so' + shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH @@ -13911,7 +15022,7 @@ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) - shrext='.sl' + shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH @@ -13922,7 +15033,7 @@ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) - shrext='.sl' + shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH @@ -13934,6 +15045,18 @@ postinstall_cmds='chmod 555 $lib' ;; +interix3*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; @@ -13991,6 +15114,12 @@ # before this can be enabled. hardcode_into_libs=yes + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, @@ -14000,6 +15129,18 @@ dynamic_linker='GNU/Linux ld.so' ;; +knetbsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + netbsd*) version_type=sunos need_lib_prefix=no @@ -14009,7 +15150,7 @@ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} ${libname}${shared_ext}' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi @@ -14025,7 +15166,7 @@ shlibpath_overrides_runpath=yes ;; -nto-qnx) +nto-qnx*) version_type=linux need_lib_prefix=no need_version=no @@ -14037,8 +15178,13 @@ openbsd*) version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no - need_version=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH @@ -14058,7 +15204,7 @@ os2*) libname_spec='$name' - shrext=".dll" + shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' @@ -14076,13 +15222,6 @@ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; -sco3.2v5*) - version_type=osf - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - ;; - solaris*) version_type=linux need_lib_prefix=no @@ -14108,7 +15247,7 @@ need_version=yes ;; -sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) +sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' @@ -14141,6 +15280,29 @@ fi ;; +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -14152,10 +15314,52 @@ dynamic_linker=no ;; esac -echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -echo "${ECHO_T}$dynamic_linker" >&6 +{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } +hardcode_action_F77= +if test -n "$hardcode_libdir_flag_spec_F77" || \ + test -n "$runpath_var_F77" || \ + test "X$hardcode_automatic_F77" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct_F77" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && + test "$hardcode_minus_L_F77" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_F77=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_F77=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_F77=unsupported +fi +{ echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 +echo "${ECHO_T}$hardcode_action_F77" >&6; } + +if test "$hardcode_action_F77" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh @@ -14170,7 +15374,8 @@ # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM SED SHELL \ + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ @@ -14270,6 +15475,12 @@ # The host system. host_alias=$host_alias host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo @@ -14281,6 +15492,9 @@ # A C compiler. LTCC=$lt_LTCC +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + # A language-specific compiler. CC=$lt_compiler_F77 @@ -14300,7 +15514,7 @@ NM=$lt_NM # A symbol stripping program -STRIP=$STRIP +STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD @@ -14331,7 +15545,7 @@ libext="$libext" # Shared library suffix (normally ".so"). -shrext='$shrext' +shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" @@ -14346,7 +15560,7 @@ # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 -# Must we lock files when doing compilation ? +# Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? @@ -14548,7 +15762,10 @@ # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. - test -f Makefile && make "$ltmain" + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi fi @@ -14567,7 +15784,11 @@ GCJ) if test -n "$GCJ" && test "X$GCJ" != "Xno"; then - + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for Java test sources. @@ -14581,38 +15802,64 @@ lt_simple_compile_test_code="class foo {}\n" # Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String argv) {}; }\n' +lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + # Allow CC to be a program name with arguments. compiler=$CC +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${GCJ-"gcj"} compiler=$CC compiler_GCJ=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + # GCJ did not exist at the time GCC didn't implicitly link libc in. archive_cmds_need_lc_GCJ=no -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... +old_archive_cmds_GCJ=$old_archive_cmds + lt_prog_compiler_no_builtin_flag_GCJ= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' - echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 + +{ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14626,26 +15873,28 @@ # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14632: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15879: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:14636: \$? = $ac_status" >&5 + echo "$as_me:15883: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test ! -s conftest.err; then + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $rm conftest* fi -echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6 +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" @@ -14659,8 +15908,8 @@ lt_prog_compiler_pic_GCJ= lt_prog_compiler_static_GCJ= -echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl_GCJ='-Wl,' @@ -14698,6 +15947,11 @@ lt_prog_compiler_pic_GCJ='-fno-common' ;; + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. @@ -14714,7 +15968,7 @@ hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) # +Z the default ;; @@ -14740,6 +15994,16 @@ lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' fi ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic_GCJ='-qnocommon' + lt_prog_compiler_wl_GCJ='-Wl,' + ;; + esac + ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being @@ -14751,7 +16015,7 @@ lt_prog_compiler_wl_GCJ='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) # +Z the default ;; @@ -14775,13 +16039,20 @@ ;; linux*) - case $CC in - icc|ecc) + case $cc_basename in + icc* | ecc*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-static' ;; - ccc) + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-fpic' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + ccc*) lt_prog_compiler_wl_GCJ='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_GCJ='-non_shared' @@ -14795,15 +16066,15 @@ lt_prog_compiler_static_GCJ='-non_shared' ;; - sco3.2v5*) - lt_prog_compiler_pic_GCJ='-Kpic' - lt_prog_compiler_static_GCJ='-dn' - ;; - solaris*) - lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl_GCJ='-Qoption ld ';; + *) + lt_prog_compiler_wl_GCJ='-Wl,';; + esac ;; sunos4*) @@ -14812,7 +16083,7 @@ lt_prog_compiler_static_GCJ='-Bstatic' ;; - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' @@ -14825,6 +16096,17 @@ fi ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_can_build_shared_GCJ=no + ;; + uts4*) lt_prog_compiler_pic_GCJ='-pic' lt_prog_compiler_static_GCJ='-Bstatic' @@ -14836,15 +16118,16 @@ esac fi -echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6 +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_GCJ"; then - echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 -echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6 + +{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6; } if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14858,26 +16141,28 @@ # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14864: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16147: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:14868: \$? = $ac_status" >&5 + echo "$as_me:16151: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test ! -s conftest.err; then + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works_GCJ=yes fi fi $rm conftest* fi -echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6 +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6; } if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then case $lt_prog_compiler_pic_GCJ in @@ -14890,7 +16175,7 @@ fi fi -case "$host_os" in +case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_GCJ= @@ -14900,8 +16185,50 @@ ;; esac -echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\" +{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_static_works_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works_GCJ=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + printf "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works_GCJ=yes + fi + else + lt_prog_compiler_static_works_GCJ=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_GCJ" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works_GCJ" >&6; } + +if test x"$lt_prog_compiler_static_works_GCJ" = xyes; then + : +else + lt_prog_compiler_static_GCJ= +fi + + +{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14912,60 +16239,58 @@ mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext - # According to Tom Tromey, Ian Lance Taylor reported there are C compilers - # that will create temporary files in the current directory regardless of - # the output directory. Thus, making CWD read-only will cause this test - # to fail, enabling locking or at least warning the user not to do parallel - # builds. - chmod -w . - lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14931: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16251: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:14935: \$? = $ac_status" >&5 + echo "$as_me:16255: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - if test ! -s out/conftest.err; then + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_GCJ=yes fi fi - chmod u+w . - $rm conftest* out/* - rmdir out + chmod u+w . 2>&5 + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi -echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6 +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user - echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no - echo "$as_me:$LINENO: result: $hard_links" >&5 -echo "${ECHO_T}$hard_links" >&6 + { echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6; } if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} @@ -14975,8 +16300,8 @@ need_locks=no fi -echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } runpath_var= allow_undefined_flag_GCJ= @@ -15014,6 +16339,16 @@ # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) @@ -15024,6 +16359,10 @@ with_gnu_ld=no fi ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; openbsd*) with_gnu_ld=no ;; @@ -15034,6 +16373,27 @@ # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_GCJ='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_GCJ= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) @@ -15084,10 +16444,10 @@ allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=no enable_shared_with_static_runtimes_GCJ=yes - export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then @@ -15096,9 +16456,55 @@ echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else - ld_shlibs=no + ld_shlibs_GCJ=no + fi + ;; + + interix3*) + hardcode_direct_GCJ=no + hardcode_shlibpath_var_GCJ=no + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + export_dynamic_flag_spec_GCJ='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_GCJ='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + linux*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + archive_cmds_GCJ='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + $echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + else + ld_shlibs_GCJ=no fi ;; @@ -15112,7 +16518,7 @@ fi ;; - solaris* | sysv5*) + solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_GCJ=no cat <&2 @@ -15133,6 +16539,33 @@ fi ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs_GCJ=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + esac + ;; + sunos4*) archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= @@ -15150,16 +16583,11 @@ ;; esac - if test "$ld_shlibs_GCJ" = yes; then - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_GCJ='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec_GCJ= - fi + if test "$ld_shlibs_GCJ" = no; then + runpath_var= + hardcode_libdir_flag_spec_GCJ= + export_dynamic_flag_spec_GCJ= + whole_archive_flag_spec_GCJ= fi else # PORTME fill in a description of your system's linker (not GNU ld) @@ -15171,7 +16599,7 @@ # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L_GCJ=yes - if test "$GCC" = yes && test -z "$link_static_flag"; then + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_GCJ=unsupported @@ -15205,6 +16633,7 @@ break fi done + ;; esac exp_sym_flag='-bexport' @@ -15223,7 +16652,7 @@ link_all_deplibs_GCJ=yes if test "$GCC" = yes; then - case $host_os in aix4.012|aix4.012.*) + case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` @@ -15242,8 +16671,12 @@ hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_libdir_separator_GCJ= fi + ;; esac shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi else # not using gcc if test "$host_cpu" = ia64; then @@ -15251,11 +16684,11 @@ # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else - if test "$aix_use_runtimelinking" = yes; then + if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' - fi + fi fi fi @@ -15283,24 +16716,36 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -15314,18 +16759,20 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" + archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_GCJ="-z nodefs" - archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" + archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF @@ -15344,24 +16791,36 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -15375,8 +16834,10 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi @@ -15385,13 +16846,11 @@ # -berok will link without error, but may produce a broken library. no_undefined_flag_GCJ=' ${wl}-bernotok' allow_undefined_flag_GCJ=' ${wl}-berok' - # -bexpall does not export symbols beginning with underscore (_) - always_export_symbols_GCJ=yes # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_GCJ=' ' + whole_archive_flag_spec_GCJ='$convenience' archive_cmds_need_lc_GCJ=yes - # This is similar to how AIX traditionally builds it's shared libraries. - archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; @@ -15404,7 +16863,7 @@ ld_shlibs_GCJ=no ;; - bsdi4*) + bsdi[45]*) export_dynamic_flag_spec_GCJ=-rdynamic ;; @@ -15418,55 +16877,64 @@ # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. - shrext=".dll" + shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_GCJ='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path='`cygpath -w "$srcfile"`' + fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_GCJ=yes ;; darwin* | rhapsody*) - if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then - archive_cmds_need_lc_GCJ=no - case "$host_os" in - rhapsody* | darwin1.[012]) - allow_undefined_flag_GCJ='-undefined suppress' - ;; - *) # Darwin 1.3 on - test -z ${LD_TWOLEVEL_NAMESPACE} && allow_undefined_flag_GCJ='-flat_namespace -undefined suppress' - ;; + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; esac - # FIXME: Relying on posixy $() will cause problems for - # cross-compilation, but unfortunately the echo tests do not - # yet detect zsh echo's removal of \ escapes. Also zsh mangles - # `"' quotes if we put them in here... so don't! - lt_int_apple_cc_single_mod=no - output_verbose_link_cmd='echo' - if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then - lt_int_apple_cc_single_mod=yes - fi - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - archive_cmds_GCJ='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - else - archive_cmds_GCJ='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - fi - module_cmds_GCJ='$CC -bundle ${wl}-bind_at_load $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + archive_cmds_need_lc_GCJ=no hardcode_direct_GCJ=no hardcode_automatic_GCJ=yes hardcode_shlibpath_var_GCJ=unsupported - whole_archive_flag_spec_GCJ='-all_load $convenience' + whole_archive_flag_spec_GCJ='' link_all_deplibs_GCJ=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs_GCJ=no + ;; + esac fi ;; @@ -15500,7 +16968,7 @@ ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd*) + freebsd* | kfreebsd*-gnu | dragonfly*) archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes @@ -15523,47 +16991,62 @@ export_dynamic_flag_spec_GCJ='${wl}-E' ;; - hpux10* | hpux11*) + hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case "$host_cpu" in - hppa*64*|ia64*) + archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + + hardcode_direct_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_GCJ=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; + ia64*) + archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; *) archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else - case "$host_cpu" in - hppa*64*|ia64*) - archive_cmds_GCJ='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' + case $host_cpu in + hppa*64*) + archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then - case "$host_cpu" in - hppa*64*) - hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + + case $host_cpu in + hppa*64*|ia64*) hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' - hardcode_libdir_separator_GCJ=: - hardcode_direct_GCJ=no - hardcode_shlibpath_var_GCJ=no - ;; - ia64*) - hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_GCJ=yes ;; *) - hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' @@ -15611,6 +17094,7 @@ hardcode_shlibpath_var_GCJ=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' export_dynamic_flag_spec_GCJ='${wl}-E' else @@ -15656,7 +17140,7 @@ allow_undefined_flag_GCJ=' -expect_unresolved \*' archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_GCJ='-rpath $libdir' @@ -15664,21 +17148,15 @@ hardcode_libdir_separator_GCJ=: ;; - sco3.2v5*) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_GCJ=no - export_dynamic_flag_spec_GCJ='${wl}-Bexport' - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ;; - solaris*) no_undefined_flag_GCJ=' -z text' if test "$GCC" = yes; then + wlarc='${wl}' archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else + wlarc='' archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' @@ -15687,8 +17165,18 @@ hardcode_shlibpath_var_GCJ=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; - *) # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;; + *) + # The compiler driver will combine linker options so we + # cannot just pass the convience library names through + # without $wl, iff we do not link with $LD. + # Luckily, gcc supports the same syntax we need for Sun Studio. + # Supported since Solaris 2.6 (maybe 2.5.1?) + case $wlarc in + '') + whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;; + *) + whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; + esac ;; esac link_all_deplibs_GCJ=yes ;; @@ -15745,36 +17233,45 @@ fi ;; - sysv4.2uw2*) - archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_GCJ=yes - hardcode_minus_L_GCJ=no + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) + no_undefined_flag_GCJ='${wl}-z,text' + archive_cmds_need_lc_GCJ=no hardcode_shlibpath_var_GCJ=no - hardcode_runpath_var=yes - runpath_var=LD_RUN_PATH - ;; + runpath_var='LD_RUN_PATH' - sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) - no_undefined_flag_GCJ='${wl}-z ${wl}text' if test "$GCC" = yes; then - archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else - archive_cmds_GCJ='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var_GCJ=no ;; - sysv5*) - no_undefined_flag_GCJ=' -z text' - # $CC -shared without GNU ld will not create a library from C++ - # object files and a static libstdc++, better avoid it by now - archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - hardcode_libdir_flag_spec_GCJ= + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag_GCJ='${wl}-z,text' + allow_undefined_flag_GCJ='${wl}-z,nodefs' + archive_cmds_need_lc_GCJ=no hardcode_shlibpath_var_GCJ=no + hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator_GCJ=':' + link_all_deplibs_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-Bexport' runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi ;; uts4*) @@ -15789,15 +17286,10 @@ esac fi -echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 -echo "${ECHO_T}$ld_shlibs_GCJ" >&6 +{ echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 +echo "${ECHO_T}$ld_shlibs_GCJ" >&6; } test "$ld_shlibs_GCJ" = no && can_build_shared=no -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - # # Do we need to explicitly link libc? # @@ -15815,8 +17307,8 @@ # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. - echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext @@ -15830,6 +17322,7 @@ libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_GCJ + pic_flag=$lt_prog_compiler_pic_GCJ compiler_flags=-v linker_flags=-v verstring= @@ -15852,86 +17345,20 @@ cat conftest.err 1>&5 fi $rm conftest* - echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 -echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6 + { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6; } ;; esac fi ;; esac -echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 -hardcode_action_GCJ= -if test -n "$hardcode_libdir_flag_spec_GCJ" || \ - test -n "$runpath_var GCJ" || \ - test "X$hardcode_automatic_GCJ"="Xyes" ; then - - # We can hardcode non-existant directories. - if test "$hardcode_direct_GCJ" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && - test "$hardcode_minus_L_GCJ" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action_GCJ=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_GCJ=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_GCJ=unsupported -fi -echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 -echo "${ECHO_T}$hardcode_action_GCJ" >&6 - -if test "$hardcode_action_GCJ" = relink; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - -striplib= -old_striplib= -echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 -echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 -if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - ;; - *) - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - ;; - esac -fi - -echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } library_names_spec= libname_spec='lib$name' soname_spec= -shrext=".so" +shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= @@ -15952,1299 +17379,612 @@ else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix4* | aix5*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi4*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32*) - version_type=windows - shrext=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $rm \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/lib /lib/w32api /usr/lib /usr/local/lib" - ;; - mingw*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - # FIXME: Relying on posixy $() will cause problems for - # cross-compilation, but unfortunately the echo tests do not - # yet detect zsh echo's removal of \ escapes. - library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext='$(test .$module = .yes && echo .so || echo .dylib)' - # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. - if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then - sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` - fi - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd*) - objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.01* | freebsdelf3.01*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - *) # from 3.2 on - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case "$host_cpu" in - ia64*) - shrext='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -nto-qnx) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -openbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -sco3.2v5*) - version_type=osf - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - export_dynamic_flag_spec='${wl}-Blargedynsym' - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -echo "${ECHO_T}$dynamic_linker" >&6 -test "$dynamic_linker" = no && can_build_shared=no - -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dlopen (); -int -main () -{ -dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_dl_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_dl_dlopen=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 -if test $ac_cv_lib_dl_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - -fi - - ;; - - *) - echo "$as_me:$LINENO: checking for shl_load" >&5 -echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 -if test "${ac_cv_func_shl_load+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define shl_load to an innocuous variant, in case declares shl_load. - For example, HP-UX 11i declares gettimeofday. */ -#define shl_load innocuous_shl_load - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char shl_load (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef shl_load - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char shl_load (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_shl_load) || defined (__stub___shl_load) -choke me -#else -char (*f) () = shl_load; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != shl_load; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_shl_load=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_func_shl_load=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 -echo "${ECHO_T}$ac_cv_func_shl_load" >&6 -if test $ac_cv_func_shl_load = yes; then - lt_cv_dlopen="shl_load" -else - echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 -if test "${ac_cv_lib_dld_shl_load+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char shl_load (); -int -main () -{ -shl_load (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_dld_shl_load=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_dld_shl_load=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 -if test $ac_cv_lib_dld_shl_load = yes; then - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" -else - echo "$as_me:$LINENO: checking for dlopen" >&5 -echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 -if test "${ac_cv_func_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define dlopen to an innocuous variant, in case declares dlopen. - For example, HP-UX 11i declares gettimeofday. */ -#define dlopen innocuous_dlopen - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char dlopen (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef dlopen - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dlopen (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_dlopen) || defined (__stub___dlopen) -choke me -#else -char (*f) () = dlopen; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != dlopen; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_func_dlopen=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 -echo "${ECHO_T}$ac_cv_func_dlopen" >&6 -if test $ac_cv_func_dlopen = yes; then - lt_cv_dlopen="dlopen" -else - echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dlopen (); -int -main () -{ -dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_dl_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_dl_dlopen=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 -if test $ac_cv_lib_dl_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 -echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 -if test "${ac_cv_lib_svld_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dlopen (); -int -main () -{ -dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_svld_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_svld_dlopen=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 -if test $ac_cv_lib_svld_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" -else - echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 -echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 -if test "${ac_cv_lib_dld_dld_link+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dld_link (); -int -main () -{ -dld_link (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_dld_dld_link=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_dld_dld_link=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 -if test $ac_cv_lib_dld_dld_link = yes; then - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi +need_lib_prefix=unknown +hardcode_into_libs=no +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown -fi +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; -fi +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; -fi +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; -fi +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes -fi + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='.dylib' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else - enable_dlopen=no + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" +freebsd1*) + dynamic_linker=no + ;; - echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 -echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 -if test "${lt_cv_dlopen_self+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext < -#endif +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + freebsd*) # from 4.6 on + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; -#include +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif +interix3*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; -#ifdef __cplusplus -extern "C" void exit (int); -#endif +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } +# This must be Linux ELF. +linux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes - exit (status); -} -EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_unknown|x*) lt_cv_dlopen_self=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self=no + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi -fi -rm -fr conftest* + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; -fi -echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 -echo "${ECHO_T}$lt_cv_dlopen_self" >&6 +knetbsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; - if test "x$lt_cv_dlopen_self" = xyes; then - LDFLAGS="$LDFLAGS $link_static_flag" - echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 -echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 -if test "${lt_cv_dlopen_self_static+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self_static=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext </dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; -#if HAVE_DLFCN_H -#include -#endif +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; -#include +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; -#ifdef __cplusplus -extern "C" void exit (int); -#endif +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; - exit (status); -} -EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; esac - else : - # compilation failed - lt_cv_dlopen_self_static=no fi -fi -rm -fr conftest* + sys_lib_dlsearch_path_spec='/usr/lib' + ;; +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi -echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 -echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 - fi - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac +{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } +hardcode_action_GCJ= +if test -n "$hardcode_libdir_flag_spec_GCJ" || \ + test -n "$runpath_var_GCJ" || \ + test "X$hardcode_automatic_GCJ" = "Xyes" ; then - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac + # We can hardcode non-existant directories. + if test "$hardcode_direct_GCJ" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && + test "$hardcode_minus_L_GCJ" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_GCJ=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_GCJ=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_GCJ=unsupported +fi +{ echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 +echo "${ECHO_T}$hardcode_action_GCJ" >&6; } - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac +if test "$hardcode_action_GCJ" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless fi @@ -17261,7 +18001,8 @@ # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM SED SHELL \ + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ @@ -17361,6 +18102,12 @@ # The host system. host_alias=$host_alias host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo @@ -17372,6 +18119,9 @@ # A C compiler. LTCC=$lt_LTCC +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + # A language-specific compiler. CC=$lt_compiler_GCJ @@ -17391,7 +18141,7 @@ NM=$lt_NM # A symbol stripping program -STRIP=$STRIP +STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD @@ -17422,7 +18172,7 @@ libext="$libext" # Shared library suffix (normally ".so"). -shrext='$shrext' +shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" @@ -17437,7 +18187,7 @@ # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ -# Must we lock files when doing compilation ? +# Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? @@ -17639,7 +18389,10 @@ # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. - test -f Makefile && make "$ltmain" + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi fi @@ -17657,7 +18410,11 @@ ;; RC) - + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for RC test sources. @@ -17678,15 +18435,42 @@ # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + # Allow CC to be a program name with arguments. compiler=$CC +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${RC-"windres"} compiler=$CC compiler_RC=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + lt_cv_prog_compiler_c_o_RC=yes # The else clause should only fire when bootstrapping the @@ -17702,7 +18486,8 @@ # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM SED SHELL \ + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ @@ -17802,6 +18587,12 @@ # The host system. host_alias=$host_alias host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo @@ -17813,6 +18604,9 @@ # A C compiler. LTCC=$lt_LTCC +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + # A language-specific compiler. CC=$lt_compiler_RC @@ -17832,7 +18626,7 @@ NM=$lt_NM # A symbol stripping program -STRIP=$STRIP +STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD @@ -17863,7 +18657,7 @@ libext="$libext" # Shared library suffix (normally ".so"). -shrext='$shrext' +shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" @@ -17878,7 +18672,7 @@ # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC -# Must we lock files when doing compilation ? +# Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? @@ -18080,7 +18874,10 @@ # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. - test -f Makefile && make "$ltmain" + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi fi @@ -18150,11 +18947,11 @@ -echo "$as_me:$LINENO: checking for shared library suffix" >&5 -echo $ECHO_N "checking for shared library suffix... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for shared library suffix" >&5 +echo $ECHO_N "checking for shared library suffix... $ECHO_C" >&6; } eval "SHLIBEXT=$shrext" -echo "$as_me:$LINENO: result: $SHLIBEXT" >&5 -echo "${ECHO_T}$SHLIBEXT" >&6 +{ echo "$as_me:$LINENO: result: $SHLIBEXT" >&5 +echo "${ECHO_T}$SHLIBEXT" >&6; } SHLIBEXT=$SHLIBEXT @@ -18172,26 +18969,54 @@ -# Check whether --with-llvmsrc or --without-llvmsrc was given. +# Check whether --with-llvmsrc was given. if test "${with_llvmsrc+set}" = set; then - withval="$with_llvmsrc" - LLVM_SRC=$withval + withval=$with_llvmsrc; LLVM_SRC=$withval else LLVM_SRC=`cd ${srcdir}/../..; pwd` -fi; +fi + +ac_config_commands="$ac_config_commands llvm_src" + -# Check whether --with-llvmobj or --without-llvmobj was given. +# Check whether --with-llvmobj was given. if test "${with_llvmobj+set}" = set; then - withval="$with_llvmobj" - LLVM_OBJ=$withval + withval=$with_llvmobj; LLVM_OBJ=$withval else LLVM_OBJ=`cd ../..; pwd` -fi; +fi + +ac_config_commands="$ac_config_commands llvm_obj" + + + +ac_config_commands="$ac_config_commands Makefile" + + +ac_config_commands="$ac_config_commands lib/Makefile" + + +ac_config_commands="$ac_config_commands lib/compiler/Makefile" + + +ac_config_commands="$ac_config_commands lib/runtime/Makefile" + + +ac_config_commands="$ac_config_commands test/Makefile" + + +ac_config_commands="$ac_config_commands tools/Makefile" + + +ac_config_commands="$ac_config_commands tools/stkrc/Makefile" + + + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -18211,39 +19036,58 @@ # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. +# So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -{ +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + (set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; + ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} | + esac | + sort +) | sed ' + /^ac_cv_env_/b end t clear - : clear + :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end - /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - : end' >>confcache -if diff $cache_file confcache >/dev/null 2>&1; then :; else - if test -w $cache_file; then - test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { echo "$as_me:$LINENO: updating cache $cache_file" >&5 +echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else - echo "not updating unwritable cache $cache_file" + { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -18252,63 +19096,48 @@ # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/; -s/:*\${srcdir}:*/:/; -s/:*@srcdir@:*/:/; -s/^\([^=]*=[ ]*\):*/\1/; -s/:*$//; -s/^[^=]*=[ ]*$//; -}' -fi - # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that -# take arguments), then we branch to the quote section. Otherwise, +# take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. -cat >confdef2opt.sed <<\_ACEOF +ac_script=' t clear -: clear -s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g +:clear +s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote -s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g +s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote -d -: quote -s,[ `~#$^&*(){}\\|;'"<>?],\\&,g -s,\[,\\&,g -s,\],\\&,g -s,\$,$$,g -p -_ACEOF -# We use echo to avoid assuming a particular line-breaking character. -# The extra dot is to prevent the shell from consuming trailing -# line-breaks from the sub-command output. A line-break within -# single-quotes doesn't work because, if this script is created in a -# platform that uses two characters for line-breaks (e.g., DOS), tr -# would break. -ac_LF_and_DOT=`echo; echo .` -DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` -rm -f confdef2opt.sed +b any +:quote +s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g +s/\[/\\&/g +s/\]/\\&/g +s/\$/$$/g +H +:any +${ + g + s/^\n// + s/\n/ /g + p +} +' +DEFS=`sed -n "$ac_script" confdefs.h` ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. - ac_i=`echo "$ac_i" | - sed 's/\$U\././;s/\.o$//;s/\.obj$//'` - # 2. Add them. - ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs @@ -18346,11 +19175,35 @@ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi +BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset @@ -18359,8 +19212,43 @@ fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + # Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done PS1='$ ' PS2='> ' PS4='+ ' @@ -18374,18 +19262,19 @@ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - $as_unset $as_var + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -18393,159 +19282,120 @@ # Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - - -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi +# CDPATH. +$as_unset CDPATH - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 -echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop - s,-$,, - s,^['$as_cr_digits']*\n,, + s/-\n.*// ' >$as_me.lineno && - chmod +x $as_me.lineno || - { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 -echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + chmod +x "$as_me.lineno" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" # Exit status is that of the last command. exit } -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.file +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -18554,7 +19404,19 @@ as_mkdir_p=false fi -as_executable_p="test -f" +# Find out whether ``test -x'' works. Don't use a zero-byte file, as +# systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + as_executable_p="test -x" +else + as_executable_p=: +fi +rm -f conf$$.file # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -18563,31 +19425,14 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - exec 6>&1 -# Open the log real soon, to keep \$[0] and so on meaningful, and to +# Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. Logging --version etc. is OK. -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX -} >&5 -cat >&5 <<_CSEOF - -This file was extended by [Stacker] $as_me [1.0], which was -generated by GNU Autoconf 2.59. Invocation command line was +# values after options handling. +ac_log=" +This file was extended by [Stacker] $as_me [2.0], which was +generated by GNU Autoconf 2.60. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -18595,30 +19440,19 @@ CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ -_CSEOF -echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 -echo >&5 +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + _ACEOF +cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. -if test -n "$ac_config_files"; then - echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_headers"; then - echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS -fi +config_files="$ac_config_files" +config_commands="$ac_config_commands" -if test -n "$ac_config_links"; then - echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_commands"; then - echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS -fi +_ACEOF cat >>$CONFIG_STATUS <<\_ACEOF - ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. @@ -18640,18 +19474,20 @@ $config_commands Report bugs to ." -_ACEOF +_ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -[Stacker] config.status [1.0] -configured by $0, generated by GNU Autoconf 2.59, - with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" +[Stacker] config.status [2.0] +configured by $0, generated by GNU Autoconf 2.60, + with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright (C) 2006 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." -srcdir=$srcdir + +ac_pwd='$ac_pwd' +srcdir='$srcdir' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF @@ -18662,60 +19498,42 @@ do case $1 in --*=*) - ac_option=`expr "x$1" : 'x\([^=]*\)='` - ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; - -*) + *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; - *) # This is not an option, so the user has probably given explicit - # arguments. - ac_option=$1 - ac_need_defaults=false;; esac case $ac_option in # Handling of the options. -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; - --version | --vers* | -V ) - echo "$ac_cs_version"; exit 0 ;; - --he | --h) - # Conflict between --help and --header - { { echo "$as_me:$LINENO: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; };; - --help | --hel | -h ) - echo "$ac_cs_usage"; exit 0 ;; - --debug | --d* | -d ) + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" - ac_need_defaults=false;; + --he | --h | --help | --hel | -h ) + echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2;} + -*) { echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; - *) ac_config_targets="$ac_config_targets $1" ;; + *) ac_config_targets="$ac_config_targets $1" + ac_need_defaults=false ;; esac shift @@ -18731,48 +19549,57 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then - echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + CONFIG_SHELL=$SHELL + export CONFIG_SHELL + exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + echo "$ac_log" +} >&5 +_ACEOF cat >>$CONFIG_STATUS <<_ACEOF # -# INIT-COMMANDS section. +# INIT-COMMANDS # - -${srcdir}/autoconf/mkinstalldirs `dirname Makefile` -${srcdir}/autoconf/mkinstalldirs `dirname lib/Makefile` -${srcdir}/autoconf/mkinstalldirs `dirname lib/compiler/Makefile` -${srcdir}/autoconf/mkinstalldirs `dirname lib/runtime/Makefile` -${srcdir}/autoconf/mkinstalldirs `dirname test/Makefile` -${srcdir}/autoconf/mkinstalldirs `dirname tools/Makefile` -${srcdir}/autoconf/mkinstalldirs `dirname tools/stkrc/Makefile` +llvm_src=$LLVM_SRC +llvm_obj=$LLVM_OBJ _ACEOF - - cat >>$CONFIG_STATUS <<\_ACEOF + +# Handling of arguments. for ac_config_target in $ac_config_targets do - case "$ac_config_target" in - # Handling of arguments. - "Makefile.common" ) CONFIG_FILES="$CONFIG_FILES Makefile.common" ;; - "Makefile" ) CONFIG_COMMANDS="$CONFIG_COMMANDS Makefile" ;; - "lib/Makefile" ) CONFIG_COMMANDS="$CONFIG_COMMANDS lib/Makefile" ;; - "lib/compiler/Makefile" ) CONFIG_COMMANDS="$CONFIG_COMMANDS lib/compiler/Makefile" ;; - "lib/runtime/Makefile" ) CONFIG_COMMANDS="$CONFIG_COMMANDS lib/runtime/Makefile" ;; - "test/Makefile" ) CONFIG_COMMANDS="$CONFIG_COMMANDS test/Makefile" ;; - "tools/Makefile" ) CONFIG_COMMANDS="$CONFIG_COMMANDS tools/Makefile" ;; - "tools/stkrc/Makefile" ) CONFIG_COMMANDS="$CONFIG_COMMANDS tools/stkrc/Makefile" ;; + case $ac_config_target in + "Makefile.common") CONFIG_FILES="$CONFIG_FILES Makefile.common" ;; + "llvm_src") CONFIG_COMMANDS="$CONFIG_COMMANDS llvm_src" ;; + "llvm_obj") CONFIG_COMMANDS="$CONFIG_COMMANDS llvm_obj" ;; + "Makefile") CONFIG_COMMANDS="$CONFIG_COMMANDS Makefile" ;; + "lib/Makefile") CONFIG_COMMANDS="$CONFIG_COMMANDS lib/Makefile" ;; + "lib/compiler/Makefile") CONFIG_COMMANDS="$CONFIG_COMMANDS lib/compiler/Makefile" ;; + "lib/runtime/Makefile") CONFIG_COMMANDS="$CONFIG_COMMANDS lib/runtime/Makefile" ;; + "test/Makefile") CONFIG_COMMANDS="$CONFIG_COMMANDS test/Makefile" ;; + "tools/Makefile") CONFIG_COMMANDS="$CONFIG_COMMANDS tools/Makefile" ;; + "tools/stkrc/Makefile") CONFIG_COMMANDS="$CONFIG_COMMANDS tools/stkrc/Makefile" ;; + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done + # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely @@ -18783,471 +19610,443 @@ fi # Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason to put it here, and in addition, +# simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. -# Create a temporary directory, and hook for its removal unless debugging. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. $debug || { - trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } - # Create a (secure) tmp directory for tmp files. { - tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { - tmp=./confstat$$-$RANDOM - (umask 077 && mkdir $tmp) + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } -_ACEOF - -cat >>$CONFIG_STATUS <<_ACEOF - # -# CONFIG_FILES section. +# Set up the sed scripts for CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h -if test -n "\$CONFIG_FILES"; then - # Protect against being on the right side of a sed subst in config.status. - sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; - s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF -s, at SHELL@,$SHELL,;t t -s, at PATH_SEPARATOR@,$PATH_SEPARATOR,;t t -s, at PACKAGE_NAME@,$PACKAGE_NAME,;t t -s, at PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t -s, at PACKAGE_VERSION@,$PACKAGE_VERSION,;t t -s, at PACKAGE_STRING@,$PACKAGE_STRING,;t t -s, at PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t -s, at exec_prefix@,$exec_prefix,;t t -s, at prefix@,$prefix,;t t -s, at program_transform_name@,$program_transform_name,;t t -s, at bindir@,$bindir,;t t -s, at sbindir@,$sbindir,;t t -s, at libexecdir@,$libexecdir,;t t -s, at datadir@,$datadir,;t t -s, at sysconfdir@,$sysconfdir,;t t -s, at sharedstatedir@,$sharedstatedir,;t t -s, at localstatedir@,$localstatedir,;t t -s, at libdir@,$libdir,;t t -s, at includedir@,$includedir,;t t -s, at oldincludedir@,$oldincludedir,;t t -s, at infodir@,$infodir,;t t -s, at mandir@,$mandir,;t t -s, at build_alias@,$build_alias,;t t -s, at host_alias@,$host_alias,;t t -s, at target_alias@,$target_alias,;t t -s, at DEFS@,$DEFS,;t t -s, at ECHO_C@,$ECHO_C,;t t -s, at ECHO_N@,$ECHO_N,;t t -s, at ECHO_T@,$ECHO_T,;t t -s, at LIBS@,$LIBS,;t t -s, at build@,$build,;t t -s, at build_cpu@,$build_cpu,;t t -s, at build_vendor@,$build_vendor,;t t -s, at build_os@,$build_os,;t t -s, at host@,$host,;t t -s, at host_cpu@,$host_cpu,;t t -s, at host_vendor@,$host_vendor,;t t -s, at host_os@,$host_os,;t t -s, at CC@,$CC,;t t -s, at CFLAGS@,$CFLAGS,;t t -s, at LDFLAGS@,$LDFLAGS,;t t -s, at CPPFLAGS@,$CPPFLAGS,;t t -s, at ac_ct_CC@,$ac_ct_CC,;t t -s, at EXEEXT@,$EXEEXT,;t t -s, at OBJEXT@,$OBJEXT,;t t -s, at EGREP@,$EGREP,;t t -s, at LN_S@,$LN_S,;t t -s, at ECHO@,$ECHO,;t t -s, at AR@,$AR,;t t -s, at ac_ct_AR@,$ac_ct_AR,;t t -s, at RANLIB@,$RANLIB,;t t -s, at ac_ct_RANLIB@,$ac_ct_RANLIB,;t t -s, at STRIP@,$STRIP,;t t -s, at ac_ct_STRIP@,$ac_ct_STRIP,;t t -s, at CPP@,$CPP,;t t -s, at CXX@,$CXX,;t t -s, at CXXFLAGS@,$CXXFLAGS,;t t -s, at ac_ct_CXX@,$ac_ct_CXX,;t t -s, at CXXCPP@,$CXXCPP,;t t -s, at F77@,$F77,;t t -s, at FFLAGS@,$FFLAGS,;t t -s, at ac_ct_F77@,$ac_ct_F77,;t t -s, at LIBTOOL@,$LIBTOOL,;t t -s, at SHLIBEXT@,$SHLIBEXT,;t t -s, at LLVM_SRC@,$LLVM_SRC,;t t -s, at LLVM_OBJ@,$LLVM_OBJ,;t t -s, at LIBOBJS@,$LIBOBJS,;t t -s, at LTLIBOBJS@,$LTLIBOBJS,;t t -CEOF - -_ACEOF - - cat >>$CONFIG_STATUS <<\_ACEOF - # Split the substitutions into bite-sized pieces for seds with - # small command number limits, like on Digital OSF/1 and HP-UX. - ac_max_sed_lines=48 - ac_sed_frag=1 # Number of current file. - ac_beg=1 # First line for current file. - ac_end=$ac_max_sed_lines # Line after last line for current file. - ac_more_lines=: - ac_sed_cmds= - while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - else - sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - fi - if test ! -s $tmp/subs.frag; then - ac_more_lines=false - else - # The purpose of the label and of the branching condition is to - # speed up the sed processing (if there are no `@' at all, there - # is no need to browse any of the substitutions). - # These are the two extra sed commands mentioned above. - (echo ':t - /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" - else - ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" - fi - ac_sed_frag=`expr $ac_sed_frag + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_lines` - fi - done - if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat +if test -n "$CONFIG_FILES"; then + +_ACEOF + + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +SHELL!$SHELL$ac_delim +PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim +PACKAGE_NAME!$PACKAGE_NAME$ac_delim +PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim +PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim +PACKAGE_STRING!$PACKAGE_STRING$ac_delim +PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim +exec_prefix!$exec_prefix$ac_delim +prefix!$prefix$ac_delim +program_transform_name!$program_transform_name$ac_delim +bindir!$bindir$ac_delim +sbindir!$sbindir$ac_delim +libexecdir!$libexecdir$ac_delim +datarootdir!$datarootdir$ac_delim +datadir!$datadir$ac_delim +sysconfdir!$sysconfdir$ac_delim +sharedstatedir!$sharedstatedir$ac_delim +localstatedir!$localstatedir$ac_delim +includedir!$includedir$ac_delim +oldincludedir!$oldincludedir$ac_delim +docdir!$docdir$ac_delim +infodir!$infodir$ac_delim +htmldir!$htmldir$ac_delim +dvidir!$dvidir$ac_delim +pdfdir!$pdfdir$ac_delim +psdir!$psdir$ac_delim +libdir!$libdir$ac_delim +localedir!$localedir$ac_delim +mandir!$mandir$ac_delim +DEFS!$DEFS$ac_delim +ECHO_C!$ECHO_C$ac_delim +ECHO_N!$ECHO_N$ac_delim +ECHO_T!$ECHO_T$ac_delim +LIBS!$LIBS$ac_delim +build_alias!$build_alias$ac_delim +host_alias!$host_alias$ac_delim +target_alias!$target_alias$ac_delim +build!$build$ac_delim +build_cpu!$build_cpu$ac_delim +build_vendor!$build_vendor$ac_delim +build_os!$build_os$ac_delim +host!$host$ac_delim +host_cpu!$host_cpu$ac_delim +host_vendor!$host_vendor$ac_delim +host_os!$host_os$ac_delim +CC!$CC$ac_delim +CFLAGS!$CFLAGS$ac_delim +LDFLAGS!$LDFLAGS$ac_delim +CPPFLAGS!$CPPFLAGS$ac_delim +ac_ct_CC!$ac_ct_CC$ac_delim +EXEEXT!$EXEEXT$ac_delim +OBJEXT!$OBJEXT$ac_delim +GREP!$GREP$ac_delim +EGREP!$EGREP$ac_delim +LN_S!$LN_S$ac_delim +ECHO!$ECHO$ac_delim +AR!$AR$ac_delim +RANLIB!$RANLIB$ac_delim +STRIP!$STRIP$ac_delim +CPP!$CPP$ac_delim +CXX!$CXX$ac_delim +CXXFLAGS!$CXXFLAGS$ac_delim +ac_ct_CXX!$ac_ct_CXX$ac_delim +CXXCPP!$CXXCPP$ac_delim +F77!$F77$ac_delim +FFLAGS!$FFLAGS$ac_delim +ac_ct_F77!$ac_ct_F77$ac_delim +LIBTOOL!$LIBTOOL$ac_delim +SHLIBEXT!$SHLIBEXT$ac_delim +LLVM_SRC!$LLVM_SRC$ac_delim +LLVM_OBJ!$LLVM_OBJ$ac_delim +LIBOBJS!$LIBOBJS$ac_delim +LTLIBOBJS!$LTLIBOBJS$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 73; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi -fi # test -n "$CONFIG_FILES" +done +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +:end +s/|#_!!_#|//g +CEOF$ac_eof _ACEOF + + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi + cat >>$CONFIG_STATUS <<\_ACEOF -for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; +fi # test -n "$CONFIG_FILES" + + +for ac_tag in :F $CONFIG_FILES :C $CONFIG_COMMANDS +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 +echo "$as_me: error: Invalid tag $ac_tag." >&2;} + { (exit 1); exit 1; }; };; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + esac + ac_file_inputs="$ac_file_inputs $ac_f" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input="Generated from "`IFS=: + echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + fi + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin";; + esac + ;; esac - # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. - ac_dir=`(dirname "$ac_file") 2>/dev/null || + ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || + while :; do + case $as_dir in #( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } - ac_builddir=. -if test "$ac_dir" != .; then +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac - -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + case $ac_mode in + :F) + # + # CONFIG_FILE + # - if test x"$ac_file" != x-; then - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - rm -f "$ac_file" - fi - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - if test x"$ac_file" = x-; then - configure_input= - else - configure_input="$ac_file. " - fi - configure_input=$configure_input"Generated from `echo $ac_file_in | - sed 's,.*/,,'` by configure." +_ACEOF - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - echo "$f";; - *) # Relative - if test -f "$f"; then - # Build tree - echo "$f" - elif test -f "$srcdir/$f"; then - # Source tree - echo "$srcdir/$f" - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } +cat >>$CONFIG_STATUS <<\_ACEOF +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= + +case `sed -n '/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' $ac_file_inputs` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s, at configure_input@,$configure_input,;t t -s, at srcdir@,$ac_srcdir,;t t -s, at abs_srcdir@,$ac_abs_srcdir,;t t -s, at top_srcdir@,$ac_top_srcdir,;t t -s, at abs_top_srcdir@,$ac_abs_top_srcdir,;t t -s, at builddir@,$ac_builddir,;t t -s, at abs_builddir@,$ac_abs_builddir,;t t -s, at top_builddir@,$ac_top_builddir,;t t -s, at abs_top_builddir@,$ac_abs_top_builddir,;t t -" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out - rm -f $tmp/stdin - if test x"$ac_file" != x-; then - mv $tmp/out $ac_file - else - cat $tmp/out - rm -f $tmp/out - fi - -done -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF - -# -# CONFIG_COMMANDS section. -# -for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue - ac_dest=`echo "$ac_file" | sed 's,:.*,,'` - ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_dir=`(dirname "$ac_dest") 2>/dev/null || -$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_dest" : 'X\(//\)[^/]' \| \ - X"$ac_dest" : 'X\(//\)$' \| \ - X"$ac_dest" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_dest" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; }; } +s&@configure_input@&$configure_input&;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +$ac_datarootdir_hack +" $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} - ac_builddir=. + rm -f "$tmp/stdin" + case $ac_file in + -) cat "$tmp/out"; rm -f "$tmp/out";; + *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; + esac + ;; -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi -case $srcdir in - .) # No --srcdir option. We are building in place. - ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac + :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 +echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac + case $ac_file$ac_mode in + "Makefile":C) ${llvm_src}/autoconf/mkinstalldirs `dirname Makefile` + ${SHELL} ${llvm_src}/autoconf/install-sh -c ${srcdir}/Makefile Makefile ;; + "lib/Makefile":C) ${llvm_src}/autoconf/mkinstalldirs `dirname lib/Makefile` + ${SHELL} ${llvm_src}/autoconf/install-sh -c ${srcdir}/lib/Makefile lib/Makefile ;; + "lib/compiler/Makefile":C) ${llvm_src}/autoconf/mkinstalldirs `dirname lib/compiler/Makefile` + ${SHELL} ${llvm_src}/autoconf/install-sh -c ${srcdir}/lib/compiler/Makefile lib/compiler/Makefile ;; + "lib/runtime/Makefile":C) ${llvm_src}/autoconf/mkinstalldirs `dirname lib/runtime/Makefile` + ${SHELL} ${llvm_src}/autoconf/install-sh -c ${srcdir}/lib/runtime/Makefile lib/runtime/Makefile ;; + "test/Makefile":C) ${llvm_src}/autoconf/mkinstalldirs `dirname test/Makefile` + ${SHELL} ${llvm_src}/autoconf/install-sh -c ${srcdir}/test/Makefile test/Makefile ;; + "tools/Makefile":C) ${llvm_src}/autoconf/mkinstalldirs `dirname tools/Makefile` + ${SHELL} ${llvm_src}/autoconf/install-sh -c ${srcdir}/tools/Makefile tools/Makefile ;; + "tools/stkrc/Makefile":C) ${llvm_src}/autoconf/mkinstalldirs `dirname tools/stkrc/Makefile` + ${SHELL} ${llvm_src}/autoconf/install-sh -c ${srcdir}/tools/stkrc/Makefile tools/stkrc/Makefile ;; - { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 -echo "$as_me: executing $ac_dest commands" >&6;} - case $ac_dest in - Makefile ) ${SHELL} ${srcdir}/autoconf/install-sh -c ${srcdir}/Makefile Makefile ;; - lib/Makefile ) ${SHELL} ${srcdir}/autoconf/install-sh -c ${srcdir}/lib/Makefile lib/Makefile ;; - lib/compiler/Makefile ) ${SHELL} ${srcdir}/autoconf/install-sh -c ${srcdir}/lib/compiler/Makefile lib/compiler/Makefile ;; - lib/runtime/Makefile ) ${SHELL} ${srcdir}/autoconf/install-sh -c ${srcdir}/lib/runtime/Makefile lib/runtime/Makefile ;; - test/Makefile ) ${SHELL} ${srcdir}/autoconf/install-sh -c ${srcdir}/test/Makefile test/Makefile ;; - tools/Makefile ) ${SHELL} ${srcdir}/autoconf/install-sh -c ${srcdir}/tools/Makefile tools/Makefile ;; - tools/stkrc/Makefile ) ${SHELL} ${srcdir}/autoconf/install-sh -c ${srcdir}/tools/stkrc/Makefile tools/stkrc/Makefile ;; esac -done -_ACEOF +done # for ac_tag -cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF From evan.cheng at apple.com Tue May 8 12:04:10 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 8 May 2007 12:04:10 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCRegisterInfo.td Message-ID: <200705081704.l48H4Anf028112@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPCRegisterInfo.td updated: 1.45 -> 1.46 --- Log message: R0 is a sub-register of X0, etc. --- Diffs of the changes: (+3 -3) PPCRegisterInfo.td | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Index: llvm/lib/Target/PowerPC/PPCRegisterInfo.td diff -u llvm/lib/Target/PowerPC/PPCRegisterInfo.td:1.45 llvm/lib/Target/PowerPC/PPCRegisterInfo.td:1.46 --- llvm/lib/Target/PowerPC/PPCRegisterInfo.td:1.45 Tue May 1 00:57:02 2007 +++ llvm/lib/Target/PowerPC/PPCRegisterInfo.td Tue May 8 12:03:51 2007 @@ -22,9 +22,9 @@ } // GP8 - One of the 32 64-bit general-purpose registers -class GP8 : PPCReg { - field bits<5> Num = Alias.Num; - let Aliases = [Alias]; +class GP8 : PPCReg { + field bits<5> Num = SubReg.Num; + let SubRegs = [SubReg]; } // SPR - One of the 32-bit special-purpose registers From evan.cheng at apple.com Tue May 8 12:09:21 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 8 May 2007 10:09:21 -0700 Subject: [llvm-commits] Regalloc Refactoring In-Reply-To: <46408C0B.6000200@obbligato.org> References: <463E6E94.60909@obbligato.org> <46408C0B.6000200@obbligato.org> Message-ID: <4586BB69-600C-4E57-8063-3899E5D5DA0A@apple.com> Sorry, I haven't had a chance to review this. I'll read it today or tomorrow. Evan On May 8, 2007, at 7:41 AM, David Greene wrote: > David A. Greene wrote: >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> This patch splits LiveIntervalAnalysis into separate live interval >> analysis and register coalescing phases to facilitate development >> of new register allocators and coalescing schemes. >> >> It passes all tests that do not also fail in the official, unmodified >> source tree. > > No comment on this yet? In? Out? > > -Dave > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From dalej at apple.com Tue May 8 12:44:55 2007 From: dalej at apple.com (Dale Johannesen) Date: Tue, 8 May 2007 12:44:55 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/ARM/2007-05-07-jumptoentry.ll Message-ID: <200705081744.l48HitJv028891@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/ARM: 2007-05-07-jumptoentry.ll added (r1.1) --- Log message: testcase for CodeGenPrepare bug fixed yesterday --- Diffs of the changes: (+58 -0) 2007-05-07-jumptoentry.ll | 58 ++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 58 insertions(+) Index: llvm/test/CodeGen/ARM/2007-05-07-jumptoentry.ll diff -c /dev/null llvm/test/CodeGen/ARM/2007-05-07-jumptoentry.ll:1.1 *** /dev/null Tue May 8 12:44:46 2007 --- llvm/test/CodeGen/ARM/2007-05-07-jumptoentry.ll Tue May 8 12:44:36 2007 *************** *** 0 **** --- 1,58 ---- + ; RUN: llvm-as < %s | llc | not grep 1_0 + ; This used to create an extra branch to 'entry', LBB1_0. + + ; ModuleID = 'bug.bc' + target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:64:64-v128:128:128-a0:0:64" + target triple = "arm-apple-darwin8" + %struct.HexxagonMove = type { i8, i8, i32 } + %struct.HexxagonMoveList = type { i32, %struct.HexxagonMove* } + + define void @_ZN16HexxagonMoveList8sortListEv(%struct.HexxagonMoveList* %this) { + entry: + %tmp51 = getelementptr %struct.HexxagonMoveList* %this, i32 0, i32 0 ; [#uses=1] + %tmp2 = getelementptr %struct.HexxagonMoveList* %this, i32 0, i32 1 ; <%struct.HexxagonMove**> [#uses=2] + br label %bb49 + + bb1: ; preds = %bb49 + %tmp3 = load %struct.HexxagonMove** %tmp2 ; <%struct.HexxagonMove*> [#uses=5] + %tmp6 = getelementptr %struct.HexxagonMove* %tmp3, i32 %i.1, i32 2 ; [#uses=1] + %tmp7 = load i32* %tmp6 ; [#uses=2] + %tmp12 = add i32 %i.1, 1 ; [#uses=7] + %tmp14 = getelementptr %struct.HexxagonMove* %tmp3, i32 %tmp12, i32 2 ; [#uses=1] + %tmp15 = load i32* %tmp14 ; [#uses=1] + %tmp16 = icmp slt i32 %tmp7, %tmp15 ; [#uses=1] + br i1 %tmp16, label %cond_true, label %bb49 + + cond_true: ; preds = %bb1 + %tmp23.0 = getelementptr %struct.HexxagonMove* %tmp3, i32 %i.1, i32 0 ; [#uses=2] + %tmp67 = load i8* %tmp23.0 ; [#uses=1] + %tmp23.1 = getelementptr %struct.HexxagonMove* %tmp3, i32 %i.1, i32 1 ; [#uses=1] + %tmp68 = load i8* %tmp23.1 ; [#uses=1] + %tmp3638 = getelementptr %struct.HexxagonMove* %tmp3, i32 %tmp12, i32 0 ; [#uses=1] + tail call void @llvm.memcpy.i32( i8* %tmp23.0, i8* %tmp3638, i32 8, i32 4 ) + %tmp41 = load %struct.HexxagonMove** %tmp2 ; <%struct.HexxagonMove*> [#uses=3] + %tmp44.0 = getelementptr %struct.HexxagonMove* %tmp41, i32 %tmp12, i32 0 ; [#uses=1] + store i8 %tmp67, i8* %tmp44.0 + %tmp44.1 = getelementptr %struct.HexxagonMove* %tmp41, i32 %tmp12, i32 1 ; [#uses=1] + store i8 %tmp68, i8* %tmp44.1 + %tmp44.2 = getelementptr %struct.HexxagonMove* %tmp41, i32 %tmp12, i32 2 ; [#uses=1] + store i32 %tmp7, i32* %tmp44.2 + br label %bb49 + + bb49: ; preds = %bb59, %cond_true, %bb1, %entry + %i.1 = phi i32 [ 0, %entry ], [ %tmp12, %bb1 ], [ %tmp12, %cond_true ], [ 0, %bb59 ] ; [#uses=5] + %move.2 = phi i32 [ 0, %entry ], [ 1, %cond_true ], [ %move.2, %bb1 ], [ 0, %bb59 ] ; [#uses=2] + %tmp52 = load i32* %tmp51 ; [#uses=1] + %tmp53 = add i32 %tmp52, -1 ; [#uses=1] + %tmp55 = icmp sgt i32 %tmp53, %i.1 ; [#uses=1] + br i1 %tmp55, label %bb1, label %bb59 + + bb59: ; preds = %bb49 + %tmp61 = icmp eq i32 %move.2, 0 ; [#uses=1] + br i1 %tmp61, label %return, label %bb49 + + return: ; preds = %bb59 + ret void + } + + declare void @llvm.memcpy.i32(i8*, i8*, i32, i32) From dpatel at apple.com Tue May 8 13:08:38 2007 From: dpatel at apple.com (Devang Patel) Date: Tue, 8 May 2007 13:08:38 -0500 Subject: [llvm-commits] CVS: llvm/test/CFrontend/2007-05-08-PCH.c Message-ID: <200705081808.l48I8c3q029303@zion.cs.uiuc.edu> Changes in directory llvm/test/CFrontend: 2007-05-08-PCH.c added (r1.1) --- Log message: New test for PR1400: http://llvm.org/PR1400 --- Diffs of the changes: (+7 -0) 2007-05-08-PCH.c | 7 +++++++ 1 files changed, 7 insertions(+) Index: llvm/test/CFrontend/2007-05-08-PCH.c diff -c /dev/null llvm/test/CFrontend/2007-05-08-PCH.c:1.1 *** /dev/null Tue May 8 13:08:31 2007 --- llvm/test/CFrontend/2007-05-08-PCH.c Tue May 8 13:08:20 2007 *************** *** 0 **** --- 1,7 ---- + // PR 1400 + // RUN: %llvmgcc -x c-header %s -o /dev/null + + int main() { + return 0; + } + From dpatel at apple.com Tue May 8 13:09:28 2007 From: dpatel at apple.com (dpatel at apple.com) Date: Tue, 8 May 2007 11:09:28 -0700 (PDT) Subject: [llvm-commits] [127041] Fix PR1400 Message-ID: <20070508180928.5EDE2192837C@src> Revision: 127041 Author: dpatel Date: 2007-05-08 11:09:27 -0700 (Tue, 08 May 2007) Log Message: ----------- Fix PR1400 Test case http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070507/049420.html Modified Paths: -------------- apple-local/branches/llvm/gcc/llvm-convert.cpp Modified: apple-local/branches/llvm/gcc/llvm-convert.cpp =================================================================== --- apple-local/branches/llvm/gcc/llvm-convert.cpp 2007-05-08 10:44:37 UTC (rev 127040) +++ apple-local/branches/llvm/gcc/llvm-convert.cpp 2007-05-08 18:09:27 UTC (rev 127041) @@ -203,7 +203,7 @@ else // Non constant values, e.g. arguments, are not at global scope. // When PCH is read, only global scope values are used. - ValuesForPCH.push_back(NULL); + ValuesForPCH.push_back(Constant::getNullValue(Type::Int32Ty)); } // Create string table. From dpatel at apple.com Tue May 8 13:24:04 2007 From: dpatel at apple.com (dpatel at apple.com) Date: Tue, 8 May 2007 11:24:04 -0700 (PDT) Subject: [llvm-commits] [127042] If new bit field's starting offset is not at byte boundary Message-ID: <20070508182404.6E572193BA33@src> Revision: 127042 Author: dpatel Date: 2007-05-08 11:24:04 -0700 (Tue, 08 May 2007) Log Message: ----------- If new bit field's starting offset is not at byte boundary _AND_ the field's starting offset is outside already allocated bytes for enclosing structure then - Do not insert PadBytes array if PadBytes are zero. - Update Field size to count PadBits. Modified Paths: -------------- apple-local/branches/llvm/gcc/llvm-types.cpp Modified: apple-local/branches/llvm/gcc/llvm-types.cpp =================================================================== --- apple-local/branches/llvm/gcc/llvm-types.cpp 2007-05-08 18:09:27 UTC (rev 127041) +++ apple-local/branches/llvm/gcc/llvm-types.cpp 2007-05-08 18:24:04 UTC (rev 127042) @@ -1395,15 +1395,18 @@ } else PadBytes = StartOffsetInBits/8-FirstUnallocatedByte; - const Type *Pad = Type::Int8Ty; - if (PadBytes != 1) - Pad = ArrayType::get(Pad, PadBytes); - Info.addElement(Pad, FirstUnallocatedByte, PadBytes); + if (PadBytes) { + const Type *Pad = Type::Int8Ty; + if (PadBytes != 1) + Pad = ArrayType::get(Pad, PadBytes); + Info.addElement(Pad, FirstUnallocatedByte, PadBytes); + } + FirstUnallocatedByte = StartOffsetInBits/8; // This field will use some of the bits from this PadBytes, if // starting offset is not at byte boundry. if (StartOffsetFromByteBoundry != 0) - FieldSizeInBits = PadBits; + FieldSizeInBits += PadBits; } // Now, Field starts at FirstUnallocatedByte and everything is aligned. From evan.cheng at apple.com Tue May 8 13:55:21 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 8 May 2007 13:55:21 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineBasicBlock.h Message-ID: <200705081855.l48ItLMc030482@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: MachineBasicBlock.h updated: 1.62 -> 1.63 --- Log message: Add MachineBasicBlock preds / succs reverse iterators. --- Diffs of the changes: (+24 -0) MachineBasicBlock.h | 24 ++++++++++++++++++++++++ 1 files changed, 24 insertions(+) Index: llvm/include/llvm/CodeGen/MachineBasicBlock.h diff -u llvm/include/llvm/CodeGen/MachineBasicBlock.h:1.62 llvm/include/llvm/CodeGen/MachineBasicBlock.h:1.63 --- llvm/include/llvm/CodeGen/MachineBasicBlock.h:1.62 Fri Mar 23 13:44:11 2007 +++ llvm/include/llvm/CodeGen/MachineBasicBlock.h Tue May 8 13:55:03 2007 @@ -123,17 +123,41 @@ typedef std::vector::const_iterator const_pred_iterator; typedef std::vector::iterator succ_iterator; typedef std::vector::const_iterator const_succ_iterator; + typedef std::vector::reverse_iterator + pred_reverse_iterator; + typedef std::vector::const_reverse_iterator + const_pred_reverse_iterator; + typedef std::vector::reverse_iterator + succ_reverse_iterator; + typedef std::vector::const_reverse_iterator + const_succ_reverse_iterator; pred_iterator pred_begin() { return Predecessors.begin(); } const_pred_iterator pred_begin() const { return Predecessors.begin(); } pred_iterator pred_end() { return Predecessors.end(); } const_pred_iterator pred_end() const { return Predecessors.end(); } + pred_reverse_iterator pred_rbegin() + { return Predecessors.rbegin();} + const_pred_reverse_iterator pred_rbegin() const + { return Predecessors.rbegin();} + pred_reverse_iterator pred_rend() + { return Predecessors.rend(); } + const_pred_reverse_iterator pred_rend() const + { return Predecessors.rend(); } unsigned pred_size() const { return Predecessors.size(); } bool pred_empty() const { return Predecessors.empty(); } succ_iterator succ_begin() { return Successors.begin(); } const_succ_iterator succ_begin() const { return Successors.begin(); } succ_iterator succ_end() { return Successors.end(); } const_succ_iterator succ_end() const { return Successors.end(); } + succ_reverse_iterator succ_rbegin() + { return Successors.rbegin(); } + const_succ_reverse_iterator succ_rbegin() const + { return Successors.rbegin(); } + succ_reverse_iterator succ_rend() + { return Successors.rend(); } + const_succ_reverse_iterator succ_rend() const + { return Successors.rend(); } unsigned succ_size() const { return Successors.size(); } bool succ_empty() const { return Successors.empty(); } From evan.cheng at apple.com Tue May 8 14:00:23 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 8 May 2007 14:00:23 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/LiveVariables.cpp Message-ID: <200705081900.l48J0Nko030641@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: LiveVariables.cpp updated: 1.82 -> 1.83 --- Log message: Eliminate MarkVirtRegAliveInBlock recursion. --- Diffs of the changes: (+17 -4) LiveVariables.cpp | 21 +++++++++++++++++---- 1 files changed, 17 insertions(+), 4 deletions(-) Index: llvm/lib/CodeGen/LiveVariables.cpp diff -u llvm/lib/CodeGen/LiveVariables.cpp:1.82 llvm/lib/CodeGen/LiveVariables.cpp:1.83 --- llvm/lib/CodeGen/LiveVariables.cpp:1.82 Wed May 2 20:11:53 2007 +++ llvm/lib/CodeGen/LiveVariables.cpp Tue May 8 14:00:00 2007 @@ -112,7 +112,8 @@ } void LiveVariables::MarkVirtRegAliveInBlock(VarInfo &VRInfo, - MachineBasicBlock *MBB) { + MachineBasicBlock *MBB, + std::vector &WorkList) { unsigned BBNum = MBB->getNumber(); // Check to see if this basic block is one of the killing blocks. If so, @@ -131,11 +132,23 @@ // Mark the variable known alive in this bb VRInfo.AliveBlocks[BBNum] = true; - for (MachineBasicBlock::const_pred_iterator PI = MBB->pred_begin(), - E = MBB->pred_end(); PI != E; ++PI) - MarkVirtRegAliveInBlock(VRInfo, *PI); + for (MachineBasicBlock::const_pred_reverse_iterator PI = MBB->pred_rbegin(), + E = MBB->pred_rend(); PI != E; ++PI) + WorkList.push_back(*PI); } +void LiveVariables::MarkVirtRegAliveInBlock(VarInfo &VRInfo, + MachineBasicBlock *MBB) { + std::vector WorkList; + MarkVirtRegAliveInBlock(VRInfo, MBB, WorkList); + while (!WorkList.empty()) { + MachineBasicBlock *Pred = WorkList.back(); + WorkList.pop_back(); + MarkVirtRegAliveInBlock(VRInfo, Pred, WorkList); + } +} + + void LiveVariables::HandleVirtRegUse(VarInfo &VRInfo, MachineBasicBlock *MBB, MachineInstr *MI) { assert(VRInfo.DefInst && "Register use before def!"); From evan.cheng at apple.com Tue May 8 14:00:23 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 8 May 2007 14:00:23 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/LiveVariables.h Message-ID: <200705081900.l48J0NRc030639@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: LiveVariables.h updated: 1.45 -> 1.46 --- Log message: Eliminate MarkVirtRegAliveInBlock recursion. --- Diffs of the changes: (+2 -0) LiveVariables.h | 2 ++ 1 files changed, 2 insertions(+) Index: llvm/include/llvm/CodeGen/LiveVariables.h diff -u llvm/include/llvm/CodeGen/LiveVariables.h:1.45 llvm/include/llvm/CodeGen/LiveVariables.h:1.46 --- llvm/include/llvm/CodeGen/LiveVariables.h:1.45 Sun May 6 08:37:16 2007 +++ llvm/include/llvm/CodeGen/LiveVariables.h Tue May 8 14:00:00 2007 @@ -283,6 +283,8 @@ VarInfo &getVarInfo(unsigned RegIdx); void MarkVirtRegAliveInBlock(VarInfo &VRInfo, MachineBasicBlock *BB); + void MarkVirtRegAliveInBlock(VarInfo &VRInfo, MachineBasicBlock *BB, + std::vector &WorkList); void HandleVirtRegUse(VarInfo &VRInfo, MachineBasicBlock *MBB, MachineInstr *MI); }; From isanbard at gmail.com Tue May 8 14:03:04 2007 From: isanbard at gmail.com (Bill Wendling) Date: Tue, 8 May 2007 14:03:04 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/RegAllocLinearScan.cpp RegAllocLocal.cpp Message-ID: <200705081903.l48J34pp030746@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: RegAllocLinearScan.cpp updated: 1.148 -> 1.149 RegAllocLocal.cpp updated: 1.105 -> 1.106 --- Log message: Change names from RA to something unique to get rid of naming conflicts with certain linkers... --- Diffs of the changes: (+42 -38) RegAllocLinearScan.cpp | 36 +++++++++++++++++++----------------- RegAllocLocal.cpp | 44 +++++++++++++++++++++++--------------------- 2 files changed, 42 insertions(+), 38 deletions(-) Index: llvm/lib/CodeGen/RegAllocLinearScan.cpp diff -u llvm/lib/CodeGen/RegAllocLinearScan.cpp:1.148 llvm/lib/CodeGen/RegAllocLinearScan.cpp:1.149 --- llvm/lib/CodeGen/RegAllocLinearScan.cpp:1.148 Wed May 2 20:11:53 2007 +++ llvm/lib/CodeGen/RegAllocLinearScan.cpp Tue May 8 14:02:46 2007 @@ -47,9 +47,9 @@ static unsigned numIterations = 0; static unsigned numIntervals = 0; - struct VISIBILITY_HIDDEN RA : public MachineFunctionPass { + struct VISIBILITY_HIDDEN RALinScan : public MachineFunctionPass { static char ID; - RA() : MachineFunctionPass((intptr_t)&ID) {} + RALinScan() : MachineFunctionPass((intptr_t)&ID) {} typedef std::pair IntervalPtr; typedef std::vector IntervalPtrs; @@ -149,10 +149,10 @@ } } }; - char RA::ID = 0; + char RALinScan::ID = 0; } -void RA::ComputeRelatedRegClasses() { +void RALinScan::ComputeRelatedRegClasses() { const MRegisterInfo &MRI = *mri_; // First pass, add all reg classes to the union, and determine at least one @@ -187,7 +187,7 @@ RelatedRegClasses.unionSets(I->second, OneClassForEachPhysReg[*AS]); } -bool RA::runOnMachineFunction(MachineFunction &fn) { +bool RALinScan::runOnMachineFunction(MachineFunction &fn) { mf_ = &fn; tm_ = &fn.getTarget(); mri_ = tm_->getRegisterInfo(); @@ -222,7 +222,7 @@ /// initIntervalSets - initialize the interval sets. /// -void RA::initIntervalSets() +void RALinScan::initIntervalSets() { assert(unhandled_.empty() && fixed_.empty() && active_.empty() && inactive_.empty() && @@ -237,7 +237,7 @@ } } -void RA::linearScan() +void RALinScan::linearScan() { // linear scan algorithm DOUT << "********** LINEAR SCAN **********\n"; @@ -317,7 +317,7 @@ /// processActiveIntervals - expire old intervals and move non-overlapping ones /// to the inactive list. -void RA::processActiveIntervals(unsigned CurPoint) +void RALinScan::processActiveIntervals(unsigned CurPoint) { DOUT << "\tprocessing active intervals:\n"; @@ -363,7 +363,7 @@ /// processInactiveIntervals - expire old intervals and move overlapping /// ones to the active list. -void RA::processInactiveIntervals(unsigned CurPoint) +void RALinScan::processInactiveIntervals(unsigned CurPoint) { DOUT << "\tprocessing inactive intervals:\n"; @@ -412,16 +412,18 @@ Weights[*as] += weight; } -static RA::IntervalPtrs::iterator FindIntervalInVector(RA::IntervalPtrs &IP, - LiveInterval *LI) { - for (RA::IntervalPtrs::iterator I = IP.begin(), E = IP.end(); I != E; ++I) +static +RALinScan::IntervalPtrs::iterator +FindIntervalInVector(RALinScan::IntervalPtrs &IP, LiveInterval *LI) { + for (RALinScan::IntervalPtrs::iterator I = IP.begin(), E = IP.end(); + I != E; ++I) if (I->first == LI) return I; return IP.end(); } -static void RevertVectorIteratorsTo(RA::IntervalPtrs &V, unsigned Point) { +static void RevertVectorIteratorsTo(RALinScan::IntervalPtrs &V, unsigned Point){ for (unsigned i = 0, e = V.size(); i != e; ++i) { - RA::IntervalPtr &IP = V[i]; + RALinScan::IntervalPtr &IP = V[i]; LiveInterval::iterator I = std::upper_bound(IP.first->begin(), IP.second, Point); if (I != IP.first->begin()) --I; @@ -431,7 +433,7 @@ /// assignRegOrStackSlotAtInterval - assign a register if one is available, or /// spill. -void RA::assignRegOrStackSlotAtInterval(LiveInterval* cur) +void RALinScan::assignRegOrStackSlotAtInterval(LiveInterval* cur) { DOUT << "\tallocating current interval: "; @@ -752,7 +754,7 @@ /// getFreePhysReg - return a free physical register for this virtual register /// interval if we have one, otherwise return 0. -unsigned RA::getFreePhysReg(LiveInterval *cur) { +unsigned RALinScan::getFreePhysReg(LiveInterval *cur) { std::vector inactiveCounts(mri_->getNumRegs(), 0); unsigned MaxInactiveCount = 0; @@ -821,5 +823,5 @@ } FunctionPass* llvm::createLinearScanRegisterAllocator() { - return new RA(); + return new RALinScan(); } Index: llvm/lib/CodeGen/RegAllocLocal.cpp diff -u llvm/lib/CodeGen/RegAllocLocal.cpp:1.105 llvm/lib/CodeGen/RegAllocLocal.cpp:1.106 --- llvm/lib/CodeGen/RegAllocLocal.cpp:1.105 Wed May 2 20:11:53 2007 +++ llvm/lib/CodeGen/RegAllocLocal.cpp Tue May 8 14:02:46 2007 @@ -42,10 +42,10 @@ createLocalRegisterAllocator); - class VISIBILITY_HIDDEN RA : public MachineFunctionPass { + class VISIBILITY_HIDDEN RALocal : public MachineFunctionPass { public: static char ID; - RA() : MachineFunctionPass((intptr_t)&ID) {} + RALocal() : MachineFunctionPass((intptr_t)&ID) {} private: const TargetMachine *TM; MachineFunction *MF; @@ -228,12 +228,12 @@ void reloadPhysReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator &I, unsigned PhysReg); }; - char RA::ID = 0; + char RALocal::ID = 0; } /// getStackSpaceFor - This allocates space for the specified virtual register /// to be held on the stack. -int RA::getStackSpaceFor(unsigned VirtReg, const TargetRegisterClass *RC) { +int RALocal::getStackSpaceFor(unsigned VirtReg, const TargetRegisterClass *RC) { // Find the location Reg would belong... std::map::iterator I =StackSlotForVirtReg.lower_bound(VirtReg); @@ -253,7 +253,7 @@ /// removePhysReg - This method marks the specified physical register as no /// longer being in use. /// -void RA::removePhysReg(unsigned PhysReg) { +void RALocal::removePhysReg(unsigned PhysReg) { PhysRegsUsed[PhysReg] = -1; // PhyReg no longer used std::vector::iterator It = @@ -267,8 +267,9 @@ /// virtual register slot specified by VirtReg. It then updates the RA data /// structures to indicate the fact that PhysReg is now available. /// -void RA::spillVirtReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, - unsigned VirtReg, unsigned PhysReg) { +void RALocal::spillVirtReg(MachineBasicBlock &MBB, + MachineBasicBlock::iterator I, + unsigned VirtReg, unsigned PhysReg) { assert(VirtReg && "Spilling a physical register is illegal!" " Must not have appropriate kill for the register or use exists beyond" " the intended one."); @@ -300,8 +301,8 @@ /// then the request is ignored if the physical register does not contain a /// virtual register. /// -void RA::spillPhysReg(MachineBasicBlock &MBB, MachineInstr *I, - unsigned PhysReg, bool OnlyVirtRegs) { +void RALocal::spillPhysReg(MachineBasicBlock &MBB, MachineInstr *I, + unsigned PhysReg, bool OnlyVirtRegs) { if (PhysRegsUsed[PhysReg] != -1) { // Only spill it if it's used! assert(PhysRegsUsed[PhysReg] != -2 && "Non allocable reg used!"); if (PhysRegsUsed[PhysReg] || !OnlyVirtRegs) @@ -334,7 +335,7 @@ /// that PhysReg is the proper container for VirtReg now. The physical /// register must not be used for anything else when this is called. /// -void RA::assignVirtToPhysReg(unsigned VirtReg, unsigned PhysReg) { +void RALocal::assignVirtToPhysReg(unsigned VirtReg, unsigned PhysReg) { assert(PhysRegsUsed[PhysReg] == -1 && "Phys reg already assigned!"); // Update information to note the fact that this register was just used, and // it holds VirtReg. @@ -348,7 +349,7 @@ /// and available for use. This also includes checking to see if aliased /// registers are all free... /// -bool RA::isPhysRegAvailable(unsigned PhysReg) const { +bool RALocal::isPhysRegAvailable(unsigned PhysReg) const { if (PhysRegsUsed[PhysReg] != -1) return false; // If the selected register aliases any other allocated registers, it is @@ -364,7 +365,7 @@ /// getFreeReg - Look to see if there is a free register available in the /// specified register class. If not, return 0. /// -unsigned RA::getFreeReg(const TargetRegisterClass *RC) { +unsigned RALocal::getFreeReg(const TargetRegisterClass *RC) { // Get iterators defining the range of registers that are valid to allocate in // this class, which also specifies the preferred allocation order. TargetRegisterClass::iterator RI = RC->allocation_order_begin(*MF); @@ -383,8 +384,9 @@ /// use. If there is currently a value in it, it is either moved out of the way /// or spilled to memory. /// -void RA::liberatePhysReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator &I, - unsigned PhysReg) { +void RALocal::liberatePhysReg(MachineBasicBlock &MBB, + MachineBasicBlock::iterator &I, + unsigned PhysReg) { spillPhysReg(MBB, I, PhysReg); } @@ -393,8 +395,8 @@ /// register. If all compatible physical registers are used, this method spills /// the last used virtual register to the stack, and uses that register. /// -unsigned RA::getReg(MachineBasicBlock &MBB, MachineInstr *I, - unsigned VirtReg) { +unsigned RALocal::getReg(MachineBasicBlock &MBB, MachineInstr *I, + unsigned VirtReg) { const TargetRegisterClass *RC = MF->getSSARegMap()->getRegClass(VirtReg); // First check to see if we have a free register of the requested type... @@ -470,8 +472,8 @@ /// subsequent instructions can use the reloaded value. This method returns the /// modified instruction. /// -MachineInstr *RA::reloadVirtReg(MachineBasicBlock &MBB, MachineInstr *MI, - unsigned OpNum) { +MachineInstr *RALocal::reloadVirtReg(MachineBasicBlock &MBB, MachineInstr *MI, + unsigned OpNum) { unsigned VirtReg = MI->getOperand(OpNum).getReg(); // If the virtual register is already available, just update the instruction @@ -522,7 +524,7 @@ -void RA::AllocateBasicBlock(MachineBasicBlock &MBB) { +void RALocal::AllocateBasicBlock(MachineBasicBlock &MBB) { // loop over each instruction MachineBasicBlock::iterator MII = MBB.begin(); const TargetInstrInfo &TII = *TM->getInstrInfo(); @@ -776,7 +778,7 @@ /// runOnMachineFunction - Register allocate the whole function /// -bool RA::runOnMachineFunction(MachineFunction &Fn) { +bool RALocal::runOnMachineFunction(MachineFunction &Fn) { DOUT << "Machine Function " << "\n"; MF = &Fn; TM = &Fn.getTarget(); @@ -812,5 +814,5 @@ } FunctionPass *llvm::createLocalRegisterAllocator() { - return new RA(); + return new RALocal(); } From sabre at nondot.org Tue May 8 15:08:24 2007 From: sabre at nondot.org (Chris Lattner) Date: Tue, 8 May 2007 15:08:24 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/LICM/scalar_promote.ll Message-ID: <200705082008.l48K8OKB032125@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/LICM: scalar_promote.ll updated: 1.7 -> 1.8 --- Log message: add the & back. I'm not sure why bill removed it. --- Diffs of the changes: (+1 -1) scalar_promote.ll | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/test/Transforms/LICM/scalar_promote.ll diff -u llvm/test/Transforms/LICM/scalar_promote.ll:1.7 llvm/test/Transforms/LICM/scalar_promote.ll:1.8 --- llvm/test/Transforms/LICM/scalar_promote.ll:1.7 Tue May 8 02:49:07 2007 +++ llvm/test/Transforms/LICM/scalar_promote.ll Tue May 8 15:08:06 2007 @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -licm -stats | \ +; RUN: llvm-upgrade < %s | llvm-as | opt -licm -stats |& \ ; RUN: grep {memory locations promoted to register} %X = global int 7 From isanbard at gmail.com Tue May 8 15:10:56 2007 From: isanbard at gmail.com (Bill) Date: Tue, 8 May 2007 13:10:56 -0700 Subject: [llvm-commits] CVS: llvm/test/Transforms/LICM/scalar_promote.ll In-Reply-To: <200705082008.l48K8OKB032125@zion.cs.uiuc.edu> References: <200705082008.l48K8OKB032125@zion.cs.uiuc.edu> Message-ID: <16e5fdf90705081310j480d580cs3cc9f5741b1408d8@mail.gmail.com> On 5/8/07, Chris Lattner wrote: > > add the & back. I'm not sure why bill removed it. > That test was failing for me last night, and it seemed like that was part of the problem. Also, I didn't see the |& in other places... Oh well. -bw From clattner at apple.com Tue May 8 15:15:09 2007 From: clattner at apple.com (Chris Lattner) Date: Tue, 8 May 2007 13:15:09 -0700 Subject: [llvm-commits] CVS: llvm/test/Transforms/LICM/scalar_promote.ll In-Reply-To: <16e5fdf90705081310j480d580cs3cc9f5741b1408d8@mail.gmail.com> References: <200705082008.l48K8OKB032125@zion.cs.uiuc.edu> <16e5fdf90705081310j480d580cs3cc9f5741b1408d8@mail.gmail.com> Message-ID: On May 8, 2007, at 1:10 PM, Bill wrote: > On 5/8/07, Chris Lattner wrote: >> >> add the & back. I'm not sure why bill removed it. >> > That test was failing for me last night, and it seemed like that was > part of the problem. Also, I didn't see the |& in other places... tcl shell uses c-shell syntax. This test wants to grep stderr, so it uses |&. -Chris From isanbard at gmail.com Tue May 8 15:20:11 2007 From: isanbard at gmail.com (Bill) Date: Tue, 8 May 2007 13:20:11 -0700 Subject: [llvm-commits] CVS: llvm/test/Transforms/LICM/scalar_promote.ll In-Reply-To: References: <200705082008.l48K8OKB032125@zion.cs.uiuc.edu> <16e5fdf90705081310j480d580cs3cc9f5741b1408d8@mail.gmail.com> Message-ID: <16e5fdf90705081320l656b81fcy6b5078d28b7e733a@mail.gmail.com> Ah! Gotcha. On 5/8/07, Chris Lattner wrote: > On May 8, 2007, at 1:10 PM, Bill wrote: > > On 5/8/07, Chris Lattner wrote: > >> > >> add the & back. I'm not sure why bill removed it. > >> > > That test was failing for me last night, and it seemed like that was > > part of the problem. Also, I didn't see the |& in other places... > > tcl shell uses c-shell syntax. This test wants to grep stderr, so it > uses |&. > > -Chris > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > From evan.cheng at apple.com Tue May 8 16:04:26 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 8 May 2007 16:04:26 -0500 Subject: [llvm-commits] CVS: llvm/utils/TableGen/DAGISelEmitter.cpp Message-ID: <200705082104.l48L4QEO000656@zion.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: DAGISelEmitter.cpp updated: 1.294 -> 1.295 --- Log message: If a PredicateOperand has an empty ExecuteAlways field, treat it as if a normal operand for isel. --- Diffs of the changes: (+9 -4) DAGISelEmitter.cpp | 13 +++++++++---- 1 files changed, 9 insertions(+), 4 deletions(-) Index: llvm/utils/TableGen/DAGISelEmitter.cpp diff -u llvm/utils/TableGen/DAGISelEmitter.cpp:1.294 llvm/utils/TableGen/DAGISelEmitter.cpp:1.295 --- llvm/utils/TableGen/DAGISelEmitter.cpp:1.294 Thu Apr 26 12:03:22 2007 +++ llvm/utils/TableGen/DAGISelEmitter.cpp Tue May 8 16:04:07 2007 @@ -775,8 +775,10 @@ Record *OperandNode = Inst.getOperand(i); // If the instruction expects a predicate operand, we codegen this by - // setting the predicate to it's "execute always" value. - if (OperandNode->isSubClassOf("PredicateOperand")) + // setting the predicate to it's "execute always" value if it has a + // non-empty ExecuteAlways field. + if (OperandNode->isSubClassOf("PredicateOperand") && + !ISE.getPredicateOperand(OperandNode).AlwaysOps.empty()) continue; // Verify that we didn't run out of provided operands. @@ -2801,8 +2803,11 @@ InstOpNo != II.OperandList.size(); ++InstOpNo) { std::vector Ops; - // If this is a normal operand, emit it. - if (!II.OperandList[InstOpNo].Rec->isSubClassOf("PredicateOperand")) { + // If this is a normal operand or a predicate operand without + // 'execute always', emit it. + Record *OperandNode = II.OperandList[InstOpNo].Rec; + if (!OperandNode->isSubClassOf("PredicateOperand") || + ISE.getPredicateOperand(OperandNode).AlwaysOps.empty()) { Ops = EmitResultCode(N->getChild(ChildNo), RetSelected, InFlagDecled, ResNodeDecled); AllOps.insert(AllOps.end(), Ops.begin(), Ops.end()); From evan.cheng at apple.com Tue May 8 16:05:42 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 8 May 2007 16:05:42 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/Target.td Message-ID: <200705082105.l48L5gtd000698@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target: Target.td updated: 1.99 -> 1.100 --- Log message: PredicateOperand can be used as a normal operand for isel. --- Diffs of the changes: (+1 -1) Target.td | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Target/Target.td diff -u llvm/lib/Target/Target.td:1.99 llvm/lib/Target/Target.td:1.100 --- llvm/lib/Target/Target.td:1.99 Fri May 4 15:38:40 2007 +++ llvm/lib/Target/Target.td Tue May 8 16:05:24 2007 @@ -254,7 +254,7 @@ /// instruction. OpTypes specifies the MIOperandInfo for the operand, and /// AlwaysVal specifies the value of this predicate when set to "always /// execute". -class PredicateOperand : Operand { +class PredicateOperand : Operand { let MIOperandInfo = OpTypes; dag ExecuteAlways = AlwaysVal; } From evan.cheng at apple.com Tue May 8 16:06:25 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 8 May 2007 16:06:25 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCInstrInfo.td Message-ID: <200705082106.l48L6Pbh000727@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPCInstrInfo.td updated: 1.277 -> 1.278 --- Log message: PredicateOperand can be used as a normal operand for isel. --- Diffs of the changes: (+1 -1) PPCInstrInfo.td | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Target/PowerPC/PPCInstrInfo.td diff -u llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.277 llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.278 --- llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.277 Tue Apr 3 05:27:07 2007 +++ llvm/lib/Target/PowerPC/PPCInstrInfo.td Tue May 8 16:06:08 2007 @@ -272,7 +272,7 @@ // PowerPC Predicate operand. 20 = (0<<5)|20 = always, CR0 is a dummy reg // that doesn't matter. -def pred : PredicateOperand<(ops imm, CRRC), (ops (i32 20), CR0)> { +def pred : PredicateOperand { let PrintMethod = "printPredicateOperand"; } From evan.cheng at apple.com Tue May 8 16:09:01 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 8 May 2007 16:09:01 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMAsmPrinter.cpp ARMInstrInfo.td ARMInstrThumb.td ARMInstrVFP.td Message-ID: <200705082109.l48L91MC000789@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: ARMAsmPrinter.cpp updated: 1.72 -> 1.73 ARMInstrInfo.td updated: 1.99 -> 1.100 ARMInstrThumb.td updated: 1.25 -> 1.26 ARMInstrVFP.td updated: 1.4 -> 1.5 --- Log message: Switch BCC, MOVCCr, etc. to PredicateOperand. --- Diffs of the changes: (+22 -17) ARMAsmPrinter.cpp | 4 ++-- ARMInstrInfo.td | 23 ++++++++++++++--------- ARMInstrThumb.td | 4 ++-- ARMInstrVFP.td | 8 ++++---- 4 files changed, 22 insertions(+), 17 deletions(-) Index: llvm/lib/Target/ARM/ARMAsmPrinter.cpp diff -u llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.72 llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.73 --- llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.72 Thu May 3 18:30:36 2007 +++ llvm/lib/Target/ARM/ARMAsmPrinter.cpp Tue May 8 16:08:43 2007 @@ -101,7 +101,7 @@ void printThumbAddrModeS2Operand(const MachineInstr *MI, int OpNo); void printThumbAddrModeS4Operand(const MachineInstr *MI, int OpNo); void printThumbAddrModeSPOperand(const MachineInstr *MI, int OpNo); - void printCCOperand(const MachineInstr *MI, int opNum); + void printPredicateOperand(const MachineInstr *MI, int opNum); void printPCLabel(const MachineInstr *MI, int opNum); void printRegisterList(const MachineInstr *MI, int opNum); void printCPInstOperand(const MachineInstr *MI, int opNum, @@ -613,7 +613,7 @@ O << "]"; } -void ARMAsmPrinter::printCCOperand(const MachineInstr *MI, int opNum) { +void ARMAsmPrinter::printPredicateOperand(const MachineInstr *MI, int opNum) { int CC = (int)MI->getOperand(opNum).getImmedValue(); O << ARMCondCodeToString((ARMCC::CondCodes)CC); } Index: llvm/lib/Target/ARM/ARMInstrInfo.td diff -u llvm/lib/Target/ARM/ARMInstrInfo.td:1.99 llvm/lib/Target/ARM/ARMInstrInfo.td:1.100 --- llvm/lib/Target/ARM/ARMInstrInfo.td:1.99 Fri Apr 27 19:36:37 2007 +++ llvm/lib/Target/ARM/ARMInstrInfo.td Tue May 8 16:08:43 2007 @@ -162,11 +162,6 @@ // Branch target. def brtarget : Operand; -// Operand for printing out a condition code. -def CCOp : Operand { - let PrintMethod = "printCCOperand"; -} - // A list of registers separated by comma. Used by load/store multiple. def reglist : Operand { let PrintMethod = "printRegisterList"; @@ -282,6 +277,16 @@ let MIOperandInfo = (ops GPR, i32imm); } +// ARM branch / cmov condition code operand. +def ccop : PredicateOperand { + let PrintMethod = "printPredicateOperand"; +} + +// ARM Predicate operand. Default to 14 = always (AL). +def pred : PredicateOperand { + let PrintMethod = "printPredicateOperand"; +} + //===----------------------------------------------------------------------===// // ARM Instruction flags. These need to match ARMInstrInfo.h. // @@ -579,7 +584,7 @@ } let isBranch = 1, isTerminator = 1, noResults = 1, isBarrier = 1 in - def Bcc : AI<(ops brtarget:$dst, CCOp:$cc), "b$cc $dst", + def Bcc : AI<(ops brtarget:$dst, ccop:$cc), "b$cc $dst", [(ARMbrcond bb:$dst, imm:$cc)]>; //===----------------------------------------------------------------------===// @@ -1041,17 +1046,17 @@ // Conditional moves -def MOVCCr : AI<(ops GPR:$dst, GPR:$false, GPR:$true, CCOp:$cc), +def MOVCCr : AI<(ops GPR:$dst, GPR:$false, GPR:$true, ccop:$cc), "mov$cc $dst, $true", [(set GPR:$dst, (ARMcmov GPR:$false, GPR:$true, imm:$cc))]>, RegConstraint<"$false = $dst">; -def MOVCCs : AI<(ops GPR:$dst, GPR:$false, so_reg:$true, CCOp:$cc), +def MOVCCs : AI<(ops GPR:$dst, GPR:$false, so_reg:$true, ccop:$cc), "mov$cc $dst, $true", [(set GPR:$dst, (ARMcmov GPR:$false, so_reg:$true,imm:$cc))]>, RegConstraint<"$false = $dst">; -def MOVCCi : AI<(ops GPR:$dst, GPR:$false, so_imm:$true, CCOp:$cc), +def MOVCCi : AI<(ops GPR:$dst, GPR:$false, so_imm:$true, ccop:$cc), "mov$cc $dst, $true", [(set GPR:$dst, (ARMcmov GPR:$false, so_imm:$true,imm:$cc))]>, RegConstraint<"$false = $dst">; Index: llvm/lib/Target/ARM/ARMInstrThumb.td diff -u llvm/lib/Target/ARM/ARMInstrThumb.td:1.25 llvm/lib/Target/ARM/ARMInstrThumb.td:1.26 --- llvm/lib/Target/ARM/ARMInstrThumb.td:1.25 Tue May 1 15:27:19 2007 +++ llvm/lib/Target/ARM/ARMInstrThumb.td Tue May 8 16:08:43 2007 @@ -207,7 +207,7 @@ } let isBranch = 1, isTerminator = 1, noResults = 1, isBarrier = 1 in - def tBcc : TI<(ops brtarget:$dst, CCOp:$cc), "b$cc $dst", + def tBcc : TI<(ops brtarget:$dst, ccop:$cc), "b$cc $dst", [(ARMbrcond bb:$dst, imm:$cc)]>; //===----------------------------------------------------------------------===// @@ -503,7 +503,7 @@ // Expanded by the scheduler into a branch sequence. let usesCustomDAGSchedInserter = 1 in // Expanded by the scheduler. def tMOVCCr : - PseudoInst<(ops GPR:$dst, GPR:$false, GPR:$true, CCOp:$cc), + PseudoInst<(ops GPR:$dst, GPR:$false, GPR:$true, ccop:$cc), "@ tMOVCCr $cc", [(set GPR:$dst, (ARMcmov GPR:$false, GPR:$true, imm:$cc))]>; Index: llvm/lib/Target/ARM/ARMInstrVFP.td diff -u llvm/lib/Target/ARM/ARMInstrVFP.td:1.4 llvm/lib/Target/ARM/ARMInstrVFP.td:1.5 --- llvm/lib/Target/ARM/ARMInstrVFP.td:1.4 Mon May 7 16:29:41 2007 +++ llvm/lib/Target/ARM/ARMInstrVFP.td Tue May 8 16:08:43 2007 @@ -344,22 +344,22 @@ // FP Conditional moves. // -def FCPYDcc : ADI<(ops DPR:$dst, DPR:$false, DPR:$true, CCOp:$cc), +def FCPYDcc : ADI<(ops DPR:$dst, DPR:$false, DPR:$true, ccop:$cc), "fcpyd$cc $dst, $true", [(set DPR:$dst, (ARMcmov DPR:$false, DPR:$true, imm:$cc))]>, RegConstraint<"$false = $dst">; -def FCPYScc : ASI<(ops SPR:$dst, SPR:$false, SPR:$true, CCOp:$cc), +def FCPYScc : ASI<(ops SPR:$dst, SPR:$false, SPR:$true, ccop:$cc), "fcpys$cc $dst, $true", [(set SPR:$dst, (ARMcmov SPR:$false, SPR:$true, imm:$cc))]>, RegConstraint<"$false = $dst">; -def FNEGDcc : ADI<(ops DPR:$dst, DPR:$false, DPR:$true, CCOp:$cc), +def FNEGDcc : ADI<(ops DPR:$dst, DPR:$false, DPR:$true, ccop:$cc), "fnegd$cc $dst, $true", [(set DPR:$dst, (ARMcneg DPR:$false, DPR:$true, imm:$cc))]>, RegConstraint<"$false = $dst">; -def FNEGScc : ASI<(ops SPR:$dst, SPR:$false, SPR:$true, CCOp:$cc), +def FNEGScc : ASI<(ops SPR:$dst, SPR:$false, SPR:$true, ccop:$cc), "fnegs$cc $dst, $true", [(set SPR:$dst, (ARMcneg SPR:$false, SPR:$true, imm:$cc))]>, RegConstraint<"$false = $dst">; From bwendlin at apple.com Tue May 8 16:48:47 2007 From: bwendlin at apple.com (bwendlin at apple.com) Date: Tue, 8 May 2007 14:48:47 -0700 (PDT) Subject: [llvm-commits] [127059] Use "--" instead of "-" for command line options. Message-ID: <20070508214847.E21EB19DF326@src> Revision: 127059 Author: bwendlin Date: 2007-05-08 14:48:47 -0700 (Tue, 08 May 2007) Log Message: ----------- Use "--" instead of "-" for command line options. Modified Paths: -------------- apple-local/branches/llvm/build_gcc Modified: apple-local/branches/llvm/build_gcc =================================================================== --- apple-local/branches/llvm/build_gcc 2007-05-08 21:01:22 UTC (rev 127058) +++ apple-local/branches/llvm/build_gcc 2007-05-08 21:48:47 UTC (rev 127059) @@ -160,7 +160,7 @@ # These are the configure and build flags that are used. # APPLE LOCAL begin LLVM Support for non /usr $DEST_ROOT, use libstdc++ -CONFIGFLAGS="--disable-checking -enable-werror \ +CONFIGFLAGS="--disable-checking --enable-werror \ --prefix=$DEST_ROOT \ --mandir=$DEST_ROOT/share/man \ --enable-languages=c,objc,c++,obj-c++ \ From dpatel at apple.com Tue May 8 18:23:00 2007 From: dpatel at apple.com (dpatel at apple.com) Date: Tue, 8 May 2007 16:23:00 -0700 (PDT) Subject: [llvm-commits] [127060] Add missing undefs. Message-ID: <20070508232300.A39931A3661E@src> Revision: 127060 Author: dpatel Date: 2007-05-08 16:23:00 -0700 (Tue, 08 May 2007) Log Message: ----------- Add missing undefs. Patch by Reid. Modified Paths: -------------- apple-local/branches/llvm/gcc/c-common.c Modified: apple-local/branches/llvm/gcc/c-common.c =================================================================== --- apple-local/branches/llvm/gcc/c-common.c 2007-05-08 21:48:47 UTC (rev 127059) +++ apple-local/branches/llvm/gcc/c-common.c 2007-05-08 23:23:00 UTC (rev 127060) @@ -3545,6 +3545,8 @@ #undef DEF_FUNCTION_TYPE_2 #undef DEF_FUNCTION_TYPE_3 #undef DEF_FUNCTION_TYPE_4 +#undef DEF_FUNCTION_TYPE_5 +#undef DEF_FUNCTION_TYPE_6 #undef DEF_FUNCTION_TYPE_VAR_0 #undef DEF_FUNCTION_TYPE_VAR_1 #undef DEF_FUNCTION_TYPE_VAR_2 From tonic at nondot.org Tue May 8 18:41:53 2007 From: tonic at nondot.org (Tanya Lattner) Date: Tue, 8 May 2007 18:41:53 -0500 Subject: [llvm-commits] [release_20] CVS: llvm/lib/Target/PowerPC/PPCRegisterInfo.td Message-ID: <200705082341.l48Nfrwp004109@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPCRegisterInfo.td updated: 1.45 -> 1.45.2.1 --- Log message: Merging from mainline. PR1399: http://llvm.org/PR1399 fix. --- Diffs of the changes: (+3 -3) PPCRegisterInfo.td | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Index: llvm/lib/Target/PowerPC/PPCRegisterInfo.td diff -u llvm/lib/Target/PowerPC/PPCRegisterInfo.td:1.45 llvm/lib/Target/PowerPC/PPCRegisterInfo.td:1.45.2.1 --- llvm/lib/Target/PowerPC/PPCRegisterInfo.td:1.45 Tue May 1 00:57:02 2007 +++ llvm/lib/Target/PowerPC/PPCRegisterInfo.td Tue May 8 18:41:39 2007 @@ -22,9 +22,9 @@ } // GP8 - One of the 32 64-bit general-purpose registers -class GP8 : PPCReg { - field bits<5> Num = Alias.Num; - let Aliases = [Alias]; +class GP8 : PPCReg { + field bits<5> Num = SubReg.Num; + let SubRegs = [SubReg]; } // SPR - One of the 32-bit special-purpose registers From reid at x10sys.com Tue May 8 23:20:17 2007 From: reid at x10sys.com (Reid Spencer) Date: Tue, 8 May 2007 23:20:17 -0500 Subject: [llvm-commits] CVS: llvm-www/DevMtgMay2007.html Message-ID: <200705090420.l494KHOh010988@zion.cs.uiuc.edu> Changes in directory llvm-www: DevMtgMay2007.html updated: 1.120 -> 1.121 --- Log message: Too late to request a T-Shirt or offer to present. --- Diffs of the changes: (+1 -14) DevMtgMay2007.html | 15 +-------------- 1 files changed, 1 insertion(+), 14 deletions(-) Index: llvm-www/DevMtgMay2007.html diff -u llvm-www/DevMtgMay2007.html:1.120 llvm-www/DevMtgMay2007.html:1.121 --- llvm-www/DevMtgMay2007.html:1.120 Thu May 3 17:11:12 2007 +++ llvm-www/DevMtgMay2007.html Tue May 8 23:19:59 2007 @@ -59,19 +59,6 @@ to win a prize! Please see the Name page for the current list of entries, naming rules, booty you can get and other details. The name may be decided at this meeting!

-

T-SHIRTS!: T-Shirts will be available - at the meeting but only if you pre-order your size. Send your size (S,M,L,XL) to - Reid Spencer so they can be - ordered in time for the meeting. The T-shirts will be good quality (heavy - cotton) and have a small LLVM related phrase on the front. There is no cost - for these T-Shirts as their cost is being donated to LLVM. But we will ask - you to make a donation to LLVM at the - meeting. If you want a T-Shirt but can't make it to the meeting, please - let Reid know. You will have to pay for shipping only.

-

CALL FOR PRESENTATIONS: This meeting is for you and by you. If you - have an LLVM related topic idea (even if you don't plan to present it), - please send it in. We need work group topics as well as people who would - like to present something. No idea is a bad one!

@@ -366,6 +353,6 @@ src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"> Valid HTML 4.01! -
Last modified: $Date: 2007/05/03 22:11:12 $ +
Last modified: $Date: 2007/05/09 04:19:59 $ From reid at x10sys.com Tue May 8 23:44:32 2007 From: reid at x10sys.com (Reid Spencer) Date: Tue, 8 May 2007 23:44:32 -0500 Subject: [llvm-commits] CVS: llvm-www/DevMtgMay2007.html Message-ID: <200705090444.l494iWox011383@zion.cs.uiuc.edu> Changes in directory llvm-www: DevMtgMay2007.html updated: 1.121 -> 1.122 --- Log message: First draft of schedule. --- Diffs of the changes: (+126 -135) DevMtgMay2007.html | 261 +++++++++++++++++++++++++---------------------------- 1 files changed, 126 insertions(+), 135 deletions(-) Index: llvm-www/DevMtgMay2007.html diff -u llvm-www/DevMtgMay2007.html:1.121 llvm-www/DevMtgMay2007.html:1.122 --- llvm-www/DevMtgMay2007.html:1.121 Tue May 8 23:19:59 2007 +++ llvm-www/DevMtgMay2007.html Tue May 8 23:44:14 2007 @@ -44,18 +44,15 @@
-

WHO IS INVITED: Everyone is invited to participate and present. If you - would like to present, please send your ideas to - Reid Spencer so they can be - incorporated on this page.

-

HOW TO REGISTER: You can attend for free just by sending an email to - LLVM Developers Mail List +

WHO IS INVITED: Everyone is invited to participate.

+

HOW TO REGISTER: You can attend for free just by sending an email + to LLVM Developers Mail List indicating that you'd like to attend. Your name will be added below.

NAME THAT COMPILER!: As mentioned in Chris Lattner's email, - we are looking for an umbrella name for the collection of compiler, tool chain - and virtual machine related things that we call LLVM today. Here's your chance + we are looking for an umbrella name for the collection of compiler, tool chain + and virtual machine related things that we call LLVM today. Here's your chance to win a prize! Please see the Name page for the current list of entries, naming rules, booty you can get and other details. The name may be decided at this meeting!

@@ -71,135 +68,129 @@ preliminary agenda. That said, here's roughly how we think the meeting will go (all times approximate):

- - - - - - - - - - - - -
StartStopDescription
08:0008:45Meet - Greet
08:4509:00Session 0: LLVM History
09:0010:30Session 1: Introductions
10:3011:00Break - Informal Discussions
11:0012:00Session 2: Learning LLVM
12:0013:00Lunch Break
13:0015:00Session 3: Using LLVM
15:0015:30Break - Informal Discussions
15:3017:00Session 4: Improving LLVM
17:0018:00Wrap up - Social Time
18:0021:00Dinner (Optional)
-
- - -
-

During this brief session, Vikram Adve and Chris Lattner (the originators - of LLVM) will present a brief and casual history of how LLVM got from an idea - in the back of Chris' brain in 2000 to an up-and-coming Open Source project in - 2007.

-

Also featured in this session will be a brief talk by Oscar describing his - plans for world domination.

-
- - -
-

This time is reserved for in-depth introductions of everyone attending - the meeting. The thing you all wanted most was to get to know one another. - So, here's your chance. You have 2-3 minutes to tell us who you are, what - you do, how much you love LLVM, why you work with it, or anything else you - want to say.

-
- - -
-

This session will provide presentations about LLVM. Most everyone at the - meeting will be somewhat familiar with LLVM (if not experts) so if you're - inclined to submit something for this session, find something unique, perhaps - a little known secret, an idiom you use, tips and tricks, tools you use with - LLVM, that tutorial you gave last week, etc.

- - - - - - - - - - -
SpeakerTopic
Evan ChengBack end talk
Nick LewyckyDesign and implementation of the PredicateSimplifier pass, or, - "VRP in LLVM"
Devang PatelDemystifying the LLVM Pass Manager
Reid SpencerThe Goal of HLVM
Evan ChengRegister Allocator overview and future work (15 min talk)
-
+

Session 0:
Introductions

+ StartStopWhoDescription + 08:0008:45Everyone + Meet and Greet. Social time, get your coffee, etc. + + 08:4509:00 + Vikram Adve
Chris Lattner + LLVM History. During this brief session, Vikram and Chris + (the originators of LLVM) will present a brief history of how LLVM + got from an idea in the back of Chris' + brain in 2000 to an up-and-coming Open Source project in 2007. + + 09:0010:00Everyone + Introductions. This time is reserved for everyone to introduce + themselves. The conference poll indicated that the thing you wanted most + was to get to know one another. So, here's your chance. You have 1 + minute to tell us twho you are, what you do, how much you love LLVM, why + you work with it, or anything else you want to say. The time is yours. + + +

Break

10:0010:30Everyone + Disscussions. Now that you know a little about everyone else, + take some time to have some discussions and make connections. Group + photo at 10:25. +

Session 1:
Learning LLVM

+ StartStopSpeakerDescription + 10:3010:50Devang Patel + Demystifying The LLVM Pass Manager. The PassManager, which + manages the execution of all LLVM passes, was recently revised to be + simpler and more useful. This talk will help you understand what the new + pass manager does and how to use it. + + 10:5511:10Evan Cheng + LLVM Register Allocator. An overview + of the current register allocator design and changes to it that are + coming in the future. + + 11:1511:35Nick Lewycky + Introduction To Predicate Simplifier. A review of the design and + implementation of LLVM's Predicate Simplifier Pass, otherwise known + as VRP (Value Range Propagation). + + + 11:4012:00Reid Spencer + HLVM: LLVM's New Component. An overview of HLVM, its current + status and its goals after integration with LLVM. We will discuss the + integration of HLVM into LLVM, its future as an LLVM sub-project, and + plans for making LLVM more accesible to scripting and higher level + language front ends. + +

Lunch

12:0013:00Everyone + Thanks to a generous sponsor, lunch will be catered. - -
-

This session will cover some of the novel ways in which LLVM is currently - being used. If you use LLVM, please consider making a presentation in this - session. -

- - - - - - - - - - - -
SpeakerTopic
Chris Lattner - Apple Inc.Using LLVM to improve OpenGL
Sarah Thompson - NASA, Ames Research CenterUsing LLVM to support model checking, symbolic execution and static - analysis
Scott MichelBuilding The Cell BE Symbiotic Processor Element - Backend: Practice and Experience
John CriswellUIUC Research, TBA
Jeff CohenUsing LLVM in the Jolt compiler
-
+

Session 2:
Using LLVM

+ StartStopSpeakerDescription + + 13:0013:30Sarah Thompson + Using LLVM At NASA. A review of how Ames Research Center, NASA + is using LLVM to support model checking, symbolic execution and static + analysis of NASA software. + + 13:3014:00Scott Michel + The Cell BE Symbiotic Processor Element Backend. A presentation + of the practice and experience that resulted from Aerospace's + implementation of an LLVM back-end Target for the Cell BE Symbiotic + Processor Element. + + 14:0014:30John Criswell + UIUC Research - TBD + + 14:3015:00Steve Naroff + Objective-C. Improvements to the Objective-C front end. + +

Break

15:0015:30Everyone + Inter-session afternoon break (yes, napping's allowed at this one). + + - -
-

This time is reserved for specific LLVM technical issues that need to be - addressed. Everyone should submit their ideas here, from pet peeves to - wishful fantasies. What do you think LLVM lacks? Where does it need to go - from here? This session will consist of a 5 minute presentation by the issue - originator followed by 10 minutes of discussion. This will allow 6 issues to - be discussed in this time slot.

- - - - - - - -
Suggested ByIssue Description
Owen AndersonIntegration of HLVM into LLVM - its - future as an LLVM sub-project, and plans for making LLVM more accessible - to scripting and higher level language front ends.
Christopher LambConcurrency Primitives - for multi-threaded - shared memory models. Though I don't claim to be any sort of expert - myself, I've spent some time looking over the Java Memory Model revision - and discussions and I think it would be worth discussing similar issues - with regards to LLVM.
Reid SpencerDo we want an LLVM road map? - does the - development community care to disclose and maintain advance information - bout what is being worked on? A page listing Bugzilla #, Title, Owner, - and Expected Release would give new users an idea of what is being worked - on. The details of each new feature could be tracked in - Bugzilla.
Reid SpencerPick a name for LLVM - - We would like to resolve this. If there's a clear winner (show of hands) - then we'll adopt it, otherwise we'll keep waiting for the perfect - name
Steve NaroffObjc front-end improvements - 30 minute presentation
-
+

Session 4:
Discussions

+ StartStopLeaderDescription + + 15:3015:45Chrisopher Lamb + Concurrency Primitives. For multi-threaded shared memory + models. Though I don't claim to be any sort of expert myself, I've + spent some time looking over the Java Memory Model revision and + discussions and I think it would be worth discussing similar issues + with regards to LLVM. + + 15:4516:00Reid Spencer + LLVM Roadmap. Does the development community care to disclose + and maintain advance information about what is being worked on? A page + listing Bugzilla #, Title, Owner, and Expected Release would give new + users an idea of what is being worked on. The details of each new + feature could be tracked in Bugzilla. + + 16:0016:20Chris Lattner + Adoption Goals. While our adoption has increased greatly + recently, we're still tiny compared to other compiler and virtual + machine systems. What are our future growth and adoption plans? What + can we as individuals and as a community do to increase adoption and + mind share? + + 16:2016:40Reid Spencer + Project Management. Right now, we have an Oversight Group. Do + we want more organization? Can UIUC continue to provide the services + that we need as we grow to 100 active developers? Should there be an + LLVM Foundation to represent the community in our future? + + 16:4015:00Chris Lattner + Name That Project. LLVM is becoming a collection of compiler + related libraries and needs a new "umbrella" name. Many names were + suggested. Let's see if we can reach a consensus on a name. + - -
-

In addition to the planned sessions above, the following discussion topics - have been submitted.

- - - - - - -
Suggested ByIssue or Discussion Topic
Owen AndersonFuture development practices: with a - burgeoning number of clients and wider adoption, do we want more organized - development practices? i.e. release focuses or something?
Owen AndersonAdoption Goals: while our adoption has - increased greatly recently, we're still tiny compared to GCC. What are our - future growth and adoption plans?
Owen AndersonProject Management: We have an oversight - group right now. Do we want more organization? Corporate interest have - given us some great things, but sometimes secrecy makes things - difficult for those not involved; should there be an LLVM Foundation - in our (distant?) future?
Devang PatelUsing Bugpoint: How to use the bugpoint - tool to identify misoptimizations and bad code gen bugs.
+

Wrap Up

17:0018:00Everyone + This is some + "spill" time (a concept you should be familiar with). If we don't + need it then it's social time. +

Dinner

18:0021:00Everyone + (Optional). Those who want to go for dinner (pay your own way) + should try to get to the restaurant by 6pm. + +
@@ -353,6 +344,6 @@ src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"> Valid HTML 4.01! -
Last modified: $Date: 2007/05/09 04:19:59 $ +
Last modified: $Date: 2007/05/09 04:44:14 $ From reid at x10sys.com Tue May 8 23:49:31 2007 From: reid at x10sys.com (Reid Spencer) Date: Tue, 8 May 2007 23:49:31 -0500 Subject: [llvm-commits] CVS: llvm-www/DevMtgMay2007.html Message-ID: <200705090449.l494nV6W011569@zion.cs.uiuc.edu> Changes in directory llvm-www: DevMtgMay2007.html updated: 1.122 -> 1.123 --- Log message: Format to make the sessions/breaks more distinct. --- Diffs of the changes: (+9 -9) DevMtgMay2007.html | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-) Index: llvm-www/DevMtgMay2007.html diff -u llvm-www/DevMtgMay2007.html:1.122 llvm-www/DevMtgMay2007.html:1.123 --- llvm-www/DevMtgMay2007.html:1.122 Tue May 8 23:44:14 2007 +++ llvm-www/DevMtgMay2007.html Tue May 8 23:48:39 2007 @@ -68,11 +68,11 @@ preliminary agenda. That said, here's roughly how we think the meeting will go (all times approximate):

- - - + + + - + @@ -118,7 +118,7 @@ plans for making LLVM more accesible to scripting and higher level language front ends. - + @@ -141,7 +141,7 @@ - + @@ -182,11 +182,11 @@ suggested. Let's see if we can reach a consensus on a name. - + - + @@ -344,6 +344,6 @@ src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!">Valid HTML 4.01! -
Last modified: $Date: 2007/05/09 04:44:14 $ +
Last modified: $Date: 2007/05/09 04:48:39 $ From reid at x10sys.com Tue May 8 23:51:23 2007 From: reid at x10sys.com (Reid Spencer) Date: Tue, 8 May 2007 23:51:23 -0500 Subject: [llvm-commits] CVS: llvm-www/DevMtgMay2007.html Message-ID: <200705090451.l494pNfu011680@zion.cs.uiuc.edu> Changes in directory llvm-www: DevMtgMay2007.html updated: 1.123 -> 1.124 --- Log message: Session 3? We don' need no stinkin' Session 3. --- Diffs of the changes: (+2 -2) DevMtgMay2007.html | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm-www/DevMtgMay2007.html diff -u llvm-www/DevMtgMay2007.html:1.123 llvm-www/DevMtgMay2007.html:1.124 --- llvm-www/DevMtgMay2007.html:1.123 Tue May 8 23:48:39 2007 +++ llvm-www/DevMtgMay2007.html Tue May 8 23:51:04 2007 @@ -146,7 +146,7 @@ - + @@ -344,6 +344,6 @@ src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!">Valid HTML 4.01! -
Last modified: $Date: 2007/05/09 04:48:39 $ +
Last modified: $Date: 2007/05/09 04:51:04 $ From reid at x10sys.com Tue May 8 23:54:33 2007 From: reid at x10sys.com (Reid Spencer) Date: Tue, 8 May 2007 23:54:33 -0500 Subject: [llvm-commits] CVS: llvm-www/DevMtgMay2007.html Message-ID: <200705090454.l494sXHH011803@zion.cs.uiuc.edu> Changes in directory llvm-www: DevMtgMay2007.html updated: 1.124 -> 1.125 --- Log message: Get the rowspan thingy right. --- Diffs of the changes: (+3 -3) DevMtgMay2007.html | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Index: llvm-www/DevMtgMay2007.html diff -u llvm-www/DevMtgMay2007.html:1.124 llvm-www/DevMtgMay2007.html:1.125 --- llvm-www/DevMtgMay2007.html:1.124 Tue May 8 23:51:04 2007 +++ llvm-www/DevMtgMay2007.html Tue May 8 23:54:15 2007 @@ -71,7 +71,7 @@ - + @@ -92,7 +92,7 @@ - + - + - + - + @@ -355,6 +358,6 @@ src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!">Valid HTML 4.01! -
Last modified: $Date: 2007/05/12 00:17:26 $ +
Last modified: $Date: 2007/05/12 10:37:03 $ From reid at x10sys.com Sat May 12 06:07:57 2007 From: reid at x10sys.com (Reid Spencer) Date: Sat, 12 May 2007 06:07:57 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/IntrinsicLowering.cpp Message-ID: <200705121107.l4CB7vG1027280@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: IntrinsicLowering.cpp updated: 1.81 -> 1.82 --- Log message: Get the size of auto arrays right, regardless of its changing size. --- Diffs of the changes: (+13 -11) IntrinsicLowering.cpp | 24 +++++++++++++----------- 1 files changed, 13 insertions(+), 11 deletions(-) Index: llvm/lib/CodeGen/IntrinsicLowering.cpp diff -u llvm/lib/CodeGen/IntrinsicLowering.cpp:1.81 llvm/lib/CodeGen/IntrinsicLowering.cpp:1.82 --- llvm/lib/CodeGen/IntrinsicLowering.cpp:1.81 Mon Apr 16 17:21:14 2007 +++ llvm/lib/CodeGen/IntrinsicLowering.cpp Sat May 12 06:07:40 2007 @@ -403,11 +403,12 @@ } // Return a call to the implementation function - Value *Args[3]; - Args[0] = CI->getOperand(1); - Args[1] = CI->getOperand(2); - Args[2] = CI->getOperand(3); - return new CallInst(F, Args, 3, CI->getName(), CI); + Value *Args[] = { + CI->getOperand(1), + CI->getOperand(2), + CI->getOperand(3) + }; + return new CallInst(F, Args, sizeof(Args)/sizeof(Args[0]), CI->getName(), CI); } /// Convert the llvm.part.set.iX.iY.iZ intrinsic. This intrinsic takes @@ -591,12 +592,13 @@ } // Return a call to the implementation function - Value *Args[3]; - Args[0] = CI->getOperand(1); - Args[1] = CI->getOperand(2); - Args[2] = CI->getOperand(3); - Args[3] = CI->getOperand(4); - return new CallInst(F, Args, 4, CI->getName(), CI); + Value *Args[] = { + CI->getOperand(1), + CI->getOperand(2), + CI->getOperand(3), + CI->getOperand(4) + }; + return new CallInst(F, Args, sizeof(Args)/sizeof(Args[0]), CI->getName(), CI); } From reid at x10sys.com Sat May 12 06:13:51 2007 From: reid at x10sys.com (Reid Spencer) Date: Sat, 12 May 2007 06:13:51 -0500 Subject: [llvm-commits] CVS: llvm-test/SingleSource/UnitTests/Integer/test4.reference_output Message-ID: <200705121113.l4CBDpkX027417@zion.cs.uiuc.edu> Changes in directory llvm-test/SingleSource/UnitTests/Integer: test4.reference_output updated: 1.1 -> 1.2 --- Log message: Update for change in program output. --- Diffs of the changes: (+4 -2) test4.reference_output | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) Index: llvm-test/SingleSource/UnitTests/Integer/test4.reference_output diff -u llvm-test/SingleSource/UnitTests/Integer/test4.reference_output:1.1 llvm-test/SingleSource/UnitTests/Integer/test4.reference_output:1.2 --- llvm-test/SingleSource/UnitTests/Integer/test4.reference_output:1.1 Sat Apr 21 12:51:54 2007 +++ llvm-test/SingleSource/UnitTests/Integer/test4.reference_output Sat May 12 06:13:33 2007 @@ -1,3 +1,5 @@ -1111111111111111111111111111111111111111111111111111111111111111 -11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 +concat(i25,i39)=1111111111111111111111111111111111111111111111111111111111111111 +n1 = 11111111111111111111111111111111111111111111111111111111111111111111 +n2 = 00001111111111111111111111111111111111111111111111111111111111111111 +concat(i68 n2, i60 -1)=00001111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 exit 0 From reid at x10sys.com Sat May 12 06:14:17 2007 From: reid at x10sys.com (Reid Spencer) Date: Sat, 12 May 2007 06:14:17 -0500 Subject: [llvm-commits] CVS: llvm-test/SingleSource/UnitTests/Integer/test_part_set.c test_part_set.reference_output Message-ID: <200705121114.l4CBEHls027436@zion.cs.uiuc.edu> Changes in directory llvm-test/SingleSource/UnitTests/Integer: test_part_set.c added (r1.1) test_part_set.reference_output added (r1.1) --- Log message: Add a new test case. --- Diffs of the changes: (+20 -0) test_part_set.c | 19 +++++++++++++++++++ test_part_set.reference_output | 1 + 2 files changed, 20 insertions(+) Index: llvm-test/SingleSource/UnitTests/Integer/test_part_set.c diff -c /dev/null llvm-test/SingleSource/UnitTests/Integer/test_part_set.c:1.1 *** /dev/null Sat May 12 06:14:10 2007 --- llvm-test/SingleSource/UnitTests/Integer/test_part_set.c Sat May 12 06:14:00 2007 *************** *** 0 **** --- 1,19 ---- + #include "bits.h" + + uint68 test_part_set(uint68 x, uint60 y) + { + return part_set(x, y, 0, (bitwidthof(y)-1)); + } + + uint1 test_reduce(uint68 x) + { + return reduce(or, x); + } + + int main(int argc, char** argv) { + uint68 A = 0xF0F0F0F0F0F0F0F0ULL; + uint60 B = 0x0F0F0F0F0F0F0F0FULL; + uint68 X = test_part_set(A, B); + uint1 Y = test_reduce(X); + return (int) Y; + } Index: llvm-test/SingleSource/UnitTests/Integer/test_part_set.reference_output diff -c /dev/null llvm-test/SingleSource/UnitTests/Integer/test_part_set.reference_output:1.1 *** /dev/null Sat May 12 06:14:17 2007 --- llvm-test/SingleSource/UnitTests/Integer/test_part_set.reference_output Sat May 12 06:14:00 2007 *************** *** 0 **** --- 1 ---- + exit 1 From reid at x10sys.com Sat May 12 13:00:12 2007 From: reid at x10sys.com (Reid Spencer) Date: Sat, 12 May 2007 13:00:12 -0500 Subject: [llvm-commits] CVS: llvm/test/ExecutionEngine/2007-05-12-APInt-Shl.ll Message-ID: <200705121800.l4CI0CWT001952@zion.cs.uiuc.edu> Changes in directory llvm/test/ExecutionEngine: 2007-05-12-APInt-Shl.ll added (r1.1) --- Log message: Add a test case for shl of APInt integers > 64 bits by 0 shift amount. --- Diffs of the changes: (+30 -0) 2007-05-12-APInt-Shl.ll | 30 ++++++++++++++++++++++++++++++ 1 files changed, 30 insertions(+) Index: llvm/test/ExecutionEngine/2007-05-12-APInt-Shl.ll diff -c /dev/null llvm/test/ExecutionEngine/2007-05-12-APInt-Shl.ll:1.1 *** /dev/null Sat May 12 13:00:05 2007 --- llvm/test/ExecutionEngine/2007-05-12-APInt-Shl.ll Sat May 12 12:59:55 2007 *************** *** 0 **** --- 1,30 ---- + ; RUN: llvm-as %s -f -o %t.bc + ; RUN: lli -force-interpreter=true %t.bc | tee %t.out | grep 10 + + ; Test that APInt shift left works when bitwidth > 64 and shiftamt == 0 + + declare i32 @putchar(i32) + + define void @putBit(i65 %x, i65 %bitnum) { + %tmp1 = shl i65 1, %bitnum + %tmp2 = and i65 %x, %tmp1 + %cond = icmp ne i65 %tmp2, 0 + br i1 %cond, label %cond_true, label %cond_false + + cond_true: + call i32 @putchar(i32 49) + br label %cond_next + + cond_false: + call i32 @putchar(i32 48) + br label %cond_next + + cond_next: + ret void + } + + define i32 @main() { + call void @putBit(i65 1, i65 0) + call void @putBit(i65 0, i65 0) + ret i32 0 + } From reid at x10sys.com Sat May 12 13:02:15 2007 From: reid at x10sys.com (Reid Spencer) Date: Sat, 12 May 2007 13:02:15 -0500 Subject: [llvm-commits] CVS: llvm/lib/Support/APInt.cpp Message-ID: <200705121802.l4CI2F8f002004@zion.cs.uiuc.edu> Changes in directory llvm/lib/Support: APInt.cpp updated: 1.79 -> 1.80 --- Log message: Fix shl to produce the correct result when the bitwidth is > 64 and the shift amount is 0. Previously this code would do a lshr by the bit width which can lead to incorrect results. --- Diffs of the changes: (+6 -0) APInt.cpp | 6 ++++++ 1 files changed, 6 insertions(+) Index: llvm/lib/Support/APInt.cpp diff -u llvm/lib/Support/APInt.cpp:1.79 llvm/lib/Support/APInt.cpp:1.80 --- llvm/lib/Support/APInt.cpp:1.79 Thu May 3 13:15:36 2007 +++ llvm/lib/Support/APInt.cpp Sat May 12 13:01:57 2007 @@ -1199,6 +1199,12 @@ if (shiftAmt == BitWidth) return APInt(BitWidth, 0); + // If none of the bits are shifted out, the result is *this. This avoids a + // lshr by the words size in the loop below which can produce incorrect + // results. It also avoids the expensive computation below for a common case. + if (shiftAmt == 0) + return *this; + // Create some space for the result. uint64_t * val = new uint64_t[getNumWords()]; From reid at x10sys.com Sat May 12 13:41:30 2007 From: reid at x10sys.com (Reid Spencer) Date: Sat, 12 May 2007 13:41:30 -0500 Subject: [llvm-commits] CVS: llvm-test/SingleSource/UnitTests/Integer/part_select.c part_select.reference_output Message-ID: <200705121841.l4CIfU77002744@zion.cs.uiuc.edu> Changes in directory llvm-test/SingleSource/UnitTests/Integer: part_select.c updated: 1.4 -> 1.5 part_select.reference_output updated: 1.2 -> 1.3 --- Log message: Make the output easier to validate. --- Diffs of the changes: (+65 -53) part_select.c | 25 ++++++++--- part_select.reference_output | 93 +++++++++++++++++++++---------------------- 2 files changed, 65 insertions(+), 53 deletions(-) Index: llvm-test/SingleSource/UnitTests/Integer/part_select.c diff -u llvm-test/SingleSource/UnitTests/Integer/part_select.c:1.4 llvm-test/SingleSource/UnitTests/Integer/part_select.c:1.5 --- llvm-test/SingleSource/UnitTests/Integer/part_select.c:1.4 Tue Apr 17 19:53:49 2007 +++ llvm-test/SingleSource/UnitTests/Integer/part_select.c Sat May 12 13:41:12 2007 @@ -17,10 +17,10 @@ #ifdef ENABLE_LARGE_INTEGERS typedef uint256 BitType; -const BitType X = 0xFEDCBA9876543210ULL; +const BitType X = 0xAAAAAAAAAAAAAAAAULL; #else typedef uint47 BitType; -const BitType X = 0xFEDCBA9876543210ULL; +const BitType X = 0xAAAAAAAAAAAAAAAAULL; #endif int main(int argc, char** argv) @@ -37,15 +37,26 @@ unsigned i, j; for (i = 0; i < bitwidthof(BitType); ++i) { - BitType left = rand() % bitwidthof(BitType); - BitType right = i; - printf("part_select(Y, %3u, %3u) = ", (unsigned)left, (unsigned)right); - BitType Z = part_select(Y, right, left ); + BitType high = rand() % bitwidthof(BitType); + BitType low = i; + printf("part_select(Y, %3u, %3u) = ", (unsigned)low, (unsigned)high); + BitType Z = part_select(Y, low, high ); printBits(Z); uint64_t val = Z; - printf(" (%lx)", val); + printf(" (%llx)", val); printf("\n"); } + BitType Z = part_select(Y, 0, bitwidthof(Y)-1); + if (Z == Y) + printf(" True: "); + else + printf("False: "); + printBits(Z); + printf(" == "); + printBits(Y); + printf("\n"); + + return 0; } Index: llvm-test/SingleSource/UnitTests/Integer/part_select.reference_output diff -u llvm-test/SingleSource/UnitTests/Integer/part_select.reference_output:1.2 llvm-test/SingleSource/UnitTests/Integer/part_select.reference_output:1.3 --- llvm-test/SingleSource/UnitTests/Integer/part_select.reference_output:1.2 Mon Feb 12 17:17:34 2007 +++ llvm-test/SingleSource/UnitTests/Integer/part_select.reference_output Sat May 12 13:41:12 2007 @@ -1,48 +1,49 @@ -part_select(Y, 38, 0) = 00000000001100001110110010101000011001000010000 (76543210) -part_select(Y, 4, 1) = 00000000000000000000000000000000000000000001000 (8) -part_select(Y, 18, 2) = 00000000000000000000000000000010000110010000100 (10c84) -part_select(Y, 23, 3) = 00000000000000000000000000010101000011001000010 (a8642) -part_select(Y, 17, 4) = 00000000000000000000000000000000000001100100001 (321) -part_select(Y, 26, 5) = 00000000000000000000000001100101010000110010000 (32a190) -part_select(Y, 16, 6) = 00000000000000000000000000000000000000011001000 (c8) -part_select(Y, 3, 7) = 00000000000000000000000000000000000000000001000 (8) -part_select(Y, 28, 8) = 00000000000000000000000000101100101010000110010 (165432) -part_select(Y, 28, 9) = 00000000000000000000000000010110010101000011001 (b2a19) +part_select(Y, 0, 38) = 00000000010101010101010101010101010101010101010 (2aaaaaaaaa) +part_select(Y, 1, 4) = 00000000000000000000000000000000000000000000101 (5) +part_select(Y, 2, 18) = 00000000000000000000000000000001010101010101010 (aaaa) +part_select(Y, 3, 23) = 00000000000000000000000000101010101010101010101 (155555) +part_select(Y, 4, 17) = 00000000000000000000000000000000010101010101010 (2aaa) +part_select(Y, 5, 26) = 00000000000000000000000000101010101010101010101 (155555) +part_select(Y, 6, 16) = 00000000000000000000000000000000000001010101010 (2aa) +part_select(Y, 7, 3) = 00000000000000000000000000000000000000000010101 (15) +part_select(Y, 8, 28) = 00000000000000000000000000010101010101010101010 (aaaaa) +part_select(Y, 9, 28) = 00000000000000000000000000001010101010101010101 (55555) part_select(Y, 10, 10) = 00000000000000000000000000000000000000000000000 (0) -part_select(Y, 17, 11) = 00000000000000000000000000000000000000000000110 (6) -part_select(Y, 44, 12) = 00000000000000110101001100001110110010101000011 (a9876543) -part_select(Y, 28, 13) = 00000000000000000000000000000001011001010100001 (b2a1) -part_select(Y, 2, 14) = 00000000000000000000000000000000000010000100110 (426) -part_select(Y, 20, 15) = 00000000000000000000000000000000000000000101000 (28) -part_select(Y, 22, 16) = 00000000000000000000000000000000000000001010100 (54) -part_select(Y, 21, 17) = 00000000000000000000000000000000000000000001010 (a) -part_select(Y, 18, 18) = 00000000000000000000000000000000000000000000001 (1) -part_select(Y, 36, 19) = 00000000000000000000000000000110000111011001010 (30eca) -part_select(Y, 34, 20) = 00000000000000000000000000000000000011101100101 (765) -part_select(Y, 37, 21) = 00000000000000000000000000000001100001110110010 (c3b2) -part_select(Y, 18, 22) = 00000000000000000000000000000000000000000010101 (15) -part_select(Y, 38, 23) = 00000000000000000000000000000000011000011101100 (30ec) -part_select(Y, 20, 24) = 00000000000000000000000000000000000000000010100 (14) -part_select(Y, 1, 25) = 00000000000000000000000001000010011000010101001 (2130a9) -part_select(Y, 31, 26) = 00000000000000000000000000000000000000000011101 (1d) -part_select(Y, 17, 27) = 00000000000000000000000000000000000001010100110 (2a6) -part_select(Y, 20, 28) = 00000000000000000000000000000000000000101001101 (14d) -part_select(Y, 6, 29) = 00000000000000000000000000100110000101010011011 (130a9b) -part_select(Y, 27, 30) = 00000000000000000000000000000000000000000000111 (7) -part_select(Y, 37, 31) = 00000000000000000000000000000000000000000110000 (30) -part_select(Y, 11, 32) = 00000000000000000000000000110000101010011011100 (1854dc) -part_select(Y, 24, 33) = 00000000000000000000000000000000000000110111000 (1b8) -part_select(Y, 39, 34) = 00000000000000000000000000000000000000000100110 (26) -part_select(Y, 7, 35) = 00000000000000000000100110000101010011011100001 (4c2a6e1) -part_select(Y, 3, 36) = 00000000000000100001001100001010100110111000011 (9854dc3) -part_select(Y, 9, 37) = 00000000000000000010011000010101001101110000110 (130a9b86) -part_select(Y, 36, 38) = 00000000000000000000000000000000000000000000100 (4) -part_select(Y, 31, 39) = 00000000000000000000000000000000000000000011001 (19) -part_select(Y, 16, 40) = 00000000000000000000000010101001101110000110010 (54dc32) -part_select(Y, 46, 41) = 00000000000000000000000000000000000000000011101 (1d) -part_select(Y, 27, 42) = 00000000000000000000000000000000111000011001010 (70ca) -part_select(Y, 13, 43) = 00000000000000001000010101001101110000110010101 (42a6e195) -part_select(Y, 6, 44) = 00000000000100110000101010011011100001100101011 (854dc32b) -part_select(Y, 9, 45) = 00000000001001100001010100110111000011001010111 (a9b8657) -part_select(Y, 13, 46) = 00000000000001000010101001101110000110010101110 (15370cae) +part_select(Y, 11, 17) = 00000000000000000000000000000000000000001010101 (55) +part_select(Y, 12, 44) = 00000000000000010101010101010101010101010101010 (aaaaaaaa) +part_select(Y, 13, 28) = 00000000000000000000000000000000101010101010101 (5555) +part_select(Y, 14, 2) = 00000000000000000000000000000000000101010101010 (aaa) +part_select(Y, 15, 20) = 00000000000000000000000000000000000000000010101 (15) +part_select(Y, 16, 22) = 00000000000000000000000000000000000000000101010 (2a) +part_select(Y, 17, 21) = 00000000000000000000000000000000000000000010101 (15) +part_select(Y, 18, 18) = 00000000000000000000000000000000000000000000000 (0) +part_select(Y, 19, 36) = 00000000000000000000000000000010101010101010101 (15555) +part_select(Y, 20, 34) = 00000000000000000000000000000000010101010101010 (2aaa) +part_select(Y, 21, 37) = 00000000000000000000000000000010101010101010101 (15555) +part_select(Y, 22, 18) = 00000000000000000000000000000000000000000001010 (a) +part_select(Y, 23, 38) = 00000000000000000000000000000000101010101010101 (5555) +part_select(Y, 24, 20) = 00000000000000000000000000000000000000000001010 (a) +part_select(Y, 25, 1) = 00000000000000000000001010101010101010101010101 (1555555) +part_select(Y, 26, 31) = 00000000000000000000000000000000000000000101010 (2a) +part_select(Y, 27, 17) = 00000000000000000000000000000000000010101010101 (555) +part_select(Y, 28, 20) = 00000000000000000000000000000000000000010101010 (aa) +part_select(Y, 29, 6) = 00000000000000000000000010101010101010101010101 (555555) +part_select(Y, 30, 27) = 00000000000000000000000000000000000000000001010 (a) +part_select(Y, 31, 37) = 00000000000000000000000000000000000000001010101 (55) +part_select(Y, 32, 11) = 00000000000000000000000001010101010101010101010 (2aaaaa) +part_select(Y, 33, 24) = 00000000000000000000000000000000000000101010101 (155) +part_select(Y, 34, 39) = 00000000000000000000000000000000000000000101010 (2a) +part_select(Y, 35, 7) = 00000000000000000010101010101010101010101010101 (15555555) +part_select(Y, 36, 3) = 00000000000001010101010101010101010101010101010 (2aaaaaaaa) +part_select(Y, 37, 9) = 00000000000000000010101010101010101010101010101 (15555555) +part_select(Y, 38, 36) = 00000000000000000000000000000000000000000000010 (2) +part_select(Y, 39, 31) = 00000000000000000000000000000000000000101010101 (155) +part_select(Y, 40, 16) = 00000000000000000000000101010101010101010101010 (aaaaaa) +part_select(Y, 41, 46) = 00000000000000000000000000000000000000000010101 (15) +part_select(Y, 42, 27) = 00000000000000000000000000000001010101010101010 (aaaa) +part_select(Y, 43, 13) = 00000000000000001010101010101010101010101010101 (55555555) +part_select(Y, 44, 6) = 00000000010101010101010101010101010101010101010 (2aaaaaaaaa) +part_select(Y, 45, 9) = 00000000001010101010101010101010101010101010101 (1555555555) +part_select(Y, 46, 13) = 00000000000001010101010101010101010101010101010 (2aaaaaaaa) + True: 01010101010101010101010101010101010101010101010 == 01010101010101010101010101010101010101010101010 exit 0 From reid at x10sys.com Sat May 12 13:42:15 2007 From: reid at x10sys.com (Reid Spencer) Date: Sat, 12 May 2007 13:42:15 -0500 Subject: [llvm-commits] CVS: llvm-test/SingleSource/UnitTests/Integer/bit_select.c Message-ID: <200705121842.l4CIgFkj002780@zion.cs.uiuc.edu> Changes in directory llvm-test/SingleSource/UnitTests/Integer: bit_select.c updated: 1.4 -> 1.5 --- Log message: Simplify test case. --- Diffs of the changes: (+1 -6) bit_select.c | 7 +------ 1 files changed, 1 insertion(+), 6 deletions(-) Index: llvm-test/SingleSource/UnitTests/Integer/bit_select.c diff -u llvm-test/SingleSource/UnitTests/Integer/bit_select.c:1.4 llvm-test/SingleSource/UnitTests/Integer/bit_select.c:1.5 --- llvm-test/SingleSource/UnitTests/Integer/bit_select.c:1.4 Tue Apr 17 19:53:49 2007 +++ llvm-test/SingleSource/UnitTests/Integer/bit_select.c Sat May 12 13:41:57 2007 @@ -32,12 +32,7 @@ BitType i; - for (i = bitwidthof(BitType); i > 0; --i) { - if (bit_select(Y, i-1)) - printf("1"); - else - printf("0"); - } + printBits(Y); printf("\n"); return 0; From reid at x10sys.com Sat May 12 13:44:57 2007 From: reid at x10sys.com (Reid Spencer) Date: Sat, 12 May 2007 13:44:57 -0500 Subject: [llvm-commits] CVS: llvm-test/SingleSource/UnitTests/Integer/bits.h Message-ID: <200705121844.l4CIiv2g002842@zion.cs.uiuc.edu> Changes in directory llvm-test/SingleSource/UnitTests/Integer: bits.h updated: 1.5 -> 1.6 --- Log message: Add some types needed by the tests. Fix the reduce macro to generate the correct builtin name. --- Diffs of the changes: (+6 -3) bits.h | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) Index: llvm-test/SingleSource/UnitTests/Integer/bits.h diff -u llvm-test/SingleSource/UnitTests/Integer/bits.h:1.5 llvm-test/SingleSource/UnitTests/Integer/bits.h:1.6 --- llvm-test/SingleSource/UnitTests/Integer/bits.h:1.5 Tue May 1 21:35:26 2007 +++ llvm-test/SingleSource/UnitTests/Integer/bits.h Sat May 12 13:44:37 2007 @@ -33,11 +33,13 @@ typedef unsigned int __attribute__((bitwidth(39))) uint39; typedef unsigned int __attribute__((bitwidth(47))) uint47; typedef unsigned int __attribute__((bitwidth(48))) uint48; +typedef unsigned int __attribute__((bitwidth(54))) uint54; typedef unsigned int __attribute__((bitwidth(60))) uint60; typedef unsigned int __attribute__((bitwidth(63))) uint63; typedef unsigned int __attribute__((bitwidth(64))) uint64; typedef unsigned int __attribute__((bitwidth(65))) uint65; typedef unsigned int __attribute__((bitwidth(68))) uint68; +typedef unsigned int __attribute__((bitwidth(69))) uint69; typedef unsigned int __attribute__((bitwidth(128))) uint128; typedef int __attribute__((bitwidth(9))) int9; @@ -46,6 +48,7 @@ typedef int __attribute__((bitwidth(24))) int24; typedef int __attribute__((bitwidth(32))) int32; typedef int __attribute__((bitwidth(33))) int33; +typedef int __attribute__((bitwidth(54))) int54; typedef int __attribute__((bitwidth(68))) int68; typedef int __attribute__((bitwidth(69))) int69; @@ -93,10 +96,10 @@ Result; \ }) -#define reduce(how, what) { \ +#define reduce(how, what) ({ \ typeof(what) what2 = what; \ - __bulitin_bit_reduce_ ## how(&what2); \ -} + __builtin_bit_ ## how ## _reduce(&what2); \ +}) #define printBits(val) { \ int bit = bitwidthof(val); \ From reid at x10sys.com Sat May 12 13:47:14 2007 From: reid at x10sys.com (Reid Spencer) Date: Sat, 12 May 2007 13:47:14 -0500 Subject: [llvm-commits] CVS: llvm-test/SingleSource/UnitTests/Integer/test4.c Message-ID: <200705121847.l4CIlEat002895@zion.cs.uiuc.edu> Changes in directory llvm-test/SingleSource/UnitTests/Integer: test4.c updated: 1.2 -> 1.3 --- Log message: Clean up this test case. --- Diffs of the changes: (+12 -3) test4.c | 15 ++++++++++++--- 1 files changed, 12 insertions(+), 3 deletions(-) Index: llvm-test/SingleSource/UnitTests/Integer/test4.c diff -u llvm-test/SingleSource/UnitTests/Integer/test4.c:1.2 llvm-test/SingleSource/UnitTests/Integer/test4.c:1.3 --- llvm-test/SingleSource/UnitTests/Integer/test4.c:1.2 Sat Apr 21 12:51:54 2007 +++ llvm-test/SingleSource/UnitTests/Integer/test4.c Sat May 12 13:46:55 2007 @@ -4,18 +4,27 @@ int main(int argc, char ** argv) { - uint68 n; + int68 n1; + uint68 n2; uint63 t1; uint3 t2; uint128 t3; unsigned long long t4; + printf("concat(i25,i39)="); t4 = bit_concat((uint25) -1, (uint39)-1); printBits(t4); printf("\n"); - n = -1; - t3 = bit_concat(n, (uint60)-1); + n1 = -1; + n2 = -1; + printf("n1 = "); + printBits(n1); + printf("\nn2 = "); + printBits(n2); + printf("\n"); + printf("concat(i68 n2, i60 -1)="); + t3 = bit_concat(n2, (uint60)-1); printBits(t3); printf("\n"); From asl at math.spbu.ru Sat May 12 17:36:48 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Sat, 12 May 2007 17:36:48 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineModuleInfo.h Message-ID: <200705122236.l4CMamt1007407@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: MachineModuleInfo.h updated: 1.12 -> 1.13 --- Log message: More DWARF-related things cleanup: 1. Fix PR1380: http://llvm.org/PR1380 2. Apply Duncan's patch from PR1410: http://llvm.org/PR1410 3. Insert workaround for "one personality function per module" as noted in PR1414: http://llvm.org/PR1414 4. Emit correct debug frames for x86/linux. This partly fixes DebugInfo/2006-11-06-StackTrace.cpp: stack trace is shown correctly, but arguments for function on top of stack are displayed incorrectly. --- Diffs of the changes: (+1 -0) MachineModuleInfo.h | 1 + 1 files changed, 1 insertion(+) Index: llvm/include/llvm/CodeGen/MachineModuleInfo.h diff -u llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.12 llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.13 --- llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.12 Thu May 10 17:34:59 2007 +++ llvm/include/llvm/CodeGen/MachineModuleInfo.h Sat May 12 17:36:25 2007 @@ -1020,6 +1020,7 @@ // std::vector TypeInfos; + Function *Personality; public: static char ID; // Pass identification, replacement for typeid From asl at math.spbu.ru Sat May 12 17:36:48 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Sat, 12 May 2007 17:36:48 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/DwarfWriter.cpp MachineModuleInfo.cpp Message-ID: <200705122236.l4CMamlN007412@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: DwarfWriter.cpp updated: 1.141 -> 1.142 MachineModuleInfo.cpp updated: 1.12 -> 1.13 --- Log message: More DWARF-related things cleanup: 1. Fix PR1380: http://llvm.org/PR1380 2. Apply Duncan's patch from PR1410: http://llvm.org/PR1410 3. Insert workaround for "one personality function per module" as noted in PR1414: http://llvm.org/PR1414 4. Emit correct debug frames for x86/linux. This partly fixes DebugInfo/2006-11-06-StackTrace.cpp: stack trace is shown correctly, but arguments for function on top of stack are displayed incorrectly. --- Diffs of the changes: (+75 -51) DwarfWriter.cpp | 111 ++++++++++++++++++++++++++++---------------------- MachineModuleInfo.cpp | 15 +++++- 2 files changed, 75 insertions(+), 51 deletions(-) Index: llvm/lib/CodeGen/DwarfWriter.cpp diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.141 llvm/lib/CodeGen/DwarfWriter.cpp:1.142 --- llvm/lib/CodeGen/DwarfWriter.cpp:1.141 Fri May 11 03:47:35 2007 +++ llvm/lib/CodeGen/DwarfWriter.cpp Sat May 12 17:36:25 2007 @@ -963,7 +963,7 @@ /// EmitFrameMoves - Emit frame instructions to describe the layout of the /// frame. void EmitFrameMoves(const char *BaseLabel, unsigned BaseLabelID, - std::vector &Moves) { + const std::vector &Moves) { int stackGrowth = Asm->TM.getFrameInfo()->getStackGrowthDirection() == TargetFrameInfo::StackGrowsUp ? @@ -971,7 +971,7 @@ bool IsLocal = BaseLabel && strcmp(BaseLabel, "label") == 0; for (unsigned i = 0, N = Moves.size(); i < N; ++i) { - MachineMove &Move = Moves[i]; + const MachineMove &Move = Moves[i]; unsigned LabelID = Move.getLabelID(); if (LabelID) { @@ -2356,6 +2356,7 @@ std::vector Moves; RI->getInitialFrameState(Moves); + EmitFrameMoves(NULL, 0, Moves); Asm->EmitAlignment(2); @@ -2379,7 +2380,7 @@ EmitLabel("frame_begin", SubprogramCount); - EmitSectionOffset("frame_common_begin", "section_frame", 0, 0, true, false); + EmitSectionOffset("frame_common", "section_frame", 0, 0, true, false); Asm->EOL("FDE CIE offset"); EmitReference("func_begin", SubprogramCount); @@ -2716,11 +2717,20 @@ class DwarfException : public Dwarf { private: + struct FunctionEHFrameInfo { + std::string FnName; + unsigned Number; + bool hasCalls; + bool hasLandingPads; + std::vector Moves; - /// didInitial - Flag to indicate if initial emission has been done. - /// - bool didInitial; - + FunctionEHFrameInfo(const std::string &FN, unsigned Num, bool hC, bool hL, + const std::vector &M): + FnName(FN), Number(Num), hasCalls(hC), hasLandingPads(hL), Moves(M) { }; + }; + + std::vector EHFrames; + /// shouldEmit - Flag to indicate if debug information should be emitted. /// bool shouldEmit; @@ -2728,10 +2738,6 @@ /// EmitCommonEHFrame - Emit the common eh unwind frame. /// void EmitCommonEHFrame() { - // Only do it once. - if (didInitial) return; - didInitial = true; - // If there is a personality present then we need to indicate that // in the common eh frame. Function *Personality = MMI->getPersonality(); @@ -2809,41 +2815,40 @@ Asm->EOL(); } - /// EmitEHFrame - Emit initial exception information. + /// EmitEHFrame - Emit function exception frame information. /// - void EmitEHFrame() { + void EmitEHFrame(const FunctionEHFrameInfo &EHFrameInfo) { // If there is a personality present then we need to indicate that // in the common eh frame. Function *Personality = MMI->getPersonality(); - MachineFrameInfo *MFI = MF->getFrameInfo(); Asm->SwitchToTextSection(TAI->getDwarfEHFrameSection()); // Externally visible entry into the functions eh frame info. if (const char *GlobalDirective = TAI->getGlobalDirective()) - O << GlobalDirective << getAsm()->CurrentFnName << ".eh\n"; + O << GlobalDirective << EHFrameInfo.FnName << ".eh\n"; // If there are no calls then you can't unwind. - if (!MFI->hasCalls()) { - O << getAsm()->CurrentFnName << ".eh = 0\n"; + if (!EHFrameInfo.hasCalls) { + O << EHFrameInfo.FnName << ".eh = 0\n"; } else { - O << getAsm()->CurrentFnName << ".eh:\n"; + O << EHFrameInfo.FnName << ".eh:\n"; // EH frame header. - EmitDifference("eh_frame_end", SubprogramCount, - "eh_frame_begin", SubprogramCount, true); + EmitDifference("eh_frame_end", EHFrameInfo.Number, + "eh_frame_begin", EHFrameInfo.Number, true); Asm->EOL("Length of Frame Information Entry"); - EmitLabel("eh_frame_begin", SubprogramCount); + EmitLabel("eh_frame_begin", EHFrameInfo.Number); EmitSectionOffset("eh_frame_begin", "section_eh_frame", - SubprogramCount, 0, true, true); + EHFrameInfo.Number, 0, true, true); Asm->EOL("FDE CIE offset"); - EmitReference("eh_func_begin", SubprogramCount, true); + EmitReference("eh_func_begin", EHFrameInfo.Number, true); Asm->EOL("FDE initial location"); - EmitDifference("eh_func_end", SubprogramCount, - "eh_func_begin", SubprogramCount); + EmitDifference("eh_func_end", EHFrameInfo.Number, + "eh_func_begin", EHFrameInfo.Number); Asm->EOL("FDE address range"); // If there is a personality and landing pads then point to the language @@ -2852,8 +2857,8 @@ Asm->EmitULEB128Bytes(4); Asm->EOL("Augmentation size"); - if (!MMI->getLandingPads().empty()) { - EmitReference("exception", SubprogramCount, true); + if (EHFrameInfo.hasLandingPads) { + EmitReference("exception", EHFrameInfo.Number, true); } else if(TAI->getAddressSize() == 8) { Asm->EmitInt64((int)0); } else { @@ -2867,15 +2872,14 @@ // Indicate locations of function specific callee saved registers in // frame. - std::vector &Moves = MMI->getFrameMoves(); - EmitFrameMoves("eh_func_begin", SubprogramCount, Moves); + EmitFrameMoves("eh_func_begin", EHFrameInfo.Number, EHFrameInfo.Moves); Asm->EmitAlignment(2); - EmitLabel("eh_frame_end", SubprogramCount); + EmitLabel("eh_frame_end", EHFrameInfo.Number); } if (const char *UsedDirective = TAI->getUsedDirective()) - O << UsedDirective << getAsm()->CurrentFnName << ".eh\n\n"; + O << UsedDirective << EHFrameInfo.FnName << ".eh\n\n"; } /// EmitExceptionTable - Emit landpads and actions. @@ -2916,11 +2920,6 @@ const LandingPadInfo *Filter = 0; // Compute sizes for exception table. - unsigned SizeHeader = sizeof(int8_t) + // LPStart format - sizeof(int8_t) + // TType format - sizeof(int8_t) + // TType base offset (NEED ULEB128) - sizeof(int8_t) + // Call site format - sizeof(int8_t); // Call-site table length unsigned SizeSites = 0; unsigned SizeActions = 0; @@ -2971,19 +2970,26 @@ // Final tallies. unsigned SizeTypes = TypeInfos.size() * TAI->getAddressSize(); - unsigned SizePreType = SizeHeader + SizeSites + SizeActions; - unsigned SizeAlign = (4 - SizePreType) & 3; - unsigned TypeOffset = SizePreType + - SizeTypes + - SizeAlign - - sizeof(int8_t) - // LPStart format - sizeof(int8_t) - // TType format - sizeof(int8_t); // TType base offset (NEED ULEB128) + + unsigned TypeOffset = sizeof(int8_t) + // Call site format + Asm->SizeULEB128(SizeSites) + // Call-site table length + SizeSites + SizeActions + SizeTypes; + + unsigned TotalSize = sizeof(int8_t) + // LPStart format + sizeof(int8_t) + // TType format + Asm->SizeULEB128(TypeOffset) + // TType base offset + TypeOffset; + + unsigned SizeAlign = (4 - TotalSize) & 3; // Begin the exception table. Asm->SwitchToDataSection(TAI->getDwarfExceptionSection()); O << "GCC_except_table" << SubprogramCount << ":\n"; Asm->EmitAlignment(2); + for (unsigned i = 0; i != SizeAlign; ++i) { + Asm->EmitInt8(0); + Asm->EOL("Padding"); + } EmitLabel("exception", SubprogramCount); // Emit the header. @@ -3053,7 +3059,6 @@ } // Emit the type ids. - Asm->EmitAlignment(2); for (unsigned M = TypeInfos.size(); M; --M) { GlobalVariable *GV = TypeInfos[M - 1]; @@ -3091,7 +3096,6 @@ // DwarfException(std::ostream &OS, AsmPrinter *A, const TargetAsmInfo *T) : Dwarf(OS, A, T) - , didInitial(false) , shouldEmit(false) {} @@ -3112,6 +3116,12 @@ /// EndModule - Emit all exception information that should come after the /// content. void EndModule() { + if (!shouldEmit) return; + + EmitCommonEHFrame(); + for (std::vector::iterator I = EHFrames.begin(), + E = EHFrames.end(); I != E; ++I) + EmitEHFrame(*I); } /// BeginFunction - Gather pre-function exception information. Assumes being @@ -3135,8 +3145,13 @@ EmitLabel("eh_func_end", SubprogramCount); EmitExceptionTable(); - EmitCommonEHFrame(); - EmitEHFrame(); + + // Save EH frame information + EHFrames.push_back(FunctionEHFrameInfo(getAsm()->CurrentFnName, + SubprogramCount, + MF->getFrameInfo()->hasCalls(), + !MMI->getLandingPads().empty(), + MMI->getFrameMoves())); } }; Index: llvm/lib/CodeGen/MachineModuleInfo.cpp diff -u llvm/lib/CodeGen/MachineModuleInfo.cpp:1.12 llvm/lib/CodeGen/MachineModuleInfo.cpp:1.13 --- llvm/lib/CodeGen/MachineModuleInfo.cpp:1.12 Fri May 11 18:14:43 2007 +++ llvm/lib/CodeGen/MachineModuleInfo.cpp Sat May 12 17:36:25 2007 @@ -1475,6 +1475,7 @@ , RootScope(NULL) , FrameMoves() , LandingPads() +, Personality(NULL) {} MachineModuleInfo::~MachineModuleInfo() { @@ -1685,9 +1686,13 @@ /// addPersonality - Provide the personality function for the exception /// information. void MachineModuleInfo::addPersonality(MachineBasicBlock *LandingPad, - Function *Personality) { + Function *PersFn) { LandingPadInfo &LP = getOrCreateLandingPadInfo(LandingPad); - LP.Personality = Personality; + LP.Personality = PersFn; + + // FIXME: Until PR1414 will be fixed, we're using 1 personality function per + // module + Personality = PersFn; } /// addCatchTypeInfo - Provide the catch typeinfo for a landing pad. @@ -1751,7 +1756,11 @@ /// getLandingPadInfos - Return a reference to the landing pad info for the /// current function. Function *MachineModuleInfo::getPersonality() const { - return !LandingPads.empty() ? LandingPads[0].Personality : NULL; + // FIXME: Until PR1414 will be fixed, we're using 1 personality function per + // module + + //return !LandingPads.empty() ? LandingPads[0].Personality : NULL; + return Personality; } From asl at math.spbu.ru Sat May 12 17:36:51 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Sat, 12 May 2007 17:36:51 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86RegisterInfo.cpp X86TargetAsmInfo.cpp Message-ID: <200705122236.l4CMapQg007421@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86RegisterInfo.cpp updated: 1.219 -> 1.220 X86TargetAsmInfo.cpp updated: 1.41 -> 1.42 --- Log message: More DWARF-related things cleanup: 1. Fix PR1380: http://llvm.org/PR1380 2. Apply Duncan's patch from PR1410: http://llvm.org/PR1410 3. Insert workaround for "one personality function per module" as noted in PR1414: http://llvm.org/PR1414 4. Emit correct debug frames for x86/linux. This partly fixes DebugInfo/2006-11-06-StackTrace.cpp: stack trace is shown correctly, but arguments for function on top of stack are displayed incorrectly. --- Diffs of the changes: (+10 -9) X86RegisterInfo.cpp | 17 ++++++++++------- X86TargetAsmInfo.cpp | 2 -- 2 files changed, 10 insertions(+), 9 deletions(-) Index: llvm/lib/Target/X86/X86RegisterInfo.cpp diff -u llvm/lib/Target/X86/X86RegisterInfo.cpp:1.219 llvm/lib/Target/X86/X86RegisterInfo.cpp:1.220 --- llvm/lib/Target/X86/X86RegisterInfo.cpp:1.219 Wed May 2 14:53:33 2007 +++ llvm/lib/Target/X86/X86RegisterInfo.cpp Sat May 12 17:36:25 2007 @@ -1153,11 +1153,6 @@ TargetFrameInfo::StackGrowsUp ? TAI->getAddressSize() : -TAI->getAddressSize()); - // Add return address to move list - MachineLocation CSDst(StackPtr, stackGrowth); - MachineLocation CSSrc(getRARegister()); - Moves.push_back(MachineMove(StartLabelId, CSDst, CSSrc)); - if (NumBytes) { // Show update of SP. if (hasFP(MF)) { @@ -1282,10 +1277,18 @@ void X86RegisterInfo::getInitialFrameState(std::vector &Moves) const { - // Initial state of the frame pointer is esp. + // Calculate amount of bytes used for return address storing + int stackGrowth = (Is64Bit ? -8 : -4); + + // Initial state of the frame pointer is esp+4. MachineLocation Dst(MachineLocation::VirtualFP); - MachineLocation Src(StackPtr, 0); + MachineLocation Src(StackPtr, stackGrowth); Moves.push_back(MachineMove(0, Dst, Src)); + + // Add return address to move list + MachineLocation CSDst(StackPtr, stackGrowth); + MachineLocation CSSrc(getRARegister()); + Moves.push_back(MachineMove(0, CSDst, CSSrc)); } unsigned X86RegisterInfo::getEHExceptionRegister() const { Index: llvm/lib/Target/X86/X86TargetAsmInfo.cpp diff -u llvm/lib/Target/X86/X86TargetAsmInfo.cpp:1.41 llvm/lib/Target/X86/X86TargetAsmInfo.cpp:1.42 --- llvm/lib/Target/X86/X86TargetAsmInfo.cpp:1.41 Sat May 5 04:04:50 2007 +++ llvm/lib/Target/X86/X86TargetAsmInfo.cpp Sat May 12 17:36:25 2007 @@ -113,7 +113,6 @@ AbsoluteDebugSectionOffsets = true; AbsoluteEHSectionOffsets = false; SupportsDebugInformation = true; - DwarfRequiresFrameSection = false; DwarfAbbrevSection = "\t.section\t.debug_abbrev,\"\", at progbits"; DwarfInfoSection = "\t.section\t.debug_info,\"\", at progbits"; DwarfLineSection = "\t.section\t.debug_line,\"\", at progbits"; @@ -149,7 +148,6 @@ AbsoluteDebugSectionOffsets = true; AbsoluteEHSectionOffsets = false; SupportsDebugInformation = true; - DwarfRequiresFrameSection = false; DwarfSectionOffsetDirective = "\t.secrel32\t"; DwarfAbbrevSection = "\t.section\t.debug_abbrev,\"dr\""; DwarfInfoSection = "\t.section\t.debug_info,\"dr\""; From sabre at nondot.org Sat May 12 20:00:10 2007 From: sabre at nondot.org (Chris Lattner) Date: Sat, 12 May 2007 20:00:10 -0500 Subject: [llvm-commits] CVS: llvm/docs/BitCodeFormat.html Message-ID: <200705130100.l4D10A64010105@zion.cs.uiuc.edu> Changes in directory llvm/docs: BitCodeFormat.html updated: 1.6 -> 1.7 --- Log message: finish the description of the bitstream format. --- Diffs of the changes: (+89 -4) BitCodeFormat.html | 93 ++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 89 insertions(+), 4 deletions(-) Index: llvm/docs/BitCodeFormat.html diff -u llvm/docs/BitCodeFormat.html:1.6 llvm/docs/BitCodeFormat.html:1.7 --- llvm/docs/BitCodeFormat.html:1.6 Sat May 12 03:01:52 2007 +++ llvm/docs/BitCodeFormat.html Sat May 12 19:59:52 2007 @@ -19,6 +19,7 @@
  • Blocks
  • Data Records
  • Abbreviations
  • +
  • Standard Blocks
  • LLVM IR Encoding
  • @@ -403,16 +404,100 @@ is always a single specific value. This specific value is emitted as a vbr8 after the bit indicating that it is a literal operand.
  • Encoding info without data - [01, encoding3] - - blah + - Operand encodings that do not have extra data are just emitted as their code.
  • Encoding info with data - [01, encoding3, -valuevbr5] - - +valuevbr5] - Operand encodings that do have extra data are +emitted as their code, followed by the extra data.
  • +

    The possible operand encodings are:

    + +
      +
    • 1 - Fixed - The field should be emitted as a fixed-width value, whose width + is specified by the encoding operand.
    • +
    • 2 - VBR - The field should be emitted as a variable-width value, whose width + is specified by the encoding operand.
    • +
    • 3 - Array - This field is an array of values. The element type of the array + is specified by the next encoding operand.
    • +
    • 4 - Char6 - This field should be emitted as a char6-encoded + value.
    • +
    + +

    For example, target triples in LLVM modules are encoded as a record of the +form [TRIPLE, 'a', 'b', 'c', 'd']. Consider if the bitstream emitted +the following abbrev entry:

    + +
      +
    • [0, Fixed, 4]
    • +
    • [0, Array]
    • +
    • [0, Char6]
    • +
    + +

    When emitting a record with this abbreviation, the above entry would be +emitted as:

    + +

    [4abbrevwidth, 24, 4vbr6, + 06, 16, 26, 36]

    + +

    These values are:

    + +
      +
    1. The first value, 4, is the abbreviation ID for this abbreviation.
    2. +
    3. The second value, 2, is the code for TRIPLE in LLVM IR files.
    4. +
    5. The third value, 4, is the length of the array.
    6. +
    7. The rest of the values are the char6 encoded values for "abcd".
    8. +
    + +

    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. +

    + + + + + + +
    + +

    +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. +

    +
    + + + +
    + +

    The BLOCKINFO block allows the description of metadata for other blocks. The + currently specified records are:

    + +
      +
    • [SETBID (#1), blockid]
    • +
    • [DEFINE_ABBREV, ...]
    • +
    + +

    +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. +

    + +
    @@ -433,7 +518,7 @@ src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!"> Chris Lattner
    The LLVM Compiler Infrastructure
    -Last modified: $Date: 2007/05/12 08:01:52 $ +Last modified: $Date: 2007/05/13 00:59:52 $ From sabre at nondot.org Sat May 12 20:40:06 2007 From: sabre at nondot.org (Chris Lattner) Date: Sat, 12 May 2007 20:40:06 -0500 Subject: [llvm-commits] CVS: llvm/docs/BitCodeFormat.html Message-ID: <200705130140.l4D1e6q8010947@zion.cs.uiuc.edu> Changes in directory llvm/docs: BitCodeFormat.html updated: 1.7 -> 1.8 --- Log message: add initial description of llvm top-level stuff. --- Diffs of the changes: (+94 -4) BitCodeFormat.html | 98 ++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 94 insertions(+), 4 deletions(-) Index: llvm/docs/BitCodeFormat.html diff -u llvm/docs/BitCodeFormat.html:1.7 llvm/docs/BitCodeFormat.html:1.8 --- llvm/docs/BitCodeFormat.html:1.7 Sat May 12 19:59:52 2007 +++ llvm/docs/BitCodeFormat.html Sat May 12 20:39:44 2007 @@ -22,7 +22,11 @@
  • Standard Blocks
  • -
  • LLVM IR Encoding
  • +
  • LLVM IR Encoding +
      +
    1. Basics
    2. +
    +
  • Written by Chris Lattner. @@ -114,7 +118,8 @@

    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 integer values. These +number of primitive values that encode a stream of unsigned integer values. +These integers are are encoded in two ways: either as Fixed Width Integers or as Variable Width Integers. @@ -505,7 +510,92 @@

    -

    +

    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.

    + +
    + + + + + + + +
    + +

    +The magic number for LLVM IR files is: +

    + +

    ['B'8, 'C'8, 0x04, 0xC4, +0xE4, 0xD4]

    + +

    When viewed as bytes, this is "BC 0xC0DE".

    + +
    + + + + +
    + +

    +Variable Width Integers 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).

    + +

    As such, signed vbr values of a specific width are emitted as follows:

    + +
      +
    • Positive values are emitted as vbrs of the specified width, but with their + value shifted left by one.
    • +
    • 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.
    • +
    + +

    With this encoding, small positive and small negative values can both be +emitted efficiently.

    + +
    + + + + + +
    + +

    +LLVM IR is defined with the following blocks: +

    + +
      +
    • 8 - MODULE_BLOCK - This is the top-level block that contains the + entire module, and describes a variety of per-module information.
    • +
    • 9 - PARAMATTR_BLOCK - This enumerates the parameter attributes.
    • +
    • 10 - TYPE_BLOCK - This describes all of the types in the module.
    • +
    • 11 - CONSTANTS_BLOCK - This describes constants for a module or + function.
    • +
    • 12 - FUNCTION_BLOCK - This describes a function body.
    • +
    • 13 - TYPE_SYMTAB_BLOCK - This describes the type symbol table.
    • +
    • 14 - VALUE_SYMTAB_BLOCK - This describes a value symbol table.
    • +
    + +
    + + + + +
    + +

    +

    @@ -518,7 +608,7 @@ src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!"> Chris Lattner
    The LLVM Compiler Infrastructure
    -Last modified: $Date: 2007/05/13 00:59:52 $ +Last modified: $Date: 2007/05/13 01:39:44 $ From asl at math.spbu.ru Sun May 13 10:42:45 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Sun, 13 May 2007 10:42:45 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineModuleInfo.h Message-ID: <200705131542.l4DFgj3q015744@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: MachineModuleInfo.h updated: 1.13 -> 1.14 --- Log message: Emit multiple common EH frames for multiple (including blank) personality functions. This partly fixes PR1414: http://llvm.org/PR1414 : now we're restricted only to one personality function per eh frame, not per module. Further work on "multiple personalities" topic needs representative example. --- Diffs of the changes: (+14 -3) MachineModuleInfo.h | 17 ++++++++++++++--- 1 files changed, 14 insertions(+), 3 deletions(-) Index: llvm/include/llvm/CodeGen/MachineModuleInfo.h diff -u llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.13 llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.14 --- llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.13 Sat May 12 17:36:25 2007 +++ llvm/include/llvm/CodeGen/MachineModuleInfo.h Sun May 13 10:42:26 2007 @@ -1020,7 +1020,9 @@ // std::vector TypeInfos; - Function *Personality; + // Personalities - Vector of all personality functions ever seen. Used to emit + // common EH frames. + std::vector Personalities; public: static char ID; // Pass identification, replacement for typeid @@ -1201,7 +1203,16 @@ /// addPersonality - Provide the personality function for the exception /// information. void addPersonality(MachineBasicBlock *LandingPad, Function *Personality); - + + /// getPersonalityIndex - Get index of the current personality function inside + /// Personalitites array + unsigned getPersonalityIndex() const; + + /// getPersonalities - Return array of personality functions ever seen. + const std::vector& getPersonalities() const { + return Personalities; + } + /// addCatchTypeInfo - Provide the catch typeinfo for a landing pad. /// void addCatchTypeInfo(MachineBasicBlock *LandingPad, @@ -1219,7 +1230,7 @@ /// pads. void TidyLandingPads(); - /// getLandingPadInfos - Return a reference to the landing pad info for the + /// getLandingPads - Return a reference to the landing pad info for the /// current function. const std::vector &getLandingPads() const { return LandingPads; From asl at math.spbu.ru Sun May 13 10:42:49 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Sun, 13 May 2007 10:42:49 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/DwarfWriter.cpp MachineModuleInfo.cpp Message-ID: <200705131542.l4DFgn2Z015756@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: DwarfWriter.cpp updated: 1.142 -> 1.143 MachineModuleInfo.cpp updated: 1.13 -> 1.14 --- Log message: Emit multiple common EH frames for multiple (including blank) personality functions. This partly fixes PR1414: http://llvm.org/PR1414 : now we're restricted only to one personality function per eh frame, not per module. Further work on "multiple personalities" topic needs representative example. --- Diffs of the changes: (+51 -34) DwarfWriter.cpp | 42 +++++++++++++++++++++--------------------- MachineModuleInfo.cpp | 43 ++++++++++++++++++++++++++++++------------- 2 files changed, 51 insertions(+), 34 deletions(-) Index: llvm/lib/CodeGen/DwarfWriter.cpp diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.142 llvm/lib/CodeGen/DwarfWriter.cpp:1.143 --- llvm/lib/CodeGen/DwarfWriter.cpp:1.142 Sat May 12 17:36:25 2007 +++ llvm/lib/CodeGen/DwarfWriter.cpp Sun May 13 10:42:26 2007 @@ -2720,13 +2720,16 @@ struct FunctionEHFrameInfo { std::string FnName; unsigned Number; + unsigned PersonalityIndex; bool hasCalls; bool hasLandingPads; std::vector Moves; - FunctionEHFrameInfo(const std::string &FN, unsigned Num, bool hC, bool hL, + FunctionEHFrameInfo(const std::string &FN, unsigned Num, unsigned P, + bool hC, bool hL, const std::vector &M): - FnName(FN), Number(Num), hasCalls(hC), hasLandingPads(hL), Moves(M) { }; + FnName(FN), Number(Num), PersonalityIndex(P), + hasCalls(hC), hasLandingPads(hL), Moves(M) { }; }; std::vector EHFrames; @@ -2737,11 +2740,7 @@ /// EmitCommonEHFrame - Emit the common eh unwind frame. /// - void EmitCommonEHFrame() { - // If there is a personality present then we need to indicate that - // in the common eh frame. - Function *Personality = MMI->getPersonality(); - + void EmitCommonEHFrame(const Function *Personality, unsigned Index) { // Size and sign of stack growth. int stackGrowth = Asm->TM.getFrameInfo()->getStackGrowthDirection() == @@ -2750,19 +2749,19 @@ // Begin eh frame section. Asm->SwitchToTextSection(TAI->getDwarfEHFrameSection()); - O << "EH_frame:\n"; - EmitLabel("section_eh_frame", 0); + O << "EH_frame" << Index << ":\n"; + EmitLabel("section_eh_frame", Index); // Define base labels. - EmitLabel("eh_frame_common", 0); + EmitLabel("eh_frame_common", Index); // Define the eh frame length. - EmitDifference("eh_frame_common_end", 0, - "eh_frame_common_begin", 0, true); + EmitDifference("eh_frame_common_end", Index, + "eh_frame_common_begin", Index, true); Asm->EOL("Length of Common Information Entry"); // EH frame header. - EmitLabel("eh_frame_common_begin", 0); + EmitLabel("eh_frame_common_begin", Index); Asm->EmitInt32((int)0); Asm->EOL("CIE Identifier Tag"); Asm->EmitInt8(DW_CIE_VERSION); @@ -2810,7 +2809,7 @@ EmitFrameMoves(NULL, 0, Moves); Asm->EmitAlignment(2); - EmitLabel("eh_frame_common_end", 0); + EmitLabel("eh_frame_common_end", Index); Asm->EOL(); } @@ -2818,10 +2817,6 @@ /// EmitEHFrame - Emit function exception frame information. /// void EmitEHFrame(const FunctionEHFrameInfo &EHFrameInfo) { - // If there is a personality present then we need to indicate that - // in the common eh frame. - Function *Personality = MMI->getPersonality(); - Asm->SwitchToTextSection(TAI->getDwarfEHFrameSection()); // Externally visible entry into the functions eh frame info. @@ -2842,7 +2837,8 @@ EmitLabel("eh_frame_begin", EHFrameInfo.Number); EmitSectionOffset("eh_frame_begin", "section_eh_frame", - EHFrameInfo.Number, 0, true, true); + EHFrameInfo.Number, EHFrameInfo.PersonalityIndex, + true, true); Asm->EOL("FDE CIE offset"); EmitReference("eh_func_begin", EHFrameInfo.Number, true); @@ -2853,7 +2849,7 @@ // If there is a personality and landing pads then point to the language // specific data area in the exception table. - if (Personality) { + if (EHFrameInfo.PersonalityIndex) { Asm->EmitULEB128Bytes(4); Asm->EOL("Augmentation size"); @@ -3117,8 +3113,11 @@ /// content. void EndModule() { if (!shouldEmit) return; + + const std::vector Personalities = MMI->getPersonalities(); + for (unsigned i =0; i < Personalities.size(); ++i) + EmitCommonEHFrame(Personalities[i], i); - EmitCommonEHFrame(); for (std::vector::iterator I = EHFrames.begin(), E = EHFrames.end(); I != E; ++I) EmitEHFrame(*I); @@ -3149,6 +3148,7 @@ // Save EH frame information EHFrames.push_back(FunctionEHFrameInfo(getAsm()->CurrentFnName, SubprogramCount, + MMI->getPersonalityIndex(), MF->getFrameInfo()->hasCalls(), !MMI->getLandingPads().empty(), MMI->getFrameMoves())); Index: llvm/lib/CodeGen/MachineModuleInfo.cpp diff -u llvm/lib/CodeGen/MachineModuleInfo.cpp:1.13 llvm/lib/CodeGen/MachineModuleInfo.cpp:1.14 --- llvm/lib/CodeGen/MachineModuleInfo.cpp:1.13 Sat May 12 17:36:25 2007 +++ llvm/lib/CodeGen/MachineModuleInfo.cpp Sun May 13 10:42:26 2007 @@ -1475,8 +1475,11 @@ , RootScope(NULL) , FrameMoves() , LandingPads() -, Personality(NULL) -{} +, Personalities() +{ + // Always emit "no personality" info + Personalities.push_back(NULL); +} MachineModuleInfo::~MachineModuleInfo() { } @@ -1686,13 +1689,15 @@ /// addPersonality - Provide the personality function for the exception /// information. void MachineModuleInfo::addPersonality(MachineBasicBlock *LandingPad, - Function *PersFn) { + Function *Personality) { LandingPadInfo &LP = getOrCreateLandingPadInfo(LandingPad); - LP.Personality = PersFn; + LP.Personality = Personality; - // FIXME: Until PR1414 will be fixed, we're using 1 personality function per - // module - Personality = PersFn; + for (unsigned i = 0; i < Personalities.size(); ++i) + if (Personalities[i] == Personality) + return; + + Personalities.push_back(Personality); } /// addCatchTypeInfo - Provide the catch typeinfo for a landing pad. @@ -1753,16 +1758,28 @@ return TypeInfos.size(); } -/// getLandingPadInfos - Return a reference to the landing pad info for the -/// current function. +/// getPersonality - Return the personality function for the current function. Function *MachineModuleInfo::getPersonality() const { // FIXME: Until PR1414 will be fixed, we're using 1 personality function per - // module - - //return !LandingPads.empty() ? LandingPads[0].Personality : NULL; - return Personality; + // function + return !LandingPads.empty() ? LandingPads[0].Personality : NULL; } +/// getPersonalityIndex - Return unique index for current personality +/// function. NULL personality function should always get zero index. +unsigned MachineModuleInfo::getPersonalityIndex() const { + const Function* Personality = (!LandingPads.empty() ? + LandingPads[0].Personality : NULL); + + for (unsigned i = 0; i < Personalities.size(); ++i) { + if (Personalities[i] == Personality) + return i; + } + + // This should never happen + assert(0 && "Personality function should be set!"); + return 0; +} //===----------------------------------------------------------------------===// /// DebugLabelFolding pass - This pass prunes out redundant labels. This allows From asl at math.spbu.ru Sun May 13 12:30:31 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Sun, 13 May 2007 12:30:31 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/DwarfWriter.cpp Message-ID: <200705131730.l4DHUVDN017476@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: DwarfWriter.cpp updated: 1.143 -> 1.144 --- Log message: Emit function debug frames in one atom. This will prevent us from generating incorrect assembler in case of both debug information & exception information presented. --- Diffs of the changes: (+41 -27) DwarfWriter.cpp | 68 +++++++++++++++++++++++++++++++++----------------------- 1 files changed, 41 insertions(+), 27 deletions(-) Index: llvm/lib/CodeGen/DwarfWriter.cpp diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.143 llvm/lib/CodeGen/DwarfWriter.cpp:1.144 --- llvm/lib/CodeGen/DwarfWriter.cpp:1.143 Sun May 13 10:42:26 2007 +++ llvm/lib/CodeGen/DwarfWriter.cpp Sun May 13 12:30:11 2007 @@ -1110,6 +1110,16 @@ /// bool shouldEmit; + struct FunctionDebugFrameInfo { + unsigned Number; + std::vector Moves; + + FunctionDebugFrameInfo(unsigned Num, const std::vector &M): + Number(Num), Moves(M) { }; + }; + + std::vector DebugFrames; + public: /// ShouldEmitDwarf - Returns true if Dwarf declarations should be made. @@ -1957,7 +1967,7 @@ // Dwarf sections base addresses. if (TAI->doesDwarfRequireFrameSection()) { Asm->SwitchToDataSection(TAI->getDwarfFrameSection()); - EmitLabel("section_frame", 0); + EmitLabel("section_debug_frame", 0); } Asm->SwitchToDataSection(TAI->getDwarfInfoSection()); EmitLabel("section_info", 0); @@ -1982,9 +1992,6 @@ EmitLabel("text_begin", 0); Asm->SwitchToDataSection(TAI->getDataSection()); EmitLabel("data_begin", 0); - - // Emit common frame information. - EmitInitialDebugFrame(); } /// EmitDIE - Recusively Emits a debug information entry. @@ -2321,9 +2328,9 @@ Asm->EOL(); } - /// EmitInitialDebugFrame - Emit common frame info into a debug frame section. + /// EmitCommonDebugFrame - Emit common frame info into a debug frame section. /// - void EmitInitialDebugFrame() { + void EmitCommonDebugFrame() { if (!TAI->doesDwarfRequireFrameSection()) return; @@ -2335,12 +2342,12 @@ // Start the dwarf frame section. Asm->SwitchToDataSection(TAI->getDwarfFrameSection()); - EmitLabel("frame_common", 0); - EmitDifference("frame_common_end", 0, - "frame_common_begin", 0, true); + EmitLabel("debug_frame_common", 0); + EmitDifference("debug_frame_common_end", 0, + "debug_frame_common_begin", 0, true); Asm->EOL("Length of Common Information Entry"); - EmitLabel("frame_common_begin", 0); + EmitLabel("debug_frame_common_begin", 0); Asm->EmitInt32((int)DW_CIE_ID); Asm->EOL("CIE Identifier Tag"); Asm->EmitInt8(DW_CIE_VERSION); @@ -2360,41 +2367,40 @@ EmitFrameMoves(NULL, 0, Moves); Asm->EmitAlignment(2); - EmitLabel("frame_common_end", 0); + EmitLabel("debug_frame_common_end", 0); Asm->EOL(); } /// EmitFunctionDebugFrame - Emit per function frame info into a debug frame /// section. - void EmitFunctionDebugFrame() { + void EmitFunctionDebugFrame(const FunctionDebugFrameInfo &DebugFrameInfo) { if (!TAI->doesDwarfRequireFrameSection()) return; // Start the dwarf frame section. Asm->SwitchToDataSection(TAI->getDwarfFrameSection()); - EmitDifference("frame_end", SubprogramCount, - "frame_begin", SubprogramCount, true); + EmitDifference("debug_frame_end", DebugFrameInfo.Number, + "debug_frame_begin", DebugFrameInfo.Number, true); Asm->EOL("Length of Frame Information Entry"); - EmitLabel("frame_begin", SubprogramCount); + EmitLabel("debug_frame_begin", DebugFrameInfo.Number); - EmitSectionOffset("frame_common", "section_frame", 0, 0, true, false); + EmitSectionOffset("debug_frame_common", "section_debug_frame", + 0, 0, true, false); Asm->EOL("FDE CIE offset"); - EmitReference("func_begin", SubprogramCount); + EmitReference("func_begin", DebugFrameInfo.Number); Asm->EOL("FDE initial location"); - EmitDifference("func_end", SubprogramCount, - "func_begin", SubprogramCount); + EmitDifference("func_end", DebugFrameInfo.Number, + "func_begin", DebugFrameInfo.Number); Asm->EOL("FDE address range"); - std::vector &Moves = MMI->getFrameMoves(); - - EmitFrameMoves("func_begin", SubprogramCount, Moves); + EmitFrameMoves("func_begin", DebugFrameInfo.Number, DebugFrameInfo.Moves); Asm->EmitAlignment(2); - EmitLabel("frame_end", SubprogramCount); + EmitLabel("debug_frame_end", DebugFrameInfo.Number); Asm->EOL(); } @@ -2636,7 +2642,15 @@ Asm->SwitchToTextSection(SectionMap[i].c_str()); EmitLabel("section_end", i); } - + + // Emit common frame information. + EmitCommonDebugFrame(); + + // Emit function debug frame information + for (std::vector::iterator I = DebugFrames.begin(), + E = DebugFrames.end(); I != E; ++I) + EmitFunctionDebugFrame(*I); + // Compute DIE offsets and sizes. SizeAndOffsets(); @@ -2705,9 +2719,9 @@ // Construct scopes for subprogram. ConstructRootScope(MMI->getRootScope()); - - // Emit function frame information. - EmitFunctionDebugFrame(); + + DebugFrames.push_back(FunctionDebugFrameInfo(SubprogramCount, + MMI->getFrameMoves())); } }; From sabre at nondot.org Sun May 13 13:38:06 2007 From: sabre at nondot.org (Chris Lattner) Date: Sun, 13 May 2007 13:38:06 -0500 Subject: [llvm-commits] CVS: llvm-www/InTheNews.html Message-ID: <200705131838.l4DIc6qh018764@zion.cs.uiuc.edu> Changes in directory llvm-www: InTheNews.html updated: 1.18 -> 1.19 --- Log message: add a link --- Diffs of the changes: (+2 -1) InTheNews.html | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: llvm-www/InTheNews.html diff -u llvm-www/InTheNews.html:1.18 llvm-www/InTheNews.html:1.19 --- llvm-www/InTheNews.html:1.18 Fri Apr 6 01:21:42 2007 +++ llvm-www/InTheNews.html Sun May 13 13:37:48 2007 @@ -15,6 +15,7 @@
    News Articles

    2007

      +
    • 2007-03-31, Cliff Hacks, "Experimenting with LLVM", Cliff Biffle.
    • 2007-03-20, ars technica, "Apple putting LLVM to good use" (Bossa Conference), Erik Kennedy.
    • @@ -103,6 +104,6 @@ Valid HTML 4.01!
      - Last modified: $Date: 2007/04/06 06:21:42 $ + Last modified: $Date: 2007/05/13 18:37:48 $ From sabre at nondot.org Sun May 13 16:28:26 2007 From: sabre at nondot.org (Chris Lattner) Date: Sun, 13 May 2007 16:28:26 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/IPO/GlobalOpt.cpp Message-ID: <200705132128.l4DLSQbB022130@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/IPO: GlobalOpt.cpp updated: 1.105 -> 1.106 --- Log message: Fix Transforms/GlobalOpt/2007-05-13-Crash.ll --- Diffs of the changes: (+4 -1) GlobalOpt.cpp | 5 ++++- 1 files changed, 4 insertions(+), 1 deletion(-) Index: llvm/lib/Transforms/IPO/GlobalOpt.cpp diff -u llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.105 llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.106 --- llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.105 Sun May 6 08:37:16 2007 +++ llvm/lib/Transforms/IPO/GlobalOpt.cpp Sun May 13 16:28:07 2007 @@ -623,7 +623,10 @@ Loads.push_back(LI); Changed |= OptimizeAwayTrappingUsesOfValue(LI, LV); } else { - assert(isa(*GUI) && "Only expect load and stores!"); + // If we get here we could have stores, loads, or phi nodes whose values + // are loaded. + assert((isa(*GUI) || isa(*GUI)) && + "Only expect load and stores!"); } if (Changed) { From sabre at nondot.org Sun May 13 16:28:43 2007 From: sabre at nondot.org (Chris Lattner) Date: Sun, 13 May 2007 16:28:43 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/GlobalOpt/2007-05-13-Crash.ll Message-ID: <200705132128.l4DLSh3v022141@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/GlobalOpt: 2007-05-13-Crash.ll added (r1.1) --- Log message: this crashes globalopt --- Diffs of the changes: (+74 -0) 2007-05-13-Crash.ll | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 74 insertions(+) Index: llvm/test/Transforms/GlobalOpt/2007-05-13-Crash.ll diff -c /dev/null llvm/test/Transforms/GlobalOpt/2007-05-13-Crash.ll:1.1 *** /dev/null Sun May 13 16:28:35 2007 --- llvm/test/Transforms/GlobalOpt/2007-05-13-Crash.ll Sun May 13 16:28:25 2007 *************** *** 0 **** --- 1,74 ---- + ; RUN: llvm-as < %s | opt -globalopt -disable-output + + target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64" + target triple = "i686-apple-darwin8" + %struct.SFLMutableListItem = type { i16 } + %struct.__CFDictionary = type opaque + %struct.__CFString = type opaque + %struct.__builtin_CFString = type { i32*, i32, i8*, i32 } + @_ZZ19SFLGetVisibilityKeyvE19_kSFLLVisibilityKey = internal global %struct.__CFString* null ; <%struct.__CFString**> [#uses=2] + @_ZZ22SFLGetAlwaysVisibleKeyvE22_kSFLLAlwaysVisibleKey = internal global %struct.__CFString* null ; <%struct.__CFString**> [#uses=7] + internal constant %struct.__builtin_CFString { + i32* getelementptr ([0 x i32]* @__CFConstantStringClassReference, i32 0, i32 0), + i32 1992, + i8* getelementptr ([14 x i8]* @.str, i32 0, i32 0), + i32 13 }, section "__DATA,__cfstring" ; <%struct.__builtin_CFString*>:0 [#uses=1] + @__CFConstantStringClassReference = external global [0 x i32] ; <[0 x i32]*> [#uses=1] + @.str = internal constant [14 x i8] c"AlwaysVisible\00" ; <[14 x i8]*> [#uses=1] + @_ZZ21SFLGetNeverVisibleKeyvE21_kSFLLNeverVisibleKey = internal global %struct.__CFString* null ; <%struct.__CFString**> [#uses=2] + + define %struct.__CFString* @_Z19SFLGetVisibilityKeyv() { + entry: + %tmp1 = load %struct.__CFString** @_ZZ19SFLGetVisibilityKeyvE19_kSFLLVisibilityKey ; <%struct.__CFString*> [#uses=1] + ret %struct.__CFString* %tmp1 + } + + define %struct.__CFString* @_Z22SFLGetAlwaysVisibleKeyv() { + entry: + %tmp1 = load %struct.__CFString** @_ZZ22SFLGetAlwaysVisibleKeyvE22_kSFLLAlwaysVisibleKey ; <%struct.__CFString*> [#uses=1] + %tmp2 = icmp eq %struct.__CFString* %tmp1, null ; [#uses=1] + br i1 %tmp2, label %cond_true, label %cond_next + + cond_true: ; preds = %entry + store %struct.__CFString* bitcast (%struct.__builtin_CFString* @0 to %struct.__CFString*), %struct.__CFString** @_ZZ22SFLGetAlwaysVisibleKeyvE22_kSFLLAlwaysVisibleKey + br label %cond_next + + cond_next: ; preds = %entry, %cond_true + %tmp4 = load %struct.__CFString** @_ZZ22SFLGetAlwaysVisibleKeyvE22_kSFLLAlwaysVisibleKey ; <%struct.__CFString*> [#uses=1] + ret %struct.__CFString* %tmp4 + } + + define %struct.__CFString* @_Z21SFLGetNeverVisibleKeyv() { + entry: + %tmp1 = load %struct.__CFString** @_ZZ21SFLGetNeverVisibleKeyvE21_kSFLLNeverVisibleKey ; <%struct.__CFString*> [#uses=1] + ret %struct.__CFString* %tmp1 + } + + define %struct.__CFDictionary* @_ZN18SFLMutableListItem18GetPrefsDictionaryEv(%struct.SFLMutableListItem* %this) { + entry: + %tmp4 = getelementptr %struct.SFLMutableListItem* %this, i32 0, i32 0 ; [#uses=1] + %tmp5 = load i16* %tmp4 ; [#uses=1] + %tmp6 = icmp eq i16 %tmp5, 0 ; [#uses=1] + br i1 %tmp6, label %cond_next22, label %cond_true + + cond_true: ; preds = %entry + %tmp9 = load %struct.__CFString** @_ZZ22SFLGetAlwaysVisibleKeyvE22_kSFLLAlwaysVisibleKey ; <%struct.__CFString*> [#uses=1] + %tmp10 = icmp eq %struct.__CFString* %tmp9, null ; [#uses=1] + br i1 %tmp10, label %cond_true13, label %cond_next22 + + cond_true13: ; preds = %cond_true + store %struct.__CFString* bitcast (%struct.__builtin_CFString* @0 to %struct.__CFString*), %struct.__CFString** @_ZZ22SFLGetAlwaysVisibleKeyvE22_kSFLLAlwaysVisibleKey + br label %cond_next22 + + cond_next22: ; preds = %entry, %cond_true13, %cond_true + %iftmp.1.0.in = phi %struct.__CFString** [ @_ZZ22SFLGetAlwaysVisibleKeyvE22_kSFLLAlwaysVisibleKey, %cond_true ], [ @_ZZ22SFLGetAlwaysVisibleKeyvE22_kSFLLAlwaysVisibleKey, %cond_true13 ], [ @_ZZ21SFLGetNeverVisibleKeyvE21_kSFLLNeverVisibleKey, %entry ] ; <%struct.__CFString**> [#uses=1] + %iftmp.1.0 = load %struct.__CFString** %iftmp.1.0.in ; <%struct.__CFString*> [#uses=1] + %tmp24 = load %struct.__CFString** @_ZZ19SFLGetVisibilityKeyvE19_kSFLLVisibilityKey ; <%struct.__CFString*> [#uses=1] + %tmp2728 = bitcast %struct.__CFString* %tmp24 to i8* ; [#uses=1] + %tmp2930 = bitcast %struct.__CFString* %iftmp.1.0 to i8* ; [#uses=1] + call void @_Z20CFDictionaryAddValuePKvS0_( i8* %tmp2728, i8* %tmp2930 ) + ret %struct.__CFDictionary* undef + } + + declare void @_Z20CFDictionaryAddValuePKvS0_(i8*, i8*) + From sabre at nondot.org Sun May 13 17:01:00 2007 From: sabre at nondot.org (Chris Lattner) Date: Sun, 13 May 2007 17:01:00 -0500 Subject: [llvm-commits] CVS: llvm-test/SingleSource/UnitTests/2007-04-25-weak.c Message-ID: <200705132201.l4DM1006022634@zion.cs.uiuc.edu> Changes in directory llvm-test/SingleSource/UnitTests: 2007-04-25-weak.c updated: 1.1 -> 1.2 --- Log message: darwinize this testcase --- Diffs of the changes: (+5 -0) 2007-04-25-weak.c | 5 +++++ 1 files changed, 5 insertions(+) Index: llvm-test/SingleSource/UnitTests/2007-04-25-weak.c diff -u llvm-test/SingleSource/UnitTests/2007-04-25-weak.c:1.1 llvm-test/SingleSource/UnitTests/2007-04-25-weak.c:1.2 --- llvm-test/SingleSource/UnitTests/2007-04-25-weak.c:1.1 Wed Apr 25 09:28:10 2007 +++ llvm-test/SingleSource/UnitTests/2007-04-25-weak.c Sun May 13 17:00:41 2007 @@ -1,4 +1,9 @@ + +#if !defined(__linux__) && !defined(__FreeBSD__) && !defined(__OpenBSD__) +extern int test_weak () __attribute__ ((weak_import)); +#else extern int test_weak () __attribute__ ((weak)); +#endif int main(){ int (*t)() = test_weak; From sabre at nondot.org Sun May 13 17:19:47 2007 From: sabre at nondot.org (Chris Lattner) Date: Sun, 13 May 2007 17:19:47 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/CBackend/CBackend.cpp Message-ID: <200705132219.l4DMJlQI023149@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/CBackend: CBackend.cpp updated: 1.343 -> 1.344 --- Log message: Fix PR1413: http://llvm.org/PR1413 --- Diffs of the changes: (+5 -0) CBackend.cpp | 5 +++++ 1 files changed, 5 insertions(+) Index: llvm/lib/Target/CBackend/CBackend.cpp diff -u llvm/lib/Target/CBackend/CBackend.cpp:1.343 llvm/lib/Target/CBackend/CBackend.cpp:1.344 --- llvm/lib/Target/CBackend/CBackend.cpp:1.343 Wed May 2 21:57:13 2007 +++ llvm/lib/Target/CBackend/CBackend.cpp Sun May 13 17:19:27 2007 @@ -1398,6 +1398,11 @@ << "#define __ATTRIBUTE_DTOR__\n" << "#define LLVM_ASM(X)\n" << "#endif\n\n"; + + Out << "#if __GNUC__ < 4 /* Old GCC's, or compilers not GCC */ \n" + << "#define __builtin_stack_save() 0 /* not implemented */\n" + << "#define __builtin_stack_restore(X) /* noop */\n" + << "#endif\n\n"; // Output target-specific code that should be inserted into main. Out << "#define CODE_FOR_MAIN() /* Any target-specific code for main()*/\n"; From sabre at nondot.org Sun May 13 18:39:02 2007 From: sabre at nondot.org (Chris Lattner) Date: Sun, 13 May 2007 18:39:02 -0500 Subject: [llvm-commits] CVS: llvm/docs/index.html Message-ID: <200705132339.l4DNd2BI024571@zion.cs.uiuc.edu> Changes in directory llvm/docs: index.html updated: 1.63 -> 1.64 --- Log message: add a link --- Diffs of the changes: (+5 -1) index.html | 6 +++++- 1 files changed, 5 insertions(+), 1 deletion(-) Index: llvm/docs/index.html diff -u llvm/docs/index.html:1.63 llvm/docs/index.html:1.64 --- llvm/docs/index.html:1.63 Sun May 6 18:20:06 2007 +++ llvm/docs/index.html Sun May 13 18:38:44 2007 @@ -203,6 +203,10 @@ LLVM - This document describes the design and philosophy behind the LLVM source-level debugger. +
    • Zero Cost Exception handling in LLVM +- This document describes the design and implementation of exception handling +in LLVM.
    • +
    • Bugpoint - automatic bug finder and test-case reducer description and usage information.
    • @@ -265,6 +269,6 @@ src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!"> LLVM Compiler Infrastructure
      - Last modified: $Date: 2007/05/06 23:20:06 $ + Last modified: $Date: 2007/05/13 23:38:44 $ From reid at x10sys.com Sun May 13 18:45:23 2007 From: reid at x10sys.com (Reid Spencer) Date: Sun, 13 May 2007 18:45:23 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/ADT/APInt.h Message-ID: <200705132345.l4DNjNrP024686@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/ADT: APInt.h updated: 1.67 -> 1.68 --- Log message: Add some things needed by the llvm-gcc version supporting bit accurate integer types: 1. Functions to compute div/rem at the same time. 2. Further assurance that an APInt with 0 bitwidth cannot be constructed. 3. Left and right rotate operations. 4. An exactLogBase2 function which requires an exact power of two or it returns -1. --- Diffs of the changes: (+39 -0) APInt.h | 39 +++++++++++++++++++++++++++++++++++++++ 1 files changed, 39 insertions(+) Index: llvm/include/llvm/ADT/APInt.h diff -u llvm/include/llvm/ADT/APInt.h:1.67 llvm/include/llvm/ADT/APInt.h:1.68 --- llvm/include/llvm/ADT/APInt.h:1.67 Thu May 3 12:09:36 2007 +++ llvm/include/llvm/ADT/APInt.h Sun May 13 18:44:59 2007 @@ -567,6 +567,12 @@ /// @brief Left-shift function. APInt shl(uint32_t shiftAmt) const; + /// @brief Rotate left by rotateAmt. + APInt rotl(uint32_t rotateAmt) const; + + /// @brief Rotate right by rotateAmt. + APInt rotr(uint32_t rotateAmt) const; + /// Perform an unsigned divide operation on this APInt by RHS. Both this and /// RHS are treated as unsigned quantities for purposes of this division. /// @returns a new APInt value containing the division result @@ -608,6 +614,31 @@ return this->urem(RHS); } + /// Sometimes it is convenient to divide two APInt values and obtain both + /// the quotient and remainder. This function does both operations in the + /// same computation making it a little more efficient. + /// @brief Dual division/remainder interface. + static void udivrem(const APInt &LHS, const APInt &RHS, + APInt &Quotient, APInt &Remainder); + + static void sdivrem(const APInt &LHS, const APInt &RHS, + APInt &Quotient, APInt &Remainder) + { + if (LHS.isNegative()) { + if (RHS.isNegative()) + APInt::udivrem(-LHS, -RHS, Quotient, Remainder); + else + APInt::udivrem(-LHS, RHS, Quotient, Remainder); + Quotient = -Quotient; + Remainder = -Remainder; + } else if (RHS.isNegative()) { + APInt::udivrem(LHS, -RHS, Quotient, Remainder); + Quotient = -Quotient; + } else { + APInt::udivrem(LHS, RHS, Quotient, Remainder); + } + } + /// @returns the bit value at bitPosition /// @brief Array-indexing support. bool operator[](uint32_t bitPosition) const; @@ -988,6 +1019,14 @@ return BitWidth - 1 - countLeadingZeros(); } + /// @returns the log base 2 of this APInt if its an exact power of two, -1 + /// otherwise + inline int32_t exactLogBase2() const { + if (!isPowerOf2()) + return -1; + return logBase2(); + } + /// @brief Compute the square root APInt sqrt() const; From reid at x10sys.com Sun May 13 18:45:23 2007 From: reid at x10sys.com (Reid Spencer) Date: Sun, 13 May 2007 18:45:23 -0500 Subject: [llvm-commits] CVS: llvm/lib/Support/APInt.cpp Message-ID: <200705132345.l4DNjN2L024689@zion.cs.uiuc.edu> Changes in directory llvm/lib/Support: APInt.cpp updated: 1.80 -> 1.81 --- Log message: Add some things needed by the llvm-gcc version supporting bit accurate integer types: 1. Functions to compute div/rem at the same time. 2. Further assurance that an APInt with 0 bitwidth cannot be constructed. 3. Left and right rotate operations. 4. An exactLogBase2 function which requires an exact power of two or it returns -1. --- Diffs of the changes: (+67 -1) APInt.cpp | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 67 insertions(+), 1 deletion(-) Index: llvm/lib/Support/APInt.cpp diff -u llvm/lib/Support/APInt.cpp:1.80 llvm/lib/Support/APInt.cpp:1.81 --- llvm/lib/Support/APInt.cpp:1.80 Sat May 12 13:01:57 2007 +++ llvm/lib/Support/APInt.cpp Sun May 13 18:44:59 2007 @@ -82,17 +82,23 @@ APInt::APInt(uint32_t numbits, const char StrStart[], uint32_t slen, uint8_t radix) : BitWidth(numbits), VAL(0) { + assert(BitWidth >= IntegerType::MIN_INT_BITS && "bitwidth too small"); + assert(BitWidth <= IntegerType::MAX_INT_BITS && "bitwidth too large"); fromString(numbits, StrStart, slen, radix); } APInt::APInt(uint32_t numbits, const std::string& Val, uint8_t radix) : BitWidth(numbits), VAL(0) { + assert(BitWidth >= IntegerType::MIN_INT_BITS && "bitwidth too small"); + assert(BitWidth <= IntegerType::MAX_INT_BITS && "bitwidth too large"); assert(!Val.empty() && "String empty?"); fromString(numbits, Val.c_str(), Val.size(), radix); } APInt::APInt(const APInt& that) : BitWidth(that.BitWidth), VAL(0) { + assert(BitWidth >= IntegerType::MIN_INT_BITS && "bitwidth too small"); + assert(BitWidth <= IntegerType::MAX_INT_BITS && "bitwidth too large"); if (isSingleWord()) VAL = that.VAL; else { @@ -1242,6 +1248,23 @@ return APInt(val, BitWidth).clearUnusedBits(); } +APInt APInt::rotl(uint32_t rotateAmt) const { + // Don't get too fancy, just use existing shift/or facilities + APInt hi(*this); + APInt lo(*this); + hi.shl(rotateAmt); + lo.lshr(BitWidth - rotateAmt); + return hi | lo; +} + +APInt APInt::rotr(uint32_t rotateAmt) const { + // Don't get too fancy, just use existing shift/or facilities + APInt hi(*this); + APInt lo(*this); + lo.lshr(rotateAmt); + hi.shl(BitWidth - rotateAmt); + return hi | lo; +} // Square Root - this method computes and returns the square root of "this". // Three mechanisms are used for computation. For small values (<= 5 bits), @@ -1754,12 +1777,55 @@ return APInt(BitWidth, pVal[0] % RHS.pVal[0]); } - // We have to compute it the hard way. Invoke the Knute divide algorithm. + // We have to compute it the hard way. Invoke the Knuth divide algorithm. APInt Remainder(1,0); divide(*this, lhsWords, RHS, rhsWords, 0, &Remainder); return Remainder; } +void APInt::udivrem(const APInt &LHS, const APInt &RHS, + APInt &Quotient, APInt &Remainder) { + // Get some size facts about the dividend and divisor + uint32_t lhsBits = LHS.getActiveBits(); + uint32_t lhsWords = !lhsBits ? 0 : (APInt::whichWord(lhsBits - 1) + 1); + uint32_t rhsBits = RHS.getActiveBits(); + uint32_t rhsWords = !rhsBits ? 0 : (APInt::whichWord(rhsBits - 1) + 1); + + // Check the degenerate cases + if (lhsWords == 0) { + Quotient = 0; // 0 / Y ===> 0 + Remainder = 0; // 0 % Y ===> 0 + return; + } + + if (lhsWords < rhsWords || LHS.ult(RHS)) { + Quotient = 0; // X / Y ===> 0, iff X < Y + Remainder = LHS; // X % Y ===> X, iff X < Y + return; + } + + if (LHS == RHS) { + Quotient = 1; // X / X ===> 1 + Remainder = 0; // X % X ===> 0; + return; + } + + if (lhsWords == 1 && rhsWords == 1) { + // There is only one word to consider so use the native versions. + if (LHS.isSingleWord()) { + Quotient = APInt(LHS.getBitWidth(), LHS.VAL / RHS.VAL); + Remainder = APInt(LHS.getBitWidth(), LHS.VAL % RHS.VAL); + } else { + Quotient = APInt(LHS.getBitWidth(), LHS.pVal[0] / RHS.pVal[0]); + Remainder = APInt(LHS.getBitWidth(), LHS.pVal[0] % RHS.pVal[0]); + } + return; + } + + // Okay, lets do it the long way + divide(LHS, lhsWords, RHS, rhsWords, &Quotient, &Remainder); +} + void APInt::fromString(uint32_t numbits, const char *str, uint32_t slen, uint8_t radix) { // Check our assumptions here From clattner at apple.com Sun May 13 18:49:13 2007 From: clattner at apple.com (Chris Lattner) Date: Sun, 13 May 2007 16:49:13 -0700 Subject: [llvm-commits] CVS: llvm/lib/Support/APInt.cpp In-Reply-To: <200705132345.l4DNjN2L024689@zion.cs.uiuc.edu> References: <200705132345.l4DNjN2L024689@zion.cs.uiuc.edu> Message-ID: <13FE5645-37CE-41A1-A6BA-32DF8C6BB40F@apple.com> On May 13, 2007, at 4:45 PM, Reid Spencer wrote: > +APInt APInt::rotl(uint32_t rotateAmt) const { > + // Don't get too fancy, just use existing shift/or facilities > + APInt hi(*this); > + APInt lo(*this); > + hi.shl(rotateAmt); > + lo.lshr(BitWidth - rotateAmt); > + return hi | lo; > +} > + > +APInt APInt::rotr(uint32_t rotateAmt) const { > + // Don't get too fancy, just use existing shift/or facilities > + APInt hi(*this); > + APInt lo(*this); > + lo.lshr(rotateAmt); > + hi.shl(BitWidth - rotateAmt); > + return hi | lo; > +} Do these work for rotamt = 0 ? -Chris From rspencer at reidspencer.com Sun May 13 18:57:22 2007 From: rspencer at reidspencer.com (Reid Spencer) Date: Sun, 13 May 2007 23:57:22 +0000 Subject: [llvm-commits] CVS: llvm/lib/Support/APInt.cpp In-Reply-To: <13FE5645-37CE-41A1-A6BA-32DF8C6BB40F@apple.com> References: <200705132345.l4DNjN2L024689@zion.cs.uiuc.edu> <13FE5645-37CE-41A1-A6BA-32DF8C6BB40F@apple.com> Message-ID: <1179100642.1233.182.camel@bashful.x10sys.com> On Sun, 2007-05-13 at 16:49 -0700, Chris Lattner wrote: > On May 13, 2007, at 4:45 PM, Reid Spencer wrote: > > > +APInt APInt::rotl(uint32_t rotateAmt) const { > > + // Don't get too fancy, just use existing shift/or facilities > > + APInt hi(*this); > > + APInt lo(*this); > > + hi.shl(rotateAmt); > > + lo.lshr(BitWidth - rotateAmt); > > + return hi | lo; > > +} > > + > > +APInt APInt::rotr(uint32_t rotateAmt) const { > > + // Don't get too fancy, just use existing shift/or facilities > > + APInt hi(*this); > > + APInt lo(*this); > > + lo.lshr(rotateAmt); > > + hi.shl(BitWidth - rotateAmt); > > + return hi | lo; > > +} > > Do these work for rotamt = 0 ? Yes, but results are undefined (in our case value 0). This behavior is implemented in lshr and shl. Reid. > > -Chris > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From clattner at apple.com Sun May 13 19:05:07 2007 From: clattner at apple.com (Chris Lattner) Date: Sun, 13 May 2007 17:05:07 -0700 Subject: [llvm-commits] CVS: llvm/lib/Support/APInt.cpp In-Reply-To: <1179100642.1233.182.camel@bashful.x10sys.com> References: <200705132345.l4DNjN2L024689@zion.cs.uiuc.edu> <13FE5645-37CE-41A1-A6BA-32DF8C6BB40F@apple.com> <1179100642.1233.182.camel@bashful.x10sys.com> Message-ID: <8D734FFE-CA33-4CDC-8998-8B55EBBE9628@apple.com> On May 13, 2007, at 4:57 PM, Reid Spencer wrote: > On Sun, 2007-05-13 at 16:49 -0700, Chris Lattner wrote: >> On May 13, 2007, at 4:45 PM, Reid Spencer wrote: >> >>> +APInt APInt::rotl(uint32_t rotateAmt) const { >>> + // Don't get too fancy, just use existing shift/or facilities >>> + APInt hi(*this); >>> + APInt lo(*this); >>> + hi.shl(rotateAmt); >>> + lo.lshr(BitWidth - rotateAmt); >>> + return hi | lo; >>> +} >>> + >>> +APInt APInt::rotr(uint32_t rotateAmt) const { >>> + // Don't get too fancy, just use existing shift/or facilities >>> + APInt hi(*this); >>> + APInt lo(*this); >>> + lo.lshr(rotateAmt); >>> + hi.shl(BitWidth - rotateAmt); >>> + return hi | lo; >>> +} >> >> Do these work for rotamt = 0 ? > > Yes, but results are undefined (in our case value 0). This behavior is > implemented in lshr and shl. I don't understand. Rotate by 0 is well defined. Rotate by "32" isn't. does lshl/lshr do the 'right' thing with "32" ? -Chris From reid at x10sys.com Sun May 13 19:15:47 2007 From: reid at x10sys.com (Reid Spencer) Date: Sun, 13 May 2007 19:15:47 -0500 Subject: [llvm-commits] CVS: llvm/lib/Support/APInt.cpp Message-ID: <200705140015.l4E0Flok025146@zion.cs.uiuc.edu> Changes in directory llvm/lib/Support: APInt.cpp updated: 1.81 -> 1.82 --- Log message: Make the results for the rotate functions correct when rotateAmt == 0. --- Diffs of the changes: (+4 -0) APInt.cpp | 4 ++++ 1 files changed, 4 insertions(+) Index: llvm/lib/Support/APInt.cpp diff -u llvm/lib/Support/APInt.cpp:1.81 llvm/lib/Support/APInt.cpp:1.82 --- llvm/lib/Support/APInt.cpp:1.81 Sun May 13 18:44:59 2007 +++ llvm/lib/Support/APInt.cpp Sun May 13 19:15:28 2007 @@ -1249,6 +1249,8 @@ } APInt APInt::rotl(uint32_t rotateAmt) const { + if (rotateAmt == 0) + return *this; // Don't get too fancy, just use existing shift/or facilities APInt hi(*this); APInt lo(*this); @@ -1258,6 +1260,8 @@ } APInt APInt::rotr(uint32_t rotateAmt) const { + if (rotateAmt == 0) + return *this; // Don't get too fancy, just use existing shift/or facilities APInt hi(*this); APInt lo(*this); From sabre at nondot.org Sun May 13 20:54:34 2007 From: sabre at nondot.org (Chris Lattner) Date: Sun, 13 May 2007 20:54:34 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Analysis/Dominators.h Message-ID: <200705140154.l4E1sYZv027231@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Analysis: Dominators.h updated: 1.81 -> 1.82 --- Log message: update comments --- Diffs of the changes: (+2 -3) Dominators.h | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) Index: llvm/include/llvm/Analysis/Dominators.h diff -u llvm/include/llvm/Analysis/Dominators.h:1.81 llvm/include/llvm/Analysis/Dominators.h:1.82 --- llvm/include/llvm/Analysis/Dominators.h:1.81 Sun May 6 08:37:15 2007 +++ llvm/include/llvm/Analysis/Dominators.h Sun May 13 20:54:16 2007 @@ -8,8 +8,7 @@ //===----------------------------------------------------------------------===// // // This file defines the following classes: -// 1. DominatorTree: Represent the ImmediateDominator as an explicit tree -// structure. +// 1. DominatorTree: Represent dominators as an explicit tree structure. // 2. ETForest: Efficient data structure for dominance comparisons and // nearest-common-ancestor queries. // 3. DominanceFrontier: Calculate and hold the dominance frontier for a @@ -17,7 +16,7 @@ // // These data structures are listed in increasing order of complexity. It // takes longer to calculate the dominator frontier, for example, than the -// ImmediateDominator mapping. +// DominatorTree mapping. // //===----------------------------------------------------------------------===//

    Session 0:
    Introductions

    StartStopWhoDescription
    08:0008:45Everyone

    Coffee

    08:0008:45Everyone Meet and Greet. Social time, get your coffee, etc.

    Session 0:
    Introductions

    StartStopWhoDescription
    08:4509:00 Vikram Adve
    Chris Lattner
    LLVM History. During this brief session, Vikram and Chris @@ -88,7 +88,7 @@ you work with it, or anything else you want to say. The time is yours.

    Break

    10:0010:30Everyone

    Break

    10:0010:30Everyone Disscussions. Now that you know a little about everyone else, take some time to have some discussions and make connections. Group photo at 10:25.

    Lunch

    12:0013:00Everyone

    Lunch

    12:0013:00Everyone Thanks to a generous sponsor, lunch will be catered.

    Session 2:
    Using LLVM

    14:3015:00Steve Naroff Objective-C. Improvements to the Objective-C front end.

    Break

    15:0015:30Everyone

    Break

    15:0015:30Everyone Inter-session afternoon break (yes, napping's allowed at this one).

    Wrap Up

    17:0018:00Everyone

    Wrap Up

    17:0018:00Everyone This is some "spill" time (a concept you should be familiar with). If we don't need it then it's social time.

    Dinner

    18:0021:00Everyone

    Dinner

    18:0021:00Everyone (Optional). Those who want to go for dinner (pay your own way) should try to get to the restaurant by 6pm.

    Session 4:
    Discussions

    Session 3:
    Discussions

    StartStopLeaderDescription
    15:3015:45Chrisopher Lamb

    Coffee

    08:0008:45Everyone Meet and Greet. Social time, get your coffee, etc.

    Session 0:
    Introductions

    Session 0:
    Introductions

    StartStopWhoDescription
    08:4509:00 Vikram Adve
    Chris Lattner
    Disscussions. Now that you know a little about everyone else, take some time to have some discussions and make connections. Group photo at 10:25.

    Session 1:
    Learning LLVM

    Session 1:
    Learning LLVM

    StartStopSpeakerDescription
    10:3010:50Devang Patel Demystifying The LLVM Pass Manager. The PassManager, which @@ -344,6 +344,6 @@ src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"> Valid HTML 4.01! -
    Last modified: $Date: 2007/05/09 04:51:04 $ +
    Last modified: $Date: 2007/05/09 04:54:15 $ From reid at x10sys.com Tue May 8 23:55:45 2007 From: reid at x10sys.com (Reid Spencer) Date: Tue, 8 May 2007 23:55:45 -0500 Subject: [llvm-commits] CVS: llvm-www/DevMtgMay2007.html Message-ID: <200705090455.l494tjoN011878@zion.cs.uiuc.edu> Changes in directory llvm-www: DevMtgMay2007.html updated: 1.125 -> 1.126 --- Log message: No, really, get the rowspan thing right. --- Diffs of the changes: (+2 -2) DevMtgMay2007.html | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm-www/DevMtgMay2007.html diff -u llvm-www/DevMtgMay2007.html:1.125 llvm-www/DevMtgMay2007.html:1.126 --- llvm-www/DevMtgMay2007.html:1.125 Tue May 8 23:54:15 2007 +++ llvm-www/DevMtgMay2007.html Tue May 8 23:55:27 2007 @@ -92,7 +92,7 @@
    Disscussions. Now that you know a little about everyone else, take some time to have some discussions and make connections. Group photo at 10:25.

    Session 1:
    Learning LLVM

    Session 1:
    Learning LLVM

    StartStopSpeakerDescription
    10:3010:50Devang Patel Demystifying The LLVM Pass Manager. The PassManager, which @@ -344,6 +344,6 @@ src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"> Valid HTML 4.01! -
    Last modified: $Date: 2007/05/09 04:54:15 $ +
    Last modified: $Date: 2007/05/09 04:55:27 $ From sabre at nondot.org Tue May 8 23:58:29 2007 From: sabre at nondot.org (Chris Lattner) Date: Tue, 8 May 2007 23:58:29 -0500 Subject: [llvm-commits] CVS: llvm/docs/ReleaseNotes.html Message-ID: <200705090458.l494wTox011969@zion.cs.uiuc.edu> Changes in directory llvm/docs: ReleaseNotes.html updated: 1.368 -> 1.369 --- Log message: strip the llvm 1.9 info out of the release notes --- Diffs of the changes: (+29 -121) ReleaseNotes.html | 150 ++++++++++-------------------------------------------- 1 files changed, 29 insertions(+), 121 deletions(-) Index: llvm/docs/ReleaseNotes.html diff -u llvm/docs/ReleaseNotes.html:1.368 llvm/docs/ReleaseNotes.html:1.369 --- llvm/docs/ReleaseNotes.html:1.368 Tue Apr 3 23:14:31 2007 +++ llvm/docs/ReleaseNotes.html Tue May 8 23:58:11 2007 @@ -4,11 +4,11 @@ - LLVM 1.9 Release Notes + LLVM 2.0 Release Notes -
    LLVM 1.9 Release Notes
    +
    LLVM 2.0 Release Notes
    1. Introduction
    2. @@ -32,13 +32,10 @@

      This document contains the release notes for the LLVM compiler -infrastructure, release 1.9. Here we describe the status of LLVM, including any -known problems and major improvements from the previous release. The most -up-to-date version of this document (corresponding to LLVM CVS) can be found -on the LLVM releases web site. If you are -not reading this on the LLVM web pages, you should probably go there because -this document may be updated after the release.

      +infrastructure, release 2.0. Here we describe the status of LLVM, including any +known problems and major improvements from the previous release. All LLVM +releases may be downloaded from the LLVM +releases web site.

      For more information about LLVM, including information about the latest release, please check out the main LLVM @@ -61,8 +58,18 @@

      -

      This is the tenth public release of the LLVM Compiler Infrastructure. This -release incorporates a large number of enhancements, new features, and bug +

      This is the eleventh public release of the LLVM Compiler Infrastructure. +Being the first major release since 1.0, we took this as an opportunity to +break backwards compatibility with the LLVM 1.x bytecode and .ll file format. +If you have LLVM 1.9 .ll files that you would like to upgrade to LLVM 2.x, we +recommend the use of the stand alone llvm-upgrade +tool. We intend to keep compatibility with .ll and .bc formats within the 2.x +release series.

      + +

      Note that while + This +release +incorporates a large number of enhancements, new features, and bug fixes. We recommend that all users of previous LLVM versions upgrade.

      @@ -70,37 +77,7 @@ - - - -
      -

      LLVM 1.9 now fully supports the x86-64 instruction set on Mac OS/X, and -supports it on Linux (and other operating systems) when compiling in -static -mode. LLVM includes JIT support for X86-64, and supports both Intel EMT-64T -and AMD-64 architectures. The X86-64 instruction set permits addressing a -64-bit addressing space and provides the compiler with twice the -number of integer registers to use.

      -
      - - - -
      -

      LLVM now includes liblto which can -be used to integrate LLVM Link-Time Optimization support into a native linker. -This allows LLVM .bc to transparently participate with linking an application, -even when some .o files are in LLVM form and some are not.

      -
      - - - -
      -

      llvm-gcc4 now supports generating debugging info for Linux, Cygwin and MinGW. -This extends the PPC/Darwin and X86/Darwin debugging support available in the -1.8 release. DWARF is a standard debugging format used on many platforms.

      +New Features in LLVM 2.0
      @@ -111,17 +88,7 @@ Significant changes include:

        -
      • LLVM includes a new 'predicate simplifier' pass, which - currently performs dominator tree-based optimizations.
      • -
      • The complete loop unroll pass now supports unrolling of - multiple basic block loops.
      • -
      • The 'globalopt' pass can now perform the scalar replacement of - aggregates transformation on some heap allocations.
      • -
      • The globalsmodref-aa alias analysis can now track 'indirect pointer - globals' more accurately.
      • -
      • The instruction combiner can now perform element propagation -analysis of vector expressions, eliminating computation of vector elements -that are not used.
      • +
      @@ -137,41 +104,21 @@

        -
      • LLVM now includes a late branch folding pass which optimizes code - layout, performs several branch optzns, and deletes unreachable code.
      • -
      • The code generator now support targets that have pre/post-increment - addressing modes.
      • -
      • LLVM now supports dynamically-loadable register allocators and - schedulers.
      • -
      • LLVM 1.9 includes several improvements to inline asm support, - including support for new constraints and modifiers.
      • -
      • The register coalescer is now more aggressive than before, - allowing it to eliminate more copies.
      • +

      In addition, the LLVM target description format has itself been extended in several ways:

        -
      • tblgen now allows definition of 'multiclasses' which can be - used to factor instruction patterns more aggressively in .td files.
      • -
      • LLVM has a new TargetAsmInfo class which captures a variety of - information about the target assembly language format.
      • -
      • .td files now support "${:foo}" syntax for encoding - subtarget-specific assembler syntax into instruction descriptions.
      • +

      Further, several significant target-specific enhancements are included in -LLVM 1.9:

      +LLVM 2.0:

        -
      • The LLVM ARM backend now supports more instructions - and the use of a frame pointer. It is now possible to build - libgcc and a simple cross compiler, but it is not considered "complete" yet. -
      • -
      • LLVM supports the Win32 dllimport/dllexport linkage and - stdcall/fastcall calling conventions.
      • +
      @@ -179,51 +126,15 @@
      -

      This release includes many other improvements, including improvements to - the optimizers and code generators (improving the generated code) changes to - speed up the compiler in many ways (improving algorithms and fine tuning - code), and changes to reduce the code size of the compiler itself.

      +

      More specific changes include:

        -
      • The llvm-test framework now supports SPEC2006.
      • -
      • LLVM now includes a FAQ about the -getelementptr instruction.
      • -
      • Bugpoint now supports a new "-find-bugs" mode. This mode makes - bugpoint permute pass sequences to try to expose bugs due to pass - sequencing.
      • -
      • The JIT now supports lazily streaming code from multiple modules at a - time, implicitly linking the code as it goes.
      • +
      - - - -
      - -

      Several significant API changes have been made. If you are maintaining -out-of-tree code, please be aware that:

      - -
        -
      • The ConstantSInt and ConstantUInt classes have been merged into the - ConstantInt class.
      • -
      • As a step towards making LLVM's integer types signless, several new -instructions have been added to LLVM. The Div instruction is now -UDiv, SDiv, and FDiv. The Rem instruction -is now URem, SRem and FRem. See the -Language Reference for details on these new -instructions.

        -
      • ConstantBool::True and ConstantBool::False have been - renamed to ConstantBool::getTrue() and - ConstantBool::getFalse().

      • -
      • The 'analyze' tool has been merged into the 'opt' tool.
      • - -
      -
      @@ -307,9 +218,7 @@ @@ -324,8 +233,6 @@ @@ -415,6 +322,7 @@
    3. Defining vararg functions is not supported (but calling them is ok).
    4. +
    5. The Itanium backend has bitrotted somewhat.
    6. @@ -680,7 +588,7 @@ src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!" /> The LLVM Compiler Infrastructure
      - Last modified: $Date: 2007/04/04 04:14:31 $ + Last modified: $Date: 2007/05/09 04:58:11 $ From reid at x10sys.com Wed May 9 00:06:03 2007 From: reid at x10sys.com (Reid Spencer) Date: Wed, 9 May 2007 00:06:03 -0500 Subject: [llvm-commits] CVS: llvm-www/DevMtgMay2007.html Message-ID: <200705090506.l49563vd012162@zion.cs.uiuc.edu> Changes in directory llvm-www: DevMtgMay2007.html updated: 1.126 -> 1.127 --- Log message: Some more formatting corrections. --- Diffs of the changes: (+7 -4) DevMtgMay2007.html | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) Index: llvm-www/DevMtgMay2007.html diff -u llvm-www/DevMtgMay2007.html:1.126 llvm-www/DevMtgMay2007.html:1.127 --- llvm-www/DevMtgMay2007.html:1.126 Tue May 8 23:55:27 2007 +++ llvm-www/DevMtgMay2007.html Wed May 9 00:05:45 2007 @@ -68,8 +68,11 @@ preliminary agenda. That said, here's roughly how we think the meeting will go (all times approximate):

      - - + + + @@ -106,7 +109,7 @@ coming in the future. - @@ -344,6 +347,6 @@ src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!">Valid HTML 4.01! -
      Last modified: $Date: 2007/05/09 04:55:27 $ +
      Last modified: $Date: 2007/05/09 05:05:45 $ From reid at x10sys.com Wed May 9 00:19:32 2007 From: reid at x10sys.com (Reid Spencer) Date: Wed, 9 May 2007 00:19:32 -0500 Subject: [llvm-commits] CVS: llvm-www/DevMtgMay2007.html Message-ID: <200705090519.l495JWCk021546@zion.cs.uiuc.edu> Changes in directory llvm-www: DevMtgMay2007.html updated: 1.127 -> 1.128 --- Log message: Add Jeff Cohen's talk. --- Diffs of the changes: (+15 -9) DevMtgMay2007.html | 24 +++++++++++++++--------- 1 files changed, 15 insertions(+), 9 deletions(-) Index: llvm-www/DevMtgMay2007.html diff -u llvm-www/DevMtgMay2007.html:1.127 llvm-www/DevMtgMay2007.html:1.128 --- llvm-www/DevMtgMay2007.html:1.127 Wed May 9 00:05:45 2007 +++ llvm-www/DevMtgMay2007.html Wed May 9 00:19:11 2007 @@ -86,9 +86,10 @@ @@ -124,22 +125,27 @@ - + - + - + - - + + + + + @@ -347,6 +353,6 @@ src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!">Valid HTML 4.01! -
      Last modified: $Date: 2007/05/09 05:05:45 $ +
      Last modified: $Date: 2007/05/09 05:19:11 $ From reid at x10sys.com Wed May 9 00:22:11 2007 From: reid at x10sys.com (Reid Spencer) Date: Wed, 9 May 2007 00:22:11 -0500 Subject: [llvm-commits] CVS: llvm-www/DevMtgMay2007.html Message-ID: <200705090522.l495MBQG022625@zion.cs.uiuc.edu> Changes in directory llvm-www: DevMtgMay2007.html updated: 1.128 -> 1.129 --- Log message: Fix a title. --- Diffs of the changes: (+2 -2) DevMtgMay2007.html | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm-www/DevMtgMay2007.html diff -u llvm-www/DevMtgMay2007.html:1.128 llvm-www/DevMtgMay2007.html:1.129 --- llvm-www/DevMtgMay2007.html:1.128 Wed May 9 00:19:11 2007 +++ llvm-www/DevMtgMay2007.html Wed May 9 00:21:44 2007 @@ -156,7 +156,7 @@ - + - + - @@ -354,6 +353,6 @@ src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!">Valid HTML 4.01! -
      Last modified: $Date: 2007/05/09 05:22:49 $ +
      Last modified: $Date: 2007/05/09 22:05:36 $ From asl at math.spbu.ru Wed May 9 18:27:55 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Thu, 10 May 2007 03:27:55 +0400 Subject: [llvm-commits] Fixincludes patch for mingw32 Message-ID: <1178753275.13114.101.camel@asl.dorms.spbu.ru> Hello, Everyone. Please apply attached patch to both llvm-gcc trunk & 2.0 release. Mingw32 system headers (complex.h) contains inline FP math, which causes libstdc++ configure to fail due to infinite cycle in llvm-gcc. Attached patch workarounds this by providing replacement code and wrapping "bad" places into __NO_MATH_INLINES define, which is default for all i386 systems now. Patch just adds one new mingw32-specific fixincludes rule, which executes long sed expression doing all dirty work :) -------------- next part -------------- A non-text attachment was scrubbed... Name: complex-fixincludes.diff Type: text/x-patch Size: 6650 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070510/721162f2/attachment.bin From evan.cheng at apple.com Wed May 9 18:41:36 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 9 May 2007 18:41:36 -0500 Subject: [llvm-commits] CVS: llvm-test/External/SPEC/CINT2000/186.crafty/Makefile Message-ID: <200705092341.l49NfaJI003475@zion.cs.uiuc.edu> Changes in directory llvm-test/External/SPEC/CINT2000/186.crafty: Makefile updated: 1.14 -> 1.15 --- Log message: Get 186.crafty working on ARM. --- Diffs of the changes: (+9 -0) Makefile | 9 +++++++++ 1 files changed, 9 insertions(+) Index: llvm-test/External/SPEC/CINT2000/186.crafty/Makefile diff -u llvm-test/External/SPEC/CINT2000/186.crafty/Makefile:1.14 llvm-test/External/SPEC/CINT2000/186.crafty/Makefile:1.15 --- llvm-test/External/SPEC/CINT2000/186.crafty/Makefile:1.14 Sun Jan 15 20:27:03 2006 +++ llvm-test/External/SPEC/CINT2000/186.crafty/Makefile Wed May 9 18:41:18 2007 @@ -25,6 +25,15 @@ ifeq ($(ARCH),Sparc) CPPFLAGS += -DSUN_BSD endif +ifeq ($(TARGET_ARCH),ARM) + CPPFLAGS += -DHAS_LONGLONG +endif +ifeq ($(OS),Darwin) + CPPFLAGS += -DUNIX -DLINUX +endif +ifeq ($(ENDIAN),little) + CPPFLAGS += -DLITTLE_ENDIAN_ARCH +endif include ../../Makefile.spec2000 From greened at obbligato.org Wed May 9 18:54:43 2007 From: greened at obbligato.org (David A. Greene) Date: Wed, 09 May 2007 18:54:43 -0500 Subject: [llvm-commits] Regalloc Refactoring In-Reply-To: References: <463E6E94.60909@obbligato.org> Message-ID: <46425F43.1020602@obbligato.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Evan Cheng wrote: > Hi, > > The patch seems pretty safe to me. The only thing I am not sure about is: [snip] > It's not clear to me if this is the right way to model this pass. After > all, this is not an analysis pass. Perhaps the right thing to do is to > model this after the register allocator. Add a createRegisterCoalescer() > to Passes.cpp which would allow us to choose the one we want. Then > register the pass in LLVMTargetMachine.cpp. Chris? What do you say? Yeah, I wasn't sure about that either. I modeled it after the way that out-of-ssa conversion is done since LinearScan assumes that coalescing has been done. I think your suggestion of createRegisterCoalescer() is the right solution in the long run. My goal here was to submit the first phase of a larger refactoring effort that separated coalescing from live interval analysis but tried not to do anything else dramatic. -Dave -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGQl9DgQsI8xjTYs8RAm5mAJ9mOWIQKNX63QHhh46SZDkx2HIW5QCaAtl5 3jHR+bEO1bQ2PGs6W52rhGA= =ctF+ -----END PGP SIGNATURE----- From sabre at nondot.org Wed May 9 19:08:24 2007 From: sabre at nondot.org (Chris Lattner) Date: Wed, 9 May 2007 19:08:24 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/README.txt Message-ID: <200705100008.l4A08OhK003900@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: README.txt updated: 1.167 -> 1.168 --- Log message: add some notes --- Diffs of the changes: (+28 -0) README.txt | 28 ++++++++++++++++++++++++++++ 1 files changed, 28 insertions(+) Index: llvm/lib/Target/X86/README.txt diff -u llvm/lib/Target/X86/README.txt:1.167 llvm/lib/Target/X86/README.txt:1.168 --- llvm/lib/Target/X86/README.txt:1.167 Sat May 5 17:10:24 2007 +++ llvm/lib/Target/X86/README.txt Wed May 9 19:08:04 2007 @@ -1094,5 +1094,33 @@ has this xform, but it is currently disabled until the alignment fields of the load/store nodes are trustworthy. +//===---------------------------------------------------------------------===// +Sometimes it is better to codegen subtractions from a constant (e.g. 7-x) with +a neg instead of a sub instruction. Consider: + +int test(char X) { return 7-X; } + +we currently produce: +_test: + movl $7, %eax + movsbl 4(%esp), %ecx + subl %ecx, %eax + ret + +We would use one fewer register if codegen'd as: + + movsbl 4(%esp), %eax + neg %eax + add $7, %eax + ret + +Note that this isn't beneficial if the load can be folded into the sub. In +this case, we want a sub: + +int test(int X) { return 7-X; } +_test: + movl $7, %eax + subl 4(%esp), %eax + ret From dalej at apple.com Wed May 9 20:02:08 2007 From: dalej at apple.com (Dale Johannesen) Date: Wed, 9 May 2007 20:02:08 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/BranchFolding.cpp Message-ID: <200705100102.l4A128Sh004854@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: BranchFolding.cpp updated: 1.50 -> 1.51 --- Log message: Make tail merging handle many more cases (all it can, I think). --- Diffs of the changes: (+91 -32) BranchFolding.cpp | 123 +++++++++++++++++++++++++++++++++++++++--------------- 1 files changed, 91 insertions(+), 32 deletions(-) Index: llvm/lib/CodeGen/BranchFolding.cpp diff -u llvm/lib/CodeGen/BranchFolding.cpp:1.50 llvm/lib/CodeGen/BranchFolding.cpp:1.51 --- llvm/lib/CodeGen/BranchFolding.cpp:1.50 Mon May 7 15:57:21 2007 +++ llvm/lib/CodeGen/BranchFolding.cpp Wed May 9 20:01:49 2007 @@ -110,7 +110,7 @@ RS = RegInfo->requiresRegisterScavenging(MF) ? new RegScavenger() : NULL; MMI = getAnalysisToUpdate(); - + bool EverMadeChange = false; bool MadeChangeThisIteration = true; while (MadeChangeThisIteration) { @@ -336,7 +336,16 @@ MachineBasicBlock::iterator MBB1I, MachineBasicBlock *MBB2, MachineBasicBlock::iterator MBB2I, - const TargetInstrInfo *TII) { + const TargetInstrInfo *TII, + MachineBasicBlock *PredBB) { + // If one block falls through into the common successor, choose that + // one to split; it is one instruction less to do that. + if (PredBB) { + if (MBB1 == PredBB) + return true; + else if (MBB2 == PredBB) + return false; + } // TODO: if we had some notion of which block was hotter, we could split // the hot block, so it is the fall-through. Since we don't have profile info // make a decision based on which will hurt most to split. @@ -349,6 +358,31 @@ return MBB1Time < MBB2Time; } +// CurMBB needs to add an unconditional branch to SuccMBB (we removed these +// branches temporarily for tail merging). In the case where CurMBB ends +// with a conditional branch to the next block, optimize by reversing the +// test and conditionally branching to SuccMBB instead. + +static void FixTail(MachineBasicBlock* CurMBB, MachineBasicBlock *SuccBB, + const TargetInstrInfo *TII) { + MachineFunction *MF = CurMBB->getParent(); + MachineFunction::iterator I = next(MachineFunction::iterator(CurMBB)); + MachineBasicBlock *TBB = 0, *FBB = 0; + std::vector Cond; + if (I != MF->end() && + !TII->AnalyzeBranch(*CurMBB, TBB, FBB, Cond)) { + MachineBasicBlock *NextBB = I; + if (TBB == NextBB && Cond.size() && !FBB) { + if (!TII->ReverseBranchCondition(Cond)) { + TII->RemoveBranch(*CurMBB); + TII->InsertBranch(*CurMBB, SuccBB, NULL, Cond); + return; + } + } + } + TII->InsertBranch(*CurMBB, SuccBB, NULL, std::vector()); +} + // See if any of the blocks in MergePotentials (which all have a common single // successor, or all have no successor) can be tail-merged. If there is a // successor, any blocks in MergePotentials that are not tail-merged and @@ -375,7 +409,7 @@ // give up. if (CurHash != PrevHash) { if (SuccBB && CurMBB != PredBB) - TII->InsertBranch(*CurMBB, SuccBB, NULL, std::vector()); + FixTail(CurMBB, SuccBB, TII); MergePotentials.pop_back(); continue; } @@ -390,6 +424,8 @@ // If the tails don't have at least two instructions in common, see if there // is anything else in the equivalence class that does match. + // Since instructions may get combined later (e.g. single stores into + // store multiple) this measure is not particularly accurate. if (CommonTailLen < 2) { unsigned FoundMatch = ~0U; for (int i = MergePotentials.size()-2; @@ -408,7 +444,7 @@ if (FoundMatch == ~0U) { // Put the unconditional branch back, if we need one. if (SuccBB && CurMBB != PredBB) - TII->InsertBranch(*CurMBB, SuccBB, NULL, std::vector()); + FixTail(CurMBB, SuccBB, TII); MergePotentials.pop_back(); continue; } @@ -428,7 +464,7 @@ } // Decide whether we want to split CurMBB or MBB2. - if (ShouldSplitFirstBlock(CurMBB, BBI1, MBB2, BBI2, TII)) { + if (ShouldSplitFirstBlock(CurMBB, BBI1, MBB2, BBI2, TII, PredBB)) { CurMBB = SplitMBBAt(*CurMBB, BBI1); BBI1 = CurMBB->begin(); MergePotentials.back().second = CurMBB; @@ -457,49 +493,69 @@ } bool BranchFolder::TailMergeBlocks(MachineFunction &MF) { - MadeChange = false; - + if (!EnableTailMerge) return false; - + + MadeChange = false; + // First find blocks with no successors. + MergePotentials.clear(); for (MachineFunction::iterator I = MF.begin(), E = MF.end(); I != E; ++I) { if (I->succ_empty()) MergePotentials.push_back(std::make_pair(HashEndOfMBB(I), I)); } - // See if we can do any crossjumping on those. + // See if we can do any tail merging on those. MadeChange |= TryMergeBlocks(NULL, NULL); - MergePotentials.clear(); - // Look at blocks with two predecessors, where each predecessor has either: - // - a single successor, or - // - two successors, where successor I is reached either by ubr or fallthrough. - // The two-successor case where successor I is reached by cbr - // from both blocks is handled by the preceding case (when we consider the - // other, fallthough block). - // FIXME: The two-successor case where I is reached by cbr - // from one block, and by fallthrough/ubr from the other, is not handled yet. - // Beware that sometimes blocks are in the predecessor list, but can't really - // jump to the "successor" we're looking at. Tolerate this. + // Look at blocks (IBB) with multiple predecessors (PBB). + // We change each predecessor to a canonical form, by + // (1) temporarily removing any unconditional branch from the predecessor + // to IBB, and + // (2) alter conditional branches so they branch to the other block + // not IBB; this may require adding back an unconditional branch to IBB + // later, where there wasn't one coming in. E.g. + // Bcc IBB + // fallthrough to QBB + // here becomes + // Bncc QBB + // with a conceptual B to IBB after that, which never actually exists. + // With those changes, we see whether the predecessors' tails match, + // and merge them if so. We change things out of canonical form and + // back to the way they were later in the process. (OptimizeBranches + // would undo some of this, but we can't use it, because we'd get into + // a compile-time infinite loop repeatedly doing and undoing the same + // transformations.) for (MachineFunction::iterator I = MF.begin(), E = MF.end(); I != E; ++I) { if (!I->succ_empty() && I->pred_size() >= 2) { MachineBasicBlock *IBB = I; MachineBasicBlock *PredBB = prior(I); + MergePotentials.clear(); for (MachineBasicBlock::pred_iterator P = I->pred_begin(), E2 = I->pred_end(); P != E2; ++P) { MachineBasicBlock* PBB = *P; + // Skip blocks that loop to themselves, can't tail merge these. + if (PBB==IBB) + continue; MachineBasicBlock *TBB = 0, *FBB = 0; std::vector Cond; - // Remove the unconditional branch at the end, if any. - if (!TII->AnalyzeBranch(*PBB, TBB, FBB, Cond) && - ((!FBB && Cond.size()==0) || // single successor - (!FBB && TBB!=IBB) || // cbr elsewhere, fallthrough to I - (FBB && FBB==IBB))) { // cbr then branch to I - if (TBB) { + if (!TII->AnalyzeBranch(*PBB, TBB, FBB, Cond)) { + // Failing case: IBB is the target of a cbr, and + // we cannot reverse the branch. + std::vector NewCond(Cond); + if (Cond.size() && TBB==IBB) { + if (TII->ReverseBranchCondition(NewCond)) + continue; + // This is the QBB case described above + if (!FBB) + FBB = next(MachineFunction::iterator(PBB)); + } + // Remove the unconditional branch at the end, if any. + if (TBB && (Cond.size()==0 || FBB)) { TII->RemoveBranch(*PBB); - if (TBB!=IBB) + if (Cond.size()) // reinsert conditional branch only, for now - TII->InsertBranch(*PBB, TBB, 0, Cond); + TII->InsertBranch(*PBB, (TBB==IBB) ? FBB : TBB, 0, NewCond); } MergePotentials.push_back(std::make_pair(HashEndOfMBB(PBB), *P)); } @@ -511,12 +567,9 @@ // of removing blocks in TryMergeBlocks. if (MergePotentials.size()==1 && (MergePotentials.begin())->second != PredBB) - TII->InsertBranch(*((MergePotentials.begin())->second), I, NULL, - std::vector()); - MergePotentials.clear(); + FixTail((MergePotentials.begin())->second, I, TII); } } - return MadeChange; } @@ -962,12 +1015,18 @@ MachineBasicBlock *PredBB = *PI; MachineFunction::iterator PredFallthrough = PredBB; ++PredFallthrough; if (PredBB != MBB && !CanFallThrough(PredBB) + && (!CurFallsThru || !CurTBB || !CurFBB) && (!CurFallsThru || MBB->getNumber() >= PredBB->getNumber())) { // If the current block doesn't fall through, just move it. // If the current block can fall through and does not end with a // conditional branch, we need to append an unconditional jump to // the (current) next block. To avoid a possible compile-time // infinite loop, move blocks only backward in this case. + // Also, if there are already 2 branches here, we cannot add a third; + // this means we have the case + // Bcc next + // B elsewhere + // next: if (CurFallsThru) { MachineBasicBlock *NextBB = next(MachineFunction::iterator(MBB)); CurCond.clear(); From dalej at apple.com Wed May 9 20:04:47 2007 From: dalej at apple.com (Dale Johannesen) Date: Wed, 9 May 2007 20:04:47 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/ARM/2007-05-09-tailmerge-2.ll Message-ID: <200705100104.l4A14lBs004911@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/ARM: 2007-05-09-tailmerge-2.ll added (r1.1) --- Log message: Another test for tail mergeing --- Diffs of the changes: (+66 -0) 2007-05-09-tailmerge-2.ll | 66 ++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 66 insertions(+) Index: llvm/test/CodeGen/ARM/2007-05-09-tailmerge-2.ll diff -c /dev/null llvm/test/CodeGen/ARM/2007-05-09-tailmerge-2.ll:1.1 *** /dev/null Wed May 9 20:04:38 2007 --- llvm/test/CodeGen/ARM/2007-05-09-tailmerge-2.ll Wed May 9 20:04:28 2007 *************** *** 0 **** --- 1,66 ---- + ; RUN: llvm-as < %s | llc -march=arm -enable-tail-merge | grep bl.*baz | wc -l | grep 1 + ; RUN: llvm-as < %s | llc -march=arm -enable-tail-merge | grep bl.*quux | wc -l | grep 1 + ; Check that calls to baz and quux are tail-merged. + + ; ModuleID = 'tail.c' + target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64" + target triple = "i686-apple-darwin8" + + define i32 @f(i32 %i, i32 %q) { + entry: + %i_addr = alloca i32 ; [#uses=2] + %q_addr = alloca i32 ; [#uses=2] + %retval = alloca i32, align 4 ; [#uses=1] + "alloca point" = bitcast i32 0 to i32 ; [#uses=0] + store i32 %i, i32* %i_addr + store i32 %q, i32* %q_addr + %tmp = load i32* %i_addr ; [#uses=1] + %tmp1 = icmp ne i32 %tmp, 0 ; [#uses=1] + %tmp12 = zext i1 %tmp1 to i8 ; [#uses=1] + %toBool = icmp ne i8 %tmp12, 0 ; [#uses=1] + br i1 %toBool, label %cond_true, label %cond_false + + cond_true: ; preds = %entry + %tmp3 = call i32 (...)* @bar( ) ; [#uses=0] + %tmp4 = call i32 (...)* @baz( i32 5, i32 6 ) ; [#uses=0] + %tmp7 = load i32* %q_addr ; [#uses=1] + %tmp8 = icmp ne i32 %tmp7, 0 ; [#uses=1] + %tmp89 = zext i1 %tmp8 to i8 ; [#uses=1] + %toBool10 = icmp ne i8 %tmp89, 0 ; [#uses=1] + br i1 %toBool10, label %cond_true11, label %cond_false15 + + cond_false: ; preds = %entry + %tmp5 = call i32 (...)* @foo( ) ; [#uses=0] + %tmp6 = call i32 (...)* @baz( i32 5, i32 6 ) ; [#uses=0] + %tmp27 = load i32* %q_addr ; [#uses=1] + %tmp28 = icmp ne i32 %tmp27, 0 ; [#uses=1] + %tmp289 = zext i1 %tmp28 to i8 ; [#uses=1] + %toBool210 = icmp ne i8 %tmp289, 0 ; [#uses=1] + br i1 %toBool210, label %cond_true11, label %cond_false15 + + cond_true11: ; preds = %cond_next + %tmp13 = call i32 (...)* @foo( ) ; [#uses=0] + %tmp14 = call i32 (...)* @quux( i32 3, i32 4 ) ; [#uses=0] + br label %cond_next18 + + cond_false15: ; preds = %cond_next + %tmp16 = call i32 (...)* @bar( ) ; [#uses=0] + %tmp17 = call i32 (...)* @quux( i32 3, i32 4 ) ; [#uses=0] + br label %cond_next18 + + cond_next18: ; preds = %cond_false15, %cond_true11 + %tmp19 = call i32 (...)* @bar( ) ; [#uses=0] + br label %return + + return: ; preds = %cond_next18 + %retval20 = load i32* %retval ; [#uses=1] + ret i32 %retval20 + } + + declare i32 @bar(...) + + declare i32 @baz(...) + + declare i32 @foo(...) + + declare i32 @quux(...) From tonic at nondot.org Wed May 9 23:42:47 2007 From: tonic at nondot.org (Tanya Lattner) Date: Wed, 9 May 2007 23:42:47 -0500 Subject: [llvm-commits] [release_20] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Message-ID: <200705100442.l4A4glrK008352@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: SelectionDAGISel.cpp updated: 1.449 -> 1.449.2.1 --- Log message: Merge from mainline PR1403: http://llvm.org/PR1403 --- Diffs of the changes: (+12 -5) SelectionDAGISel.cpp | 17 ++++++++++++----- 1 files changed, 12 insertions(+), 5 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.449 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.449.2.1 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.449 Mon May 7 15:49:28 2007 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Wed May 9 23:42:32 2007 @@ -1462,6 +1462,11 @@ return true; } +static inline bool areJTsAllowed(const TargetLowering &TLI) { + return (TLI.isOperationLegal(ISD::BR_JT, MVT::Other) || + TLI.isOperationLegal(ISD::BRIND, MVT::Other)); +} + /// handleJTSwitchCase - Emit jumptable for current switch case range bool SelectionDAGLowering::handleJTSwitchCase(CaseRec& CR, CaseRecVector& WorkList, @@ -1478,9 +1483,7 @@ I!=E; ++I) TSize += I->size(); - if ((!TLI.isOperationLegal(ISD::BR_JT, MVT::Other) && - !TLI.isOperationLegal(ISD::BRIND, MVT::Other)) || - TSize <= 3) + if (!areJTsAllowed(TLI) || TSize <= 3) return false; double Density = (double)TSize / (double)((Last - First) + 1ULL); @@ -1622,8 +1625,12 @@ LSize += J->size(); RSize -= J->size(); } - // If our case is dense we *really* should handle it earlier! - assert((FMetric > 0) && "Should handle dense range earlier!"); + if (areJTsAllowed(TLI)) { + // If our case is dense we *really* should handle it earlier! + assert((FMetric > 0) && "Should handle dense range earlier!"); + } else { + Pivot = CR.Range.first + Size/2; + } CaseRange LHSR(CR.Range.first, Pivot); CaseRange RHSR(Pivot, CR.Range.second); From tonic at nondot.org Wed May 9 23:47:54 2007 From: tonic at nondot.org (Tanya Lattner) Date: Wed, 9 May 2007 23:47:54 -0500 Subject: [llvm-commits] [release_20] CVS: llvm/test/CodeGen/SPARC/2007-05-09-JumpTables.ll Message-ID: <200705100447.l4A4lseS008466@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/SPARC: 2007-05-09-JumpTables.ll added (r1.1.2.2) --- Log message: Merging from mainline PR 1403: http://llvm.org/PR1403 --- Diffs of the changes: (+30 -0) 2007-05-09-JumpTables.ll | 30 ++++++++++++++++++++++++++++++ 1 files changed, 30 insertions(+) Index: llvm/test/CodeGen/SPARC/2007-05-09-JumpTables.ll diff -c /dev/null llvm/test/CodeGen/SPARC/2007-05-09-JumpTables.ll:1.1.2.2 *** /dev/null Wed May 9 23:47:48 2007 --- llvm/test/CodeGen/SPARC/2007-05-09-JumpTables.ll Wed May 9 23:47:38 2007 *************** *** 0 **** --- 1,30 ---- + ; RUN: llvm-as < %s | llc -march=sparc + + ; We cannot emit jump tables on Sparc, but we should correctly handle this case. + + target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64" + + define i32 @foo(i32 %f) { + entry: + switch i32 %f, label %bb14 [ + i32 0, label %UnifiedReturnBlock + i32 1, label %bb4 + i32 2, label %bb7 + i32 3, label %bb10 + ] + + bb4: ; preds = %entry + ret i32 2 + + bb7: ; preds = %entry + ret i32 5 + + bb10: ; preds = %entry + ret i32 9 + + bb14: ; preds = %entry + ret i32 0 + + UnifiedReturnBlock: ; preds = %entry + ret i32 1 + } From tonic at nondot.org Wed May 9 23:53:08 2007 From: tonic at nondot.org (Tanya Lattner) Date: Wed, 9 May 2007 23:53:08 -0500 Subject: [llvm-commits] [release_20] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Message-ID: <200705100453.l4A4r8pQ008586@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: DAGCombiner.cpp updated: 1.301 -> 1.301.2.1 --- Log message: Merging from mainline --- Diffs of the changes: (+2 -2) DAGCombiner.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.301 llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.301.2.1 --- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.301 Mon May 7 16:36:06 2007 +++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Wed May 9 23:52:54 2007 @@ -3422,8 +3422,8 @@ SDOperand Ptr = ST->getBasePtr(); // If this is a store of a bit convert, store the input value if the - // resultant store does not need a higher alignment than the original. - if (Value.getOpcode() == ISD::BIT_CONVERT) { + // resultant store does not need a higher alignment than the original. + if (Value.getOpcode() == ISD::BIT_CONVERT && !ST->isTruncatingStore()) { unsigned Align = ST->getAlignment(); MVT::ValueType SVT = Value.getOperand(0).getValueType(); unsigned OrigAlign = TLI.getTargetMachine().getTargetData()-> From sabre at nondot.org Thu May 10 00:37:32 2007 From: sabre at nondot.org (Chris Lattner) Date: Thu, 10 May 2007 00:37:32 -0500 Subject: [llvm-commits] CVS: llvm/docs/GettingStarted.html Message-ID: <200705100537.l4A5bWXp011360@zion.cs.uiuc.edu> Changes in directory llvm/docs: GettingStarted.html updated: 1.158 -> 1.159 --- Log message: another version of gcc that miscompiles llvm. --- Diffs of the changes: (+4 -1) GettingStarted.html | 5 ++++- 1 files changed, 4 insertions(+), 1 deletion(-) Index: llvm/docs/GettingStarted.html diff -u llvm/docs/GettingStarted.html:1.158 llvm/docs/GettingStarted.html:1.159 --- llvm/docs/GettingStarted.html:1.158 Wed Apr 11 16:28:31 2007 +++ llvm/docs/GettingStarted.html Thu May 10 00:37:14 2007 @@ -525,6 +525,9 @@ possibly others) does not compile LLVM correctly (it appears that exception handling is broken in some cases). Please download the FSF 3.3.3 or upgrade to a newer version of GCC.

      +

      GCC 3.4.0 on linux/x86 (32-bit): GCC miscompiles portions of the + code generator, causing an infinite loop in the llvm-gcc build. Please + upgrade to GCC 3.4.2.

      GCC 3.4.x on X86-64/amd64: GCC miscompiles portions of LLVM.

      IA-64 GCC 4.0.0: The IA-64 version of GCC 4.0.0 is known to @@ -1615,7 +1618,7 @@ Chris Lattner
      Reid Spencer
      The LLVM Compiler Infrastructure
      - Last modified: $Date: 2007/04/11 21:28:31 $ + Last modified: $Date: 2007/05/10 05:37:14 $ From clattner at apple.com Thu May 10 00:50:15 2007 From: clattner at apple.com (Chris Lattner) Date: Wed, 9 May 2007 22:50:15 -0700 Subject: [llvm-commits] CVS: llvm/test/Transforms/LoopUnswitch/2007-05-09-Unreachable.ll In-Reply-To: <200705090809.l4989ImQ027414@zion.cs.uiuc.edu> References: <200705090809.l4989ImQ027414@zion.cs.uiuc.edu> Message-ID: > + ; ModuleID = 'PR1333.bc' Can you please change this to just: ; PR1333 ? likewise for the other test. Thanks Devang, -Chris > + target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16- > i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128- > a0:0:64" > + target triple = "i686-pc-linux-gnu" > + %struct.ada__streams__root_stream_type = type { % > struct.ada__tags__dispatch_table* } > + %struct.ada__tags__dispatch_table = type { [1 x i8*] } > + %struct.quotes__T173s = type { i8, %struct.quotes__T173s__T174s, > [2 x [1 x double]], [2 x i16], i64, i8 } > + %struct.quotes__T173s__T174s = type { i8, i8, i8, i16, i16, [2 x > [1 x double]] } > + > + void @quotes__write_quote() { > + entry: > + %tmp606.i = icmp eq i32 0, 0 ; [#uses=1] > + br label %bb > + > + bb: ; preds = %cond_next73, %bb, %entry > + br i1 false, label %bb51, label %bb > + > + bb51: ; preds = %cond_next73, %bb > + br i1 %tmp606.i, label % > quotes__bid_ask_depth_offset_matrices__get_price.exit, label % > cond_true.i > + > + cond_true.i: ; preds = %bb51 > + unreachable > + > + quotes__bid_ask_depth_offset_matrices__get_price.exit: ; preds = > %bb51 > + br i1 false, label %cond_next73, label %cond_true72 > + > + cond_true72: ; preds = % > quotes__bid_ask_depth_offset_matrices__get_price.exit > + unreachable > + > + cond_next73: ; preds = % > quotes__bid_ask_depth_offset_matrices__get_price.exit > + br i1 false, label %bb, label %bb51 > + } > > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From dpatel at apple.com Thu May 10 01:21:25 2007 From: dpatel at apple.com (dpatel at apple.com) Date: Wed, 9 May 2007 23:21:25 -0700 (PDT) Subject: [llvm-commits] [127089] Anton Korobeynikov's fixincludes patch for mingw32 Message-ID: <20070510062125.AB11A1E269D2@src> Revision: 127089 Author: dpatel Date: 2007-05-09 23:21:25 -0700 (Wed, 09 May 2007) Log Message: ----------- Anton Korobeynikov's fixincludes patch for mingw32 Modified Paths: -------------- apple-local/branches/llvm/fixincludes/fixincl.x apple-local/branches/llvm/fixincludes/inclhack.def apple-local/branches/llvm/fixincludes/mkfixinc.sh Modified: apple-local/branches/llvm/fixincludes/fixincl.x =================================================================== --- apple-local/branches/llvm/fixincludes/fixincl.x 2007-05-10 04:40:54 UTC (rev 127088) +++ apple-local/branches/llvm/fixincludes/fixincl.x 2007-05-10 06:21:25 UTC (rev 127089) @@ -2,11 +2,11 @@ * * DO NOT EDIT THIS FILE (fixincl.x) * - * It has been AutoGen-ed Friday July 8, 2005 at 03:33:04 PM PDT + * It has been AutoGen-ed Thursday May 10, 2007 at 03:18:13 AM MSD * From the definitions inclhack.def * and the template file fixincl */ -/* DO NOT CVS-MERGE THIS FILE, EITHER Fri Jul 8 15:33:04 PDT 2005 +/* DO NOT CVS-MERGE THIS FILE, EITHER Thu May 10 03:18:13 MSD 2007 * * You must regenerate it. Use the ./genfixes script. * @@ -15,7 +15,7 @@ * certain ANSI-incompatible system header files which are fixed to work * correctly with ANSI C and placed in a directory that GNU C will search. * - * This file contains 195 fixup descriptions. + * This file contains 196 fixup descriptions. * * See README for more information. * @@ -26,7 +26,8 @@ * * You may 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. + * Foundation; either version 2 of the License, or (at your option) + * any later version. * * inclhack is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -34,10 +35,10 @@ * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with inclhack. See the file "COPYING". If not, - * write to: The Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * along with inclhack. If not, write to: + * The Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301, USA. */ /* * * * * * * * * * * * * * * * * * * * * * * * * * @@ -4050,6 +4051,43 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * + * Description of Mingw_Inline_Fp_Math fix + */ +tSCC zMingw_Inline_Fp_MathName[] = + "mingw_inline_fp_math"; + +/* + * File name selection pattern + */ +tSCC zMingw_Inline_Fp_MathList[] = + "|complex.h|"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzMingw_Inline_Fp_MathMachs[] = { + "i[34567]86-*-mingw*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zMingw_Inline_Fp_MathSelect0[] = + "[ \\t]*__asm__[ \\t]*\\(\\\"fpatan"; + +#define MINGW_INLINE_FP_MATH_TEST_CT 1 +static tTestDesc aMingw_Inline_Fp_MathTests[] = { + { TT_EGREP, zMingw_Inline_Fp_MathSelect0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Mingw_Inline_Fp_Math + */ +static const char* apzMingw_Inline_Fp_MathPatch[] = { "sed", + "-e", "/^\\#ifdef[ \\t]*__GNUC__$/,/^\\#endif[ \\t]*\\/*[ \\t]*__GNUC__[ \\t]*$/ { :ack N; /\\n[ \\t]*:/! b ack; s/\\(\\n[ \\t]*double[ \\t]*res;\\)\\n/\\1\\n#ifdef __NO_MATH_INLINES\\n res = atan((__imag__ _Z) \\/ (__real__ _Z));\\n#else\\n/; s/\\(\\n[ \\t]*float[ \\t]*res;\\)\\n/\\1\\n#ifdef __NO_MATH_INLINES\\n res = atanf((__imag__ _Z) \\/ (__real__ _Z));\\n#else\\n/; s/\\(\\n[ \\t]*long[ \\t]*double[ \\t]*res;\\)\\n/\\1\\n#ifdef __NO_MATH_INLINES\\n res = atanl((__imag__ _Z) \\/ (__real__ _Z));\\n#else\\n/; s/\\(\\\"st[(]1[)]\\\"[)];[ \\t]*\\)$/\\1\\n#endif/g }", + "-e", "s/\\(\\#include[ \\t]*<_mingw.h>\\)/\\1\\n\\#include /", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * * Description of Nested_Auth_Des fix */ tSCC zNested_Auth_DesName[] = @@ -7932,9 +7970,9 @@ * * List of all fixes */ -#define REGEX_COUNT 234 +#define REGEX_COUNT 235 #define MACH_LIST_SIZE_LIMIT 261 -#define FIX_COUNT 195 +#define FIX_COUNT 196 /* * Enumerate the fixes @@ -8037,6 +8075,7 @@ MACHINE_NAME_FIXIDX, MATH_EXCEPTION_FIXIDX, MATH_HUGE_VAL_FROM_DBL_MAX_FIXIDX, + MINGW_INLINE_FP_MATH_FIXIDX, NESTED_AUTH_DES_FIXIDX, NESTED_MOTOROLA_FIXIDX, NESTED_SYS_LIMITS_FIXIDX, @@ -8623,6 +8662,11 @@ MATH_HUGE_VAL_FROM_DBL_MAX_TEST_CT, FD_MACH_ONLY | FD_SHELL_SCRIPT, aMath_Huge_Val_From_Dbl_MaxTests, apzMath_Huge_Val_From_Dbl_MaxPatch, 0 }, + { zMingw_Inline_Fp_MathName, zMingw_Inline_Fp_MathList, + apzMingw_Inline_Fp_MathMachs, + MINGW_INLINE_FP_MATH_TEST_CT, FD_MACH_ONLY, + aMingw_Inline_Fp_MathTests, apzMingw_Inline_Fp_MathPatch, 0 }, + { zNested_Auth_DesName, zNested_Auth_DesList, apzNested_Auth_DesMachs, NESTED_AUTH_DES_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, Modified: apple-local/branches/llvm/fixincludes/inclhack.def =================================================================== --- apple-local/branches/llvm/fixincludes/inclhack.def 2007-05-10 04:40:54 UTC (rev 127088) +++ apple-local/branches/llvm/fixincludes/inclhack.def 2007-05-10 06:21:25 UTC (rev 127089) @@ -2299,6 +2299,22 @@ }; +/* APPLE LOCAL begin LLVM */ +/* We need to fix complex.h not to include inline FP assembly. + * This is needed to workaround PR879 + */ +fix = { + hackname = mingw_inline_fp_math; + files = complex.h; + mach = 'i[34567]86-*-mingw*'; + select = '[ \t]*__asm__[ \t]*\(\"fpatan'; + sed = "/^\\#ifdef[ \\t]*__GNUC__$/,/^\\#endif[ \\t]*\\/*[ \\t]*__GNUC__[ \\t]*$/ { :ack N; /\\n[ \\t]*:/! b ack; s/\\(\\n[ \\t]*double[ \\t]*res;\\)\\n/\\1\\n#ifdef __NO_MATH_INLINES\\n res = atan((__imag__ _Z) \\/ (__real__ _Z));\\n#else\\n/; s/\\(\\n[ \\t]*float[ \\t]*res;\\)\\n/\\1\\n#ifdef __NO_MATH_INLINES\\n res = atanf((__imag__ _Z) \\/ (__real__ _Z));\\n#else\\n/; s/\\(\\n[ \\t]*long[ \\t]*double[ \\t]*res;\\)\\n/\\1\\n#ifdef __NO_MATH_INLINES\\n res = atanl((__imag__ _Z) \\/ (__real__ _Z));\\n#else\\n/; s/\\(\\\"st[(]1[)]\\\"[)];[ \\t]*\\)$/\\1\\n#endif/g }"; + sed = "s/\\(\\#include[ \\t]*<_mingw.h>\\)/\\1\\n\\#include \/"; + test_text = ' __asm__ ("fpatan;"' + ' : "=t" (res) : "0" (__real__ _Z), "u" (__imag__ _Z) : "st(1)");'; +}; +/* APPLE local end LLVM */ + /* * nested comment */ Modified: apple-local/branches/llvm/fixincludes/mkfixinc.sh =================================================================== --- apple-local/branches/llvm/fixincludes/mkfixinc.sh 2007-05-10 04:40:54 UTC (rev 127088) +++ apple-local/branches/llvm/fixincludes/mkfixinc.sh 2007-05-10 06:21:25 UTC (rev 127089) @@ -20,7 +20,6 @@ i?86-*-moss* | \ i?86-*-pe | \ i?86-*-cygwin* | \ - i?86-*-mingw32* | \ i?86-*-uwin* | \ i?86-*-interix* | \ powerpc-*-eabiaix* | \ From sabre at nondot.org Thu May 10 01:42:52 2007 From: sabre at nondot.org (Chris Lattner) Date: Thu, 10 May 2007 01:42:52 -0500 Subject: [llvm-commits] CVS: llvm/docs/GettingStarted.html Message-ID: <200705100642.l4A6gqXj026908@zion.cs.uiuc.edu> Changes in directory llvm/docs: GettingStarted.html updated: 1.159 -> 1.160 --- Log message: gar. GCC 3.4.2 also miscompiles llvm at -O3. :( --- Diffs of the changes: (+9 -5) GettingStarted.html | 14 +++++++++----- 1 files changed, 9 insertions(+), 5 deletions(-) Index: llvm/docs/GettingStarted.html diff -u llvm/docs/GettingStarted.html:1.159 llvm/docs/GettingStarted.html:1.160 --- llvm/docs/GettingStarted.html:1.159 Thu May 10 00:37:14 2007 +++ llvm/docs/GettingStarted.html Thu May 10 01:42:21 2007 @@ -499,8 +499,8 @@

      LLVM is very demanding of the host C++ compiler, and as such tends to expose bugs in the compiler. In particular, several versions of GCC crash when trying to compile LLVM. We routinely use GCC 3.3.3, 3.4.0, and Apple 4.0.1 -successfully with them (however, see below). Other versions of GCC will -probably work as well. GCC versions listed +successfully with them (however, see important notes below). Other versions +of GCC will probably work as well. GCC versions listed here are known to not work. If you are using one of these versions, please try to upgrade your GCC to something more recent. If you run into a problem with a version of GCC not listed here, please let @@ -526,8 +526,12 @@ handling is broken in some cases). Please download the FSF 3.3.3 or upgrade to a newer version of GCC.

      GCC 3.4.0 on linux/x86 (32-bit): GCC miscompiles portions of the - code generator, causing an infinite loop in the llvm-gcc build. Please - upgrade to GCC 3.4.2.

      + code generator, causing an infinite loop in the llvm-gcc build when built + with optimizations enabled (i.e. a release build).

      +

      GCC 3.4.2 on linux/x86 (32-bit): GCC miscompiles portions of the + code generator at -O3, as with 3.4.0. However gcc 3.4.2 (unlike 3.4.0) + correctly compiles LLVM at -O2. A work around is to build release LLVM + builds with "make ENABLE_OPTIMIZED=1 OPTIMIZE_OPTION=-O2 ..."

      GCC 3.4.x on X86-64/amd64: GCC miscompiles portions of LLVM.

      IA-64 GCC 4.0.0: The IA-64 version of GCC 4.0.0 is known to @@ -1618,7 +1622,7 @@ Chris Lattner
      Reid Spencer
      The LLVM Compiler Infrastructure
      - Last modified: $Date: 2007/05/10 05:37:14 $ + Last modified: $Date: 2007/05/10 06:42:21 $ From isanbard at gmail.com Thu May 10 03:03:19 2007 From: isanbard at gmail.com (Bill Wendling) Date: Thu, 10 May 2007 03:03:19 -0500 Subject: [llvm-commits] CVS: llvm-www/DevMtgMay2007.html Message-ID: <200705100803.l4A83J1b016295@zion.cs.uiuc.edu> Changes in directory llvm-www: DevMtgMay2007.html updated: 1.131 -> 1.132 --- Log message: Josh Added. --- Diffs of the changes: (+4 -3) DevMtgMay2007.html | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) Index: llvm-www/DevMtgMay2007.html diff -u llvm-www/DevMtgMay2007.html:1.131 llvm-www/DevMtgMay2007.html:1.132 --- llvm-www/DevMtgMay2007.html:1.131 Wed May 9 17:05:36 2007 +++ llvm-www/DevMtgMay2007.html Thu May 10 03:02:40 2007 @@ -286,6 +286,7 @@

      + @@ -301,13 +302,13 @@ -

      Coffee

      08:0008:45EveryoneMeet and Greet. Social time, get your coffee, etc. +
      EventStartStopWhoDescription

      Breakfast

      08:0008:45EveryoneBreakfast Buffet. Get your breakfast in the hotel lounge and + join us in the meeting room for conversation and greetings.

      Session 0:
      Introductions

      StartStopWhoDescription
      11:1511:35Nick LewyckyIntroduction To Predicate Simplifier. A review of the design and + Introduction To Predicate Simplifier. A review of the design and implementation of LLVM's Predicate Simplifier Pass, otherwise known as VRP (Value Range Propagation).
      09:0010:00Everyone Introductions. This time is reserved for everyone to introduce themselves. The conference poll indicated that the thing you wanted most - was to get to know one another. So, here's your chance. You have 1 - minute to tell us twho you are, what you do, how much you love LLVM, why - you work with it, or anything else you want to say. The time is yours. + was to get to know one another. So, here's your chance. You have 1 + minute to tell us who you are, what you do, how much you love + LLVM, why you work with it, or anything else you want to say. The time + is yours, but only for a minute.

      Break

      10:0010:30Everyone

      Lunch

      12:0013:00Everyone Thanks to a generous sponsor, lunch will be catered.

      Session 2:
      Using LLVM

      Session 2:
      Using LLVM

      StartStopSpeakerDescription
      13:0013:30Sarah Thompson
      13:0013:20Sarah Thompson Using LLVM At NASA. A review of how Ames Research Center, NASA is using LLVM to support model checking, symbolic execution and static analysis of NASA software.
      13:3014:00Scott Michel
      13:2513:45Scott Michel The Cell BE Symbiotic Processor Element Backend. A presentation of the practice and experience that resulted from Aerospace's implementation of an LLVM back-end Target for the Cell BE Symbiotic Processor Element.
      14:0014:30John CriswellUIUC Research - TBD
      13:5014:10John CriswellUIUC Research. To be determined.
      14:1014:30Jeff CohenUsing LLVM For The Jolt Compiler. Jeff will share his + experiences in using the LLVM Compiler Infrastructure as the basis for + the Jolt Language's compiler.
      14:3015:00Steve Naroff Objective-C. Improvements to the Objective-C front end.

      Session 3:
      Discussions

      StartStopLeaderDescriptionStartStopLeaderDiscussion Topic
      15:3015:45Chrisopher Lamb Concurrency Primitives. For multi-threaded shared memory @@ -353,6 +353,6 @@ src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"> Valid HTML 4.01! -
      Last modified: $Date: 2007/05/09 05:19:11 $ +
      Last modified: $Date: 2007/05/09 05:21:44 $ From reid at x10sys.com Wed May 9 00:23:12 2007 From: reid at x10sys.com (Reid Spencer) Date: Wed, 9 May 2007 00:23:12 -0500 Subject: [llvm-commits] CVS: llvm-www/DevMtgMay2007.html Message-ID: <200705090523.l495NCfT022909@zion.cs.uiuc.edu> Changes in directory llvm-www: DevMtgMay2007.html updated: 1.129 -> 1.130 --- Log message: Add breakfast. --- Diffs of the changes: (+2 -1) DevMtgMay2007.html | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: llvm-www/DevMtgMay2007.html diff -u llvm-www/DevMtgMay2007.html:1.129 llvm-www/DevMtgMay2007.html:1.130 --- llvm-www/DevMtgMay2007.html:1.129 Wed May 9 00:21:44 2007 +++ llvm-www/DevMtgMay2007.html Wed May 9 00:22:49 2007 @@ -264,6 +264,7 @@
      +

      Breakfast: Breakfast will be available in the hotel lounge

      Lunch: Lunch will be catered!

      Dinner: Dinner is optional. We'll go to a local restaurant (TBD) after the meeting. We'll be "going Dutch" for this so you'll need to buy @@ -353,6 +354,6 @@ src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"> Valid HTML 4.01! -
      Last modified: $Date: 2007/05/09 05:21:44 $ +
      Last modified: $Date: 2007/05/09 05:22:49 $ From sabre at nondot.org Wed May 9 00:27:34 2007 From: sabre at nondot.org (Chris Lattner) Date: Wed, 9 May 2007 00:27:34 -0500 Subject: [llvm-commits] CVS: llvm/docs/ReleaseNotes.html Message-ID: <200705090527.l495RYQ4025233@zion.cs.uiuc.edu> Changes in directory llvm/docs: ReleaseNotes.html updated: 1.369 -> 1.370 --- Log message: add a meta-blurb about the 2.0 release --- Diffs of the changes: (+19 -10) ReleaseNotes.html | 29 +++++++++++++++++++---------- 1 files changed, 19 insertions(+), 10 deletions(-) Index: llvm/docs/ReleaseNotes.html diff -u llvm/docs/ReleaseNotes.html:1.369 llvm/docs/ReleaseNotes.html:1.370 --- llvm/docs/ReleaseNotes.html:1.369 Tue May 8 23:58:11 2007 +++ llvm/docs/ReleaseNotes.html Wed May 9 00:27:05 2007 @@ -59,19 +59,28 @@

      This is the eleventh public release of the LLVM Compiler Infrastructure. -Being the first major release since 1.0, we took this as an opportunity to +Being the first major release since 1.0, this release is different in several +ways from our previous releases:

      + +
        +
      1. We took this as an opportunity to break backwards compatibility with the LLVM 1.x bytecode and .ll file format. If you have LLVM 1.9 .ll files that you would like to upgrade to LLVM 2.x, we recommend the use of the stand alone llvm-upgrade tool. We intend to keep compatibility with .ll and .bc formats within the 2.x -release series.

        - -

        Note that while - This -release -incorporates a large number of enhancements, new features, and bug -fixes. We recommend that all users of previous LLVM versions upgrade. -

        +release series, like we did within the 1.x series.
      2. +
      3. There are several significant change to the LLVM IR and internal APIs, such + as a major overhaul of the type system, the completely new bitcode file + format, etc.
      4. +
      5. We designed the release around a 6 month release cycle instead of the usual + 3-month cycle. This gave us extra time to develop and test some of the + more invasive features in this release.
      6. +
      7. LLVM 2.0 no longer supports the llvm-gcc3 front-end.
      8. +
      + +

      Note that while this is a major version bump, this release has been + extensively tested on a wide range of software. It is easy to say that this + is our best release yet, in terms of both features and correctness.

      @@ -588,7 +597,7 @@ src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!" /> The LLVM Compiler Infrastructure
      - Last modified: $Date: 2007/05/09 04:58:11 $ + Last modified: $Date: 2007/05/09 05:27:05 $ From sabre at nondot.org Wed May 9 01:24:30 2007 From: sabre at nondot.org (Chris Lattner) Date: Wed, 9 May 2007 01:24:30 -0500 Subject: [llvm-commits] CVS: llvm/docs/ReleaseNotes.html Message-ID: <200705090624.l496OUKd001739@zion.cs.uiuc.edu> Changes in directory llvm/docs: ReleaseNotes.html updated: 1.370 -> 1.371 --- Log message: arm no longer experimental, c++ eh support is? --- Diffs of the changes: (+2 -2) ReleaseNotes.html | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/docs/ReleaseNotes.html diff -u llvm/docs/ReleaseNotes.html:1.370 llvm/docs/ReleaseNotes.html:1.371 --- llvm/docs/ReleaseNotes.html:1.370 Wed May 9 00:27:05 2007 +++ llvm/docs/ReleaseNotes.html Wed May 9 01:23:58 2007 @@ -209,8 +209,8 @@
      • The -cee pass is known to be buggy, and may be removed in in a future release.
      • +
      • C++ EH support
      • The IA64 code generator is experimental.
      • -
      • The ARM code generator is experimental.
      • The Alpha JIT is experimental.
      • "-filetype=asm" (the default) is the only supported value for the -filetype llc option.
      • @@ -597,7 +597,7 @@ src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!" /> The LLVM Compiler Infrastructure
        - Last modified: $Date: 2007/05/09 05:27:05 $ + Last modified: $Date: 2007/05/09 06:23:58 $ From dpatel at apple.com Wed May 9 03:09:18 2007 From: dpatel at apple.com (Devang Patel) Date: Wed, 9 May 2007 03:09:18 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/LoopUnswitch/2007-05-09-Unreachable.ll Message-ID: <200705090809.l4989ImQ027414@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/LoopUnswitch: 2007-05-09-Unreachable.ll added (r1.1) --- Log message: New test. --- Diffs of the changes: (+32 -0) 2007-05-09-Unreachable.ll | 32 ++++++++++++++++++++++++++++++++ 1 files changed, 32 insertions(+) Index: llvm/test/Transforms/LoopUnswitch/2007-05-09-Unreachable.ll diff -c /dev/null llvm/test/Transforms/LoopUnswitch/2007-05-09-Unreachable.ll:1.1 *** /dev/null Wed May 9 03:08:56 2007 --- llvm/test/Transforms/LoopUnswitch/2007-05-09-Unreachable.ll Wed May 9 03:08:46 2007 *************** *** 0 **** --- 1,32 ---- + ; RUN: llvm-upgrade < %s | llvm-as | opt -loop-unswitch -disable-output + ; ModuleID = 'PR1333.bc' + target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64" + target triple = "i686-pc-linux-gnu" + %struct.ada__streams__root_stream_type = type { %struct.ada__tags__dispatch_table* } + %struct.ada__tags__dispatch_table = type { [1 x i8*] } + %struct.quotes__T173s = type { i8, %struct.quotes__T173s__T174s, [2 x [1 x double]], [2 x i16], i64, i8 } + %struct.quotes__T173s__T174s = type { i8, i8, i8, i16, i16, [2 x [1 x double]] } + + void @quotes__write_quote() { + entry: + %tmp606.i = icmp eq i32 0, 0 ; [#uses=1] + br label %bb + + bb: ; preds = %cond_next73, %bb, %entry + br i1 false, label %bb51, label %bb + + bb51: ; preds = %cond_next73, %bb + br i1 %tmp606.i, label %quotes__bid_ask_depth_offset_matrices__get_price.exit, label %cond_true.i + + cond_true.i: ; preds = %bb51 + unreachable + + quotes__bid_ask_depth_offset_matrices__get_price.exit: ; preds = %bb51 + br i1 false, label %cond_next73, label %cond_true72 + + cond_true72: ; preds = %quotes__bid_ask_depth_offset_matrices__get_price.exit + unreachable + + cond_next73: ; preds = %quotes__bid_ask_depth_offset_matrices__get_price.exit + br i1 false, label %bb, label %bb51 + } From dpatel at apple.com Wed May 9 03:19:41 2007 From: dpatel at apple.com (Devang Patel) Date: Wed, 9 May 2007 03:19:41 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/LoopUnswitch/2007-05-09-tl.ll Message-ID: <200705090819.l498Jfeo027626@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/LoopUnswitch: 2007-05-09-tl.ll added (r1.1) --- Log message: New test. --- Diffs of the changes: (+95 -0) 2007-05-09-tl.ll | 95 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 95 insertions(+) Index: llvm/test/Transforms/LoopUnswitch/2007-05-09-tl.ll diff -c /dev/null llvm/test/Transforms/LoopUnswitch/2007-05-09-tl.ll:1.1 *** /dev/null Wed May 9 03:19:34 2007 --- llvm/test/Transforms/LoopUnswitch/2007-05-09-tl.ll Wed May 9 03:19:24 2007 *************** *** 0 **** --- 1,95 ---- + ; RUN: llvm-as < %s | opt -loop-unswitch -disable-output + ; ModuleID = 'PR1333-2.bc' + + define void @pp_cxx_expression() { + entry: + %tmp6 = lshr i32 0, 24 ; [#uses=1] + br label %tailrecurse + + tailrecurse: ; preds = %tailrecurse, %tailrecurse, %entry + switch i32 %tmp6, label %bb96 [ + i32 24, label %bb10 + i32 25, label %bb10 + i32 28, label %bb10 + i32 29, label %bb48 + i32 31, label %bb48 + i32 32, label %bb48 + i32 33, label %bb48 + i32 34, label %bb48 + i32 36, label %bb15 + i32 51, label %bb89 + i32 52, label %bb89 + i32 54, label %bb83 + i32 57, label %bb59 + i32 63, label %bb80 + i32 64, label %bb80 + i32 68, label %bb80 + i32 169, label %bb75 + i32 170, label %bb19 + i32 171, label %bb63 + i32 172, label %bb63 + i32 173, label %bb67 + i32 174, label %bb67 + i32 175, label %bb19 + i32 176, label %bb75 + i32 178, label %bb59 + i32 179, label %bb89 + i32 180, label %bb59 + i32 182, label %bb48 + i32 183, label %bb48 + i32 184, label %bb48 + i32 185, label %bb48 + i32 186, label %bb48 + i32 195, label %bb48 + i32 196, label %bb59 + i32 197, label %bb89 + i32 198, label %bb70 + i32 199, label %bb59 + i32 200, label %bb59 + i32 201, label %bb59 + i32 202, label %bb59 + i32 203, label %bb75 + i32 204, label %bb59 + i32 205, label %tailrecurse + i32 210, label %tailrecurse + ] + + bb10: ; preds = %tailrecurse, %tailrecurse, %tailrecurse + ret void + + bb15: ; preds = %tailrecurse + ret void + + bb19: ; preds = %tailrecurse, %tailrecurse + ret void + + bb48: ; preds = %tailrecurse, %tailrecurse, %tailrecurse, %tailrecurse, %tailrecurse, %tailrecurse, %tailrecurse, %tailrecurse, %tailrecurse, %tailrecurse, %tailrecurse + ret void + + bb59: ; preds = %tailrecurse, %tailrecurse, %tailrecurse, %tailrecurse, %tailrecurse, %tailrecurse, %tailrecurse, %tailrecurse, %tailrecurse + ret void + + bb63: ; preds = %tailrecurse, %tailrecurse + ret void + + bb67: ; preds = %tailrecurse, %tailrecurse + ret void + + bb70: ; preds = %tailrecurse + ret void + + bb75: ; preds = %tailrecurse, %tailrecurse, %tailrecurse + ret void + + bb80: ; preds = %tailrecurse, %tailrecurse, %tailrecurse + ret void + + bb83: ; preds = %tailrecurse + ret void + + bb89: ; preds = %tailrecurse, %tailrecurse, %tailrecurse, %tailrecurse + ret void + + bb96: ; preds = %tailrecurse + ret void + } From dpatel at apple.com Wed May 9 03:24:30 2007 From: dpatel at apple.com (Devang Patel) Date: Wed, 9 May 2007 03:24:30 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp Message-ID: <200705090824.l498OUcS027766@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.68 -> 1.69 --- Log message: Fix PR1333: http://llvm.org/PR1333 Testcases : http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070507/049451.html http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070507/049452.html --- Diffs of the changes: (+25 -5) LoopUnswitch.cpp | 30 +++++++++++++++++++++++++----- 1 files changed, 25 insertions(+), 5 deletions(-) Index: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp diff -u llvm/lib/Transforms/Scalar/LoopUnswitch.cpp:1.68 llvm/lib/Transforms/Scalar/LoopUnswitch.cpp:1.69 --- llvm/lib/Transforms/Scalar/LoopUnswitch.cpp:1.68 Wed May 2 20:11:54 2007 +++ llvm/lib/Transforms/Scalar/LoopUnswitch.cpp Wed May 9 03:24:12 2007 @@ -396,7 +396,7 @@ // The new block lives in whichever loop the old one did. if (Loop *L = LI->getLoopFor(Old)) L->addBasicBlockToLoop(New, *LI); - + return New; } @@ -413,8 +413,30 @@ } // If this is a critical edge, let SplitCriticalEdge do it. - if (SplitCriticalEdge(BB->getTerminator(), SuccNum, this)) - return LatchTerm->getSuccessor(SuccNum); + Loop *OrigDestBBL = LI->getLoopFor(BB->getTerminator()->getSuccessor(SuccNum)); + if (SplitCriticalEdge(BB->getTerminator(), SuccNum)) { + BasicBlock *NewBB = LatchTerm->getSuccessor(SuccNum); + + Loop *BBL = LI->getLoopFor(BB); + if (!BBL || !OrigDestBBL) + return NewBB; + + // If edge is inside a loop then NewBB is part of same loop. + if (BBL == OrigDestBBL) + BBL->addBasicBlockToLoop(NewBB, *LI); + // If edge is entering loop then NewBB is part of outer loop. + else if (BBL->contains(OrigDestBBL->getHeader())) + BBL->addBasicBlockToLoop(NewBB, *LI); + // If edge is from an inner loop to outer loop then NewBB is part + // of outer loop. + else if (OrigDestBBL->contains(BBL->getHeader())) + OrigDestBBL->addBasicBlockToLoop(NewBB, *LI); + // Else edge is connecting two loops and NewBB is part of their parent loop + else if (Loop *PL = OrigDestBBL->getParentLoop()) + PL->addBasicBlockToLoop(NewBB, *LI); + + return NewBB; + } // If the edge isn't critical, then BB has a single successor or Succ has a // single pred. Split the block. @@ -571,8 +593,6 @@ std::vector Preds(pred_begin(ExitBlock), pred_end(ExitBlock)); for (unsigned j = 0, e = Preds.size(); j != e; ++j) { - assert(L->contains(Preds[j]) && - "All preds of loop exit blocks must be the same loop!"); BasicBlock* MiddleBlock = SplitEdge(Preds[j], ExitBlock); BasicBlock* StartBlock = Preds[j]; BasicBlock* EndBlock; From baldrick at free.fr Wed May 9 03:41:44 2007 From: baldrick at free.fr (Duncan Sands) Date: Wed, 9 May 2007 03:41:44 -0500 Subject: [llvm-commits] CVS: llvm/test/CFrontend/2007-05-07-NestedStructReturn.c Message-ID: <200705090841.l498fi5I028069@zion.cs.uiuc.edu> Changes in directory llvm/test/CFrontend: 2007-05-07-NestedStructReturn.c added (r1.1) --- Log message: Testcase for http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070507/049387.html --- Diffs of the changes: (+13 -0) 2007-05-07-NestedStructReturn.c | 13 +++++++++++++ 1 files changed, 13 insertions(+) Index: llvm/test/CFrontend/2007-05-07-NestedStructReturn.c diff -c /dev/null llvm/test/CFrontend/2007-05-07-NestedStructReturn.c:1.1 *** /dev/null Wed May 9 03:41:36 2007 --- llvm/test/CFrontend/2007-05-07-NestedStructReturn.c Wed May 9 03:41:26 2007 *************** *** 0 **** --- 1,13 ---- + // RUN: %llvmgcc %s -S -fnested-functions -o - | grep {sret *%agg.result} + + struct X { int m, n; }; + + struct X p(int n) { + struct X c(int m) { + struct X x; + x.m = m; + x.n = n; + return x; + } + return c(n); + } From djg at cray.com Wed May 9 11:50:30 2007 From: djg at cray.com (Dan Gohman) Date: Wed, 9 May 2007 11:50:30 -0500 Subject: [llvm-commits] beginning unroll improvements Message-ID: <20070509165030.GN17728@village.us.cray.com> This patch extends the LoopUnroll pass to be able to unroll loops with unknown trip counts. This is left off by default, and a command-line option enables it. It also begins to separate loop unrolling into a utility routine; eventually it might be made usable from other passes. It currently works by inserting conditional branches between each unrolled iteration, unless it proves that the trip count is a multiple of a constant integer > 1, which it currently only does in the rare case that the trip count expression is a Mul operator with a ConstantInt operand. Eventually this information might be provided by other sources, for example by a pass that peels/splits the loop for this purpose. Dan -- Dan Gohman, Cray Inc. -------------- next part -------------- Index: test/Transforms/LoopUnroll/2007-05-09-UnknownTripCount.ll =================================================================== RCS file: test/Transforms/LoopUnroll/2007-05-09-UnknownTripCount.ll diff -N test/Transforms/LoopUnroll/2007-05-09-UnknownTripCount.ll --- /dev/null +++ test/Transforms/LoopUnroll/2007-05-09-UnknownTripCount.ll @@ -0,0 +1,18 @@ +; RUN: llvm-as < %s | opt -loop-unroll -unroll-count=3 | llvm-dis | grep bb72.2 + +define void @foo(i32 %trips) { +entry: + br label %cond_true.outer + +cond_true.outer: + %indvar1.ph = phi i32 [ 0, %entry ], [ %indvar.next2, %bb72 ] + br label %bb72 + +bb72: + %indvar.next2 = add i32 %indvar1.ph, 1 + %exitcond3 = icmp eq i32 %indvar.next2, %trips + br i1 %exitcond3, label %cond_true138, label %cond_true.outer + +cond_true138: + ret void +} Index: lib/Transforms/Scalar/LoopUnroll.cpp =================================================================== RCS file: /var/cvs/llvm/llvm/lib/Transforms/Scalar/LoopUnroll.cpp,v retrieving revision 1.46 diff -u -d -r1.46 LoopUnroll.cpp --- lib/Transforms/Scalar/LoopUnroll.cpp +++ lib/Transforms/Scalar/LoopUnroll.cpp @@ -31,6 +31,7 @@ #include "llvm/Support/Compiler.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/Debug.h" +#include "llvm/Support/MathExtras.h" #include "llvm/ADT/Statistic.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SmallPtrSet.h" @@ -39,12 +40,19 @@ #include using namespace llvm; -STATISTIC(NumUnrolled, "Number of loops completely unrolled"); +STATISTIC(NumCompletelyUnrolled, "Number of loops completely unrolled"); +STATISTIC(NumUnrolled, "Number of loops unrolled (completely or otherwise)"); namespace { cl::opt - UnrollThreshold("unroll-threshold", cl::init(100), cl::Hidden, - cl::desc("The cut-off point for loop unrolling")); + UnrollThreshold + ("unroll-threshold", cl::init(100), cl::Hidden, + cl::desc("The cut-off point for automatic loop unrolling")); + + cl::opt + UnrollCount + ("unroll-count", cl::init(0), cl::Hidden, + cl::desc("Use this unroll count for all loops, for testing purposes")); class VISIBILITY_HIDDEN LoopUnroll : public LoopPass { LoopInfo *LI; // The current loop information @@ -52,7 +60,13 @@ static char ID; // Pass ID, replacement for typeid LoopUnroll() : LoopPass((intptr_t)&ID) {} + /// A magic value for use with the Threshold parameter to indicate + /// that the loop unroll should be performed regardless of how much + /// code expansion would result. + static const unsigned NoThreshold = UINT_MAX; + bool runOnLoop(Loop *L, LPPassManager &LPM); + bool unrollLoop(Loop *L, unsigned Count, unsigned Threshold); BasicBlock *FoldBlockIntoPredecessor(BasicBlock *BB); /// This transformation requires natural loop information & requires that @@ -162,43 +176,137 @@ } bool LoopUnroll::runOnLoop(Loop *L, LPPassManager &LPM) { - bool Changed = false; LI = &getAnalysis(); + // Unroll the loop. + if (!unrollLoop(L, UnrollCount, UnrollThreshold)) + return false; + + // Update the loop information for this loop. + // If we completely unrolled the loop, remove it from the parent. + if (L->getNumBackEdges() == 0) + LPM.deleteLoopFromQueue(L); + + return true; +} + +/// Unroll the given loop by UnrollCount, or by a heuristically-determined +/// value if Count is zero. If Threshold is non-NULL, it points to +/// a Threshold value to limit code size expansion. If the loop size would +/// expand beyond the threshold value, unrolling is suppressed. The return +/// value is false if no transformations are performed. +/// +bool LoopUnroll::unrollLoop(Loop *L, unsigned Count, unsigned Threshold) { + assert(L->isLCSSAForm()); + BasicBlock *Header = L->getHeader(); BasicBlock *LatchBlock = L->getLoopLatch(); - BranchInst *BI = dyn_cast(LatchBlock->getTerminator()); - if (BI == 0) return Changed; // Must end in a conditional branch - ConstantInt *TripCountC = dyn_cast_or_null(L->getTripCount()); - if (!TripCountC) return Changed; // Must have constant trip count! + DOUT << "Loop Unroll: F[" << Header->getParent()->getName() + << "] Loop %" << Header->getName() << "\n"; - // Guard against huge trip counts. This also guards against assertions in - // APInt from the use of getZExtValue, below. - if (TripCountC->getValue().getActiveBits() > 32) - return Changed; // More than 2^32 iterations??? + if (!BI || BI->isUnconditional()) { + // The loop-rorate pass can be helpful to avoid this in many cases. + DOUT << " Can't unroll; loop not terminated by a conditional branch.\n"; + return false; + } - uint64_t TripCountFull = TripCountC->getZExtValue(); - if (TripCountFull == 0) - return Changed; // Zero iteraitons? + // Determine the trip count and/or trip multiple. A TripCount value of zero + // is used to mean an unknown trip count. The TripMultiple value is the + // greatest known integer multiple of the trip count. + unsigned TripCount = 0; + unsigned TripMultiple = 1; + if (Value *TripCountValue = L->getTripCount()) { + if (ConstantInt *TripCountC = dyn_cast(TripCountValue)) { + // Guard against huge trip counts. This also guards against assertions in + // APInt from the use of getZExtValue, below. + if (TripCountC->getValue().getActiveBits() <= 32) { + TripCount = (unsigned)TripCountC->getZExtValue(); + } + } else if (BinaryOperator *BO = dyn_cast(TripCountValue)) { + switch (BO->getOpcode()) { + case BinaryOperator::Mul: + if (ConstantInt *MultipleC = dyn_cast(BO->getOperand(1))) { + if (MultipleC->getValue().getActiveBits() <= 32) { + TripMultiple = (unsigned)MultipleC->getZExtValue(); + } + } + break; + default: break; + } + } + } + if (TripCount != 0) + DOUT << " Trip Count = " << TripCount << "\n"; + if (TripMultiple != 1) + DOUT << " Trip Multiple = " << TripMultiple << "\n"; - unsigned LoopSize = ApproximateLoopSize(L); - DOUT << "Loop Unroll: F[" << Header->getParent()->getName() - << "] Loop %" << Header->getName() << " Loop Size = " - << LoopSize << " Trip Count = " << TripCountFull << " - "; - uint64_t Size = (uint64_t)LoopSize*TripCountFull; - if (Size > UnrollThreshold) { - DOUT << "TOO LARGE: " << Size << ">" << UnrollThreshold << "\n"; - return Changed; + // Automatically select an unroll count. + if (Count == 0) { + // Conservative heuristic: if we know the trip count, see if we can + // completely unroll (subject to the threshold, checked below); otherwise + // don't unroll. + if (TripCount != 0) { + Count = TripCount; + } else { + return false; + } } - DOUT << "UNROLLING!\n"; - std::vector LoopBlocks = L->getBlocks(); + // Effectively "DCE" unrolled iterations that are beyond the tripcount + // and will never be executed. + if (TripCount != 0 && Count > TripCount) + Count = TripCount; - unsigned TripCount = (unsigned)TripCountFull; + assert(Count > 0); + assert(TripMultiple > 0); + assert(TripCount == 0 || TripCount % TripMultiple == 0); - BasicBlock *LoopExit = BI->getSuccessor(L->contains(BI->getSuccessor(0))); + // Enforce the threshold. + if (Threshold != NoThreshold) { + unsigned LoopSize = ApproximateLoopSize(L); + DOUT << " Loop Size = " << LoopSize << "\n"; + uint64_t Size = (uint64_t)LoopSize*Count; + if (TripCount != 1 && Size > Threshold) { + DOUT << " TOO LARGE TO UNROLL: " + << Size << ">" << Threshold << "\n"; + return false; + } + } + + // Are we eliminating the loop control altogether? + bool CompletelyUnroll = Count == TripCount; + + // If we know the trip count, we know the multiple... + unsigned BreakoutTrip = 0; + if (TripCount != 0) { + BreakoutTrip = TripCount % Count; + TripMultiple = 0; + } else { + // Figure out what multiple to use. + BreakoutTrip = TripMultiple = + (unsigned)GreatestCommonDivisor64(Count, TripMultiple); + } + + if (CompletelyUnroll) { + DOUT << "COMPLETELY UNROLLING loop %" << Header->getName() + << " with trip count " << TripCount << "!\n"; + } else { + DOUT << "UNROLLING loop %" << Header->getName() + << " by " << Count; + if (TripMultiple == 0 || BreakoutTrip != TripMultiple) { + DOUT << " with a breakout at trip " << BreakoutTrip; + } else if (TripMultiple != 1) { + DOUT << " with " << TripMultiple << " trips per branch"; + } + DOUT << "!\n"; + } + + std::vector LoopBlocks = L->getBlocks(); + + bool ContinueOnTrue = L->contains(BI->getSuccessor(0)); + BasicBlock *LoopExit = BI->getSuccessor(ContinueOnTrue); // For the first iteration of the loop, we should use the precloned values for // PHI nodes. Insert associations now. @@ -214,16 +322,12 @@ LastValueMap[I] = I; } - // Remove the exit branch from the loop - LatchBlock->getInstList().erase(BI); - std::vector Headers; std::vector Latches; Headers.push_back(Header); Latches.push_back(LatchBlock); - assert(TripCount != 0 && "Trip count of 0 is impossible!"); - for (unsigned It = 1; It != TripCount; ++It) { + for (unsigned It = 1; It != Count; ++It) { char SuffixBuffer[100]; sprintf(SuffixBuffer, ".%d", It); @@ -277,9 +381,18 @@ // we can insert the proper branches later. if (*BB == Header) Headers.push_back(New); - if (*BB == LatchBlock) + if (*BB == LatchBlock) { Latches.push_back(New); + // Also, clear out the new latch's back edge so that it doesn't look + // like a new loop, so that it's amenable to being merged with adjacent + // blocks later on. + TerminatorInst *Term = New->getTerminator(); + assert(L->contains(Term->getSuccessor(!ContinueOnTrue))); + assert(Term->getSuccessor(ContinueOnTrue) == LoopExit); + Term->setSuccessor(!ContinueOnTrue, NULL); + } + NewBlocks.push_back(New); } @@ -289,12 +402,11 @@ E = NewBlocks[i]->end(); I != E; ++I) RemapInstruction(I, LastValueMap); } - // The latch block exits the loop. If there are any PHI nodes in the // successor blocks, update them to use the appropriate values computed as the // last iteration of the loop. - if (TripCount > 1) { + if (Count != 1) { SmallPtrSet Users; for (Value::use_iterator UI = LatchBlock->use_begin(), UE = LatchBlock->use_end(); UI != UE; ++UI) @@ -316,29 +428,55 @@ } } - // Now loop over the PHI nodes in the original block, setting them to their - // incoming values. - BasicBlock *Preheader = L->getLoopPreheader(); - for (unsigned i = 0, e = OrigPHINode.size(); i != e; ++i) { - PHINode *PN = OrigPHINode[i]; - PN->replaceAllUsesWith(PN->getIncomingValueForBlock(Preheader)); - Header->getInstList().erase(PN); + // Now, if we're doing complete unrolling, loop over the PHI nodes in the + // original block, setting them to their incoming values. + if (CompletelyUnroll) { + BasicBlock *Preheader = L->getLoopPreheader(); + for (unsigned i = 0, e = OrigPHINode.size(); i != e; ++i) { + PHINode *PN = OrigPHINode[i]; + PN->replaceAllUsesWith(PN->getIncomingValueForBlock(Preheader)); + Header->getInstList().erase(PN); + } } - - // Insert the branches that link the different iterations together - for (unsigned i = 0; i < Latches.size()-1; ++i) { - new BranchInst(Headers[i+1], Latches[i]); - if (BasicBlock *Fold = FoldBlockIntoPredecessor(Headers[i+1])) { - std::replace(Latches.begin(), Latches.end(), Headers[i+1], Fold); - std::replace(Headers.begin(), Headers.end(), Headers[i+1], Fold); + + // Now that all the basic blocks for the unrolled iterations are in place, + // set up the branches to connect them. + for (unsigned i = 0, e = Latches.size(); i != e; ++i) { + // The original branch was replicated in each unrolled iteration. + BranchInst *Term = cast(Latches[i]->getTerminator()); + + // The branch destination. + unsigned j = (i + 1) % e; + BasicBlock *Dest = Headers[j]; + bool NeedConditional = true; + + // For a complete unroll, make the last iteration end with a branch + // to the exit block. + if (CompletelyUnroll && j == 0) { + Dest = LoopExit; + NeedConditional = false; + } + + // If we know the trip count or a multiple of it, we can safely use an + // unconditional branch for some iterations. + if (j != BreakoutTrip && (TripMultiple == 0 || j % TripMultiple != 0)) { + NeedConditional = false; + } + + if (NeedConditional) { + // Update the conditional branch's successor for the following + // iteration. + Term->setSuccessor(!ContinueOnTrue, Dest); + } else { + Term->setUnconditionalDest(Dest); + // Merge adjacent basic blocks, if possible. + if (BasicBlock *Fold = FoldBlockIntoPredecessor(Dest)) { + std::replace(Latches.begin(), Latches.end(), Dest, Fold); + std::replace(Headers.begin(), Headers.end(), Dest, Fold); + } } } - // Finally, add an unconditional branch to the block to continue into the exit - // block. - new BranchInst(LoopExit, Latches[Latches.size()-1]); - FoldBlockIntoPredecessor(LoopExit); - // At this point, the code is well formed. We now do a quick sweep over the // inserted code, doing constant propagation and dead code elimination as we // go. @@ -356,10 +494,7 @@ } } - // Update the loop information for this loop. - // Remove the loop from the parent. - LPM.deleteLoopFromQueue(L); - + NumCompletelyUnrolled += CompletelyUnroll; ++NumUnrolled; return true; } From dpatel at apple.com Wed May 9 11:58:33 2007 From: dpatel at apple.com (dpatel at apple.com) Date: Wed, 9 May 2007 09:58:33 -0700 (PDT) Subject: [llvm-commits] [127082] Map -dA to -asm-verbose. Message-ID: <20070509165833.4573E1BF8E9C@src> Revision: 127082 Author: dpatel Date: 2007-05-09 09:58:33 -0700 (Wed, 09 May 2007) Log Message: ----------- Map -dA to -asm-verbose. Modified Paths: -------------- apple-local/branches/llvm/gcc/llvm-backend.cpp Modified: apple-local/branches/llvm/gcc/llvm-backend.cpp =================================================================== --- apple-local/branches/llvm/gcc/llvm-backend.cpp 2007-05-09 11:00:59 UTC (rev 127081) +++ apple-local/branches/llvm/gcc/llvm-backend.cpp 2007-05-09 16:58:33 UTC (rev 127082) @@ -107,6 +107,9 @@ Args.push_back("--disable-fp-elim"); if (!flag_zero_initialized_in_bss) Args.push_back("--nozero-initialized-in-bss"); + if (flag_debug_asm) + Args.push_back("--asm-verbose"); + // Disabled until PR1224 is resolved. //if (flag_exceptions) // Args.push_back("--enable-eh"); From lauro.venancio at gmail.com Wed May 9 13:25:45 2007 From: lauro.venancio at gmail.com (Lauro Ramos Venancio) Date: Wed, 9 May 2007 15:25:45 -0300 Subject: [llvm-commits] [126997] Fix PR1278. In-Reply-To: <20070508061509.CB6081807C01@src> References: <20070508061509.CB6081807C01@src> Message-ID: <9c10c9f0705091125h299363e5mf8a732f2f567d87a@mail.gmail.com> I'm getting an error building the llvm-gcc because this patch was partially propagated to the svn mirror. The changes in llvm-convert.cpp and llvm-types.cpp was propagated but the changes in llvm-internals.h wasn't. The error: c++ -c -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wwrite-strings -pedantic -Wno-long-long -Wno-variadic-macros -DHAVE_CONFIG_H -Wno-unused -DTARGET_NAME=\"arm-linux-gnueabi\" -DNDEBUG -DENABLE_LLVM -D__STDC_LIMIT_MACROS -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/../include -I../../gcc/../libcpp/include -I/home/laurov/llvm/llvm/include -I/home/laurov/llvm/llvm/build/include ../../gcc/llvm-convert.cpp -o llvm-convert.o ../../gcc/llvm-convert.cpp: In function 'void CopyAggregate(llvm::Value*, llvm::Value*, bool, bool, llvm::BasicBlock*)': ../../gcc/llvm-convert.cpp:1088: error: 'isPaddingElement' was not declared in this scope make[1]: *** [llvm-convert.o] Error 1 make[1]: Leaving directory `/home/laurov/llvm/llvm-gcc/build_arm/gcc' make: *** [all-gcc] Error 2 Lauro 2007/5/8, dpatel at apple.com : > > Revision: 126997 > Author: dpatel > Date: 2007-05-07 23:15:09 -0700 (Mon, 07 May 2007) > > Log Message: > ----------- > Fix PR1278. > > - While adding padding elements at the end of LLVM struct use > an array of i32 (instead of an array of i8) if possible. > > - Keep track of padding elements at the end of LLVM struct. > Do not copy them while copying aggregates. > > Modified Paths: > -------------- > apple-local/branches/llvm/gcc/llvm-convert.cpp > apple-local/branches/llvm/gcc/llvm-internal.h > apple-local/branches/llvm/gcc/llvm-types.cpp > > Modified: apple-local/branches/llvm/gcc/llvm-convert.cpp > =================================================================== > --- apple-local/branches/llvm/gcc/llvm-convert.cpp 2007-05-08 > 05:09:41 UTC (rev 126996) > +++ apple-local/branches/llvm/gcc/llvm-convert.cpp 2007-05-08 > 06:15:09 UTC (rev 126997) > @@ -1085,6 +1085,8 @@ > } else if (const StructType *STy = dyn_cast(ElTy)) { > Constant *Zero = ConstantInt::get(Type::Int32Ty, 0); > for (unsigned i = 0, e = STy->getNumElements(); i != e; ++i) { > + if (isPaddingElement(STy, i)) > + continue; > Constant *Idx = ConstantInt::get(Type::Int32Ty, i); > Value *DElPtr = new GetElementPtrInst(DestPtr, Zero, Idx, "tmp", > CurBB); > Value *SElPtr = new GetElementPtrInst(SrcPtr, Zero, Idx, "tmp", > CurBB); > > Modified: apple-local/branches/llvm/gcc/llvm-internal.h > =================================================================== > --- apple-local/branches/llvm/gcc/llvm-internal.h 2007-05-08 > 05:09:41 UTC (rev 126996) > +++ apple-local/branches/llvm/gcc/llvm-internal.h 2007-05-08 > 06:15:09 UTC (rev 126997) > @@ -96,6 +96,10 @@ > > struct StructTypeConversionInfo; > > +/// Return true if and only if field no. N from struct type T is a > padding > +/// element added to match llvm struct type size and gcc struct type > size. > +bool isPaddingElement(const Type *T, unsigned N); > + > /// TypeConverter - Implement the converter from GCC types to LLVM types. > /// > class TypeConverter { > > Modified: apple-local/branches/llvm/gcc/llvm-types.cpp > =================================================================== > --- apple-local/branches/llvm/gcc/llvm-types.cpp 2007-05-08 > 05:09:41 UTC (rev 126996) > +++ apple-local/branches/llvm/gcc/llvm-types.cpp 2007-05-08 > 06:15:09 UTC (rev 126997) > @@ -893,6 +893,7 @@ > std::vector Elements; > std::vector ElementOffsetInBytes; > std::vector ElementSizeInBytes; > + std::vector PaddingElement; // True if field is used for padding > const TargetData &TD; > unsigned GCCStructAlignmentInBytes; > bool Packed; // True if struct is packed > @@ -1071,10 +1072,12 @@ > > /// addElement - Add an element to the structure with the specified > type, > /// offset and size. > - void addElement(const Type *Ty, uint64_t Offset, uint64_t Size) { > + void addElement(const Type *Ty, uint64_t Offset, uint64_t Size, > + bool ExtraPadding = false) { > Elements.push_back(Ty); > ElementOffsetInBytes.push_back(Offset); > ElementSizeInBytes.push_back(Size); > + PaddingElement.push_back(ExtraPadding); > lastFieldStartsAtNonByteBoundry(false); > ExtraBitsAvailable = 0; > } > @@ -1223,7 +1226,25 @@ > } > } > > +std::map StructTypeInfoMap; > > +/// Return true if and only if field no. N from struct type T is a > padding > +/// element added to match llvm struct type size and gcc struct type > size. > +bool isPaddingElement(const Type *Ty, unsigned index) { > + > + StructTypeConversionInfo *Info = StructTypeInfoMap[Ty]; > + > + // If info is not available then be conservative and return false. > + if (!Info) > + return false; > + > + assert ( Info->Elements.size() == Info->PaddingElement.size() > + && "Invalid StructTypeConversionInfo"); > + assert ( index < Info->PaddingElement.size() > + && "Invalid PaddingElement index"); > + return Info->PaddingElement[index]; > +} > + > /// getFieldOffsetInBits - Return the offset (in bits) of a FIELD_DECL in > a > /// structure. > static unsigned getFieldOffsetInBits(tree Field) { > @@ -1417,29 +1438,46 @@ > ConvertType(BINFO_TYPE(BINFO_BASE_BINFO(binfo, i))); > } > > - StructTypeConversionInfo Info(*TheTarget, TYPE_ALIGN_UNIT(type), > - TYPE_PACKED(type)); > + StructTypeConversionInfo *Info = > + new StructTypeConversionInfo(*TheTarget, TYPE_ALIGN_UNIT(type), > + TYPE_PACKED(type)); > + > > // Convert over all of the elements of the struct. > for (tree Field = TYPE_FIELDS(type); Field; Field = TREE_CHAIN(Field)) > - DecodeStructFields(Field, Info); > + DecodeStructFields(Field, *Info); > > - Info.RemoveExtraBytes(); > + Info->RemoveExtraBytes(); > // If the LLVM struct requires explicit tail padding to be the same > size as > // the GCC struct, insert tail padding now. This handles, e.g., "{}" > in C++. > if (TYPE_SIZE(type) && TREE_CODE(TYPE_SIZE(type)) == INTEGER_CST) { > - uint64_t LLVMStructSize = Info.getSizeAsLLVMStruct(); > + uint64_t LLVMStructSize = Info->getSizeAsLLVMStruct(); > uint64_t GCCTypeSize = > ((uint64_t)TREE_INT_CST_LOW(TYPE_SIZE(type))+7)/8; > > if (LLVMStructSize != GCCTypeSize) { > assert(LLVMStructSize < GCCTypeSize && > "LLVM type size doesn't match GCC type size!"); > - uint64_t LLVMLastElementEnd = Info.getNewElementByteOffset(1); > - const Type *PadTy = Type::Int8Ty; > - if (GCCTypeSize-LLVMLastElementEnd != 1) > - PadTy = ArrayType::get(PadTy, GCCTypeSize-LLVMStructSize); > - Info.addElement(PadTy, GCCTypeSize-LLVMLastElementEnd, > - GCCTypeSize-LLVMLastElementEnd); > + uint64_t LLVMLastElementEnd = Info->getNewElementByteOffset(1); > + > + // If only one byte is needed then insert i8. > + if (GCCTypeSize-LLVMLastElementEnd == 1) > + Info->addElement(Type::Int8Ty, 1, 1); > + else { > + if ( ((GCCTypeSize-LLVMStructSize) % 4) == 0) { > + // insert array of i32 > + unsigned Int32ArraySize = (GCCTypeSize-LLVMStructSize)/4; > + const Type *PadTy = ArrayType::get(Type::Int32Ty, > Int32ArraySize); > + Info->addElement(PadTy, GCCTypeSize - LLVMLastElementEnd, > + Int32ArraySize, true /* Padding Element */); > + } else { > + const Type *PadTy = > + ArrayType::get(Type::Int8Ty, GCCTypeSize-LLVMStructSize); > + Info->addElement(PadTy, GCCTypeSize - LLVMLastElementEnd, > + GCCTypeSize - LLVMLastElementEnd, > + true /* Padding Element */); > + > + } > + } > } > } > > @@ -1460,7 +1498,7 @@ > if (tree DeclaredType = DECL_BIT_FIELD_TYPE(Field)) { > // If this is a bitfield, the declared type must be an integral > type. > const Type *DeclFieldTy = ConvertType(DeclaredType); > - unsigned DeclBitAlignment = Info.getTypeAlignment(DeclFieldTy)*8; > + unsigned DeclBitAlignment = > Info->getTypeAlignment(DeclFieldTy)*8; > > FieldOffsetInBits &= ~(DeclBitAlignment-1ULL); > } > @@ -1471,11 +1509,12 @@ > integer_zerop(TYPE_SIZE(FieldType)); > > unsigned FieldNo = > - Info.getLLVMFieldFor(FieldOffsetInBits, CurFieldNo, > isZeroSizeField); > + Info->getLLVMFieldFor(FieldOffsetInBits, CurFieldNo, > isZeroSizeField); > SET_DECL_LLVM(Field, ConstantInt::get(Type::Int32Ty, FieldNo)); > } > > - const Type *ResultTy = Info.getLLVMType(); > + const Type *ResultTy = Info->getLLVMType(); > + StructTypeInfoMap[ResultTy] = Info; > > const OpaqueType *OldTy = > cast_or_null(GET_TYPE_LLVM(type)); > TypeDB.setType(type, ResultTy); > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070509/349a9da2/attachment.html From isanbard at gmail.com Wed May 9 13:30:15 2007 From: isanbard at gmail.com (Bill) Date: Wed, 9 May 2007 11:30:15 -0700 Subject: [llvm-commits] [126997] Fix PR1278. In-Reply-To: <9c10c9f0705091125h299363e5mf8a732f2f567d87a@mail.gmail.com> References: <20070508061509.CB6081807C01@src> <9c10c9f0705091125h299363e5mf8a732f2f567d87a@mail.gmail.com> Message-ID: <16e5fdf90705091130k5a9b2a87j1044b13021ccbd03@mail.gmail.com> Sorry all. It somehow got dropped from the mirror...It'll be fixed in the next update... -bw On 5/9/07, Lauro Ramos Venancio wrote: > I'm getting an error building the llvm-gcc because this patch was partially > propagated to the svn mirror. The changes in llvm-convert.cpp and > llvm-types.cpp was propagated but the changes in llvm-internals.h wasn't. > > The error: > c++ -c -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wwrite-strings > -pedantic -Wno-long-long -Wno-variadic-macros -DHAVE_CONFIG_H -Wno-unused > -DTARGET_NAME=\"arm-linux-gnueabi\" -DNDEBUG -DENABLE_LLVM > -D__STDC_LIMIT_MACROS -I. -I. -I../../gcc -I../../gcc/. > -I../../gcc/../include -I../../gcc/../libcpp/include > -I/home/laurov/llvm/llvm/include > -I/home/laurov/llvm/llvm/build/include ../../gcc/llvm- > convert.cpp -o llvm-convert.o > ../../gcc/llvm-convert.cpp: In function 'void CopyAggregate(llvm::Value*, > llvm::Value*, bool, bool, llvm::BasicBlock*)': > ../../gcc/llvm-convert.cpp:1088: error: 'isPaddingElement' was not declared > in this scope > make[1]: *** [llvm-convert.o] Error 1 > make[1]: Leaving directory > `/home/laurov/llvm/llvm-gcc/build_arm/gcc' > make: *** [all-gcc] Error 2 > > Lauro > 2007/5/8, dpatel at apple.com : > > Revision: 126997 > > Author: dpatel > > Date: 2007-05-07 23:15:09 -0700 (Mon, 07 May 2007) > > > > Log Message: > > ----------- > > Fix PR1278. > > > > - While adding padding elements at the end of LLVM struct use > > an array of i32 (instead of an array of i8) if possible. > > > > - Keep track of padding elements at the end of LLVM struct. > > Do not copy them while copying aggregates. > > > > Modified Paths: > > -------------- > > apple-local/branches/llvm/gcc/llvm-convert.cpp > > apple-local/branches/llvm/gcc/llvm- internal.h > > apple-local/branches/llvm/gcc/llvm-types.cpp > > > > Modified: apple-local/branches/llvm/gcc/llvm-convert.cpp > > > =================================================================== > > --- apple-local/branches/llvm/gcc/llvm- convert.cpp > 2007-05-08 05:09:41 UTC (rev 126996) > > +++ apple-local/branches/llvm/gcc/llvm-convert.cpp > 2007-05-08 06:15:09 UTC (rev 126997) > > @@ -1085,6 +1085,8 @@ > > } else if (const StructType *STy = dyn_cast(ElTy)) { > > Constant *Zero = ConstantInt::get(Type::Int32Ty, 0); > > for (unsigned i = 0, e = STy->getNumElements(); i != e; ++i) { > > + if (isPaddingElement(STy, i)) > > + continue; > > Constant *Idx = ConstantInt::get(Type::Int32Ty, i); > > Value *DElPtr = new GetElementPtrInst(DestPtr, Zero, Idx, "tmp", > CurBB); > > Value *SElPtr = new GetElementPtrInst(SrcPtr, Zero, Idx, "tmp", > CurBB); > > > > Modified: apple-local/branches/llvm/gcc/llvm- internal.h > > > =================================================================== > > --- apple-local/branches/llvm/gcc/llvm-internal.h > 2007-05-08 05:09:41 UTC (rev 126996) > > +++ apple-local/branches/llvm/gcc/llvm-internal.h > 2007-05-08 06:15:09 UTC (rev 126997) > > @@ -96,6 +96,10 @@ > > > > struct StructTypeConversionInfo; > > > > +/// Return true if and only if field no. N from struct type T is a > padding > > +/// element added to match llvm struct type size and gcc struct type > size. > > +bool isPaddingElement(const Type *T, unsigned N); > > + > > /// TypeConverter - Implement the converter from GCC types to LLVM types. > > /// > > class TypeConverter { > > > > Modified: apple-local/branches/llvm/gcc/llvm- types.cpp > > > =================================================================== > > --- apple-local/branches/llvm/gcc/llvm-types.cpp > 2007-05-08 05:09:41 UTC (rev 126996) > > +++ apple-local/branches/llvm/gcc/llvm-types.cpp > 2007-05-08 06:15:09 UTC (rev 126997) > > @@ -893,6 +893,7 @@ > > std::vector Elements; > > std::vector ElementOffsetInBytes; > > std::vector ElementSizeInBytes; > > + std::vector PaddingElement; // True if field is used for padding > > const TargetData &TD; > > unsigned GCCStructAlignmentInBytes; > > bool Packed; // True if struct is packed > > @@ -1071,10 +1072,12 @@ > > > > /// addElement - Add an element to the structure with the specified > type, > > /// offset and size. > > - void addElement(const Type *Ty, uint64_t Offset, uint64_t Size) { > > + void addElement(const Type *Ty, uint64_t Offset, uint64_t Size, > > + bool ExtraPadding = false) { > > Elements.push_back(Ty); > > ElementOffsetInBytes.push_back(Offset); > > ElementSizeInBytes.push_back(Size); > > + PaddingElement.push_back(ExtraPadding); > > lastFieldStartsAtNonByteBoundry(false); > > ExtraBitsAvailable = 0; > > } > > @@ -1223,7 +1226,25 @@ > > } > > } > > > > +std::map StructTypeInfoMap; > > > > +/// Return true if and only if field no. N from struct type T is a > padding > > +/// element added to match llvm struct type size and gcc struct type > size. > > +bool isPaddingElement(const Type *Ty, unsigned index) { > > + > > + StructTypeConversionInfo *Info = StructTypeInfoMap[Ty]; > > + > > + // If info is not available then be conservative and return false. > > + if (!Info) > > + return false; > > + > > + assert ( Info->Elements.size() == Info->PaddingElement.size() > > + && "Invalid StructTypeConversionInfo"); > > + assert ( index < Info-> PaddingElement.size() > > + && "Invalid PaddingElement index"); > > + return Info->PaddingElement[index]; > > +} > > + > > /// getFieldOffsetInBits - Return the offset (in bits) of a FIELD_DECL in > a > > /// structure. > > static unsigned getFieldOffsetInBits(tree Field) { > > @@ -1417,29 +1438,46 @@ > > ConvertType(BINFO_TYPE(BINFO_BASE_BINFO(binfo, > i))); > > } > > > > - StructTypeConversionInfo Info(*TheTarget, TYPE_ALIGN_UNIT(type), > > - TYPE_PACKED(type)); > > + StructTypeConversionInfo *Info = > > + new StructTypeConversionInfo(*TheTarget, > TYPE_ALIGN_UNIT(type), > > + TYPE_PACKED(type)); > > + > > > > // Convert over all of the elements of the struct. > > for (tree Field = TYPE_FIELDS(type); Field; Field = TREE_CHAIN(Field)) > > - DecodeStructFields(Field, Info); > > + DecodeStructFields(Field, *Info); > > > > - Info.RemoveExtraBytes(); > > + Info->RemoveExtraBytes(); > > // If the LLVM struct requires explicit tail padding to be the same > size as > > // the GCC struct, insert tail padding now. This handles, e.g ., "{}" > in C++. > > if (TYPE_SIZE(type) && TREE_CODE(TYPE_SIZE(type)) == INTEGER_CST) { > > - uint64_t LLVMStructSize = Info.getSizeAsLLVMStruct(); > > + uint64_t LLVMStructSize = Info->getSizeAsLLVMStruct(); > > uint64_t GCCTypeSize = > ((uint64_t)TREE_INT_CST_LOW(TYPE_SIZE(type))+7)/8; > > > > if (LLVMStructSize != GCCTypeSize) { > > assert(LLVMStructSize < GCCTypeSize && > > "LLVM type size doesn't match GCC type size!"); > > - uint64_t LLVMLastElementEnd = Info.getNewElementByteOffset(1); > > - const Type *PadTy = Type::Int8Ty; > > - if (GCCTypeSize-LLVMLastElementEnd != 1) > > - PadTy = ArrayType::get(PadTy, GCCTypeSize-LLVMStructSize); > > - Info.addElement(PadTy, GCCTypeSize-LLVMLastElementEnd, > > - GCCTypeSize-LLVMLastElementEnd); > > + uint64_t LLVMLastElementEnd = > Info->getNewElementByteOffset(1); > > + > > + // If only one byte is needed then insert i8. > > + if (GCCTypeSize-LLVMLastElementEnd == 1) > > + Info->addElement(Type::Int8Ty, 1, 1); > > + else { > > + if ( ((GCCTypeSize-LLVMStructSize) % 4) == 0) { > > + // insert array of i32 > > + unsigned Int32ArraySize = (GCCTypeSize-LLVMStructSize)/4; > > + const Type *PadTy = ArrayType::get(Type::Int32Ty, > Int32ArraySize); > > + Info->addElement(PadTy, GCCTypeSize - > LLVMLastElementEnd, > > + Int32ArraySize, true /* Padding Element */); > > + } else { > > + const Type *PadTy = > > + ArrayType::get(Type::Int8Ty, > GCCTypeSize-LLVMStructSize); > > + Info->addElement(PadTy, GCCTypeSize - > LLVMLastElementEnd, > > + GCCTypeSize - LLVMLastElementEnd, > > + true /* Padding Element */); > > + > > + } > > + } > > } > > } > > > > @@ -1460,7 +1498,7 @@ > > if (tree DeclaredType = DECL_BIT_FIELD_TYPE(Field)) { > > // If this is a bitfield, the declared type must be an integral > type. > > const Type *DeclFieldTy = ConvertType(DeclaredType); > > - unsigned DeclBitAlignment = Info.getTypeAlignment(DeclFieldTy)*8; > > + unsigned DeclBitAlignment = > Info->getTypeAlignment(DeclFieldTy)*8; > > > > FieldOffsetInBits &= ~(DeclBitAlignment-1ULL); > > } > > @@ -1471,11 +1509,12 @@ > > integer_zerop(TYPE_SIZE(FieldType)); > > > > unsigned FieldNo = > > - Info.getLLVMFieldFor(FieldOffsetInBits, CurFieldNo, > isZeroSizeField); > > + Info->getLLVMFieldFor(FieldOffsetInBits, > CurFieldNo, isZeroSizeField); > > SET_DECL_LLVM(Field, ConstantInt::get(Type::Int32Ty, FieldNo)); > > } > > > > - const Type *ResultTy = Info.getLLVMType(); > > + const Type *ResultTy = Info->getLLVMType(); > > + StructTypeInfoMap[ResultTy] = Info; > > > > const OpaqueType *OldTy = > cast_or_null(GET_TYPE_LLVM(type)); > > TypeDB.setType(type, ResultTy); > > > > > > _______________________________________________ > > llvm-commits mailing list > > llvm-commits at cs.uiuc.edu > > > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > > > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > > From evan.cheng at apple.com Wed May 9 14:15:58 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 9 May 2007 12:15:58 -0700 Subject: [llvm-commits] Regalloc Refactoring In-Reply-To: <463E6E94.60909@obbligato.org> References: <463E6E94.60909@obbligato.org> Message-ID: Hi, The patch seems pretty safe to me. The only thing I am not sure about is: > Index: lib/CodeGen/RegAllocLinearScan.cpp > =================================================================== > RCS file: /var/cvs/llvm/llvm/lib/CodeGen/RegAllocLinearScan.cpp,v > retrieving revision 1.148 > diff -u -r1.148 RegAllocLinearScan.cpp > --- lib/CodeGen/RegAllocLinearScan.cpp 3 May 2007 01:11:53 -0000 1.148 > +++ lib/CodeGen/RegAllocLinearScan.cpp 6 May 2007 22:44:13 -0000 > @@ -96,6 +96,7 @@ > > virtual void getAnalysisUsage(AnalysisUsage &AU) const { > AU.addRequired(); > + AU.addRequiredID(SimpleRegisterCoalescingID); > MachineFunctionPass::getAnalysisUsage(AU); > } and > + RegisterPass > + X("simple-register-coalescing", > + "Simple register coalescing to eliminate all possible register > copies"); > +} > + > +const PassInfo *llvm::SimpleRegisterCoalescingID = X.getPassInfo(); It's not clear to me if this is the right way to model this pass. After all, this is not an analysis pass. Perhaps the right thing to do is to model this after the register allocator. Add a createRegisterCoalescer() to Passes.cpp which would allow us to choose the one we want. Then register the pass in LLVMTargetMachine.cpp. Chris? What do you say? Evan On May 6, 2007, at 5:11 PM, David A. Greene wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > This patch splits LiveIntervalAnalysis into separate live interval > analysis and register coalescing phases to facilitate development > of new register allocators and coalescing schemes. > > It passes all tests that do not also fail in the official, unmodified > source tree. > > -Dave > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.6 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iD8DBQFGPm6UgQsI8xjTYs8RAtTvAJ9efdVrb/trR4bjefy0WZr0X8fWkgCfTSuY > wxN0IVt8qNJLbhjloBxfZkU= > =sCDD > -----END PGP SIGNATURE----- > Index: include/llvm/CodeGen/LiveIntervalAnalysis.h > =================================================================== > RCS file: /var/cvs/llvm/llvm/include/llvm/CodeGen/ > LiveIntervalAnalysis.h,v > retrieving revision 1.84 > diff -u -r1.84 LiveIntervalAnalysis.h > --- include/llvm/CodeGen/LiveIntervalAnalysis.h 6 May 2007 13:37:16 > -0000 1.84 > +++ include/llvm/CodeGen/LiveIntervalAnalysis.h 6 May 2007 22:44:12 > -0000 > @@ -44,7 +44,7 @@ > /// MBB2IdxMap - The index of the first instruction in the > specified basic > /// block. > std::vector MBB2IdxMap; > - > + > typedef std::map Mi2IndexMap; > Mi2IndexMap mi2iMap_; > > @@ -54,31 +54,12 @@ > typedef std::map Reg2IntervalMap; > Reg2IntervalMap r2iMap_; > > - typedef IndexedMap Reg2RegMap; > - Reg2RegMap r2rMap_; > - > BitVector allocatableRegs_; > - DenseMap > allocatableRCRegs_; > - > - /// JoinedLIs - Keep track which register intervals have been > coalesced > - /// with other intervals. > - BitVector JoinedLIs; > > public: > static char ID; // Pass identification, replacement for typeid > LiveIntervals() : MachineFunctionPass((intptr_t)&ID) {} > > - struct CopyRec { > - MachineInstr *MI; > - unsigned SrcReg, DstReg; > - }; > - CopyRec getCopyRec(MachineInstr *MI, unsigned SrcReg, unsigned > DstReg) { > - CopyRec R; > - R.MI = MI; > - R.SrcReg = SrcReg; > - R.DstReg = DstReg; > - return R; > - } > struct InstrSlots { > enum { > LOAD = 0, > @@ -158,29 +139,31 @@ > "index does not correspond to an instruction"); > return i2miMap_[index]; > } > - > - std::vector addIntervalsForSpills(const > LiveInterval& i, > - VirtRegMap& vrm, > - int slot); > + > + // Interval creation > + > + LiveInterval &getOrCreateInterval(unsigned reg) { > + Reg2IntervalMap::iterator I = r2iMap_.find(reg); > + if (I == r2iMap_.end()) > + I = r2iMap_.insert(I, std::make_pair(reg, createInterval > (reg))); > + return I->second; > + } > > /// CreateNewLiveInterval - Create a new live interval with > the given live > /// ranges. The new live interval will have an infinite spill > weight. > LiveInterval &CreateNewLiveInterval(const LiveInterval *LI, > const > std::vector &LRs); > > - virtual void getAnalysisUsage(AnalysisUsage &AU) const; > - virtual void releaseMemory(); > + std::vector addIntervalsForSpills(const > LiveInterval& i, > + VirtRegMap& vrm, > + int slot); > > - /// runOnMachineFunction - pass entry point > - virtual bool runOnMachineFunction(MachineFunction&); > + // Interval removal > > - /// print - Implement the dump method. > - virtual void print(std::ostream &O, const Module* = 0) const; > - void print(std::ostream *O, const Module* M = 0) const { > - if (O) print(*O, M); > + void removeInterval(unsigned Reg) { > + r2iMap_.erase(Reg); > } > > - private: > /// isRemoved - returns true if the specified machine instr > has been > /// removed. > bool isRemoved(MachineInstr* instr) const { > @@ -198,40 +181,22 @@ > mi2iMap_.erase(mi2i); > } > } > - > - /// computeIntervals - Compute live intervals. > - void computeIntervals(); > > - /// joinIntervals - join compatible live intervals > - void joinIntervals(); > + virtual void getAnalysisUsage(AnalysisUsage &AU) const; > + virtual void releaseMemory(); > > - /// CopyCoallesceInMBB - Coallsece copies in the specified > MBB, putting > - /// copies that cannot yet be coallesced into the "TryAgain" > list. > - void CopyCoallesceInMBB(MachineBasicBlock *MBB, > - std::vector *TryAgain, bool > PhysOnly = false); > - > - /// JoinCopy - Attempt to join intervals corresponding to > SrcReg/DstReg, > - /// which are the src/dst of the copy instruction CopyMI. > This returns true > - /// if the copy was successfully coallesced away, or if it is > never possible > - /// to coallesce these this copy, due to register > constraints. It returns > - /// false if it is not currently possible to coallesce this > interval, but > - /// it may be possible if other things get coallesced. > - bool JoinCopy(MachineInstr *CopyMI, unsigned SrcReg, unsigned > DstReg, > - bool PhysOnly = false); > - > - /// JoinIntervals - Attempt to join these two intervals. On > failure, this > - /// returns false. Otherwise, if one of the intervals being > joined is a > - /// physreg, this method always canonicalizes DestInt to be > it. The output > - /// "SrcInt" will not have been modified, so we can use this > information > - /// below to update aliases. > - bool JoinIntervals(LiveInterval &LHS, LiveInterval &RHS); > - > - /// SimpleJoin - Attempt to join the specified interval into > this one. The > - /// caller of this method must guarantee that the RHS only > contains a single > - /// value number and that the RHS is not defined by a copy > from this > - /// interval. This returns false if the intervals are not > joinable, or it > - /// joins them and returns true. > - bool SimpleJoin(LiveInterval &LHS, LiveInterval &RHS); > + /// runOnMachineFunction - pass entry point > + virtual bool runOnMachineFunction(MachineFunction&); > + > + /// print - Implement the dump method. > + virtual void print(std::ostream &O, const Module* = 0) const; > + void print(std::ostream *O, const Module* M = 0) const { > + if (O) print(*O, M); > + } > + > + private: > + /// computeIntervals - Compute live intervals. > + void computeIntervals(); > > /// handleRegisterDef - update intervals for a register def > /// (calls handlePhysicalRegisterDef and > @@ -260,53 +225,8 @@ > unsigned MIIdx, > LiveInterval &interval, bool isAlias > = false); > > - /// Return true if the two specified registers belong to > different > - /// register classes. The registers may be either phys or > virt regs. > - bool differingRegisterClasses(unsigned RegA, unsigned RegB) > const; > - > - > - bool AdjustCopiesBackFrom(LiveInterval &IntA, LiveInterval &IntB, > - MachineInstr *CopyMI); > - > - /// lastRegisterUse - Returns the last use of the specific > register between > - /// cycles Start and End. It also returns the use operand by > reference. It > - /// returns NULL if there are no uses. > - MachineInstr *lastRegisterUse(unsigned Reg, unsigned Start, > unsigned End, > - MachineOperand *&MOU); > - > - /// findDefOperand - Returns the MachineOperand that is a def > of the specific > - /// register. It returns NULL if the def is not found. > - MachineOperand *findDefOperand(MachineInstr *MI, unsigned Reg); > - > - /// unsetRegisterKill - Unset IsKill property of all uses of > the specific > - /// register of the specific instruction. > - void unsetRegisterKill(MachineInstr *MI, unsigned Reg); > - > - /// hasRegisterDef - True if the instruction defines the > specific register. > - /// > - bool hasRegisterDef(MachineInstr *MI, unsigned Reg); > - > static LiveInterval createInterval(unsigned Reg); > > - void removeInterval(unsigned Reg) { > - r2iMap_.erase(Reg); > - } > - > - LiveInterval &getOrCreateInterval(unsigned reg) { > - Reg2IntervalMap::iterator I = r2iMap_.find(reg); > - if (I == r2iMap_.end()) > - I = r2iMap_.insert(I, std::make_pair(reg, createInterval > (reg))); > - return I->second; > - } > - > - /// rep - returns the representative of this register > - unsigned rep(unsigned Reg) { > - unsigned Rep = r2rMap_[Reg]; > - if (Rep) > - return r2rMap_[Reg] = rep(Rep); > - return Reg; > - } > - > void printRegName(unsigned reg) const; > }; > > Index: include/llvm/CodeGen/Passes.h > =================================================================== > RCS file: /var/cvs/llvm/llvm/include/llvm/CodeGen/Passes.h,v > retrieving revision 1.24 > diff -u -r1.24 Passes.h > --- include/llvm/CodeGen/Passes.h 29 Nov 2006 07:31:23 -0000 1.24 > +++ include/llvm/CodeGen/Passes.h 6 May 2007 22:44:13 -0000 > @@ -44,6 +44,11 @@ > /// > extern const PassInfo *PHIEliminationID; > > + /// SimpleRegisterCoalescing pass. Aggressively coalesces every > register > + /// copy it can. > + /// > + extern const PassInfo *SimpleRegisterCoalescingID; > + > /// TwoAddressInstruction pass - This pass reduces two-address > instructions to > /// use two operands. This destroys SSA information but it is > desired by > /// register allocators. > Index: include/llvm/CodeGen/SimpleRegisterCoalescing.h > =================================================================== > RCS file: include/llvm/CodeGen/SimpleRegisterCoalescing.h > diff -N include/llvm/CodeGen/SimpleRegisterCoalescing.h > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ include/llvm/CodeGen/SimpleRegisterCoalescing.h 6 May 2007 > 22:44:13 -0000 > @@ -0,0 +1,156 @@ > +//===-- SimpleRegisterCoalescing.h - Register Coalescing -------- > *- C++ -*-===// > +// > +// 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 implements a simple register copy coalescing phase. > +// > +// > ===------------------------------------------------------------------- > ---===// > + > +#ifndef LLVM_CODEGEN_SIMPLE_REGISTER_COALESCING_H > +#define LLVM_CODEGEN_SIMPLE_REGISTER_COALESCING_H > + > +#include "llvm/CodeGen/MachineFunctionPass.h" > +#include "llvm/CodeGen/LiveInterval.h" > +#include "llvm/CodeGen/LiveIntervalAnalysis.h" > +#include "llvm/ADT/BitVector.h" > +#include "llvm/ADT/IndexedMap.h" > + > +namespace llvm { > + > + class LiveVariables; > + class MRegisterInfo; > + class TargetInstrInfo; > + class VirtRegMap; > + > + class SimpleRegisterCoalescing : public MachineFunctionPass { > + MachineFunction* mf_; > + const TargetMachine* tm_; > + const MRegisterInfo* mri_; > + const TargetInstrInfo* tii_; > + LiveIntervals *li_; > + LiveVariables *lv_; > + > + typedef IndexedMap Reg2RegMap; > + Reg2RegMap r2rMap_; > + > + BitVector allocatableRegs_; > + DenseMap > allocatableRCRegs_; > + > + /// JoinedLIs - Keep track which register intervals have been > coalesced > + /// with other intervals. > + BitVector JoinedLIs; > + > + public: > + static char ID; // Pass identifcation, replacement for typeid > + SimpleRegisterCoalescing() : MachineFunctionPass((intptr_t) > &ID) {}; > + > + struct CopyRec { > + MachineInstr *MI; > + unsigned SrcReg, DstReg; > + }; > + CopyRec getCopyRec(MachineInstr *MI, unsigned SrcReg, unsigned > DstReg) { > + CopyRec R; > + R.MI = MI; > + R.SrcReg = SrcReg; > + R.DstReg = DstReg; > + return R; > + } > + struct InstrSlots { > + enum { > + LOAD = 0, > + USE = 1, > + DEF = 2, > + STORE = 3, > + NUM = 4 > + }; > + }; > + > + virtual void getAnalysisUsage(AnalysisUsage &AU) const; > + virtual void releaseMemory(); > + > + /// runOnMachineFunction - pass entry point > + virtual bool runOnMachineFunction(MachineFunction&); > + > + /// print - Implement the dump method. > + virtual void print(std::ostream &O, const Module* = 0) const; > + void print(std::ostream *O, const Module* M = 0) const { > + if (O) print(*O, M); > + } > + > + private: > + /// joinIntervals - join compatible live intervals > + void joinIntervals(); > + > + /// CopyCoallesceInMBB - Coallsece copies in the specified > MBB, putting > + /// copies that cannot yet be coallesced into the "TryAgain" > list. > + void CopyCoallesceInMBB(MachineBasicBlock *MBB, > + std::vector *TryAgain, bool > PhysOnly = false); > + > + /// JoinCopy - Attempt to join intervals corresponding to > SrcReg/DstReg, > + /// which are the src/dst of the copy instruction CopyMI. > This returns true > + /// if the copy was successfully coallesced away, or if it is > never possible > + /// to coallesce these this copy, due to register > constraints. It returns > + /// false if it is not currently possible to coallesce this > interval, but > + /// it may be possible if other things get coallesced. > + bool JoinCopy(MachineInstr *CopyMI, unsigned SrcReg, unsigned > DstReg, > + bool PhysOnly = false); > + > + /// JoinIntervals - Attempt to join these two intervals. On > failure, this > + /// returns false. Otherwise, if one of the intervals being > joined is a > + /// physreg, this method always canonicalizes DestInt to be > it. The output > + /// "SrcInt" will not have been modified, so we can use this > information > + /// below to update aliases. > + bool JoinIntervals(LiveInterval &LHS, LiveInterval &RHS); > + > + /// SimpleJoin - Attempt to join the specified interval into > this one. The > + /// caller of this method must guarantee that the RHS only > contains a single > + /// value number and that the RHS is not defined by a copy > from this > + /// interval. This returns false if the intervals are not > joinable, or it > + /// joins them and returns true. > + bool SimpleJoin(LiveInterval &LHS, LiveInterval &RHS); > + > + /// Return true if the two specified registers belong to > different > + /// register classes. The registers may be either phys or > virt regs. > + bool differingRegisterClasses(unsigned RegA, unsigned RegB) > const; > + > + > + bool AdjustCopiesBackFrom(LiveInterval &IntA, LiveInterval &IntB, > + MachineInstr *CopyMI); > + > + /// lastRegisterUse - Returns the last use of the specific > register between > + /// cycles Start and End. It also returns the use operand by > reference. It > + /// returns NULL if there are no uses. > + MachineInstr *lastRegisterUse(unsigned Reg, unsigned Start, > unsigned End, > + MachineOperand *&MOU); > + > + /// findDefOperand - Returns the MachineOperand that is a def > of the specific > + /// register. It returns NULL if the def is not found. > + MachineOperand *findDefOperand(MachineInstr *MI, unsigned Reg); > + > + /// unsetRegisterKill - Unset IsKill property of all uses of > the specific > + /// register of the specific instruction. > + void unsetRegisterKill(MachineInstr *MI, unsigned Reg); > + > + /// hasRegisterDef - True if the instruction defines the > specific register. > + /// > + bool hasRegisterDef(MachineInstr *MI, unsigned Reg); > + > + /// rep - returns the representative of this register > + unsigned rep(unsigned Reg) { > + unsigned Rep = r2rMap_[Reg]; > + if (Rep) > + return r2rMap_[Reg] = rep(Rep); > + return Reg; > + } > + > + void printRegName(unsigned reg) const; > + }; > + > +} // End llvm namespace > + > +#endif > Index: lib/CodeGen/LiveIntervalAnalysis.cpp > =================================================================== > RCS file: /var/cvs/llvm/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp,v > retrieving revision 1.243 > diff -u -r1.243 LiveIntervalAnalysis.cpp > --- lib/CodeGen/LiveIntervalAnalysis.cpp 3 May 2007 01:11:53 -0000 > 1.243 > +++ lib/CodeGen/LiveIntervalAnalysis.cpp 6 May 2007 22:44:13 -0000 > @@ -39,22 +39,15 @@ > > STATISTIC(numIntervals, "Number of original intervals"); > STATISTIC(numIntervalsAfter, "Number of intervals after coalescing"); > -STATISTIC(numJoins , "Number of interval joins performed"); > -STATISTIC(numPeep , "Number of identity moves eliminated after > coalescing"); > STATISTIC(numFolded , "Number of loads/stores folded into > instructions"); > -STATISTIC(numAborts , "Number of times interval joining aborted"); > > char LiveIntervals::ID = 0; > namespace { > RegisterPass X("liveintervals", "Live Interval > Analysis"); > - > - static cl::opt > - EnableJoining("join-liveintervals", > - cl::desc("Coallesce copies (default=true)"), > - cl::init(true)); > } > > void LiveIntervals::getAnalysisUsage(AnalysisUsage &AU) const { > + AU.addPreserved(); > AU.addRequired(); > AU.addPreservedID(PHIEliminationID); > AU.addRequiredID(PHIEliminationID); > @@ -67,20 +60,8 @@ > mi2iMap_.clear(); > i2miMap_.clear(); > r2iMap_.clear(); > - r2rMap_.clear(); > - JoinedLIs.clear(); > -} > - > - > -static bool isZeroLengthInterval(LiveInterval *li) { > - for (LiveInterval::Ranges::const_iterator > - i = li->ranges.begin(), e = li->ranges.end(); i != e; ++i) > - if (i->end - i->start > LiveIntervals::InstrSlots::NUM) > - return false; > - return true; > } > > - > /// runOnMachineFunction - Register allocate the whole function > /// > bool LiveIntervals::runOnMachineFunction(MachineFunction &fn) { > @@ -89,11 +70,7 @@ > mri_ = tm_->getRegisterInfo(); > tii_ = tm_->getInstrInfo(); > lv_ = &getAnalysis(); > - r2rMap_.grow(mf_->getSSARegMap()->getLastVirtReg()); > allocatableRegs_ = mri_->getAllocatableSet(fn); > - for (MRegisterInfo::regclass_iterator I = mri_->regclass_begin(), > - E = mri_->regclass_end(); I != E; ++I) > - allocatableRCRegs_.insert(std::make_pair(*I,mri_- > >getAllocatableSet(fn, *I))); > > // Number MachineInstrs and MachineBasicBlocks. > // Initialize MBB indexes to a sentinal. > @@ -124,99 +101,7 @@ > DOUT << "\n"; > } > > - // Join (coallesce) intervals if requested. > - if (EnableJoining) { > - joinIntervals(); > - DOUT << "********** INTERVALS POST JOINING **********\n"; > - for (iterator I = begin(), E = end(); I != E; ++I) { > - I->second.print(DOUT, mri_); > - DOUT << "\n"; > - } > - } > - > numIntervalsAfter += getNumIntervals(); > - > - // perform a final pass over the instructions and compute spill > - // weights, coalesce virtual registers and remove identity moves. > - const LoopInfo &loopInfo = getAnalysis(); > - > - for (MachineFunction::iterator mbbi = mf_->begin(), mbbe = mf_- > >end(); > - mbbi != mbbe; ++mbbi) { > - MachineBasicBlock* mbb = mbbi; > - unsigned loopDepth = loopInfo.getLoopDepth(mbb->getBasicBlock()); > - > - for (MachineBasicBlock::iterator mii = mbb->begin(), mie = mbb- > >end(); > - mii != mie; ) { > - // if the move will be an identity move delete it > - unsigned srcReg, dstReg, RegRep; > - if (tii_->isMoveInstr(*mii, srcReg, dstReg) && > - (RegRep = rep(srcReg)) == rep(dstReg)) { > - // remove from def list > - LiveInterval &RegInt = getOrCreateInterval(RegRep); > - MachineOperand *MO = mii->findRegisterDefOperand(dstReg); > - // If def of this move instruction is dead, remove its > live range from > - // the dstination register's live interval. > - if (MO->isDead()) { > - unsigned MoveIdx = getDefIndex(getInstructionIndex(mii)); > - LiveInterval::iterator MLR = > RegInt.FindLiveRangeContaining(MoveIdx); > - RegInt.removeRange(MLR->start, MoveIdx+1); > - if (RegInt.empty()) > - removeInterval(RegRep); > - } > - RemoveMachineInstrFromMaps(mii); > - mii = mbbi->erase(mii); > - ++numPeep; > - } else { > - SmallSet UniqueUses; > - for (unsigned i = 0, e = mii->getNumOperands(); i != e; + > +i) { > - const MachineOperand &mop = mii->getOperand(i); > - if (mop.isRegister() && mop.getReg() && > - MRegisterInfo::isVirtualRegister(mop.getReg())) { > - // replace register with representative register > - unsigned reg = rep(mop.getReg()); > - mii->getOperand(i).setReg(reg); > - > - // Multiple uses of reg by the same instruction. It > should not > - // contribute to spill weight again. > - if (UniqueUses.count(reg) != 0) > - continue; > - LiveInterval &RegInt = getInterval(reg); > - float w = (mop.isUse()+mop.isDef()) * powf(10.0F, > (float)loopDepth); > - // If the definition instruction is re-materializable, > its spill > - // weight is half of what it would have been normally > unless it's > - // a load from fixed stack slot. > - int Dummy; > - if (RegInt.remat && !tii_->isLoadFromStackSlot > (RegInt.remat, Dummy)) > - w /= 2; > - RegInt.weight += w; > - UniqueUses.insert(reg); > - } > - } > - ++mii; > - } > - } > - } > - > - for (iterator I = begin(), E = end(); I != E; ++I) { > - LiveInterval &LI = I->second; > - if (MRegisterInfo::isVirtualRegister(LI.reg)) { > - // If the live interval length is essentially zero, i.e. in > every live > - // range the use follows def immediately, it doesn't make > sense to spill > - // it and hope it will be easier to allocate for this li. > - if (isZeroLengthInterval(&LI)) > - LI.weight = HUGE_VALF; > - > - // Slightly prefer live interval that has been assigned a > preferred reg. > - if (LI.preference) > - LI.weight *= 1.01F; > - > - // Divide the weight of the interval by its size. This > encourages > - // spilling of intervals that are large and have few uses, and > - // discourages spilling of small intervals with many uses. > - LI.weight /= LI.getSize(); > - } > - } > - > DEBUG(dump()); > return true; > } > @@ -240,6 +125,7 @@ > } > } > > +// Not called? > /// CreateNewLiveInterval - Create a new live interval with the > given live > /// ranges. The new live interval will have an infinite spill weight. > LiveInterval& > @@ -268,7 +154,7 @@ > > for (unsigned J = 0, e = MI->getNumOperands(); J != e; ++J) { > MachineOperand &MOp = MI->getOperand(J); > - if (MOp.isRegister() && rep(MOp.getReg()) == LI->reg) > + if (MOp.isRegister() && MOp.getReg() == LI->reg) > MOp.setReg(NewVReg); > } > } > @@ -794,909 +680,6 @@ > } > } > > -/// AdjustCopiesBackFrom - We found a non-trivially-coallescable > copy with IntA > -/// being the source and IntB being the dest, thus this defines a > value number > -/// in IntB. If the source value number (in IntA) is defined by a > copy from B, > -/// see if we can merge these two pieces of B into a single value > number, > -/// eliminating a copy. For example: > -/// > -/// A3 = B0 > -/// ... > -/// B1 = A3 <- this copy > -/// > -/// In this case, B0 can be extended to where the B1 copy lives, > allowing the B1 > -/// value number to be replaced with B0 (which simplifies the B > liveinterval). > -/// > -/// This returns true if an interval was modified. > -/// > -bool LiveIntervals::AdjustCopiesBackFrom(LiveInterval &IntA, > LiveInterval &IntB, > - MachineInstr *CopyMI) { > - unsigned CopyIdx = getDefIndex(getInstructionIndex(CopyMI)); > - > - // BValNo is a value number in B that is defined by a copy from > A. 'B3' in > - // the example above. > - LiveInterval::iterator BLR = IntB.FindLiveRangeContaining(CopyIdx); > - unsigned BValNo = BLR->ValId; > - > - // Get the location that B is defined at. Two options: either > this value has > - // an unknown definition point or it is defined at CopyIdx. If > unknown, we > - // can't process it. > - unsigned BValNoDefIdx = IntB.getInstForValNum(BValNo); > - if (BValNoDefIdx == ~0U) return false; > - assert(BValNoDefIdx == CopyIdx && > - "Copy doesn't define the value?"); > - > - // AValNo is the value number in A that defines the copy, A0 in > the example. > - LiveInterval::iterator AValLR = IntA.FindLiveRangeContaining > (CopyIdx-1); > - unsigned AValNo = AValLR->ValId; > - > - // If AValNo is defined as a copy from IntB, we can potentially > process this. > - > - // Get the instruction that defines this value number. > - unsigned SrcReg = IntA.getSrcRegForValNum(AValNo); > - if (!SrcReg) return false; // Not defined by a copy. > - > - // If the value number is not defined by a copy instruction, > ignore it. > - > - // If the source register comes from an interval other than > IntB, we can't > - // handle this. > - if (rep(SrcReg) != IntB.reg) return false; > - > - // Get the LiveRange in IntB that this value number starts with. > - unsigned AValNoInstIdx = IntA.getInstForValNum(AValNo); > - LiveInterval::iterator ValLR = IntB.FindLiveRangeContaining > (AValNoInstIdx-1); > - > - // Make sure that the end of the live range is inside the same > block as > - // CopyMI. > - MachineInstr *ValLREndInst = getInstructionFromIndex(ValLR->end-1); > - if (!ValLREndInst || > - ValLREndInst->getParent() != CopyMI->getParent()) return false; > - > - // Okay, we now know that ValLR ends in the same block that the > CopyMI > - // live-range starts. If there are no intervening live ranges > between them in > - // IntB, we can merge them. > - if (ValLR+1 != BLR) return false; > - > - DOUT << "\nExtending: "; IntB.print(DOUT, mri_); > - > - // We are about to delete CopyMI, so need to remove it as the > 'instruction > - // that defines this value #'. > - IntB.setValueNumberInfo(BValNo, std::make_pair(~0U, 0)); > - > - // Okay, we can merge them. We need to insert a new liverange: > - // [ValLR.end, BLR.begin) of either value number, then we merge the > - // two value numbers. > - unsigned FillerStart = ValLR->end, FillerEnd = BLR->start; > - IntB.addRange(LiveRange(FillerStart, FillerEnd, BValNo)); > - > - // If the IntB live range is assigned to a physical register, > and if that > - // physreg has aliases, > - if (MRegisterInfo::isPhysicalRegister(IntB.reg)) { > - // Update the liveintervals of sub-registers. > - for (const unsigned *AS = mri_->getSubRegisters(IntB.reg); > *AS; ++AS) { > - LiveInterval &AliasLI = getInterval(*AS); > - AliasLI.addRange(LiveRange(FillerStart, FillerEnd, > - AliasLI.getNextValue(~0U, 0))); > - } > - } > - > - // Okay, merge "B1" into the same value number as "B0". > - if (BValNo != ValLR->ValId) > - IntB.MergeValueNumberInto(BValNo, ValLR->ValId); > - DOUT << " result = "; IntB.print(DOUT, mri_); > - DOUT << "\n"; > - > - // If the source instruction was killing the source register > before the > - // merge, unset the isKill marker given the live range has been > extended. > - int UIdx = ValLREndInst->findRegisterUseOperandIdx(IntB.reg, true); > - if (UIdx != -1) > - ValLREndInst->getOperand(UIdx).unsetIsKill(); > - > - // Finally, delete the copy instruction. > - RemoveMachineInstrFromMaps(CopyMI); > - CopyMI->eraseFromParent(); > - ++numPeep; > - return true; > -} > - > - > -/// JoinCopy - Attempt to join intervals corresponding to SrcReg/ > DstReg, > -/// which are the src/dst of the copy instruction CopyMI. This > returns true > -/// if the copy was successfully coallesced away, or if it is > never possible > -/// to coallesce this copy, due to register constraints. It returns > -/// false if it is not currently possible to coallesce this > interval, but > -/// it may be possible if other things get coallesced. > -bool LiveIntervals::JoinCopy(MachineInstr *CopyMI, > - unsigned SrcReg, unsigned DstReg, > bool PhysOnly) { > - DOUT << getInstructionIndex(CopyMI) << '\t' << *CopyMI; > - > - // Get representative registers. > - unsigned repSrcReg = rep(SrcReg); > - unsigned repDstReg = rep(DstReg); > - > - // If they are already joined we continue. > - if (repSrcReg == repDstReg) { > - DOUT << "\tCopy already coallesced.\n"; > - return true; // Not coallescable. > - } > - > - bool SrcIsPhys = MRegisterInfo::isPhysicalRegister(repSrcReg); > - bool DstIsPhys = MRegisterInfo::isPhysicalRegister(repDstReg); > - if (PhysOnly && !SrcIsPhys && !DstIsPhys) > - // Only joining physical registers with virtual registers in > this round. > - return true; > - > - // If they are both physical registers, we cannot join them. > - if (SrcIsPhys && DstIsPhys) { > - DOUT << "\tCan not coallesce physregs.\n"; > - return true; // Not coallescable. > - } > - > - // We only join virtual registers with allocatable physical > registers. > - if (SrcIsPhys && !allocatableRegs_[repSrcReg]) { > - DOUT << "\tSrc reg is unallocatable physreg.\n"; > - return true; // Not coallescable. > - } > - if (DstIsPhys && !allocatableRegs_[repDstReg]) { > - DOUT << "\tDst reg is unallocatable physreg.\n"; > - return true; // Not coallescable. > - } > - > - // If they are not of the same register class, we cannot join them. > - if (differingRegisterClasses(repSrcReg, repDstReg)) { > - DOUT << "\tSrc/Dest are different register classes.\n"; > - return true; // Not coallescable. > - } > - > - LiveInterval &SrcInt = getInterval(repSrcReg); > - LiveInterval &DstInt = getInterval(repDstReg); > - assert(SrcInt.reg == repSrcReg && DstInt.reg == repDstReg && > - "Register mapping is horribly broken!"); > - > - DOUT << "\t\tInspecting "; SrcInt.print(DOUT, mri_); > - DOUT << " and "; DstInt.print(DOUT, mri_); > - DOUT << ": "; > - > - // Check if it is necessary to propagate "isDead" property > before intervals > - // are joined. > - MachineOperand *mopd = CopyMI->findRegisterDefOperand(DstReg); > - bool isDead = mopd->isDead(); > - bool isShorten = false; > - unsigned SrcStart = 0, RemoveStart = 0; > - unsigned SrcEnd = 0, RemoveEnd = 0; > - if (isDead) { > - unsigned CopyIdx = getInstructionIndex(CopyMI); > - LiveInterval::iterator SrcLR = > - SrcInt.FindLiveRangeContaining(getUseIndex(CopyIdx)); > - RemoveStart = SrcStart = SrcLR->start; > - RemoveEnd = SrcEnd = SrcLR->end; > - // The instruction which defines the src is only truly dead if > there are > - // no intermediate uses and there isn't a use beyond the copy. > - // FIXME: find the last use, mark is kill and shorten the live > range. > - if (SrcEnd > getDefIndex(CopyIdx)) { > - isDead = false; > - } else { > - MachineOperand *MOU; > - MachineInstr *LastUse= lastRegisterUse(repSrcReg, SrcStart, > CopyIdx, MOU); > - if (LastUse) { > - // Shorten the liveinterval to the end of last use. > - MOU->setIsKill(); > - isDead = false; > - isShorten = true; > - RemoveStart = getDefIndex(getInstructionIndex(LastUse)); > - RemoveEnd = SrcEnd; > - } else { > - MachineInstr *SrcMI = getInstructionFromIndex(SrcStart); > - if (SrcMI) { > - MachineOperand *mops = findDefOperand(SrcMI, repSrcReg); > - if (mops) > - // A dead def should have a single cycle interval. > - ++RemoveStart; > - } > - } > - } > - } > - > - // We need to be careful about coalescing a source physical > register with a > - // virtual register. Once the coalescing is done, it cannot be > broken and > - // these are not spillable! If the destination interval uses are > far away, > - // think twice about coalescing them! > - if (!mopd->isDead() && (SrcIsPhys || DstIsPhys)) { > - LiveInterval &JoinVInt = SrcIsPhys ? DstInt : SrcInt; > - unsigned JoinVReg = SrcIsPhys ? repDstReg : repSrcReg; > - unsigned JoinPReg = SrcIsPhys ? repSrcReg : repDstReg; > - const TargetRegisterClass *RC = mf_->getSSARegMap()- > >getRegClass(JoinVReg); > - unsigned Threshold = allocatableRCRegs_[RC].count(); > - > - // If the virtual register live interval is long has it has > low use desity, > - // do not join them, instead mark the physical register as its > allocation > - // preference. > - unsigned Length = JoinVInt.getSize() / InstrSlots::NUM; > - LiveVariables::VarInfo &vi = lv_->getVarInfo(JoinVReg); > - if (Length > Threshold && > - (((float)vi.NumUses / Length) < (1.0 / Threshold))) { > - JoinVInt.preference = JoinPReg; > - ++numAborts; > - DOUT << "\tMay tie down a physical register, abort!\n"; > - return false; > - } > - } > - > - // Okay, attempt to join these two intervals. On failure, this > returns false. > - // Otherwise, if one of the intervals being joined is a physreg, > this method > - // always canonicalizes DstInt to be it. The output "SrcInt" > will not have > - // been modified, so we can use this information below to update > aliases. > - if (JoinIntervals(DstInt, SrcInt)) { > - if (isDead) { > - // Result of the copy is dead. Propagate this property. > - if (SrcStart == 0) { > - assert(MRegisterInfo::isPhysicalRegister(repSrcReg) && > - "Live-in must be a physical register!"); > - // Live-in to the function but dead. Remove it from entry > live-in set. > - // JoinIntervals may end up swapping the two intervals. > - mf_->begin()->removeLiveIn(repSrcReg); > - } else { > - MachineInstr *SrcMI = getInstructionFromIndex(SrcStart); > - if (SrcMI) { > - MachineOperand *mops = findDefOperand(SrcMI, repSrcReg); > - if (mops) > - mops->setIsDead(); > - } > - } > - } > - > - if (isShorten || isDead) { > - // Shorten the live interval. > - LiveInterval &LiveInInt = (repSrcReg == DstInt.reg) ? > DstInt : SrcInt; > - LiveInInt.removeRange(RemoveStart, RemoveEnd); > - } > - } else { > - // Coallescing failed. > - > - // If we can eliminate the copy without merging the live > ranges, do so now. > - if (AdjustCopiesBackFrom(SrcInt, DstInt, CopyMI)) > - return true; > - > - // Otherwise, we are unable to join the intervals. > - DOUT << "Interference!\n"; > - return false; > - } > - > - bool Swapped = repSrcReg == DstInt.reg; > - if (Swapped) > - std::swap(repSrcReg, repDstReg); > - assert(MRegisterInfo::isVirtualRegister(repSrcReg) && > - "LiveInterval::join didn't work right!"); > - > - // If we're about to merge live ranges into a physical register > live range, > - // we have to update any aliased register's live ranges to > indicate that they > - // have clobbered values for this range. > - if (MRegisterInfo::isPhysicalRegister(repDstReg)) { > - // Update the liveintervals of sub-registers. > - for (const unsigned *AS = mri_->getSubRegisters(repDstReg); > *AS; ++AS) > - getInterval(*AS).MergeInClobberRanges(SrcInt); > - } else { > - // Merge use info if the destination is a virtual register. > - LiveVariables::VarInfo& dVI = lv_->getVarInfo(repDstReg); > - LiveVariables::VarInfo& sVI = lv_->getVarInfo(repSrcReg); > - dVI.NumUses += sVI.NumUses; > - } > - > - DOUT << "\n\t\tJoined. Result = "; DstInt.print(DOUT, mri_); > - DOUT << "\n"; > - > - // Remember these liveintervals have been joined. > - JoinedLIs.set(repSrcReg - MRegisterInfo::FirstVirtualRegister); > - if (MRegisterInfo::isVirtualRegister(repDstReg)) > - JoinedLIs.set(repDstReg - MRegisterInfo::FirstVirtualRegister); > - > - // If the intervals were swapped by Join, swap them back so that > the register > - // mapping (in the r2i map) is correct. > - if (Swapped) SrcInt.swap(DstInt); > - removeInterval(repSrcReg); > - r2rMap_[repSrcReg] = repDstReg; > - > - // Finally, delete the copy instruction. > - RemoveMachineInstrFromMaps(CopyMI); > - CopyMI->eraseFromParent(); > - ++numPeep; > - ++numJoins; > - return true; > -} > - > -/// ComputeUltimateVN - Assuming we are going to join two live > intervals, > -/// compute what the resultant value numbers for each value in the > input two > -/// ranges will be. This is complicated by copies between the two > which can > -/// and will commonly cause multiple value numbers to be merged > into one. > -/// > -/// VN is the value number that we're trying to resolve. > InstDefiningValue > -/// keeps track of the new InstDefiningValue assignment for the > result > -/// LiveInterval. ThisFromOther/OtherFromThis are sets that keep > track of > -/// whether a value in this or other is a copy from the opposite set. > -/// ThisValNoAssignments/OtherValNoAssignments keep track of value > #'s that have > -/// already been assigned. > -/// > -/// ThisFromOther[x] - If x is defined as a copy from the other > interval, this > -/// contains the value number the copy is from. > -/// > -static unsigned ComputeUltimateVN(unsigned VN, > - SmallVector - unsigned>, 16> > &ValueNumberInfo, > - SmallVector > &ThisFromOther, > - SmallVector > &OtherFromThis, > - SmallVector > &ThisValNoAssignments, > - SmallVector > &OtherValNoAssignments, > - LiveInterval &ThisLI, > LiveInterval &OtherLI) { > - // If the VN has already been computed, just return it. > - if (ThisValNoAssignments[VN] >= 0) > - return ThisValNoAssignments[VN]; > -// assert(ThisValNoAssignments[VN] != -2 && "Cyclic case?"); > - > - // If this val is not a copy from the other val, then it must be > a new value > - // number in the destination. > - int OtherValNo = ThisFromOther[VN]; > - if (OtherValNo == -1) { > - ValueNumberInfo.push_back(ThisLI.getValNumInfo(VN)); > - return ThisValNoAssignments[VN] = ValueNumberInfo.size()-1; > - } > - > - // Otherwise, this *is* a copy from the RHS. If the other side > has already > - // been computed, return it. > - if (OtherValNoAssignments[OtherValNo] >= 0) > - return ThisValNoAssignments[VN] = OtherValNoAssignments > [OtherValNo]; > - > - // Mark this value number as currently being computed, then ask > what the > - // ultimate value # of the other value is. > - ThisValNoAssignments[VN] = -2; > - unsigned UltimateVN = > - ComputeUltimateVN(OtherValNo, ValueNumberInfo, > - OtherFromThis, ThisFromOther, > - OtherValNoAssignments, ThisValNoAssignments, > - OtherLI, ThisLI); > - return ThisValNoAssignments[VN] = UltimateVN; > -} > - > -static bool InVector(unsigned Val, const SmallVector > &V) { > - return std::find(V.begin(), V.end(), Val) != V.end(); > -} > - > -/// SimpleJoin - Attempt to joint the specified interval into this > one. The > -/// caller of this method must guarantee that the RHS only > contains a single > -/// value number and that the RHS is not defined by a copy from this > -/// interval. This returns false if the intervals are not > joinable, or it > -/// joins them and returns true. > -bool LiveIntervals::SimpleJoin(LiveInterval &LHS, LiveInterval > &RHS) { > - assert(RHS.containsOneValue()); > - > - // Some number (potentially more than one) value numbers in the > current > - // interval may be defined as copies from the RHS. Scan the > overlapping > - // portions of the LHS and RHS, keeping track of this and > looking for > - // overlapping live ranges that are NOT defined as copies. If > these exist, we > - // cannot coallesce. > - > - LiveInterval::iterator LHSIt = LHS.begin(), LHSEnd = LHS.end(); > - LiveInterval::iterator RHSIt = RHS.begin(), RHSEnd = RHS.end(); > - > - if (LHSIt->start < RHSIt->start) { > - LHSIt = std::upper_bound(LHSIt, LHSEnd, RHSIt->start); > - if (LHSIt != LHS.begin()) --LHSIt; > - } else if (RHSIt->start < LHSIt->start) { > - RHSIt = std::upper_bound(RHSIt, RHSEnd, LHSIt->start); > - if (RHSIt != RHS.begin()) --RHSIt; > - } > - > - SmallVector EliminatedLHSVals; > - > - while (1) { > - // Determine if these live intervals overlap. > - bool Overlaps = false; > - if (LHSIt->start <= RHSIt->start) > - Overlaps = LHSIt->end > RHSIt->start; > - else > - Overlaps = RHSIt->end > LHSIt->start; > - > - // If the live intervals overlap, there are two interesting > cases: if the > - // LHS interval is defined by a copy from the RHS, it's ok and > we record > - // that the LHS value # is the same as the RHS. If it's not, > then we cannot > - // coallesce these live ranges and we bail out. > - if (Overlaps) { > - // If we haven't already recorded that this value # is safe, > check it. > - if (!InVector(LHSIt->ValId, EliminatedLHSVals)) { > - // Copy from the RHS? > - unsigned SrcReg = LHS.getSrcRegForValNum(LHSIt->ValId); > - if (rep(SrcReg) != RHS.reg) > - return false; // Nope, bail out. > - > - EliminatedLHSVals.push_back(LHSIt->ValId); > - } > - > - // We know this entire LHS live range is okay, so skip it now. > - if (++LHSIt == LHSEnd) break; > - continue; > - } > - > - if (LHSIt->end < RHSIt->end) { > - if (++LHSIt == LHSEnd) break; > - } else { > - // One interesting case to check here. It's possible that > we have > - // something like "X3 = Y" which defines a new value number > in the LHS, > - // and is the last use of this liverange of the RHS. In > this case, we > - // want to notice this copy (so that it gets coallesced > away) even though > - // the live ranges don't actually overlap. > - if (LHSIt->start == RHSIt->end) { > - if (InVector(LHSIt->ValId, EliminatedLHSVals)) { > - // We already know that this value number is going to be > merged in > - // if coallescing succeeds. Just skip the liverange. > - if (++LHSIt == LHSEnd) break; > - } else { > - // Otherwise, if this is a copy from the RHS, mark it as > being merged > - // in. > - if (rep(LHS.getSrcRegForValNum(LHSIt->ValId)) == RHS.reg) { > - EliminatedLHSVals.push_back(LHSIt->ValId); > - > - // We know this entire LHS live range is okay, so skip > it now. > - if (++LHSIt == LHSEnd) break; > - } > - } > - } > - > - if (++RHSIt == RHSEnd) break; > - } > - } > - > - // If we got here, we know that the coallescing will be > successful and that > - // the value numbers in EliminatedLHSVals will all be merged > together. Since > - // the most common case is that EliminatedLHSVals has a single > number, we > - // optimize for it: if there is more than one value, we merge > them all into > - // the lowest numbered one, then handle the interval as if we > were merging > - // with one value number. > - unsigned LHSValNo; > - if (EliminatedLHSVals.size() > 1) { > - // Loop through all the equal value numbers merging them into > the smallest > - // one. > - unsigned Smallest = EliminatedLHSVals[0]; > - for (unsigned i = 1, e = EliminatedLHSVals.size(); i != e; ++i) { > - if (EliminatedLHSVals[i] < Smallest) { > - // Merge the current notion of the smallest into the > smaller one. > - LHS.MergeValueNumberInto(Smallest, EliminatedLHSVals[i]); > - Smallest = EliminatedLHSVals[i]; > - } else { > - // Merge into the smallest. > - LHS.MergeValueNumberInto(EliminatedLHSVals[i], Smallest); > - } > - } > - LHSValNo = Smallest; > - } else { > - assert(!EliminatedLHSVals.empty() && "No copies from the RHS?"); > - LHSValNo = EliminatedLHSVals[0]; > - } > - > - // Okay, now that there is a single LHS value number that we're > merging the > - // RHS into, update the value number info for the LHS to > indicate that the > - // value number is defined where the RHS value number was. > - LHS.setValueNumberInfo(LHSValNo, RHS.getValNumInfo(0)); > - > - // Okay, the final step is to loop over the RHS live intervals, > adding them to > - // the LHS. > - LHS.MergeRangesInAsValue(RHS, LHSValNo); > - LHS.weight += RHS.weight; > - if (RHS.preference && !LHS.preference) > - LHS.preference = RHS.preference; > - > - return true; > -} > - > -/// JoinIntervals - Attempt to join these two intervals. On > failure, this > -/// returns false. Otherwise, if one of the intervals being > joined is a > -/// physreg, this method always canonicalizes LHS to be it. The > output > -/// "RHS" will not have been modified, so we can use this information > -/// below to update aliases. > -bool LiveIntervals::JoinIntervals(LiveInterval &LHS, LiveInterval > &RHS) { > - // Compute the final value assignment, assuming that the live > ranges can be > - // coallesced. > - SmallVector LHSValNoAssignments; > - SmallVector RHSValNoAssignments; > - SmallVector, 16> ValueNumberInfo; > - > - // If a live interval is a physical register, conservatively > check if any > - // of its sub-registers is overlapping the live interval of the > virtual > - // register. If so, do not coalesce. > - if (MRegisterInfo::isPhysicalRegister(LHS.reg) && > - *mri_->getSubRegisters(LHS.reg)) { > - for (const unsigned* SR = mri_->getSubRegisters(LHS.reg); *SR; > ++SR) > - if (hasInterval(*SR) && RHS.overlaps(getInterval(*SR))) { > - DOUT << "Interfere with sub-register "; > - DEBUG(getInterval(*SR).print(DOUT, mri_)); > - return false; > - } > - } else if (MRegisterInfo::isPhysicalRegister(RHS.reg) && > - *mri_->getSubRegisters(RHS.reg)) { > - for (const unsigned* SR = mri_->getSubRegisters(RHS.reg); *SR; > ++SR) > - if (hasInterval(*SR) && LHS.overlaps(getInterval(*SR))) { > - DOUT << "Interfere with sub-register "; > - DEBUG(getInterval(*SR).print(DOUT, mri_)); > - return false; > - } > - } > - > - // Compute ultimate value numbers for the LHS and RHS values. > - if (RHS.containsOneValue()) { > - // Copies from a liveinterval with a single value are simple > to handle and > - // very common, handle the special case here. This is > important, because > - // often RHS is small and LHS is large (e.g. a physreg). > - > - // Find out if the RHS is defined as a copy from some value in > the LHS. > - int RHSValID = -1; > - std::pair RHSValNoInfo; > - unsigned RHSSrcReg = RHS.getSrcRegForValNum(0); > - if ((RHSSrcReg == 0 || rep(RHSSrcReg) != LHS.reg)) { > - // If RHS is not defined as a copy from the LHS, we can use > simpler and > - // faster checks to see if the live ranges are > coallescable. This joiner > - // can't swap the LHS/RHS intervals though. > - if (!MRegisterInfo::isPhysicalRegister(RHS.reg)) { > - return SimpleJoin(LHS, RHS); > - } else { > - RHSValNoInfo = RHS.getValNumInfo(0); > - } > - } else { > - // It was defined as a copy from the LHS, find out what > value # it is. > - unsigned ValInst = RHS.getInstForValNum(0); > - RHSValID = LHS.getLiveRangeContaining(ValInst-1)->ValId; > - RHSValNoInfo = LHS.getValNumInfo(RHSValID); > - } > - > - LHSValNoAssignments.resize(LHS.getNumValNums(), -1); > - RHSValNoAssignments.resize(RHS.getNumValNums(), -1); > - ValueNumberInfo.resize(LHS.getNumValNums()); > - > - // Okay, *all* of the values in LHS that are defined as a copy > from RHS > - // should now get updated. > - for (unsigned VN = 0, e = LHS.getNumValNums(); VN != e; ++VN) { > - if (unsigned LHSSrcReg = LHS.getSrcRegForValNum(VN)) { > - if (rep(LHSSrcReg) != RHS.reg) { > - // If this is not a copy from the RHS, its value number > will be > - // unmodified by the coallescing. > - ValueNumberInfo[VN] = LHS.getValNumInfo(VN); > - LHSValNoAssignments[VN] = VN; > - } else if (RHSValID == -1) { > - // Otherwise, it is a copy from the RHS, and we don't > already have a > - // value# for it. Keep the current value number, but > remember it. > - LHSValNoAssignments[VN] = RHSValID = VN; > - ValueNumberInfo[VN] = RHSValNoInfo; > - } else { > - // Otherwise, use the specified value #. > - LHSValNoAssignments[VN] = RHSValID; > - if (VN != (unsigned)RHSValID) > - ValueNumberInfo[VN].first = ~1U; > - else > - ValueNumberInfo[VN] = RHSValNoInfo; > - } > - } else { > - ValueNumberInfo[VN] = LHS.getValNumInfo(VN); > - LHSValNoAssignments[VN] = VN; > - } > - } > - > - assert(RHSValID != -1 && "Didn't find value #?"); > - RHSValNoAssignments[0] = RHSValID; > - > - } else { > - // Loop over the value numbers of the LHS, seeing if any are > defined from > - // the RHS. > - SmallVector LHSValsDefinedFromRHS; > - LHSValsDefinedFromRHS.resize(LHS.getNumValNums(), -1); > - for (unsigned VN = 0, e = LHS.getNumValNums(); VN != e; ++VN) { > - unsigned ValSrcReg = LHS.getSrcRegForValNum(VN); > - if (ValSrcReg == 0) // Src not defined by a copy? > - continue; > - > - // DstReg is known to be a register in the LHS interval. If > the src is > - // from the RHS interval, we can use its value #. > - if (rep(ValSrcReg) != RHS.reg) > - continue; > - > - // Figure out the value # from the RHS. > - unsigned ValInst = LHS.getInstForValNum(VN); > - LHSValsDefinedFromRHS[VN] = RHS.getLiveRangeContaining > (ValInst-1)->ValId; > - } > - > - // Loop over the value numbers of the RHS, seeing if any are > defined from > - // the LHS. > - SmallVector RHSValsDefinedFromLHS; > - RHSValsDefinedFromLHS.resize(RHS.getNumValNums(), -1); > - for (unsigned VN = 0, e = RHS.getNumValNums(); VN != e; ++VN) { > - unsigned ValSrcReg = RHS.getSrcRegForValNum(VN); > - if (ValSrcReg == 0) // Src not defined by a copy? > - continue; > - > - // DstReg is known to be a register in the RHS interval. If > the src is > - // from the LHS interval, we can use its value #. > - if (rep(ValSrcReg) != LHS.reg) > - continue; > - > - // Figure out the value # from the LHS. > - unsigned ValInst = RHS.getInstForValNum(VN); > - RHSValsDefinedFromLHS[VN] = LHS.getLiveRangeContaining > (ValInst-1)->ValId; > - } > - > - LHSValNoAssignments.resize(LHS.getNumValNums(), -1); > - RHSValNoAssignments.resize(RHS.getNumValNums(), -1); > - ValueNumberInfo.reserve(LHS.getNumValNums() + RHS.getNumValNums > ()); > - > - for (unsigned VN = 0, e = LHS.getNumValNums(); VN != e; ++VN) { > - if (LHSValNoAssignments[VN] >= 0 || LHS.getInstForValNum(VN) > == ~2U) > - continue; > - ComputeUltimateVN(VN, ValueNumberInfo, > - LHSValsDefinedFromRHS, RHSValsDefinedFromLHS, > - LHSValNoAssignments, RHSValNoAssignments, > LHS, RHS); > - } > - for (unsigned VN = 0, e = RHS.getNumValNums(); VN != e; ++VN) { > - if (RHSValNoAssignments[VN] >= 0 || RHS.getInstForValNum(VN) > == ~2U) > - continue; > - // If this value number isn't a copy from the LHS, it's a > new number. > - if (RHSValsDefinedFromLHS[VN] == -1) { > - ValueNumberInfo.push_back(RHS.getValNumInfo(VN)); > - RHSValNoAssignments[VN] = ValueNumberInfo.size()-1; > - continue; > - } > - > - ComputeUltimateVN(VN, ValueNumberInfo, > - RHSValsDefinedFromLHS, LHSValsDefinedFromRHS, > - RHSValNoAssignments, LHSValNoAssignments, > RHS, LHS); > - } > - } > - > - // Armed with the mappings of LHS/RHS values to ultimate values, > walk the > - // interval lists to see if these intervals are coallescable. > - LiveInterval::const_iterator I = LHS.begin(); > - LiveInterval::const_iterator IE = LHS.end(); > - LiveInterval::const_iterator J = RHS.begin(); > - LiveInterval::const_iterator JE = RHS.end(); > - > - // Skip ahead until the first place of potential sharing. > - if (I->start < J->start) { > - I = std::upper_bound(I, IE, J->start); > - if (I != LHS.begin()) --I; > - } else if (J->start < I->start) { > - J = std::upper_bound(J, JE, I->start); > - if (J != RHS.begin()) --J; > - } > - > - while (1) { > - // Determine if these two live ranges overlap. > - bool Overlaps; > - if (I->start < J->start) { > - Overlaps = I->end > J->start; > - } else { > - Overlaps = J->end > I->start; > - } > - > - // If so, check value # info to determine if they are really > different. > - if (Overlaps) { > - // If the live range overlap will map to the same value > number in the > - // result liverange, we can still coallesce them. If not, > we can't. > - if (LHSValNoAssignments[I->ValId] != RHSValNoAssignments[J- > >ValId]) > - return false; > - } > - > - if (I->end < J->end) { > - ++I; > - if (I == IE) break; > - } else { > - ++J; > - if (J == JE) break; > - } > - } > - > - // If we get here, we know that we can coallesce the live > ranges. Ask the > - // intervals to coallesce themselves now. > - LHS.join(RHS, &LHSValNoAssignments[0], &RHSValNoAssignments[0], > - ValueNumberInfo); > - return true; > -} > - > - > -namespace { > - // DepthMBBCompare - Comparison predicate that sort first based > on the loop > - // depth of the basic block (the unsigned), and then on the MBB > number. > - struct DepthMBBCompare { > - typedef std::pair DepthMBBPair; > - bool operator()(const DepthMBBPair &LHS, const DepthMBBPair > &RHS) const { > - if (LHS.first > RHS.first) return true; // Deeper loops first > - return LHS.first == RHS.first && > - LHS.second->getNumber() < RHS.second->getNumber(); > - } > - }; > -} > - > - > -void LiveIntervals::CopyCoallesceInMBB(MachineBasicBlock *MBB, > - std::vector *TryAgain, > bool PhysOnly) { > - DOUT << ((Value*)MBB->getBasicBlock())->getName() << ":\n"; > - > - for (MachineBasicBlock::iterator MII = MBB->begin(), E = MBB->end > (); > - MII != E;) { > - MachineInstr *Inst = MII++; > - > - // If this isn't a copy, we can't join intervals. > - unsigned SrcReg, DstReg; > - if (!tii_->isMoveInstr(*Inst, SrcReg, DstReg)) continue; > - > - if (TryAgain && !JoinCopy(Inst, SrcReg, DstReg, PhysOnly)) > - TryAgain->push_back(getCopyRec(Inst, SrcReg, DstReg)); > - } > -} > - > - > -void LiveIntervals::joinIntervals() { > - DOUT << "********** JOINING INTERVALS ***********\n"; > - > - JoinedLIs.resize(getNumIntervals()); > - JoinedLIs.reset(); > - > - std::vector TryAgainList; > - const LoopInfo &LI = getAnalysis(); > - if (LI.begin() == LI.end()) { > - // If there are no loops in the function, join intervals in > function order. > - for (MachineFunction::iterator I = mf_->begin(), E = mf_->end(); > - I != E; ++I) > - CopyCoallesceInMBB(I, &TryAgainList); > - } else { > - // Otherwise, join intervals in inner loops before other > intervals. > - // Unfortunately we can't just iterate over loop hierarchy > here because > - // there may be more MBB's than BB's. Collect MBB's for sorting. > - > - // Join intervals in the function prolog first. We want to > join physical > - // registers with virtual registers before the intervals got > too long. > - std::vector > MBBs; > - for (MachineFunction::iterator I = mf_->begin(), E = mf_->end > (); I != E;++I) > - MBBs.push_back(std::make_pair(LI.getLoopDepth(I- > >getBasicBlock()), I)); > - > - // Sort by loop depth. > - std::sort(MBBs.begin(), MBBs.end(), DepthMBBCompare()); > - > - // Finally, join intervals in loop nest order. > - for (unsigned i = 0, e = MBBs.size(); i != e; ++i) > - CopyCoallesceInMBB(MBBs[i].second, NULL, true); > - for (unsigned i = 0, e = MBBs.size(); i != e; ++i) > - CopyCoallesceInMBB(MBBs[i].second, &TryAgainList, false); > - } > - > - // Joining intervals can allow other intervals to be joined. > Iteratively join > - // until we make no progress. > - bool ProgressMade = true; > - while (ProgressMade) { > - ProgressMade = false; > - > - for (unsigned i = 0, e = TryAgainList.size(); i != e; ++i) { > - CopyRec &TheCopy = TryAgainList[i]; > - if (TheCopy.MI && > - JoinCopy(TheCopy.MI, TheCopy.SrcReg, TheCopy.DstReg)) { > - TheCopy.MI = 0; // Mark this one as done. > - ProgressMade = true; > - } > - } > - } > - > - // Some live range has been lengthened due to colaescing, > eliminate the > - // unnecessary kills. > - int RegNum = JoinedLIs.find_first(); > - while (RegNum != -1) { > - unsigned Reg = RegNum + MRegisterInfo::FirstVirtualRegister; > - unsigned repReg = rep(Reg); > - LiveInterval &LI = getInterval(repReg); > - LiveVariables::VarInfo& svi = lv_->getVarInfo(Reg); > - for (unsigned i = 0, e = svi.Kills.size(); i != e; ++i) { > - MachineInstr *Kill = svi.Kills[i]; > - // Suppose vr1 = op vr2, x > - // and vr1 and vr2 are coalesced. vr2 should still be marked > kill > - // unless it is a two-address operand. > - if (isRemoved(Kill) || hasRegisterDef(Kill, repReg)) > - continue; > - if (LI.liveAt(getInstructionIndex(Kill) + InstrSlots::NUM)) > - unsetRegisterKill(Kill, repReg); > - } > - RegNum = JoinedLIs.find_next(RegNum); > - } > - > - DOUT << "*** Register mapping ***\n"; > - for (int i = 0, e = r2rMap_.size(); i != e; ++i) > - if (r2rMap_[i]) { > - DOUT << " reg " << i << " -> "; > - DEBUG(printRegName(r2rMap_[i])); > - DOUT << "\n"; > - } > -} > - > -/// Return true if the two specified registers belong to different > register > -/// classes. The registers may be either phys or virt regs. > -bool LiveIntervals::differingRegisterClasses(unsigned RegA, > - unsigned RegB) const { > - > - // Get the register classes for the first reg. > - if (MRegisterInfo::isPhysicalRegister(RegA)) { > - assert(MRegisterInfo::isVirtualRegister(RegB) && > - "Shouldn't consider two physregs!"); > - return !mf_->getSSARegMap()->getRegClass(RegB)->contains(RegA); > - } > - > - // Compare against the regclass for the second reg. > - const TargetRegisterClass *RegClass = mf_->getSSARegMap()- > >getRegClass(RegA); > - if (MRegisterInfo::isVirtualRegister(RegB)) > - return RegClass != mf_->getSSARegMap()->getRegClass(RegB); > - else > - return !RegClass->contains(RegB); > -} > - > -/// lastRegisterUse - Returns the last use of the specific > register between > -/// cycles Start and End. It also returns the use operand by > reference. It > -/// returns NULL if there are no uses. > -MachineInstr * > -LiveIntervals::lastRegisterUse(unsigned Reg, unsigned Start, > unsigned End, > - MachineOperand *&MOU) { > - int e = (End-1) / InstrSlots::NUM * InstrSlots::NUM; > - int s = Start; > - while (e >= s) { > - // Skip deleted instructions > - MachineInstr *MI = getInstructionFromIndex(e); > - while ((e - InstrSlots::NUM) >= s && !MI) { > - e -= InstrSlots::NUM; > - MI = getInstructionFromIndex(e); > - } > - if (e < s || MI == NULL) > - return NULL; > - > - for (unsigned i = 0, NumOps = MI->getNumOperands(); i != > NumOps; ++i) { > - MachineOperand &MO = MI->getOperand(i); > - if (MO.isReg() && MO.isUse() && MO.getReg() && > - mri_->regsOverlap(rep(MO.getReg()), Reg)) { > - MOU = &MO; > - return MI; > - } > - } > - > - e -= InstrSlots::NUM; > - } > - > - return NULL; > -} > - > - > -/// findDefOperand - Returns the MachineOperand that is a def of > the specific > -/// register. It returns NULL if the def is not found. > -MachineOperand *LiveIntervals::findDefOperand(MachineInstr *MI, > unsigned Reg) { > - for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { > - MachineOperand &MO = MI->getOperand(i); > - if (MO.isReg() && MO.isDef() && > - mri_->regsOverlap(rep(MO.getReg()), Reg)) > - return &MO; > - } > - return NULL; > -} > - > -/// unsetRegisterKill - Unset IsKill property of all uses of > specific register > -/// of the specific instruction. > -void LiveIntervals::unsetRegisterKill(MachineInstr *MI, unsigned > Reg) { > - for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { > - MachineOperand &MO = MI->getOperand(i); > - if (MO.isReg() && MO.isUse() && MO.isKill() && MO.getReg() && > - mri_->regsOverlap(rep(MO.getReg()), Reg)) > - MO.unsetIsKill(); > - } > -} > - > -/// hasRegisterDef - True if the instruction defines the specific > register. > -/// > -bool LiveIntervals::hasRegisterDef(MachineInstr *MI, unsigned Reg) { > - for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { > - MachineOperand &MO = MI->getOperand(i); > - if (MO.isReg() && MO.isDef() && > - mri_->regsOverlap(rep(MO.getReg()), Reg)) > - return true; > - } > - return false; > -} > - > LiveInterval LiveIntervals::createInterval(unsigned reg) { > float Weight = MRegisterInfo::isPhysicalRegister(reg) ? > HUGE_VALF : 0.0F; > Index: lib/CodeGen/RegAllocLinearScan.cpp > =================================================================== > RCS file: /var/cvs/llvm/llvm/lib/CodeGen/RegAllocLinearScan.cpp,v > retrieving revision 1.148 > diff -u -r1.148 RegAllocLinearScan.cpp > --- lib/CodeGen/RegAllocLinearScan.cpp 3 May 2007 01:11:53 -0000 1.148 > +++ lib/CodeGen/RegAllocLinearScan.cpp 6 May 2007 22:44:13 -0000 > @@ -96,6 +96,7 @@ > > virtual void getAnalysisUsage(AnalysisUsage &AU) const { > AU.addRequired(); > + AU.addRequiredID(SimpleRegisterCoalescingID); > MachineFunctionPass::getAnalysisUsage(AU); > } > > Index: lib/CodeGen/SimpleRegisterCoalescing.cpp > =================================================================== > RCS file: lib/CodeGen/SimpleRegisterCoalescing.cpp > diff -N lib/CodeGen/SimpleRegisterCoalescing.cpp > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ lib/CodeGen/SimpleRegisterCoalescing.cpp 6 May 2007 22:44:55 -0000 > @@ -0,0 +1,1103 @@ > +//===-- SimpleRegisterCoalescing.cpp - Register Coalescing > ----------------===// > +// > +// 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 implements a simple register coalescing pass that > attempts to > +// aggressively coalesce every register copy that it can. > +// > +// > ===------------------------------------------------------------------- > ---===// > + > +#define DEBUG_TYPE "simpleregistercoalescing" > +#include "llvm/CodeGen/SimpleRegisterCoalescing.h" > +#include "llvm/CodeGen/LiveIntervalAnalysis.h" > +#include "VirtRegMap.h" > +#include "llvm/Value.h" > +#include "llvm/Analysis/LoopInfo.h" > +#include "llvm/CodeGen/LiveVariables.h" > +#include "llvm/CodeGen/MachineFrameInfo.h" > +#include "llvm/CodeGen/MachineInstr.h" > +#include "llvm/CodeGen/Passes.h" > +#include "llvm/CodeGen/SSARegMap.h" > +#include "llvm/Target/MRegisterInfo.h" > +#include "llvm/Target/TargetInstrInfo.h" > +#include "llvm/Target/TargetMachine.h" > +#include "llvm/Support/CommandLine.h" > +#include "llvm/Support/Debug.h" > +#include "llvm/ADT/SmallSet.h" > +#include "llvm/ADT/Statistic.h" > +#include "llvm/ADT/STLExtras.h" > +#include > +#include > +using namespace llvm; > + > +STATISTIC(numJoins , "Number of interval joins performed"); > +STATISTIC(numPeep , "Number of identity moves eliminated after > coalescing"); > +STATISTIC(numAborts , "Number of times interval joining aborted"); > + > +char SimpleRegisterCoalescing::ID = 0; > +namespace { > + static cl::opt > + EnableJoining("join-liveintervals", > + cl::desc("Coallesce copies (default=true)"), > + cl::init(true)); > + > + RegisterPass > + X("simple-register-coalescing", > + "Simple register coalescing to eliminate all possible register > copies"); > +} > + > +const PassInfo *llvm::SimpleRegisterCoalescingID = X.getPassInfo(); > + > +void SimpleRegisterCoalescing::getAnalysisUsage(AnalysisUsage &AU) > const { > + //AU.addPreserved(); > + AU.addPreserved(); > + AU.addPreservedID(PHIEliminationID); > + AU.addPreservedID(TwoAddressInstructionPassID); > + AU.addRequired(); > + AU.addRequired(); > + AU.addRequired(); > + MachineFunctionPass::getAnalysisUsage(AU); > +} > + > +/// AdjustCopiesBackFrom - We found a non-trivially-coallescable > copy with IntA > +/// being the source and IntB being the dest, thus this defines a > value number > +/// in IntB. If the source value number (in IntA) is defined by a > copy from B, > +/// see if we can merge these two pieces of B into a single value > number, > +/// eliminating a copy. For example: > +/// > +/// A3 = B0 > +/// ... > +/// B1 = A3 <- this copy > +/// > +/// In this case, B0 can be extended to where the B1 copy lives, > allowing the B1 > +/// value number to be replaced with B0 (which simplifies the B > liveinterval). > +/// > +/// This returns true if an interval was modified. > +/// > +bool SimpleRegisterCoalescing::AdjustCopiesBackFrom(LiveInterval > &IntA, LiveInterval &IntB, > + MachineInstr *CopyMI) { > + unsigned CopyIdx = li_->getDefIndex(li_->getInstructionIndex > (CopyMI)); > + > + // BValNo is a value number in B that is defined by a copy from > A. 'B3' in > + // the example above. > + LiveInterval::iterator BLR = IntB.FindLiveRangeContaining(CopyIdx); > + unsigned BValNo = BLR->ValId; > + > + // Get the location that B is defined at. Two options: either > this value has > + // an unknown definition point or it is defined at CopyIdx. If > unknown, we > + // can't process it. > + unsigned BValNoDefIdx = IntB.getInstForValNum(BValNo); > + if (BValNoDefIdx == ~0U) return false; > + assert(BValNoDefIdx == CopyIdx && > + "Copy doesn't define the value?"); > + > + // AValNo is the value number in A that defines the copy, A0 in > the example. > + LiveInterval::iterator AValLR = IntA.FindLiveRangeContaining > (CopyIdx-1); > + unsigned AValNo = AValLR->ValId; > + > + // If AValNo is defined as a copy from IntB, we can potentially > process this. > + > + // Get the instruction that defines this value number. > + unsigned SrcReg = IntA.getSrcRegForValNum(AValNo); > + if (!SrcReg) return false; // Not defined by a copy. > + > + // If the value number is not defined by a copy instruction, > ignore it. > + > + // If the source register comes from an interval other than > IntB, we can't > + // handle this. > + if (rep(SrcReg) != IntB.reg) return false; > + > + // Get the LiveRange in IntB that this value number starts with. > + unsigned AValNoInstIdx = IntA.getInstForValNum(AValNo); > + LiveInterval::iterator ValLR = IntB.FindLiveRangeContaining > (AValNoInstIdx-1); > + > + // Make sure that the end of the live range is inside the same > block as > + // CopyMI. > + MachineInstr *ValLREndInst = li_->getInstructionFromIndex(ValLR- > >end-1); > + if (!ValLREndInst || > + ValLREndInst->getParent() != CopyMI->getParent()) return false; > + > + // Okay, we now know that ValLR ends in the same block that the > CopyMI > + // live-range starts. If there are no intervening live ranges > between them in > + // IntB, we can merge them. > + if (ValLR+1 != BLR) return false; > + > + DOUT << "\nExtending: "; IntB.print(DOUT, mri_); > + > + // We are about to delete CopyMI, so need to remove it as the > 'instruction > + // that defines this value #'. > + IntB.setValueNumberInfo(BValNo, std::make_pair(~0U, 0)); > + > + // Okay, we can merge them. We need to insert a new liverange: > + // [ValLR.end, BLR.begin) of either value number, then we merge the > + // two value numbers. > + unsigned FillerStart = ValLR->end, FillerEnd = BLR->start; > + IntB.addRange(LiveRange(FillerStart, FillerEnd, BValNo)); > + > + // If the IntB live range is assigned to a physical register, > and if that > + // physreg has aliases, > + if (MRegisterInfo::isPhysicalRegister(IntB.reg)) { > + // Update the liveintervals of sub-registers. > + for (const unsigned *AS = mri_->getSubRegisters(IntB.reg); > *AS; ++AS) { > + LiveInterval &AliasLI = li_->getInterval(*AS); > + AliasLI.addRange(LiveRange(FillerStart, FillerEnd, > + AliasLI.getNextValue(~0U, 0))); > + } > + } > + > + // Okay, merge "B1" into the same value number as "B0". > + if (BValNo != ValLR->ValId) > + IntB.MergeValueNumberInto(BValNo, ValLR->ValId); > + DOUT << " result = "; IntB.print(DOUT, mri_); > + DOUT << "\n"; > + > + // If the source instruction was killing the source register > before the > + // merge, unset the isKill marker given the live range has been > extended. > + int UIdx = ValLREndInst->findRegisterUseOperandIdx(IntB.reg, true); > + if (UIdx != -1) > + ValLREndInst->getOperand(UIdx).unsetIsKill(); > + > + // Finally, delete the copy instruction. > + li_->RemoveMachineInstrFromMaps(CopyMI); > + CopyMI->eraseFromParent(); > + ++numPeep; > + return true; > +} > + > +/// JoinCopy - Attempt to join intervals corresponding to SrcReg/ > DstReg, > +/// which are the src/dst of the copy instruction CopyMI. This > returns true > +/// if the copy was successfully coallesced away, or if it is > never possible > +/// to coallesce this copy, due to register constraints. It returns > +/// false if it is not currently possible to coallesce this > interval, but > +/// it may be possible if other things get coallesced. > +bool SimpleRegisterCoalescing::JoinCopy(MachineInstr *CopyMI, > + unsigned SrcReg, unsigned DstReg, > bool PhysOnly) { > + DOUT << li_->getInstructionIndex(CopyMI) << '\t' << *CopyMI; > + > + // Get representative registers. > + unsigned repSrcReg = rep(SrcReg); > + unsigned repDstReg = rep(DstReg); > + > + // If they are already joined we continue. > + if (repSrcReg == repDstReg) { > + DOUT << "\tCopy already coallesced.\n"; > + return true; // Not coallescable. > + } > + > + bool SrcIsPhys = MRegisterInfo::isPhysicalRegister(repSrcReg); > + bool DstIsPhys = MRegisterInfo::isPhysicalRegister(repDstReg); > + if (PhysOnly && !SrcIsPhys && !DstIsPhys) > + // Only joining physical registers with virtual registers in > this round. > + return true; > + > + // If they are both physical registers, we cannot join them. > + if (SrcIsPhys && DstIsPhys) { > + DOUT << "\tCan not coallesce physregs.\n"; > + return true; // Not coallescable. > + } > + > + // We only join virtual registers with allocatable physical > registers. > + if (SrcIsPhys && !allocatableRegs_[repSrcReg]) { > + DOUT << "\tSrc reg is unallocatable physreg.\n"; > + return true; // Not coallescable. > + } > + if (DstIsPhys && !allocatableRegs_[repDstReg]) { > + DOUT << "\tDst reg is unallocatable physreg.\n"; > + return true; // Not coallescable. > + } > + > + // If they are not of the same register class, we cannot join them. > + if (differingRegisterClasses(repSrcReg, repDstReg)) { > + DOUT << "\tSrc/Dest are different register classes.\n"; > + return true; // Not coallescable. > + } > + > + LiveInterval &SrcInt = li_->getInterval(repSrcReg); > + LiveInterval &DstInt = li_->getInterval(repDstReg); > + assert(SrcInt.reg == repSrcReg && DstInt.reg == repDstReg && > + "Register mapping is horribly broken!"); > + > + DOUT << "\t\tInspecting "; SrcInt.print(DOUT, mri_); > + DOUT << " and "; DstInt.print(DOUT, mri_); > + DOUT << ": "; > + > + // Check if it is necessary to propagate "isDead" property > before intervals > + // are joined. > + MachineOperand *mopd = CopyMI->findRegisterDefOperand(DstReg); > + bool isDead = mopd->isDead(); > + bool isShorten = false; > + unsigned SrcStart = 0, RemoveStart = 0; > + unsigned SrcEnd = 0, RemoveEnd = 0; > + if (isDead) { > + unsigned CopyIdx = li_->getInstructionIndex(CopyMI); > + LiveInterval::iterator SrcLR = > + SrcInt.FindLiveRangeContaining(li_->getUseIndex(CopyIdx)); > + RemoveStart = SrcStart = SrcLR->start; > + RemoveEnd = SrcEnd = SrcLR->end; > + // The instruction which defines the src is only truly dead if > there are > + // no intermediate uses and there isn't a use beyond the copy. > + // FIXME: find the last use, mark is kill and shorten the live > range. > + if (SrcEnd > li_->getDefIndex(CopyIdx)) { > + isDead = false; > + } else { > + MachineOperand *MOU; > + MachineInstr *LastUse= lastRegisterUse(repSrcReg, SrcStart, > CopyIdx, MOU); > + if (LastUse) { > + // Shorten the liveinterval to the end of last use. > + MOU->setIsKill(); > + isDead = false; > + isShorten = true; > + RemoveStart = li_->getDefIndex(li_->getInstructionIndex > (LastUse)); > + RemoveEnd = SrcEnd; > + } else { > + MachineInstr *SrcMI = li_->getInstructionFromIndex(SrcStart); > + if (SrcMI) { > + MachineOperand *mops = findDefOperand(SrcMI, repSrcReg); > + if (mops) > + // A dead def should have a single cycle interval. > + ++RemoveStart; > + } > + } > + } > + } > + > + // We need to be careful about coalescing a source physical > register with a > + // virtual register. Once the coalescing is done, it cannot be > broken and > + // these are not spillable! If the destination interval uses are > far away, > + // think twice about coalescing them! > + if (!mopd->isDead() && (SrcIsPhys || DstIsPhys)) { > + LiveInterval &JoinVInt = SrcIsPhys ? DstInt : SrcInt; > + unsigned JoinVReg = SrcIsPhys ? repDstReg : repSrcReg; > + unsigned JoinPReg = SrcIsPhys ? repSrcReg : repDstReg; > + const TargetRegisterClass *RC = mf_->getSSARegMap()- > >getRegClass(JoinVReg); > + unsigned Threshold = allocatableRCRegs_[RC].count(); > + > + // If the virtual register live interval is long has it has > low use desity, > + // do not join them, instead mark the physical register as its > allocation > + // preference. > + unsigned Length = JoinVInt.getSize() / InstrSlots::NUM; > + LiveVariables::VarInfo &vi = lv_->getVarInfo(JoinVReg); > + if (Length > Threshold && > + (((float)vi.NumUses / Length) < (1.0 / Threshold))) { > + JoinVInt.preference = JoinPReg; > + ++numAborts; > + DOUT << "\tMay tie down a physical register, abort!\n"; > + return false; > + } > + } > + > + // Okay, attempt to join these two intervals. On failure, this > returns false. > + // Otherwise, if one of the intervals being joined is a physreg, > this method > + // always canonicalizes DstInt to be it. The output "SrcInt" > will not have > + // been modified, so we can use this information below to update > aliases. > + if (JoinIntervals(DstInt, SrcInt)) { > + if (isDead) { > + // Result of the copy is dead. Propagate this property. > + if (SrcStart == 0) { > + assert(MRegisterInfo::isPhysicalRegister(repSrcReg) && > + "Live-in must be a physical register!"); > + // Live-in to the function but dead. Remove it from entry > live-in set. > + // JoinIntervals may end up swapping the two intervals. > + mf_->begin()->removeLiveIn(repSrcReg); > + } else { > + MachineInstr *SrcMI = li_->getInstructionFromIndex(SrcStart); > + if (SrcMI) { > + MachineOperand *mops = findDefOperand(SrcMI, repSrcReg); > + if (mops) > + mops->setIsDead(); > + } > + } > + } > + > + if (isShorten || isDead) { > + // Shorten the live interval. > + LiveInterval &LiveInInt = (repSrcReg == DstInt.reg) ? > DstInt : SrcInt; > + LiveInInt.removeRange(RemoveStart, RemoveEnd); > + } > + } else { > + // Coallescing failed. > + > + // If we can eliminate the copy without merging the live > ranges, do so now. > + if (AdjustCopiesBackFrom(SrcInt, DstInt, CopyMI)) > + return true; > + > + // Otherwise, we are unable to join the intervals. > + DOUT << "Interference!\n"; > + return false; > + } > + > + bool Swapped = repSrcReg == DstInt.reg; > + if (Swapped) > + std::swap(repSrcReg, repDstReg); > + assert(MRegisterInfo::isVirtualRegister(repSrcReg) && > + "LiveInterval::join didn't work right!"); > + > + // If we're about to merge live ranges into a physical register > live range, > + // we have to update any aliased register's live ranges to > indicate that they > + // have clobbered values for this range. > + if (MRegisterInfo::isPhysicalRegister(repDstReg)) { > + // Update the liveintervals of sub-registers. > + for (const unsigned *AS = mri_->getSubRegisters(repDstReg); > *AS; ++AS) > + li_->getInterval(*AS).MergeInClobberRanges(SrcInt); > + } else { > + // Merge use info if the destination is a virtual register. > + LiveVariables::VarInfo& dVI = lv_->getVarInfo(repDstReg); > + LiveVariables::VarInfo& sVI = lv_->getVarInfo(repSrcReg); > + dVI.NumUses += sVI.NumUses; > + } > + > + DOUT << "\n\t\tJoined. Result = "; DstInt.print(DOUT, mri_); > + DOUT << "\n"; > + > + // Remember these liveintervals have been joined. > + JoinedLIs.set(repSrcReg - MRegisterInfo::FirstVirtualRegister); > + if (MRegisterInfo::isVirtualRegister(repDstReg)) > + JoinedLIs.set(repDstReg - MRegisterInfo::FirstVirtualRegister); > + > + // If the intervals were swapped by Join, swap them back so that > the register > + // mapping (in the r2i map) is correct. > + if (Swapped) SrcInt.swap(DstInt); > + li_->removeInterval(repSrcReg); > + r2rMap_[repSrcReg] = repDstReg; > + > + // Finally, delete the copy instruction. > + li_->RemoveMachineInstrFromMaps(CopyMI); > + CopyMI->eraseFromParent(); > + ++numPeep; > + ++numJoins; > + return true; > +} > + > +/// ComputeUltimateVN - Assuming we are going to join two live > intervals, > +/// compute what the resultant value numbers for each value in the > input two > +/// ranges will be. This is complicated by copies between the two > which can > +/// and will commonly cause multiple value numbers to be merged > into one. > +/// > +/// VN is the value number that we're trying to resolve. > InstDefiningValue > +/// keeps track of the new InstDefiningValue assignment for the > result > +/// LiveInterval. ThisFromOther/OtherFromThis are sets that keep > track of > +/// whether a value in this or other is a copy from the opposite set. > +/// ThisValNoAssignments/OtherValNoAssignments keep track of value > #'s that have > +/// already been assigned. > +/// > +/// ThisFromOther[x] - If x is defined as a copy from the other > interval, this > +/// contains the value number the copy is from. > +/// > +static unsigned ComputeUltimateVN(unsigned VN, > + SmallVector + unsigned>, 16> > &ValueNumberInfo, > + SmallVector > &ThisFromOther, > + SmallVector > &OtherFromThis, > + SmallVector > &ThisValNoAssignments, > + SmallVector > &OtherValNoAssignments, > + LiveInterval &ThisLI, > LiveInterval &OtherLI) { > + // If the VN has already been computed, just return it. > + if (ThisValNoAssignments[VN] >= 0) > + return ThisValNoAssignments[VN]; > +// assert(ThisValNoAssignments[VN] != -2 && "Cyclic case?"); > + > + // If this val is not a copy from the other val, then it must be > a new value > + // number in the destination. > + int OtherValNo = ThisFromOther[VN]; > + if (OtherValNo == -1) { > + ValueNumberInfo.push_back(ThisLI.getValNumInfo(VN)); > + return ThisValNoAssignments[VN] = ValueNumberInfo.size()-1; > + } > + > + // Otherwise, this *is* a copy from the RHS. If the other side > has already > + // been computed, return it. > + if (OtherValNoAssignments[OtherValNo] >= 0) > + return ThisValNoAssignments[VN] = OtherValNoAssignments > [OtherValNo]; > + > + // Mark this value number as currently being computed, then ask > what the > + // ultimate value # of the other value is. > + ThisValNoAssignments[VN] = -2; > + unsigned UltimateVN = > + ComputeUltimateVN(OtherValNo, ValueNumberInfo, > + OtherFromThis, ThisFromOther, > + OtherValNoAssignments, ThisValNoAssignments, > + OtherLI, ThisLI); > + return ThisValNoAssignments[VN] = UltimateVN; > +} > + > +static bool InVector(unsigned Val, const SmallVector > &V) { > + return std::find(V.begin(), V.end(), Val) != V.end(); > +} > + > +/// SimpleJoin - Attempt to joint the specified interval into this > one. The > +/// caller of this method must guarantee that the RHS only > contains a single > +/// value number and that the RHS is not defined by a copy from this > +/// interval. This returns false if the intervals are not > joinable, or it > +/// joins them and returns true. > +bool SimpleRegisterCoalescing::SimpleJoin(LiveInterval &LHS, > LiveInterval &RHS) { > + assert(RHS.containsOneValue()); > + > + // Some number (potentially more than one) value numbers in the > current > + // interval may be defined as copies from the RHS. Scan the > overlapping > + // portions of the LHS and RHS, keeping track of this and > looking for > + // overlapping live ranges that are NOT defined as copies. If > these exist, we > + // cannot coallesce. > + > + LiveInterval::iterator LHSIt = LHS.begin(), LHSEnd = LHS.end(); > + LiveInterval::iterator RHSIt = RHS.begin(), RHSEnd = RHS.end(); > + > + if (LHSIt->start < RHSIt->start) { > + LHSIt = std::upper_bound(LHSIt, LHSEnd, RHSIt->start); > + if (LHSIt != LHS.begin()) --LHSIt; > + } else if (RHSIt->start < LHSIt->start) { > + RHSIt = std::upper_bound(RHSIt, RHSEnd, LHSIt->start); > + if (RHSIt != RHS.begin()) --RHSIt; > + } > + > + SmallVector EliminatedLHSVals; > + > + while (1) { > + // Determine if these live intervals overlap. > + bool Overlaps = false; > + if (LHSIt->start <= RHSIt->start) > + Overlaps = LHSIt->end > RHSIt->start; > + else > + Overlaps = RHSIt->end > LHSIt->start; > + > + // If the live intervals overlap, there are two interesting > cases: if the > + // LHS interval is defined by a copy from the RHS, it's ok and > we record > + // that the LHS value # is the same as the RHS. If it's not, > then we cannot > + // coallesce these live ranges and we bail out. > + if (Overlaps) { > + // If we haven't already recorded that this value # is safe, > check it. > + if (!InVector(LHSIt->ValId, EliminatedLHSVals)) { > + // Copy from the RHS? > + unsigned SrcReg = LHS.getSrcRegForValNum(LHSIt->ValId); > + if (rep(SrcReg) != RHS.reg) > + return false; // Nope, bail out. > + > + EliminatedLHSVals.push_back(LHSIt->ValId); > + } > + > + // We know this entire LHS live range is okay, so skip it now. > + if (++LHSIt == LHSEnd) break; > + continue; > + } > + > + if (LHSIt->end < RHSIt->end) { > + if (++LHSIt == LHSEnd) break; > + } else { > + // One interesting case to check here. It's possible that > we have > + // something like "X3 = Y" which defines a new value number > in the LHS, > + // and is the last use of this liverange of the RHS. In > this case, we > + // want to notice this copy (so that it gets coallesced > away) even though > + // the live ranges don't actually overlap. > + if (LHSIt->start == RHSIt->end) { > + if (InVector(LHSIt->ValId, EliminatedLHSVals)) { > + // We already know that this value number is going to be > merged in > + // if coallescing succeeds. Just skip the liverange. > + if (++LHSIt == LHSEnd) break; > + } else { > + // Otherwise, if this is a copy from the RHS, mark it as > being merged > + // in. > + if (rep(LHS.getSrcRegForValNum(LHSIt->ValId)) == RHS.reg) { > + EliminatedLHSVals.push_back(LHSIt->ValId); > + > + // We know this entire LHS live range is okay, so skip > it now. > + if (++LHSIt == LHSEnd) break; > + } > + } > + } > + > + if (++RHSIt == RHSEnd) break; > + } > + } > + > + // If we got here, we know that the coallescing will be > successful and that > + // the value numbers in EliminatedLHSVals will all be merged > together. Since > + // the most common case is that EliminatedLHSVals has a single > number, we > + // optimize for it: if there is more than one value, we merge > them all into > + // the lowest numbered one, then handle the interval as if we > were merging > + // with one value number. > + unsigned LHSValNo; > + if (EliminatedLHSVals.size() > 1) { > + // Loop through all the equal value numbers merging them into > the smallest > + // one. > + unsigned Smallest = EliminatedLHSVals[0]; > + for (unsigned i = 1, e = EliminatedLHSVals.size(); i != e; ++i) { > + if (EliminatedLHSVals[i] < Smallest) { > + // Merge the current notion of the smallest into the > smaller one. > + LHS.MergeValueNumberInto(Smallest, EliminatedLHSVals[i]); > + Smallest = EliminatedLHSVals[i]; > + } else { > + // Merge into the smallest. > + LHS.MergeValueNumberInto(EliminatedLHSVals[i], Smallest); > + } > + } > + LHSValNo = Smallest; > + } else { > + assert(!EliminatedLHSVals.empty() && "No copies from the RHS?"); > + LHSValNo = EliminatedLHSVals[0]; > + } > + > + // Okay, now that there is a single LHS value number that we're > merging the > + // RHS into, update the value number info for the LHS to > indicate that the > + // value number is defined where the RHS value number was. > + LHS.setValueNumberInfo(LHSValNo, RHS.getValNumInfo(0)); > + > + // Okay, the final step is to loop over the RHS live intervals, > adding them to > + // the LHS. > + LHS.MergeRangesInAsValue(RHS, LHSValNo); > + LHS.weight += RHS.weight; > + if (RHS.preference && !LHS.preference) > + LHS.preference = RHS.preference; > + > + return true; > +} > + > +/// JoinIntervals - Attempt to join these two intervals. On > failure, this > +/// returns false. Otherwise, if one of the intervals being > joined is a > +/// physreg, this method always canonicalizes LHS to be it. The > output > +/// "RHS" will not have been modified, so we can use this information > +/// below to update aliases. > +bool SimpleRegisterCoalescing::JoinIntervals(LiveInterval &LHS, > LiveInterval &RHS) { > + // Compute the final value assignment, assuming that the live > ranges can be > + // coallesced. > + SmallVector LHSValNoAssignments; > + SmallVector RHSValNoAssignments; > + SmallVector, 16> ValueNumberInfo; > + > + // If a live interval is a physical register, conservatively > check if any > + // of its sub-registers is overlapping the live interval of the > virtual > + // register. If so, do not coalesce. > + if (MRegisterInfo::isPhysicalRegister(LHS.reg) && > + *mri_->getSubRegisters(LHS.reg)) { > + for (const unsigned* SR = mri_->getSubRegisters(LHS.reg); *SR; > ++SR) > + if (li_->hasInterval(*SR) && RHS.overlaps(li_->getInterval > (*SR))) { > + DOUT << "Interfere with sub-register "; > + DEBUG(li_->getInterval(*SR).print(DOUT, mri_)); > + return false; > + } > + } else if (MRegisterInfo::isPhysicalRegister(RHS.reg) && > + *mri_->getSubRegisters(RHS.reg)) { > + for (const unsigned* SR = mri_->getSubRegisters(RHS.reg); *SR; > ++SR) > + if (li_->hasInterval(*SR) && LHS.overlaps(li_->getInterval > (*SR))) { > + DOUT << "Interfere with sub-register "; > + DEBUG(li_->getInterval(*SR).print(DOUT, mri_)); > + return false; > + } > + } > + > + // Compute ultimate value numbers for the LHS and RHS values. > + if (RHS.containsOneValue()) { > + // Copies from a liveinterval with a single value are simple > to handle and > + // very common, handle the special case here. This is > important, because > + // often RHS is small and LHS is large (e.g. a physreg). > + > + // Find out if the RHS is defined as a copy from some value in > the LHS. > + int RHSValID = -1; > + std::pair RHSValNoInfo; > + unsigned RHSSrcReg = RHS.getSrcRegForValNum(0); > + if ((RHSSrcReg == 0 || rep(RHSSrcReg) != LHS.reg)) { > + // If RHS is not defined as a copy from the LHS, we can use > simpler and > + // faster checks to see if the live ranges are > coallescable. This joiner > + // can't swap the LHS/RHS intervals though. > + if (!MRegisterInfo::isPhysicalRegister(RHS.reg)) { > + return SimpleJoin(LHS, RHS); > + } else { > + RHSValNoInfo = RHS.getValNumInfo(0); > + } > + } else { > + // It was defined as a copy from the LHS, find out what > value # it is. > + unsigned ValInst = RHS.getInstForValNum(0); > + RHSValID = LHS.getLiveRangeContaining(ValInst-1)->ValId; > + RHSValNoInfo = LHS.getValNumInfo(RHSValID); > + } > + > + LHSValNoAssignments.resize(LHS.getNumValNums(), -1); > + RHSValNoAssignments.resize(RHS.getNumValNums(), -1); > + ValueNumberInfo.resize(LHS.getNumValNums()); > + > + // Okay, *all* of the values in LHS that are defined as a copy > from RHS > + // should now get updated. > + for (unsigned VN = 0, e = LHS.getNumValNums(); VN != e; ++VN) { > + if (unsigned LHSSrcReg = LHS.getSrcRegForValNum(VN)) { > + if (rep(LHSSrcReg) != RHS.reg) { > + // If this is not a copy from the RHS, its value number > will be > + // unmodified by the coallescing. > + ValueNumberInfo[VN] = LHS.getValNumInfo(VN); > + LHSValNoAssignments[VN] = VN; > + } else if (RHSValID == -1) { > + // Otherwise, it is a copy from the RHS, and we don't > already have a > + // value# for it. Keep the current value number, but > remember it. > + LHSValNoAssignments[VN] = RHSValID = VN; > + ValueNumberInfo[VN] = RHSValNoInfo; > + } else { > + // Otherwise, use the specified value #. > + LHSValNoAssignments[VN] = RHSValID; > + if (VN != (unsigned)RHSValID) > + ValueNumberInfo[VN].first = ~1U; > + else > + ValueNumberInfo[VN] = RHSValNoInfo; > + } > + } else { > + ValueNumberInfo[VN] = LHS.getValNumInfo(VN); > + LHSValNoAssignments[VN] = VN; > + } > + } > + > + assert(RHSValID != -1 && "Didn't find value #?"); > + RHSValNoAssignments[0] = RHSValID; > + > + } else { > + // Loop over the value numbers of the LHS, seeing if any are > defined from > + // the RHS. > + SmallVector LHSValsDefinedFromRHS; > + LHSValsDefinedFromRHS.resize(LHS.getNumValNums(), -1); > + for (unsigned VN = 0, e = LHS.getNumValNums(); VN != e; ++VN) { > + unsigned ValSrcReg = LHS.getSrcRegForValNum(VN); > + if (ValSrcReg == 0) // Src not defined by a copy? > + continue; > + > + // DstReg is known to be a register in the LHS interval. If > the src is > + // from the RHS interval, we can use its value #. > + if (rep(ValSrcReg) != RHS.reg) > + continue; > + > + // Figure out the value # from the RHS. > + unsigned ValInst = LHS.getInstForValNum(VN); > + LHSValsDefinedFromRHS[VN] = RHS.getLiveRangeContaining > (ValInst-1)->ValId; > + } > + > + // Loop over the value numbers of the RHS, seeing if any are > defined from > + // the LHS. > + SmallVector RHSValsDefinedFromLHS; > + RHSValsDefinedFromLHS.resize(RHS.getNumValNums(), -1); > + for (unsigned VN = 0, e = RHS.getNumValNums(); VN != e; ++VN) { > + unsigned ValSrcReg = RHS.getSrcRegForValNum(VN); > + if (ValSrcReg == 0) // Src not defined by a copy? > + continue; > + > + // DstReg is known to be a register in the RHS interval. If > the src is > + // from the LHS interval, we can use its value #. > + if (rep(ValSrcReg) != LHS.reg) > + continue; > + > + // Figure out the value # from the LHS. > + unsigned ValInst = RHS.getInstForValNum(VN); > + RHSValsDefinedFromLHS[VN] = LHS.getLiveRangeContaining > (ValInst-1)->ValId; > + } > + > + LHSValNoAssignments.resize(LHS.getNumValNums(), -1); > + RHSValNoAssignments.resize(RHS.getNumValNums(), -1); > + ValueNumberInfo.reserve(LHS.getNumValNums() + RHS.getNumValNums > ()); > + > + for (unsigned VN = 0, e = LHS.getNumValNums(); VN != e; ++VN) { > + if (LHSValNoAssignments[VN] >= 0 || LHS.getInstForValNum(VN) > == ~2U) > + continue; > + ComputeUltimateVN(VN, ValueNumberInfo, > + LHSValsDefinedFromRHS, RHSValsDefinedFromLHS, > + LHSValNoAssignments, RHSValNoAssignments, > LHS, RHS); > + } > + for (unsigned VN = 0, e = RHS.getNumValNums(); VN != e; ++VN) { > + if (RHSValNoAssignments[VN] >= 0 || RHS.getInstForValNum(VN) > == ~2U) > + continue; > + // If this value number isn't a copy from the LHS, it's a > new number. > + if (RHSValsDefinedFromLHS[VN] == -1) { > + ValueNumberInfo.push_back(RHS.getValNumInfo(VN)); > + RHSValNoAssignments[VN] = ValueNumberInfo.size()-1; > + continue; > + } > + > + ComputeUltimateVN(VN, ValueNumberInfo, > + RHSValsDefinedFromLHS, LHSValsDefinedFromRHS, > + RHSValNoAssignments, LHSValNoAssignments, > RHS, LHS); > + } > + } > + > + // Armed with the mappings of LHS/RHS values to ultimate values, > walk the > + // interval lists to see if these intervals are coallescable. > + LiveInterval::const_iterator I = LHS.begin(); > + LiveInterval::const_iterator IE = LHS.end(); > + LiveInterval::const_iterator J = RHS.begin(); > + LiveInterval::const_iterator JE = RHS.end(); > + > + // Skip ahead until the first place of potential sharing. > + if (I->start < J->start) { > + I = std::upper_bound(I, IE, J->start); > + if (I != LHS.begin()) --I; > + } else if (J->start < I->start) { > + J = std::upper_bound(J, JE, I->start); > + if (J != RHS.begin()) --J; > + } > + > + while (1) { > + // Determine if these two live ranges overlap. > + bool Overlaps; > + if (I->start < J->start) { > + Overlaps = I->end > J->start; > + } else { > + Overlaps = J->end > I->start; > + } > + > + // If so, check value # info to determine if they are really > different. > + if (Overlaps) { > + // If the live range overlap will map to the same value > number in the > + // result liverange, we can still coallesce them. If not, > we can't. > + if (LHSValNoAssignments[I->ValId] != RHSValNoAssignments[J- > >ValId]) > + return false; > + } > + > + if (I->end < J->end) { > + ++I; > + if (I == IE) break; > + } else { > + ++J; > + if (J == JE) break; > + } > + } > + > + // If we get here, we know that we can coallesce the live > ranges. Ask the > + // intervals to coallesce themselves now. > + LHS.join(RHS, &LHSValNoAssignments[0], &RHSValNoAssignments[0], > + ValueNumberInfo); > + return true; > +} > + > +namespace { > + // DepthMBBCompare - Comparison predicate that sort first based > on the loop > + // depth of the basic block (the unsigned), and then on the MBB > number. > + struct DepthMBBCompare { > + typedef std::pair DepthMBBPair; > + bool operator()(const DepthMBBPair &LHS, const DepthMBBPair > &RHS) const { > + if (LHS.first > RHS.first) return true; // Deeper loops first > + return LHS.first == RHS.first && > + LHS.second->getNumber() < RHS.second->getNumber(); > + } > + }; > +} > + > +void SimpleRegisterCoalescing::CopyCoallesceInMBB > (MachineBasicBlock *MBB, > + std::vector *TryAgain, > bool PhysOnly) { > + DOUT << ((Value*)MBB->getBasicBlock())->getName() << ":\n"; > + > + for (MachineBasicBlock::iterator MII = MBB->begin(), E = MBB->end > (); > + MII != E;) { > + MachineInstr *Inst = MII++; > + > + // If this isn't a copy, we can't join intervals. > + unsigned SrcReg, DstReg; > + if (!tii_->isMoveInstr(*Inst, SrcReg, DstReg)) continue; > + > + if (TryAgain && !JoinCopy(Inst, SrcReg, DstReg, PhysOnly)) > + TryAgain->push_back(getCopyRec(Inst, SrcReg, DstReg)); > + } > +} > + > +void SimpleRegisterCoalescing::joinIntervals() { > + DOUT << "********** JOINING INTERVALS ***********\n"; > + > + JoinedLIs.resize(li_->getNumIntervals()); > + JoinedLIs.reset(); > + > + std::vector TryAgainList; > + const LoopInfo &LI = getAnalysis(); > + if (LI.begin() == LI.end()) { > + // If there are no loops in the function, join intervals in > function order. > + for (MachineFunction::iterator I = mf_->begin(), E = mf_->end(); > + I != E; ++I) > + CopyCoallesceInMBB(I, &TryAgainList); > + } else { > + // Otherwise, join intervals in inner loops before other > intervals. > + // Unfortunately we can't just iterate over loop hierarchy > here because > + // there may be more MBB's than BB's. Collect MBB's for sorting. > + > + // Join intervals in the function prolog first. We want to > join physical > + // registers with virtual registers before the intervals got > too long. > + std::vector > MBBs; > + for (MachineFunction::iterator I = mf_->begin(), E = mf_->end > (); I != E;++I) > + MBBs.push_back(std::make_pair(LI.getLoopDepth(I- > >getBasicBlock()), I)); > + > + // Sort by loop depth. > + std::sort(MBBs.begin(), MBBs.end(), DepthMBBCompare()); > + > + // Finally, join intervals in loop nest order. > + for (unsigned i = 0, e = MBBs.size(); i != e; ++i) > + CopyCoallesceInMBB(MBBs[i].second, NULL, true); > + for (unsigned i = 0, e = MBBs.size(); i != e; ++i) > + CopyCoallesceInMBB(MBBs[i].second, &TryAgainList, false); > + } > + > + // Joining intervals can allow other intervals to be joined. > Iteratively join > + // until we make no progress. > + bool ProgressMade = true; > + while (ProgressMade) { > + ProgressMade = false; > + > + for (unsigned i = 0, e = TryAgainList.size(); i != e; ++i) { > + CopyRec &TheCopy = TryAgainList[i]; > + if (TheCopy.MI && > + JoinCopy(TheCopy.MI, TheCopy.SrcReg, TheCopy.DstReg)) { > + TheCopy.MI = 0; // Mark this one as done. > + ProgressMade = true; > + } > + } > + } > + > + // Some live range has been lengthened due to colaescing, > eliminate the > + // unnecessary kills. > + int RegNum = JoinedLIs.find_first(); > + while (RegNum != -1) { > + unsigned Reg = RegNum + MRegisterInfo::FirstVirtualRegister; > + unsigned repReg = rep(Reg); > + LiveInterval &LI = li_->getInterval(repReg); > + LiveVariables::VarInfo& svi = lv_->getVarInfo(Reg); > + for (unsigned i = 0, e = svi.Kills.size(); i != e; ++i) { > + MachineInstr *Kill = svi.Kills[i]; > + // Suppose vr1 = op vr2, x > + // and vr1 and vr2 are coalesced. vr2 should still be marked > kill > + // unless it is a two-address operand. > + if (li_->isRemoved(Kill) || hasRegisterDef(Kill, repReg)) > + continue; > + if (LI.liveAt(li_->getInstructionIndex(Kill) + > InstrSlots::NUM)) > + unsetRegisterKill(Kill, repReg); > + } > + RegNum = JoinedLIs.find_next(RegNum); > + } > + > + DOUT << "*** Register mapping ***\n"; > + for (int i = 0, e = r2rMap_.size(); i != e; ++i) > + if (r2rMap_[i]) { > + DOUT << " reg " << i << " -> "; > + DEBUG(printRegName(r2rMap_[i])); > + DOUT << "\n"; > + } > +} > + > +/// Return true if the two specified registers belong to different > register > +/// classes. The registers may be either phys or virt regs. > +bool SimpleRegisterCoalescing::differingRegisterClasses(unsigned > RegA, > + unsigned RegB) const { > + > + // Get the register classes for the first reg. > + if (MRegisterInfo::isPhysicalRegister(RegA)) { > + assert(MRegisterInfo::isVirtualRegister(RegB) && > + "Shouldn't consider two physregs!"); > + return !mf_->getSSARegMap()->getRegClass(RegB)->contains(RegA); > + } > + > + // Compare against the regclass for the second reg. > + const TargetRegisterClass *RegClass = mf_->getSSARegMap()- > >getRegClass(RegA); > + if (MRegisterInfo::isVirtualRegister(RegB)) > + return RegClass != mf_->getSSARegMap()->getRegClass(RegB); > + else > + return !RegClass->contains(RegB); > +} > + > +/// lastRegisterUse - Returns the last use of the specific > register between > +/// cycles Start and End. It also returns the use operand by > reference. It > +/// returns NULL if there are no uses. > +MachineInstr * > +SimpleRegisterCoalescing::lastRegisterUse(unsigned Reg, unsigned > Start, unsigned End, > + MachineOperand *&MOU) { > + int e = (End-1) / InstrSlots::NUM * InstrSlots::NUM; > + int s = Start; > + while (e >= s) { > + // Skip deleted instructions > + MachineInstr *MI = li_->getInstructionFromIndex(e); > + while ((e - InstrSlots::NUM) >= s && !MI) { > + e -= InstrSlots::NUM; > + MI = li_->getInstructionFromIndex(e); > + } > + if (e < s || MI == NULL) > + return NULL; > + > + for (unsigned i = 0, NumOps = MI->getNumOperands(); i != > NumOps; ++i) { > + MachineOperand &MO = MI->getOperand(i); > + if (MO.isReg() && MO.isUse() && MO.getReg() && > + mri_->regsOverlap(rep(MO.getReg()), Reg)) { > + MOU = &MO; > + return MI; > + } > + } > + > + e -= InstrSlots::NUM; > + } > + > + return NULL; > +} > + > + > +/// findDefOperand - Returns the MachineOperand that is a def of > the specific > +/// register. It returns NULL if the def is not found. > +MachineOperand *SimpleRegisterCoalescing::findDefOperand > (MachineInstr *MI, unsigned Reg) { > + for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { > + MachineOperand &MO = MI->getOperand(i); > + if (MO.isReg() && MO.isDef() && > + mri_->regsOverlap(rep(MO.getReg()), Reg)) > + return &MO; > + } > + return NULL; > +} > + > +/// unsetRegisterKill - Unset IsKill property of all uses of > specific register > +/// of the specific instruction. > +void SimpleRegisterCoalescing::unsetRegisterKill(MachineInstr *MI, > unsigned Reg) { > + for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { > + MachineOperand &MO = MI->getOperand(i); > + if (MO.isReg() && MO.isUse() && MO.isKill() && MO.getReg() && > + mri_->regsOverlap(rep(MO.getReg()), Reg)) > + MO.unsetIsKill(); > + } > +} > + > +/// hasRegisterDef - True if the instruction defines the specific > register. > +/// > +bool SimpleRegisterCoalescing::hasRegisterDef(MachineInstr *MI, > unsigned Reg) { > + for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { > + MachineOperand &MO = MI->getOperand(i); > + if (MO.isReg() && MO.isDef() && > + mri_->regsOverlap(rep(MO.getReg()), Reg)) > + return true; > + } > + return false; > +} > + > +void SimpleRegisterCoalescing::printRegName(unsigned reg) const { > + if (MRegisterInfo::isPhysicalRegister(reg)) > + cerr << mri_->getName(reg); > + else > + cerr << "%reg" << reg; > +} > + > +void SimpleRegisterCoalescing::releaseMemory() { > + r2rMap_.clear(); > + JoinedLIs.clear(); > +} > + > +static bool isZeroLengthInterval(LiveInterval *li) { > + for (LiveInterval::Ranges::const_iterator > + i = li->ranges.begin(), e = li->ranges.end(); i != e; ++i) > + if (i->end - i->start > LiveIntervals::InstrSlots::NUM) > + return false; > + return true; > +} > + > +bool SimpleRegisterCoalescing::runOnMachineFunction > (MachineFunction &fn) { > + mf_ = &fn; > + tm_ = &fn.getTarget(); > + mri_ = tm_->getRegisterInfo(); > + tii_ = tm_->getInstrInfo(); > + li_ = &getAnalysis(); > + lv_ = &getAnalysis(); > + > + DOUT << "********** SIMPLE REGISTER COALESCING **********\n" > + << "********** Function: " > + << ((Value*)mf_->getFunction())->getName() << '\n'; > + > + allocatableRegs_ = mri_->getAllocatableSet(fn); > + for (MRegisterInfo::regclass_iterator I = mri_->regclass_begin(), > + E = mri_->regclass_end(); I != E; ++I) > + allocatableRCRegs_.insert(std::make_pair(*I,mri_- > >getAllocatableSet(fn, *I))); > + > + r2rMap_.grow(mf_->getSSARegMap()->getLastVirtReg()); > + > + // Join (coallesce) intervals if requested. > + if (EnableJoining) { > + joinIntervals(); > + DOUT << "********** INTERVALS POST JOINING **********\n"; > + for (LiveIntervals::iterator I = li_->begin(), E = li_->end(); > I != E; ++I) { > + I->second.print(DOUT, mri_); > + DOUT << "\n"; > + } > + } > + > + // perform a final pass over the instructions and compute spill > + // weights, coalesce virtual registers and remove identity moves. > + const LoopInfo &loopInfo = getAnalysis(); > + > + for (MachineFunction::iterator mbbi = mf_->begin(), mbbe = mf_- > >end(); > + mbbi != mbbe; ++mbbi) { > + MachineBasicBlock* mbb = mbbi; > + unsigned loopDepth = loopInfo.getLoopDepth(mbb->getBasicBlock()); > + > + for (MachineBasicBlock::iterator mii = mbb->begin(), mie = mbb- > >end(); > + mii != mie; ) { > + // if the move will be an identity move delete it > + unsigned srcReg, dstReg, RegRep; > + if (tii_->isMoveInstr(*mii, srcReg, dstReg) && > + (RegRep = rep(srcReg)) == rep(dstReg)) { > + // remove from def list > + LiveInterval &RegInt = li_->getOrCreateInterval(RegRep); > + MachineOperand *MO = mii->findRegisterDefOperand(dstReg); > + // If def of this move instruction is dead, remove its > live range from > + // the dstination register's live interval. > + if (MO->isDead()) { > + unsigned MoveIdx = li_->getDefIndex(li_- > >getInstructionIndex(mii)); > + LiveInterval::iterator MLR = > RegInt.FindLiveRangeContaining(MoveIdx); > + RegInt.removeRange(MLR->start, MoveIdx+1); > + if (RegInt.empty()) > + li_->removeInterval(RegRep); > + } > + li_->RemoveMachineInstrFromMaps(mii); > + mii = mbbi->erase(mii); > + ++numPeep; > + } else { > + SmallSet UniqueUses; > + for (unsigned i = 0, e = mii->getNumOperands(); i != e; + > +i) { > + const MachineOperand &mop = mii->getOperand(i); > + if (mop.isRegister() && mop.getReg() && > + MRegisterInfo::isVirtualRegister(mop.getReg())) { > + // replace register with representative register > + unsigned reg = rep(mop.getReg()); > + mii->getOperand(i).setReg(reg); > + > + // Multiple uses of reg by the same instruction. It > should not > + // contribute to spill weight again. > + if (UniqueUses.count(reg) != 0) > + continue; > + LiveInterval &RegInt = li_->getInterval(reg); > + float w = (mop.isUse()+mop.isDef()) * powf(10.0F, > (float)loopDepth); > + // If the definition instruction is re-materializable, > its spill > + // weight is half of what it would have been normally > unless it's > + // a load from fixed stack slot. > + int Dummy; > + if (RegInt.remat && !tii_->isLoadFromStackSlot > (RegInt.remat, Dummy)) > + w /= 2; > + RegInt.weight += w; > + UniqueUses.insert(reg); > + } > + } > + ++mii; > + } > + } > + } > + > + for (LiveIntervals::iterator I = li_->begin(), E = li_->end(); > I != E; ++I) { > + LiveInterval &LI = I->second; > + if (MRegisterInfo::isVirtualRegister(LI.reg)) { > + // If the live interval length is essentially zero, i.e. in > every live > + // range the use follows def immediately, it doesn't make > sense to spill > + // it and hope it will be easier to allocate for this li. > + if (isZeroLengthInterval(&LI)) > + LI.weight = HUGE_VALF; > + > + // Slightly prefer live interval that has been assigned a > preferred reg. > + if (LI.preference) > + LI.weight *= 1.01F; > + > + // Divide the weight of the interval by its size. This > encourages > + // spilling of intervals that are large and have few uses, and > + // discourages spilling of small intervals with many uses. > + LI.weight /= LI.getSize(); > + } > + } > + > + DEBUG(dump()); > + return true; > +} > + > +/// print - Implement the dump method. > +void SimpleRegisterCoalescing::print(std::ostream &O, const > Module* m) const { > + li_->print(O, m); > +} > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070509/c3d5ab8c/attachment.html From evan.cheng at apple.com Wed May 9 14:20:57 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 9 May 2007 14:20:57 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/PowerPC/hello.ll Message-ID: <200705091920.l49JKvRc001688@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/PowerPC: hello.ll added (r1.1) --- Log message: PR1399: http://llvm.org/PR1399 test case. --- Diffs of the changes: (+12 -0) hello.ll | 12 ++++++++++++ 1 files changed, 12 insertions(+) Index: llvm/test/CodeGen/PowerPC/hello.ll diff -c /dev/null llvm/test/CodeGen/PowerPC/hello.ll:1.1 *** /dev/null Wed May 9 14:20:47 2007 --- llvm/test/CodeGen/PowerPC/hello.ll Wed May 9 14:20:37 2007 *************** *** 0 **** --- 1,12 ---- + ; RUN: llvm-as < %s | llc -march=ppc32 + ; RUN: llvm-as < %s | llc -march=ppc64 + ; PR1399 + + @.str = internal constant [13 x i8] c"Hello World!\00" + + define i32 @main() { + %tmp2 = tail call i32 @puts( i8* getelementptr ([13 x i8]* @.str, i32 0, i64 0) ) + ret i32 0 + } + + declare i32 @puts(i8*) From lauro.venancio at gmail.com Wed May 9 14:32:17 2007 From: lauro.venancio at gmail.com (Lauro Ramos Venancio) Date: Wed, 9 May 2007 14:32:17 -0500 Subject: [llvm-commits] CVS: llvm/docs/ReleaseNotes.html Message-ID: <200705091932.l49JWHiF009301@zion.cs.uiuc.edu> Changes in directory llvm/docs: ReleaseNotes.html updated: 1.371 -> 1.372 --- Log message: Add two ARM known problems. --- Diffs of the changes: (+7 -4) ReleaseNotes.html | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) Index: llvm/docs/ReleaseNotes.html diff -u llvm/docs/ReleaseNotes.html:1.371 llvm/docs/ReleaseNotes.html:1.372 --- llvm/docs/ReleaseNotes.html:1.371 Wed May 9 01:23:58 2007 +++ llvm/docs/ReleaseNotes.html Wed May 9 14:31:58 2007 @@ -66,7 +66,7 @@
      • We took this as an opportunity to break backwards compatibility with the LLVM 1.x bytecode and .ll file format. If you have LLVM 1.9 .ll files that you would like to upgrade to LLVM 2.x, we -recommend the use of the stand alone llvm-upgrade +recommend the use of the stand alone llvm-upgrade tool. We intend to keep compatibility with .ll and .bc formats within the 2.x release series, like we did within the 1.x series.
      • There are several significant change to the LLVM IR and internal APIs, such @@ -344,8 +344,11 @@
          -
        • The ARM backend is currently in early development stages, it is not -ready for production use.
        • +
        • The Thumb mode works only on ARMv6 or higher processors. On sub-ARMv6 +processors, any thumb program compiled with LLVM crashes or produces wrong +results. (PR1388)
        • +
        • Compilation for ARM Linux OABI (old ABI) is supported, but not fully tested. +
        @@ -597,7 +600,7 @@ src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!" /> The LLVM Compiler Infrastructure
        - Last modified: $Date: 2007/05/09 06:23:58 $ + Last modified: $Date: 2007/05/09 19:31:58 $ From asl at math.spbu.ru Wed May 9 15:07:27 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Wed, 9 May 2007 15:07:27 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Message-ID: <200705092007.l49K7RuC018022@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: SelectionDAGISel.cpp updated: 1.449 -> 1.450 --- Log message: Do not assert, when case range split metric is zero and JTs are not allowed: just emit binary tree in this case. This fixes PR1403: http://llvm.org/PR1403 . --- Diffs of the changes: (+12 -5) SelectionDAGISel.cpp | 17 ++++++++++++----- 1 files changed, 12 insertions(+), 5 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.449 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.450 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.449 Mon May 7 15:49:28 2007 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Wed May 9 15:07:09 2007 @@ -1462,6 +1462,11 @@ return true; } +static inline bool areJTsAllowed(const TargetLowering &TLI) { + return (TLI.isOperationLegal(ISD::BR_JT, MVT::Other) || + TLI.isOperationLegal(ISD::BRIND, MVT::Other)); +} + /// handleJTSwitchCase - Emit jumptable for current switch case range bool SelectionDAGLowering::handleJTSwitchCase(CaseRec& CR, CaseRecVector& WorkList, @@ -1478,9 +1483,7 @@ I!=E; ++I) TSize += I->size(); - if ((!TLI.isOperationLegal(ISD::BR_JT, MVT::Other) && - !TLI.isOperationLegal(ISD::BRIND, MVT::Other)) || - TSize <= 3) + if (!areJTsAllowed(TLI) || TSize <= 3) return false; double Density = (double)TSize / (double)((Last - First) + 1ULL); @@ -1622,8 +1625,12 @@ LSize += J->size(); RSize -= J->size(); } - // If our case is dense we *really* should handle it earlier! - assert((FMetric > 0) && "Should handle dense range earlier!"); + if (areJTsAllowed(TLI)) { + // If our case is dense we *really* should handle it earlier! + assert((FMetric > 0) && "Should handle dense range earlier!"); + } else { + Pivot = CR.Range.first + Size/2; + } CaseRange LHSR(CR.Range.first, Pivot); CaseRange RHSR(Pivot, CR.Range.second); From asl at math.spbu.ru Wed May 9 15:07:32 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Wed, 9 May 2007 15:07:32 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/SPARC/2007-05-09-JumpTables.ll Message-ID: <200705092007.l49K7W20018027@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/SPARC: 2007-05-09-JumpTables.ll added (r1.1) --- Log message: Do not assert, when case range split metric is zero and JTs are not allowed: just emit binary tree in this case. This fixes PR1403: http://llvm.org/PR1403 . --- Diffs of the changes: (+30 -0) 2007-05-09-JumpTables.ll | 30 ++++++++++++++++++++++++++++++ 1 files changed, 30 insertions(+) Index: llvm/test/CodeGen/SPARC/2007-05-09-JumpTables.ll diff -c /dev/null llvm/test/CodeGen/SPARC/2007-05-09-JumpTables.ll:1.1 *** /dev/null Wed May 9 15:07:20 2007 --- llvm/test/CodeGen/SPARC/2007-05-09-JumpTables.ll Wed May 9 15:07:09 2007 *************** *** 0 **** --- 1,30 ---- + ; RUN: llvm-as < %s | llc -march=sparc + + ; We cannot emit jump tables on Sparc, but we should correctly handle this case. + + target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64" + + define i32 @foo(i32 %f) { + entry: + switch i32 %f, label %bb14 [ + i32 0, label %UnifiedReturnBlock + i32 1, label %bb4 + i32 2, label %bb7 + i32 3, label %bb10 + ] + + bb4: ; preds = %entry + ret i32 2 + + bb7: ; preds = %entry + ret i32 5 + + bb10: ; preds = %entry + ret i32 9 + + bb14: ; preds = %entry + ret i32 0 + + UnifiedReturnBlock: ; preds = %entry + ret i32 1 + } From evan.cheng at apple.com Wed May 9 16:50:05 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 9 May 2007 16:50:05 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Message-ID: <200705092150.l49Lo5Nn001721@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: DAGCombiner.cpp updated: 1.301 -> 1.302 --- Log message: Can't fold the bit_convert is the store is a truncating store. --- Diffs of the changes: (+2 -2) DAGCombiner.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.301 llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.302 --- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.301 Mon May 7 16:36:06 2007 +++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Wed May 9 16:49:47 2007 @@ -3422,8 +3422,8 @@ SDOperand Ptr = ST->getBasePtr(); // If this is a store of a bit convert, store the input value if the - // resultant store does not need a higher alignment than the original. - if (Value.getOpcode() == ISD::BIT_CONVERT) { + // resultant store does not need a higher alignment than the original. + if (Value.getOpcode() == ISD::BIT_CONVERT && !ST->isTruncatingStore()) { unsigned Align = ST->getAlignment(); MVT::ValueType SVT = Value.getOperand(0).getValueType(); unsigned OrigAlign = TLI.getTargetMachine().getTargetData()-> From evan.cheng at apple.com Wed May 9 16:54:53 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 9 May 2007 16:54:53 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/ARM/fptoint.ll Message-ID: <200705092154.l49LsrZT001801@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/ARM: fptoint.ll updated: 1.2 -> 1.3 --- Log message: Can't fold bit_convert into truncating store. --- Diffs of the changes: (+7 -1) fptoint.ll | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletion(-) Index: llvm/test/CodeGen/ARM/fptoint.ll diff -u llvm/test/CodeGen/ARM/fptoint.ll:1.2 llvm/test/CodeGen/ARM/fptoint.ll:1.3 --- llvm/test/CodeGen/ARM/fptoint.ll:1.2 Mon May 7 16:49:35 2007 +++ llvm/test/CodeGen/ARM/fptoint.ll Wed May 9 16:54:34 2007 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | llc -march=arm -mattr=+v6,+vfp2 | not grep fmrs +; RUN: llvm-as < %s | llc -march=arm -mattr=+v6,+vfp2 | grep fmrs | wc -l | grep 1 ; RUN: llvm-as < %s | llc -march=arm -mattr=+v6,+vfp2 | not grep fmrrd @i = weak global i32 0 ; [#uses=2] @@ -39,3 +39,9 @@ store i32 %tmp1, i32* @u ret void } + +define void @foo9(double %x) { + %tmp = fptoui double %x to i16 + store i16 %tmp, i16* null + ret void +} From reid at x10sys.com Wed May 9 17:05:55 2007 From: reid at x10sys.com (Reid Spencer) Date: Wed, 9 May 2007 17:05:55 -0500 Subject: [llvm-commits] CVS: llvm-www/DevMtgMay2007.html Message-ID: <200705092205.l49M5t76002034@zion.cs.uiuc.edu> Changes in directory llvm-www: DevMtgMay2007.html updated: 1.130 -> 1.131 --- Log message: Changes requested by Evan. --- Diffs of the changes: (+5 -6) DevMtgMay2007.html | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-) Index: llvm-www/DevMtgMay2007.html diff -u llvm-www/DevMtgMay2007.html:1.130 llvm-www/DevMtgMay2007.html:1.131 --- llvm-www/DevMtgMay2007.html:1.130 Wed May 9 00:22:49 2007 +++ llvm-www/DevMtgMay2007.html Wed May 9 17:05:36 2007 @@ -105,13 +105,12 @@ pass manager does and how to use it.
      10:5511:10Evan ChengLLVM Register Allocator. An overview - of the current register allocator design and changes to it that are - coming in the future.LLVM Code Generator. An overview of the LLVM generic code + generator design and changes to it that are coming in the future.
      11:1511:35Nick LewyckyIntroduction To Predicate Simplifier. A review of the design and - implementation of LLVM's Predicate Simplifier Pass, otherwise known + Introduction To Predicate Simplifier. A review of the design + and implementation of LLVM's Predicate Simplifier Pass, otherwise known as VRP (Value Range Propagation).
      Ryan BrownGoogle
      Evan ChengApple Inc.
      Jeff CohenIndependent
      Josh ConnerApple Inc.
      John CriswellUIUC
      Mike EnglerAdobe Systems Incorporated.
      Tomas EvensenWind River
      Nick LewyckyIndependent
      Efrem LipkinCoDesign
      Gabe McArthurIndependent
      Paul McJonesAdobe Systems Incorporated.
    + @@ -333,7 +334,7 @@
    Confirmed Attendees
    NameOrganization
    Paul McJonesAdobe Systems Incorporated.
    Scott MichelAerospace
    Dan MonizMatasano
    Alireza MoshtaghiMicrochip Technology
    -

    Total confirmed: 43

    +

    Total confirmed: 44

    @@ -353,6 +354,6 @@ src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!">Valid HTML 4.01! -
    Last modified: $Date: 2007/05/09 22:05:36 $ +
    Last modified: $Date: 2007/05/10 08:02:40 $ From asl at math.spbu.ru Thu May 10 03:27:03 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Thu, 10 May 2007 03:27:03 -0500 Subject: [llvm-commits] CVS: llvm/docs/ReleaseNotes.html Message-ID: <200705100827.l4A8R3Hj017187@zion.cs.uiuc.edu> Changes in directory llvm/docs: ReleaseNotes.html updated: 1.372 -> 1.373 --- Log message: These attributes are supported! --- Diffs of the changes: (+8 -9) ReleaseNotes.html | 17 ++++++++--------- 1 files changed, 8 insertions(+), 9 deletions(-) Index: llvm/docs/ReleaseNotes.html diff -u llvm/docs/ReleaseNotes.html:1.372 llvm/docs/ReleaseNotes.html:1.373 --- llvm/docs/ReleaseNotes.html:1.372 Wed May 9 14:31:58 2007 +++ llvm/docs/ReleaseNotes.html Thu May 10 03:26:24 2007 @@ -427,9 +427,9 @@ Declaring that functions have no side effects or that they can never return.
    - Supported:constructor, destructor, + Supported:alias, constructor, destructor, deprecated, fastcall, format, - format_arg, non_null, noreturn, + format_arg, non_null, noreturn, regparmsection, stdcall, unused, used, visibility, warn_unused_result, weak
    @@ -437,15 +437,14 @@ always_inline, pure, const, nothrow, malloc, no_instrument_function, cdecl
    - Unsupported:alias, regparm, all other target specific - attributes + Unsupported: All other target specific attributes
  • Variable Attributes: Specifying attributes of variables.
    - Supported: cleanup, common, nocommon, - deprecated, dllimport, dllexport, - section, transparent_union, unused, - used, weak
    + Supported: alias, cleanup, common, + nocommon, deprecated, dllimport, + dllexport, section, transparent_union, + unused, used, weak
    Unsupported: aligned, mode, packed, shared, tls_model, @@ -600,7 +599,7 @@ src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!" /> The LLVM Compiler Infrastructure
    - Last modified: $Date: 2007/05/09 19:31:58 $ + Last modified: $Date: 2007/05/10 08:26:24 $ From criswell at cs.uiuc.edu Thu May 10 09:39:10 2007 From: criswell at cs.uiuc.edu (John Criswell) Date: Thu, 10 May 2007 09:39:10 -0500 Subject: [llvm-commits] CVS: llvm-www/DevMtgMay2007.html Message-ID: <200705101439.JAA09091@choi.cs.uiuc.edu> Changes in directory llvm-www: DevMtgMay2007.html updated: 1.132 -> 1.133 --- Log message: Added a brief description of my talk. --- Diffs of the changes: (+3 -2) DevMtgMay2007.html | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) Index: llvm-www/DevMtgMay2007.html diff -u llvm-www/DevMtgMay2007.html:1.132 llvm-www/DevMtgMay2007.html:1.133 --- llvm-www/DevMtgMay2007.html:1.132 Thu May 10 03:02:40 2007 +++ llvm-www/DevMtgMay2007.html Thu May 10 09:38:27 2007 @@ -139,7 +139,8 @@ Processor Element.
  • - + - + - + + -
    Unconfirmed Attendees
    NameOrganization
    13:5014:10John CriswellUIUC Research. To be determined.Secure Virtual Architecture. A presentation on our research to create a virtual machine that operates below the operating system and enforces +security properties for all software, including the operating system.
    14:1014:30Jeff Cohen Using LLVM For The Jolt Compiler. Jeff will share his @@ -354,6 +355,6 @@ src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"> Valid HTML 4.01! -
    Last modified: $Date: 2007/05/10 08:02:40 $ +
    Last modified: $Date: 2007/05/10 14:38:27 $ From asl at math.spbu.ru Thu May 10 10:10:52 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Thu, 10 May 2007 10:10:52 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/DwarfWriter.cpp Message-ID: <200705101510.l4AFAqKp027889@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: DwarfWriter.cpp updated: 1.136 -> 1.137 --- Log message: TypeIds are indexed by j, not i --- Diffs of the changes: (+1 -1) DwarfWriter.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/CodeGen/DwarfWriter.cpp diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.136 llvm/lib/CodeGen/DwarfWriter.cpp:1.137 --- llvm/lib/CodeGen/DwarfWriter.cpp:1.136 Sat May 5 15:27:00 2007 +++ llvm/lib/CodeGen/DwarfWriter.cpp Thu May 10 10:10:34 2007 @@ -2948,7 +2948,7 @@ } else { // Gather the action sizes for (unsigned j = 0, M = TypeIds.size(); j != M; ++j) { - unsigned TypeID = TypeIds[i]; + unsigned TypeID = TypeIds[j]; unsigned SizeTypeID = Asm->SizeSLEB128(TypeID); signed Action = j ? -(SizeAction + SizeTypeID) : 0; SizeAction = SizeTypeID + Asm->SizeSLEB128(Action); From dpatel at apple.com Thu May 10 13:27:04 2007 From: dpatel at apple.com (Devang Patel) Date: Thu, 10 May 2007 11:27:04 -0700 Subject: [llvm-commits] beginning unroll improvements In-Reply-To: <20070509165030.GN17728@village.us.cray.com> References: <20070509165030.GN17728@village.us.cray.com> Message-ID: <427A7B3F-37C8-48D0-8ED7-D3012830F0EB@apple.com> Hi Dan, This looks good. Have you run any llvm-test benchmarks or any other benchmarks ? - Devang On May 9, 2007, at 9:50 AM, Dan Gohman wrote: > This patch extends the LoopUnroll pass to be able to unroll loops > with unknown trip counts. This is left off by default, and a > command-line option enables it. It also begins to separate loop > unrolling into a utility routine; eventually it might be made usable > from other passes. > > It currently works by inserting conditional branches between each > unrolled iteration, unless it proves that the trip count is a > multiple of a constant integer > 1, which it currently only does in > the rare case that the trip count expression is a Mul operator with > a ConstantInt operand. Eventually this information might be provided > by other sources, for example by a pass that peels/splits the loop > for this purpose. > > Dan > > -- > Dan Gohman, Cray Inc. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: patch.txt Url: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070510/dfaa2d27/attachment.txt -------------- next part -------------- > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From baldrick at free.fr Thu May 10 13:40:44 2007 From: baldrick at free.fr (Duncan Sands) Date: Thu, 10 May 2007 13:40:44 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/DwarfWriter.cpp Message-ID: <200705101840.l4AIeiW8017279@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: DwarfWriter.cpp updated: 1.137 -> 1.138 --- Log message: Later computations assume we are aligned at this point. --- Diffs of the changes: (+3 -2) DwarfWriter.cpp | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) Index: llvm/lib/CodeGen/DwarfWriter.cpp diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.137 llvm/lib/CodeGen/DwarfWriter.cpp:1.138 --- llvm/lib/CodeGen/DwarfWriter.cpp:1.137 Thu May 10 10:10:34 2007 +++ llvm/lib/CodeGen/DwarfWriter.cpp Thu May 10 13:40:24 2007 @@ -2979,12 +2979,13 @@ sizeof(int8_t) - // LPStart format sizeof(int8_t) - // TType format sizeof(int8_t); // TType base offset (NEED ULEB128) - + // Begin the exception table. Asm->SwitchToDataSection(TAI->getDwarfExceptionSection()); O << "GCC_except_table" << SubprogramCount << ":\n"; + Asm->EmitAlignment(2); EmitLabel("exception", SubprogramCount); - + // Emit the header. Asm->EmitInt8(DW_EH_PE_omit); Asm->EOL("LPStart format (DW_EH_PE_omit)"); From criswell at cs.uiuc.edu Thu May 10 16:23:56 2007 From: criswell at cs.uiuc.edu (John Criswell) Date: Thu, 10 May 2007 16:23:56 -0500 Subject: [llvm-commits] CVS: llvm-www/DevMtgMay2007.html Message-ID: <200705102123.QAA16269@choi.cs.uiuc.edu> Changes in directory llvm-www: DevMtgMay2007.html updated: 1.133 -> 1.134 --- Log message: Updated to my presentation abstract. --- Diffs of the changes: (+2 -3) DevMtgMay2007.html | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) Index: llvm-www/DevMtgMay2007.html diff -u llvm-www/DevMtgMay2007.html:1.133 llvm-www/DevMtgMay2007.html:1.134 --- llvm-www/DevMtgMay2007.html:1.133 Thu May 10 09:38:27 2007 +++ llvm-www/DevMtgMay2007.html Thu May 10 16:23:06 2007 @@ -139,8 +139,7 @@ Processor Element.
    13:5014:10John CriswellSecure Virtual Architecture. A presentation on our research to create a virtual machine that operates below the operating system and enforces -security properties for all software, including the operating system.Secure Virtual Architecture. A presentation on our research to create a virtual machine that operates below the operating system and some of the novel security capabilities that our architecture can enable.
    14:1014:30Jeff Cohen Using LLVM For The Jolt Compiler. Jeff will share his @@ -355,6 +354,6 @@ src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"> Valid HTML 4.01! -
    Last modified: $Date: 2007/05/10 14:38:27 $ +
    Last modified: $Date: 2007/05/10 21:23:06 $ From evan.cheng at apple.com Thu May 10 17:29:25 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 10 May 2007 17:29:25 -0500 Subject: [llvm-commits] CVS: llvm-test/Makefile.programs Message-ID: <200705102229.l4AMTPRN018440@zion.cs.uiuc.edu> Changes in directory llvm-test: Makefile.programs updated: 1.266 -> 1.267 --- Log message: For ARM / THUMB. Make llcbeta option --enable-tail-merge. --- Diffs of the changes: (+5 -1) Makefile.programs | 6 +++++- 1 files changed, 5 insertions(+), 1 deletion(-) Index: llvm-test/Makefile.programs diff -u llvm-test/Makefile.programs:1.266 llvm-test/Makefile.programs:1.267 --- llvm-test/Makefile.programs:1.266 Fri May 4 16:50:39 2007 +++ llvm-test/Makefile.programs Thu May 10 17:28:56 2007 @@ -242,7 +242,11 @@ LLCBETAOPTION := -enable-sparc-v9-insts endif ifeq ($(ARCH),ARM) -LLCBETAOPTION := -march=thumb +LLCBETAOPTION := --enable-tail-merge +#-march=thumb +endif +ifeq ($(ARCH),THUMB) +LLCBETAOPTION := --enable-tail-merge endif print-llcbeta-option: From asl at math.spbu.ru Thu May 10 17:35:23 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Thu, 10 May 2007 17:35:23 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineModuleInfo.h Message-ID: <200705102235.l4AMZNJW018549@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: MachineModuleInfo.h updated: 1.11 -> 1.12 --- Log message: Allow multiple invokes per landing pad. This (probably) fixes PR1410: http://llvm.org/PR1410 . --- Diffs of the changes: (+3 -4) MachineModuleInfo.h | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) Index: llvm/include/llvm/CodeGen/MachineModuleInfo.h diff -u llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.11 llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.12 --- llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.11 Sun May 6 08:37:16 2007 +++ llvm/include/llvm/CodeGen/MachineModuleInfo.h Thu May 10 17:34:59 2007 @@ -33,6 +33,7 @@ #include "llvm/Support/Dwarf.h" #include "llvm/Support/DataTypes.h" +#include "llvm/ADT/SmallVector.h" #include "llvm/ADT/UniqueVector.h" #include "llvm/GlobalValue.h" #include "llvm/Pass.h" @@ -955,8 +956,8 @@ /// struct LandingPadInfo { MachineBasicBlock *LandingPadBlock; // Landing pad block. - unsigned BeginLabel; // Label prior to invoke. - unsigned EndLabel; // Label after invoke. + SmallVector BeginLabels; // Labels prior to invoke. + SmallVector EndLabels; // Labels after invoke. unsigned LandingPadLabel; // Label at beginning of landing pad. Function *Personality; // Personality function. std::vector TypeIds; // List of type ids. @@ -965,8 +966,6 @@ LandingPadInfo(MachineBasicBlock *MBB) : LandingPadBlock(MBB) - , BeginLabel(0) - , EndLabel(0) , LandingPadLabel(0) , TypeIds() , IsFilter(false) From asl at math.spbu.ru Thu May 10 17:35:23 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Thu, 10 May 2007 17:35:23 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/DwarfWriter.cpp MachineModuleInfo.cpp Message-ID: <200705102235.l4AMZNI4018547@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: DwarfWriter.cpp updated: 1.138 -> 1.139 MachineModuleInfo.cpp updated: 1.9 -> 1.10 --- Log message: Allow multiple invokes per landing pad. This (probably) fixes PR1410: http://llvm.org/PR1410 . --- Diffs of the changes: (+75 -57) DwarfWriter.cpp | 103 ++++++++++++++++++++++++++------------------------ MachineModuleInfo.cpp | 29 ++++++++++---- 2 files changed, 75 insertions(+), 57 deletions(-) Index: llvm/lib/CodeGen/DwarfWriter.cpp diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.138 llvm/lib/CodeGen/DwarfWriter.cpp:1.139 --- llvm/lib/CodeGen/DwarfWriter.cpp:1.138 Thu May 10 13:40:24 2007 +++ llvm/lib/CodeGen/DwarfWriter.cpp Thu May 10 17:34:59 2007 @@ -2933,40 +2933,42 @@ const std::vector &TypeIds = LandingPad.TypeIds; unsigned SizeAction = 0; signed FirstAction; - - if (IsFilter) { - // FIXME - Assume there is only one filter typeinfo list per function - // time being. I.E., Each call to eh_filter will have the same list. - // This can change if a function is inlined. - Filter = &LandingPad; - SizeAction = Asm->SizeSLEB128(-1) + Asm->SizeSLEB128(0); - SizeSiteActions += SizeAction; - // Record the first action of the landing pad site. - FirstAction = SizeActions + SizeSiteActions - SizeAction + 1; - } else if (TypeIds.empty()) { - FirstAction = 0; - } else { - // Gather the action sizes - for (unsigned j = 0, M = TypeIds.size(); j != M; ++j) { - unsigned TypeID = TypeIds[j]; - unsigned SizeTypeID = Asm->SizeSLEB128(TypeID); - signed Action = j ? -(SizeAction + SizeTypeID) : 0; - SizeAction = SizeTypeID + Asm->SizeSLEB128(Action); + + for (unsigned j = 0, E = LandingPad.BeginLabels.size(); j != E; ++j) { + if (IsFilter) { + // FIXME - Assume there is only one filter typeinfo list per function + // time being. I.E., Each call to eh_filter will have the same list. + // This can change if a function is inlined. + Filter = &LandingPad; + SizeAction = Asm->SizeSLEB128(-1) + Asm->SizeSLEB128(0); SizeSiteActions += SizeAction; + // Record the first action of the landing pad site. + FirstAction = SizeActions + SizeSiteActions - SizeAction + 1; + } else if (TypeIds.empty()) { + FirstAction = 0; + } else { + // Gather the action sizes + for (unsigned k = 0, M = TypeIds.size(); k != M; ++k) { + unsigned TypeID = TypeIds[k]; + unsigned SizeTypeID = Asm->SizeSLEB128(TypeID); + signed Action = k ? -(SizeAction + SizeTypeID) : 0; + SizeAction = SizeTypeID + Asm->SizeSLEB128(Action); + SizeSiteActions += SizeAction; + } + + // Record the first action of the landing pad site. + FirstAction = SizeActions + SizeSiteActions - SizeAction + 1; } + + Actions.push_back(FirstAction); - // Record the first action of the landing pad site. - FirstAction = SizeActions + SizeSiteActions - SizeAction + 1; + // Compute this sites contribution to size. + SizeActions += SizeSiteActions; + SizeSites += sizeof(int32_t) + // Site start. + sizeof(int32_t) + // Site length. + sizeof(int32_t) + // Landing pad. + Asm->SizeSLEB128(FirstAction); // Action. } - - Actions.push_back(FirstAction); - - // Compute this sites contribution to size. - SizeActions += SizeSiteActions; - SizeSites += sizeof(int32_t) + // Site start. - sizeof(int32_t) + // Site length. - sizeof(int32_t) + // Landing pad. - Asm->SizeSLEB128(FirstAction); // Action. } // Final tallies. @@ -2998,30 +3000,33 @@ Asm->EmitULEB128Bytes(SizeSites); Asm->EOL("Call-site table length"); - // Emit the landng pad site information. + // Emit the landing pad site information. for (unsigned i = 0, N = LandingPads.size(); i != N; ++i) { const LandingPadInfo &LandingPad = LandingPads[i]; - EmitSectionOffset("label", "eh_func_begin", - LandingPad.BeginLabel, SubprogramCount, false, true); - Asm->EOL("Region start"); + for (unsigned j=0, E = LandingPad.BeginLabels.size(); j != E; ++j) { + EmitSectionOffset("label", "eh_func_begin", + LandingPad.BeginLabels[j], SubprogramCount, + false, true); + Asm->EOL("Region start"); - EmitDifference("label", LandingPad.EndLabel, - "label", LandingPad.BeginLabel); - Asm->EOL("Region length"); + EmitDifference("label", LandingPad.EndLabels[j], + "label", LandingPad.BeginLabels[j]); + Asm->EOL("Region length"); - if (LandingPad.TypeIds.empty()) { - if (TAI->getAddressSize() == sizeof(int32_t)) - Asm->EmitInt32(0); - else - Asm->EmitInt64(0); - } else { - EmitSectionOffset("label", "eh_func_begin", LandingPad.LandingPadLabel, - SubprogramCount, false, true); - } - Asm->EOL("Landing pad"); + if (LandingPad.TypeIds.empty()) { + if (TAI->getAddressSize() == sizeof(int32_t)) + Asm->EmitInt32(0); + else + Asm->EmitInt64(0); + } else { + EmitSectionOffset("label", "eh_func_begin", LandingPad.LandingPadLabel, + SubprogramCount, false, true); + } + Asm->EOL("Landing pad"); - Asm->EmitULEB128Bytes(Actions[i]); - Asm->EOL("Action"); + Asm->EmitULEB128Bytes(Actions[i]); + Asm->EOL("Action"); + } } // Emit the actions. Index: llvm/lib/CodeGen/MachineModuleInfo.cpp diff -u llvm/lib/CodeGen/MachineModuleInfo.cpp:1.9 llvm/lib/CodeGen/MachineModuleInfo.cpp:1.10 --- llvm/lib/CodeGen/MachineModuleInfo.cpp:1.9 Wed May 2 20:11:53 2007 +++ llvm/lib/CodeGen/MachineModuleInfo.cpp Thu May 10 17:34:59 2007 @@ -1669,8 +1669,8 @@ void MachineModuleInfo::addInvoke(MachineBasicBlock *LandingPad, unsigned BeginLabel, unsigned EndLabel) { LandingPadInfo &LP = getOrCreateLandingPadInfo(LandingPad); - if (!LP.BeginLabel) LP.BeginLabel = BeginLabel; - LP.EndLabel = EndLabel; + LP.BeginLabels.push_back(BeginLabel); + LP.EndLabels.push_back(EndLabel); } /// addLandingPad - Provide the label of a try LandingPad block. @@ -1711,16 +1711,29 @@ void MachineModuleInfo::TidyLandingPads() { for (unsigned i = 0; i != LandingPads.size(); ) { LandingPadInfo &LandingPad = LandingPads[i]; - LandingPad.BeginLabel = MappedLabel(LandingPad.BeginLabel); - LandingPad.EndLabel = MappedLabel(LandingPad.EndLabel); LandingPad.LandingPadLabel = MappedLabel(LandingPad.LandingPadLabel); - - if (!LandingPad.BeginLabel || - !LandingPad.EndLabel || - !LandingPad.LandingPadLabel) { + + if (!LandingPad.LandingPadLabel) { LandingPads.erase(LandingPads.begin() + i); continue; } + + for (unsigned j=0; j != LandingPads[i].BeginLabels.size(); ) { + unsigned BeginLabel = MappedLabel(LandingPad.BeginLabels[j]); + unsigned EndLabel = MappedLabel(LandingPad.EndLabels[j]); + + + if (!BeginLabel || !EndLabel) { + printf("Tidy: %d, %d, %d\n", BeginLabel, EndLabel, LandingPad.LandingPadLabel); + LandingPad.BeginLabels.erase(LandingPad.BeginLabels.begin() + j); + LandingPad.EndLabels.erase(LandingPad.EndLabels.begin() + j); + continue; + } + + LandingPad.BeginLabels[j] = BeginLabel; + LandingPad.EndLabels[j] = EndLabel; + ++j; + } ++i; } From asl at math.spbu.ru Thu May 10 17:39:06 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Thu, 10 May 2007 17:39:06 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/MachineModuleInfo.cpp Message-ID: <200705102239.l4AMd6Uk018650@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: MachineModuleInfo.cpp updated: 1.10 -> 1.11 --- Log message: Ooops. Some debugging stuff :) --- Diffs of the changes: (+0 -1) MachineModuleInfo.cpp | 1 - 1 files changed, 1 deletion(-) Index: llvm/lib/CodeGen/MachineModuleInfo.cpp diff -u llvm/lib/CodeGen/MachineModuleInfo.cpp:1.10 llvm/lib/CodeGen/MachineModuleInfo.cpp:1.11 --- llvm/lib/CodeGen/MachineModuleInfo.cpp:1.10 Thu May 10 17:34:59 2007 +++ llvm/lib/CodeGen/MachineModuleInfo.cpp Thu May 10 17:38:46 2007 @@ -1724,7 +1724,6 @@ if (!BeginLabel || !EndLabel) { - printf("Tidy: %d, %d, %d\n", BeginLabel, EndLabel, LandingPad.LandingPadLabel); LandingPad.BeginLabels.erase(LandingPad.BeginLabels.begin() + j); LandingPad.EndLabels.erase(LandingPad.EndLabels.begin() + j); continue; From dalej at apple.com Thu May 10 18:59:41 2007 From: dalej at apple.com (Dale Johannesen) Date: Thu, 10 May 2007 18:59:41 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/BranchFolding.cpp Message-ID: <200705102359.l4ANxff6002219@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: BranchFolding.cpp updated: 1.51 -> 1.52 --- Log message: Do not generate branches to entry block. This fixes several test suite failures on PPC (can happen only when prologue code is null) --- Diffs of the changes: (+19 -4) BranchFolding.cpp | 23 +++++++++++++++++++---- 1 files changed, 19 insertions(+), 4 deletions(-) Index: llvm/lib/CodeGen/BranchFolding.cpp diff -u llvm/lib/CodeGen/BranchFolding.cpp:1.51 llvm/lib/CodeGen/BranchFolding.cpp:1.52 --- llvm/lib/CodeGen/BranchFolding.cpp:1.51 Wed May 9 20:01:49 2007 +++ llvm/lib/CodeGen/BranchFolding.cpp Thu May 10 18:59:23 2007 @@ -338,6 +338,14 @@ MachineBasicBlock::iterator MBB2I, const TargetInstrInfo *TII, MachineBasicBlock *PredBB) { + // If one block is the entry block, split the other one; we can't generate + // a branch to the entry block, as its label is not emitted. + MachineBasicBlock *Entry = MBB1->getParent()->begin(); + if (MBB1 == Entry) + return false; + if (MBB2 == Entry) + return true; + // If one block falls through into the common successor, choose that // one to split; it is one instruction less to do that. if (PredBB) { @@ -456,8 +464,14 @@ MachineBasicBlock *MBB2 = (MergePotentials.end()-2)->second; // If neither block is the entire common tail, split the tail of one block - // to make it redundant with the other tail. - if (CurMBB->begin() != BBI1 && MBB2->begin() != BBI2) { + // to make it redundant with the other tail. Also, we cannot jump to the + // entry block, so if one block is the entry block, split the other one. + MachineBasicBlock *Entry = CurMBB->getParent()->begin(); + if (CurMBB->begin() == BBI1 && CurMBB != Entry) + ; // CurMBB is common tail + else if (MBB2->begin() == BBI2 && MBB2 != Entry) + ; // MBB2 is common tail + else { if (0) { // Enable this to disable partial tail merges. MergePotentials.pop_back(); continue; @@ -475,13 +489,14 @@ } } - if (MBB2->begin() == BBI2) { + if (MBB2->begin() == BBI2 && MBB2 != Entry) { // Hack the end off CurMBB, making it jump to MBBI@ instead. ReplaceTailWithBranchTo(BBI1, MBB2); // This modifies CurMBB, so remove it from the worklist. MergePotentials.pop_back(); } else { - assert(CurMBB->begin() == BBI1 && "Didn't split block correctly?"); + assert(CurMBB->begin() == BBI1 && CurMBB != Entry && + "Didn't split block correctly?"); // Hack the end off MBB2, making it jump to CurMBB instead. ReplaceTailWithBranchTo(BBI2, CurMBB); // This modifies MBB2, so remove it from the worklist. From sabre at nondot.org Thu May 10 19:00:45 2007 From: sabre at nondot.org (Chris Lattner) Date: Thu, 10 May 2007 19:00:45 -0500 Subject: [llvm-commits] CVS: llvm/lib/System/Unix/MappedFile.inc Message-ID: <200705110000.l4B00jY9002271@zion.cs.uiuc.edu> Changes in directory llvm/lib/System/Unix: MappedFile.inc updated: 1.19 -> 1.20 --- Log message: Fix a bug where the bcreader could crash on .bc files that were an exact multiple of the page size, due to a bug in MappedFile --- Diffs of the changes: (+1 -0) MappedFile.inc | 1 + 1 files changed, 1 insertion(+) Index: llvm/lib/System/Unix/MappedFile.inc diff -u llvm/lib/System/Unix/MappedFile.inc:1.19 llvm/lib/System/Unix/MappedFile.inc:1.20 --- llvm/lib/System/Unix/MappedFile.inc:1.19 Thu Mar 29 14:11:22 2007 +++ llvm/lib/System/Unix/MappedFile.inc Thu May 10 19:00:27 2007 @@ -78,6 +78,7 @@ if (options_ & WRITE_ACCESS) ::msync(base_, info_->Size, MS_SYNC); ::munmap(base_, info_->Size); + base_ = 0; // Mark this as non-mapped. } } From sabre at nondot.org Thu May 10 19:43:44 2007 From: sabre at nondot.org (Chris Lattner) Date: Thu, 10 May 2007 19:43:44 -0500 Subject: [llvm-commits] CVS: llvm/lib/Support/MemoryBuffer.cpp Message-ID: <200705110043.l4B0hiOO003470@zion.cs.uiuc.edu> Changes in directory llvm/lib/Support: MemoryBuffer.cpp updated: 1.6 -> 1.7 --- Log message: fix a memory leak --- Diffs of the changes: (+1 -1) MemoryBuffer.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Support/MemoryBuffer.cpp diff -u llvm/lib/Support/MemoryBuffer.cpp:1.6 llvm/lib/Support/MemoryBuffer.cpp:1.7 --- llvm/lib/Support/MemoryBuffer.cpp:1.6 Mon May 7 10:21:46 2007 +++ llvm/lib/Support/MemoryBuffer.cpp Thu May 10 19:43:26 2007 @@ -39,7 +39,7 @@ BufferEnd = BufferStart+Size; memcpy(const_cast(BufferStart), BufStart, Size); *const_cast(BufferEnd) = 0; // Null terminate buffer. - MustDeleteBuffer = false; + MustDeleteBuffer = true; } /// init - Initialize this MemoryBuffer as a reference to externally allocated From dpatel at apple.com Thu May 10 19:46:16 2007 From: dpatel at apple.com (Devang Patel) Date: Thu, 10 May 2007 19:46:16 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/LoopUnswitch/2007-05-09-Unreachable.ll 2007-05-09-tl.ll Message-ID: <200705110046.l4B0kG25003554@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/LoopUnswitch: 2007-05-09-Unreachable.ll updated: 1.1 -> 1.2 2007-05-09-tl.ll updated: 1.1 -> 1.2 --- Log message: Drop ModuleID from comment. --- Diffs of the changes: (+2 -2) 2007-05-09-Unreachable.ll | 2 +- 2007-05-09-tl.ll | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/test/Transforms/LoopUnswitch/2007-05-09-Unreachable.ll diff -u llvm/test/Transforms/LoopUnswitch/2007-05-09-Unreachable.ll:1.1 llvm/test/Transforms/LoopUnswitch/2007-05-09-Unreachable.ll:1.2 --- llvm/test/Transforms/LoopUnswitch/2007-05-09-Unreachable.ll:1.1 Wed May 9 03:08:46 2007 +++ llvm/test/Transforms/LoopUnswitch/2007-05-09-Unreachable.ll Thu May 10 19:45:58 2007 @@ -1,5 +1,5 @@ +; PR1333 ; RUN: llvm-upgrade < %s | llvm-as | opt -loop-unswitch -disable-output -; ModuleID = 'PR1333.bc' target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64" target triple = "i686-pc-linux-gnu" %struct.ada__streams__root_stream_type = type { %struct.ada__tags__dispatch_table* } Index: llvm/test/Transforms/LoopUnswitch/2007-05-09-tl.ll diff -u llvm/test/Transforms/LoopUnswitch/2007-05-09-tl.ll:1.1 llvm/test/Transforms/LoopUnswitch/2007-05-09-tl.ll:1.2 --- llvm/test/Transforms/LoopUnswitch/2007-05-09-tl.ll:1.1 Wed May 9 03:19:24 2007 +++ llvm/test/Transforms/LoopUnswitch/2007-05-09-tl.ll Thu May 10 19:45:58 2007 @@ -1,5 +1,5 @@ +; PR1333 ; RUN: llvm-as < %s | opt -loop-unswitch -disable-output -; ModuleID = 'PR1333-2.bc' define void @pp_cxx_expression() { entry: From sabre at nondot.org Fri May 11 00:55:56 2007 From: sabre at nondot.org (Chris Lattner) Date: Fri, 11 May 2007 00:55:56 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/InstCombine/2007-05-10-icmp-or.ll Message-ID: <200705110555.l4B5tuAC008847@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/InstCombine: 2007-05-10-icmp-or.ll added (r1.1) --- Log message: new testcase that crashes instcombine --- Diffs of the changes: (+8 -0) 2007-05-10-icmp-or.ll | 8 ++++++++ 1 files changed, 8 insertions(+) Index: llvm/test/Transforms/InstCombine/2007-05-10-icmp-or.ll diff -c /dev/null llvm/test/Transforms/InstCombine/2007-05-10-icmp-or.ll:1.1 *** /dev/null Fri May 11 00:55:48 2007 --- llvm/test/Transforms/InstCombine/2007-05-10-icmp-or.ll Fri May 11 00:55:38 2007 *************** *** 0 **** --- 1,8 ---- + ; RUN: llvm-as < %s | opt -instcombine -disable-output + define i1 @test(i32 %tmp9) { + %tmp20 = icmp ugt i32 %tmp9, 255 ; [#uses=1] + %tmp11.not = icmp sgt i32 %tmp9, 255 ; [#uses=1] + %bothcond = or i1 %tmp20, %tmp11.not ; [#uses=1] + ret i1 %bothcond + } + From sabre at nondot.org Fri May 11 00:56:14 2007 From: sabre at nondot.org (Chris Lattner) Date: Fri, 11 May 2007 00:56:14 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200705110556.l4B5uEI0008861@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.762 -> 1.763 --- Log message: fix Transforms/InstCombine/2007-05-10-icmp-or.ll --- Diffs of the changes: (+10 -5) InstructionCombining.cpp | 15 ++++++++++----- 1 files changed, 10 insertions(+), 5 deletions(-) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.762 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.763 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.762 Sun May 6 08:37:16 2007 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Fri May 11 00:55:56 2007 @@ -3919,13 +3919,18 @@ LHSCC != ICmpInst::ICMP_UGE && LHSCC != ICmpInst::ICMP_ULE && RHSCC != ICmpInst::ICMP_UGE && RHSCC != ICmpInst::ICMP_ULE && LHSCC != ICmpInst::ICMP_SGE && LHSCC != ICmpInst::ICMP_SLE && - RHSCC != ICmpInst::ICMP_SGE && RHSCC != ICmpInst::ICMP_SLE) { + RHSCC != ICmpInst::ICMP_SGE && RHSCC != ICmpInst::ICMP_SLE && + // We can't fold (ugt x, C) | (sgt x, C2). + PredicatesFoldable(LHSCC, RHSCC)) { // Ensure that the larger constant is on the RHS. - ICmpInst::Predicate GT = ICmpInst::isSignedPredicate(LHSCC) ? - ICmpInst::ICMP_SGT : ICmpInst::ICMP_UGT; - Constant *Cmp = ConstantExpr::getICmp(GT, LHSCst, RHSCst); ICmpInst *LHS = cast(Op0); - if (cast(Cmp)->getZExtValue()) { + bool NeedsSwap; + if (ICmpInst::isSignedPredicate(LHSCC)) + NeedsSwap = LHSCst->getValue().sgt(LHSCst->getValue()); + else + NeedsSwap = LHSCst->getValue().ugt(LHSCst->getValue()); + + if (NeedsSwap) { std::swap(LHS, RHS); std::swap(LHSCst, RHSCst); std::swap(LHSCC, RHSCC); From reid at x10sys.com Fri May 11 01:47:34 2007 From: reid at x10sys.com (Reid Spencer) Date: Fri, 11 May 2007 01:47:34 -0500 Subject: [llvm-commits] CVS: llvm/test/Makefile Message-ID: <200705110647.l4B6lY6a009685@zion.cs.uiuc.edu> Changes in directory llvm/test: Makefile updated: 1.102 -> 1.103 --- Log message: For PR1411: http://llvm.org/PR1411 : Don't try to use {} bracketing when setting a variable in site.exp --- Diffs of the changes: (+3 -3) Makefile | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Index: llvm/test/Makefile diff -u llvm/test/Makefile:1.102 llvm/test/Makefile:1.103 --- llvm/test/Makefile:1.102 Sat Apr 21 16:43:18 2007 +++ llvm/test/Makefile Fri May 11 01:47:16 2007 @@ -82,9 +82,9 @@ @echo 'set objdir "$(LLVM_OBJ_ROOT)/test"' >>site.tmp @echo 'set gccpath "$(CC)"' >>site.tmp @echo 'set gxxpath "$(CXX)"' >>site.tmp - @echo 'set compile_c {$(CC) $(CPP.Flags) $(C.Flags) $(CompileCommonOpts) -c } ' >>site.tmp - @echo 'set compile_cxx {$(CXX) $(CPP.Flags) $(CXX.Flags) $(CompileCommonOpts) - c}' >> site.tmp - @echo 'set link {$(CXX) $(CPP.Flags) $(CXX.Flags) $(CompileCommonOpts) $(LD.Flags)}' >>site.tmp + @echo 'set compile_c "$(CC) $(CPP.Flags) $(C.Flags) $(CompileCommonOpts) -c "' >>site.tmp + @echo 'set compile_cxx "$(CXX) $(CPP.Flags) $(CXX.Flags) $(CompileCommonOpts) - c"' >> site.tmp + @echo 'set link "$(CXX) $(CPP.Flags) $(CXX.Flags) $(CompileCommonOpts) $(LD.Flags)"' >>site.tmp @echo 'set llvmgcc "$(LLVMGCC)"' >> site.tmp @echo 'set llvmgxx "$(LLVMGCC)"' >> site.tmp @echo 'set llvmgccmajvers "$(LLVMGCC_MAJVERS)"' >> site.tmp From sabre at nondot.org Fri May 11 02:26:04 2007 From: sabre at nondot.org (Chris Lattner) Date: Fri, 11 May 2007 02:26:04 -0500 Subject: [llvm-commits] CVS: llvm-test/SingleSource/UnitTests/Vector/Altivec/Makefile Message-ID: <200705110726.l4B7Q4F3019562@zion.cs.uiuc.edu> Changes in directory llvm-test/SingleSource/UnitTests/Vector/Altivec: Makefile updated: 1.2 -> 1.3 --- Log message: disable vector tests for the CBE, which doesn't support vectors (PR1126: http://llvm.org/PR1126 ) --- Diffs of the changes: (+3 -0) Makefile | 3 +++ 1 files changed, 3 insertions(+) Index: llvm-test/SingleSource/UnitTests/Vector/Altivec/Makefile diff -u llvm-test/SingleSource/UnitTests/Vector/Altivec/Makefile:1.2 llvm-test/SingleSource/UnitTests/Vector/Altivec/Makefile:1.3 --- llvm-test/SingleSource/UnitTests/Vector/Altivec/Makefile:1.2 Tue Jun 6 19:05:16 2006 +++ llvm-test/SingleSource/UnitTests/Vector/Altivec/Makefile Fri May 11 02:25:17 2007 @@ -4,5 +4,8 @@ LEVEL = ../../../.. include $(LEVEL)/SingleSource/Makefile.singlesrc +# FIXME: CBE doesn't support vectors: PR1126 +DISABLE_CBE=1 + TARGET_FLAGS += -maltivec LCCFLAGS += -maltivec From sabre at nondot.org Fri May 11 02:26:04 2007 From: sabre at nondot.org (Chris Lattner) Date: Fri, 11 May 2007 02:26:04 -0500 Subject: [llvm-commits] CVS: llvm-test/SingleSource/UnitTests/Vector/Makefile Message-ID: <200705110726.l4B7Q4sZ019561@zion.cs.uiuc.edu> Changes in directory llvm-test/SingleSource/UnitTests/Vector: Makefile updated: 1.3 -> 1.4 --- Log message: disable vector tests for the CBE, which doesn't support vectors (PR1126: http://llvm.org/PR1126 ) --- Diffs of the changes: (+3 -0) Makefile | 3 +++ 1 files changed, 3 insertions(+) Index: llvm-test/SingleSource/UnitTests/Vector/Makefile diff -u llvm-test/SingleSource/UnitTests/Vector/Makefile:1.3 llvm-test/SingleSource/UnitTests/Vector/Makefile:1.4 --- llvm-test/SingleSource/UnitTests/Vector/Makefile:1.3 Mon Apr 3 19:47:54 2006 +++ llvm-test/SingleSource/UnitTests/Vector/Makefile Fri May 11 02:25:16 2007 @@ -13,6 +13,9 @@ DIRS += SSE endif +# FIXME: CBE doesn't support vectors yet: PR1126 +DISABLE_CBE=1 + include $(LEVEL)/SingleSource/Makefile.singlesrc From sabre at nondot.org Fri May 11 02:26:05 2007 From: sabre at nondot.org (Chris Lattner) Date: Fri, 11 May 2007 02:26:05 -0500 Subject: [llvm-commits] CVS: llvm-test/SingleSource/UnitTests/Vector/SSE/Makefile Message-ID: <200705110726.l4B7Q5ro019570@zion.cs.uiuc.edu> Changes in directory llvm-test/SingleSource/UnitTests/Vector/SSE: Makefile updated: 1.4 -> 1.5 --- Log message: disable vector tests for the CBE, which doesn't support vectors (PR1126: http://llvm.org/PR1126 ) --- Diffs of the changes: (+1 -1) Makefile | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm-test/SingleSource/UnitTests/Vector/SSE/Makefile diff -u llvm-test/SingleSource/UnitTests/Vector/SSE/Makefile:1.4 llvm-test/SingleSource/UnitTests/Vector/SSE/Makefile:1.5 --- llvm-test/SingleSource/UnitTests/Vector/SSE/Makefile:1.4 Tue Oct 17 13:23:16 2006 +++ llvm-test/SingleSource/UnitTests/Vector/SSE/Makefile Fri May 11 02:25:17 2007 @@ -5,7 +5,7 @@ FP_TOLERANCE := 0.016 ### FIXME: We have disabled CBE here because it doesn't grok the vector -### FIXME: instructions yet. +### FIXME: instructions yet: PR1126 DISABLE_CBE := 1 include $(LEVEL)/SingleSource/Makefile.singlesrc From asl at math.spbu.ru Fri May 11 03:24:16 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Fri, 11 May 2007 03:24:16 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/DwarfWriter.cpp Message-ID: <200705110824.l4B8OGjS020614@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: DwarfWriter.cpp updated: 1.139 -> 1.140 --- Log message: Fix action No calculation in multiple-invoke-one-LP mode --- Diffs of the changes: (+31 -31) DwarfWriter.cpp | 62 ++++++++++++++++++++++++++++---------------------------- 1 files changed, 31 insertions(+), 31 deletions(-) Index: llvm/lib/CodeGen/DwarfWriter.cpp diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.139 llvm/lib/CodeGen/DwarfWriter.cpp:1.140 --- llvm/lib/CodeGen/DwarfWriter.cpp:1.139 Thu May 10 17:34:59 2007 +++ llvm/lib/CodeGen/DwarfWriter.cpp Fri May 11 03:23:57 2007 @@ -2934,41 +2934,41 @@ unsigned SizeAction = 0; signed FirstAction; - for (unsigned j = 0, E = LandingPad.BeginLabels.size(); j != E; ++j) { - if (IsFilter) { - // FIXME - Assume there is only one filter typeinfo list per function - // time being. I.E., Each call to eh_filter will have the same list. - // This can change if a function is inlined. - Filter = &LandingPad; - SizeAction = Asm->SizeSLEB128(-1) + Asm->SizeSLEB128(0); + if (IsFilter) { + // FIXME - Assume there is only one filter typeinfo list per function + // time being. I.E., Each call to eh_filter will have the same list. + // This can change if a function is inlined. + Filter = &LandingPad; + SizeAction = Asm->SizeSLEB128(-1) + Asm->SizeSLEB128(0); + SizeSiteActions += SizeAction; + // Record the first action of the landing pad site. + FirstAction = SizeActions + SizeSiteActions - SizeAction + 1; + } else if (TypeIds.empty()) { + FirstAction = 0; + } else { + // Gather the action sizes + for (unsigned j = 0, M = TypeIds.size(); j != M; ++j) { + unsigned TypeID = TypeIds[j]; + unsigned SizeTypeID = Asm->SizeSLEB128(TypeID); + signed Action = j ? -(SizeAction + SizeTypeID) : 0; + SizeAction = SizeTypeID + Asm->SizeSLEB128(Action); SizeSiteActions += SizeAction; - // Record the first action of the landing pad site. - FirstAction = SizeActions + SizeSiteActions - SizeAction + 1; - } else if (TypeIds.empty()) { - FirstAction = 0; - } else { - // Gather the action sizes - for (unsigned k = 0, M = TypeIds.size(); k != M; ++k) { - unsigned TypeID = TypeIds[k]; - unsigned SizeTypeID = Asm->SizeSLEB128(TypeID); - signed Action = k ? -(SizeAction + SizeTypeID) : 0; - SizeAction = SizeTypeID + Asm->SizeSLEB128(Action); - SizeSiteActions += SizeAction; - } - - // Record the first action of the landing pad site. - FirstAction = SizeActions + SizeSiteActions - SizeAction + 1; } - - Actions.push_back(FirstAction); - // Compute this sites contribution to size. - SizeActions += SizeSiteActions; - SizeSites += sizeof(int32_t) + // Site start. - sizeof(int32_t) + // Site length. - sizeof(int32_t) + // Landing pad. - Asm->SizeSLEB128(FirstAction); // Action. + // Record the first action of the landing pad site. + FirstAction = SizeActions + SizeSiteActions - SizeAction + 1; } + + unsigned M = LandingPad.BeginLabels.size(); + for (unsigned j = 0; j!=M; ++j) + Actions.push_back(FirstAction); + + // Compute this sites contribution to size. + SizeActions += SizeSiteActions*M; + SizeSites += M*(sizeof(int32_t) + // Site start. + sizeof(int32_t) + // Site length. + sizeof(int32_t) + // Landing pad. + Asm->SizeSLEB128(FirstAction)); // Action. } // Final tallies. From asl at math.spbu.ru Fri May 11 03:47:53 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Fri, 11 May 2007 03:47:53 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/DwarfWriter.cpp Message-ID: <200705110847.l4B8lrJq021007@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: DwarfWriter.cpp updated: 1.140 -> 1.141 --- Log message: Perform correct actions numbers/sizes computation --- Diffs of the changes: (+3 -5) DwarfWriter.cpp | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-) Index: llvm/lib/CodeGen/DwarfWriter.cpp diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.140 llvm/lib/CodeGen/DwarfWriter.cpp:1.141 --- llvm/lib/CodeGen/DwarfWriter.cpp:1.140 Fri May 11 03:23:57 2007 +++ llvm/lib/CodeGen/DwarfWriter.cpp Fri May 11 03:47:35 2007 @@ -2958,13 +2958,11 @@ // Record the first action of the landing pad site. FirstAction = SizeActions + SizeSiteActions - SizeAction + 1; } - - unsigned M = LandingPad.BeginLabels.size(); - for (unsigned j = 0; j!=M; ++j) - Actions.push_back(FirstAction); + Actions.push_back(FirstAction); // Compute this sites contribution to size. - SizeActions += SizeSiteActions*M; + SizeActions += SizeSiteActions; + unsigned M = LandingPad.BeginLabels.size(); SizeSites += M*(sizeof(int32_t) + // Site start. sizeof(int32_t) + // Site length. sizeof(int32_t) + // Landing pad. From criswell at cs.uiuc.edu Fri May 11 10:31:59 2007 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri, 11 May 2007 10:31:59 -0500 Subject: [llvm-commits] CVS: llvm-www/DevMtgMay2007.html Message-ID: <200705111531.KAA19077@choi.cs.uiuc.edu> Changes in directory llvm-www: DevMtgMay2007.html updated: 1.134 -> 1.135 --- Log message: Update abstract. --- Diffs of the changes: (+2 -2) DevMtgMay2007.html | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm-www/DevMtgMay2007.html diff -u llvm-www/DevMtgMay2007.html:1.134 llvm-www/DevMtgMay2007.html:1.135 --- llvm-www/DevMtgMay2007.html:1.134 Thu May 10 16:23:06 2007 +++ llvm-www/DevMtgMay2007.html Fri May 11 10:31:18 2007 @@ -139,7 +139,7 @@ Processor Element.
    13:5014:10John CriswellSecure Virtual Architecture. A presentation on our research to create a virtual machine that operates below the operating system and some of the novel security capabilities that our architecture can enable.Secure Virtual Architecture. A presentation on our research to create a virtual machine that operates below the operating system and a brief introduction to some of the novel security capabilities that our architecture can enable.
    14:1014:30Jeff Cohen Using LLVM For The Jolt Compiler. Jeff will share his @@ -354,6 +354,6 @@ src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"> Valid HTML 4.01! -
    Last modified: $Date: 2007/05/10 21:23:06 $ +
    Last modified: $Date: 2007/05/11 15:31:18 $ From sabre at nondot.org Fri May 11 11:59:05 2007 From: sabre at nondot.org (Chris Lattner) Date: Fri, 11 May 2007 11:59:05 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200705111659.l4BGx5vh030464@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.763 -> 1.764 --- Log message: fix regressions from my previous checking, including Transforms/InstCombine/2006-12-08-ICmp-Combining.ll --- Diffs of the changes: (+2 -2) InstructionCombining.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.763 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.764 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.763 Fri May 11 00:55:56 2007 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Fri May 11 11:58:45 2007 @@ -3926,9 +3926,9 @@ ICmpInst *LHS = cast(Op0); bool NeedsSwap; if (ICmpInst::isSignedPredicate(LHSCC)) - NeedsSwap = LHSCst->getValue().sgt(LHSCst->getValue()); + NeedsSwap = LHSCst->getValue().sgt(RHSCst->getValue()); else - NeedsSwap = LHSCst->getValue().ugt(LHSCst->getValue()); + NeedsSwap = LHSCst->getValue().ugt(RHSCst->getValue()); if (NeedsSwap) { std::swap(LHS, RHS); From djg at cray.com Fri May 11 13:30:17 2007 From: djg at cray.com (Dan Gohman) Date: Fri, 11 May 2007 13:30:17 -0500 Subject: [llvm-commits] beginning unroll improvements Message-ID: <20070511183017.GM17728@village.us.cray.com> Devang Patel wrote: > This looks good. Have you run any llvm-test > benchmarks or any other benchmarks ? I'm not currently planning to make loop-unroll unroll anything more by default than what it currently does, so I don't expect llvm-test to be affected. Dan -- Dan Gohman, Cray Inc. From reid at x10sys.com Fri May 11 13:44:58 2007 From: reid at x10sys.com (Reid Spencer) Date: Fri, 11 May 2007 13:44:58 -0500 Subject: [llvm-commits] CVS: llvm-www/DevMtgMay2007.html Message-ID: <200705111844.l4BIiwrV009519@zion.cs.uiuc.edu> Changes in directory llvm-www: DevMtgMay2007.html updated: 1.135 -> 1.136 --- Log message: Add Tanya. --- Diffs of the changes: (+3 -2) DevMtgMay2007.html | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) Index: llvm-www/DevMtgMay2007.html diff -u llvm-www/DevMtgMay2007.html:1.135 llvm-www/DevMtgMay2007.html:1.136 --- llvm-www/DevMtgMay2007.html:1.135 Fri May 11 10:31:18 2007 +++ llvm-www/DevMtgMay2007.html Fri May 11 13:44:38 2007 @@ -297,17 +297,18 @@
    Dale JohannesenApple Inc.
    Christopher LambAgeia Technologies, Inc.
    Chris LattnerApple Inc.
    Tanya LattnerIndependent
    Andrew LenharthUIUC
    Julien LerougeApple Inc.
    Nick LewyckyIndependent
    Efrem LipkinCoDesign
    Gabe McArthurIndependent
    + @@ -354,6 +355,6 @@ src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!">Valid HTML 4.01! -
    Last modified: $Date: 2007/05/11 15:31:18 $ +
    Last modified: $Date: 2007/05/11 18:44:38 $ From reid at x10sys.com Fri May 11 14:10:31 2007 From: reid at x10sys.com (Reid Spencer) Date: Fri, 11 May 2007 14:10:31 -0500 Subject: [llvm-commits] CVS: llvm-www/DevMtgMay2007.html Message-ID: <200705111910.l4BJAVV0027911@zion.cs.uiuc.edu> Changes in directory llvm-www: DevMtgMay2007.html updated: 1.136 -> 1.137 --- Log message: Update total too. --- Diffs of the changes: (+2 -2) DevMtgMay2007.html | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm-www/DevMtgMay2007.html diff -u llvm-www/DevMtgMay2007.html:1.136 llvm-www/DevMtgMay2007.html:1.137 --- llvm-www/DevMtgMay2007.html:1.136 Fri May 11 13:44:38 2007 +++ llvm-www/DevMtgMay2007.html Fri May 11 14:10:13 2007 @@ -335,7 +335,7 @@
    Confirmed Attendees
    NameOrganization
    Gabe McArthurIndependent
    Paul McJonesAdobe Systems Incorporated.
    Scott MichelAerospace
    Dan MonizMatasano
    -

    Total confirmed: 44

    +

    Total confirmed: 45

    @@ -355,6 +355,6 @@ src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!">Valid HTML 4.01! -
    Last modified: $Date: 2007/05/11 18:44:38 $ +
    Last modified: $Date: 2007/05/11 19:10:13 $ From djg at cray.com Fri May 11 15:54:01 2007 From: djg at cray.com (Dan Gohman) Date: Fri, 11 May 2007 15:54:01 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnroll.cpp Message-ID: <200705112054.l4BKs1I1013229@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: LoopUnroll.cpp updated: 1.46 -> 1.47 --- Log message: This patch extends the LoopUnroll pass to be able to unroll loops with unknown trip counts. This is left off by default, and a command-line option enables it. It also begins to separate loop unrolling into a utility routine; eventually it might be made usable from other passes. It currently works by inserting conditional branches between each unrolled iteration, unless it proves that the trip count is a multiple of a constant integer > 1, which it currently only does in the rare case that the trip count expression is a Mul operator with a ConstantInt operand. Eventually this information might be provided by other sources, for example by a pass that peels/splits the loop for this purpose. --- Diffs of the changes: (+193 -58) LoopUnroll.cpp | 251 +++++++++++++++++++++++++++++++++++++++++++-------------- 1 files changed, 193 insertions(+), 58 deletions(-) Index: llvm/lib/Transforms/Scalar/LoopUnroll.cpp diff -u llvm/lib/Transforms/Scalar/LoopUnroll.cpp:1.46 llvm/lib/Transforms/Scalar/LoopUnroll.cpp:1.47 --- llvm/lib/Transforms/Scalar/LoopUnroll.cpp:1.46 Tue May 8 10:19:19 2007 +++ llvm/lib/Transforms/Scalar/LoopUnroll.cpp Fri May 11 15:53:41 2007 @@ -31,6 +31,7 @@ #include "llvm/Support/Compiler.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/Debug.h" +#include "llvm/Support/MathExtras.h" #include "llvm/ADT/Statistic.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SmallPtrSet.h" @@ -39,12 +40,19 @@ #include using namespace llvm; -STATISTIC(NumUnrolled, "Number of loops completely unrolled"); +STATISTIC(NumCompletelyUnrolled, "Number of loops completely unrolled"); +STATISTIC(NumUnrolled, "Number of loops unrolled (completely or otherwise)"); namespace { cl::opt - UnrollThreshold("unroll-threshold", cl::init(100), cl::Hidden, - cl::desc("The cut-off point for loop unrolling")); + UnrollThreshold + ("unroll-threshold", cl::init(100), cl::Hidden, + cl::desc("The cut-off point for automatic loop unrolling")); + + cl::opt + UnrollCount + ("unroll-count", cl::init(0), cl::Hidden, + cl::desc("Use this unroll count for all loops, for testing purposes")); class VISIBILITY_HIDDEN LoopUnroll : public LoopPass { LoopInfo *LI; // The current loop information @@ -52,7 +60,13 @@ static char ID; // Pass ID, replacement for typeid LoopUnroll() : LoopPass((intptr_t)&ID) {} + /// A magic value for use with the Threshold parameter to indicate + /// that the loop unroll should be performed regardless of how much + /// code expansion would result. + static const unsigned NoThreshold = UINT_MAX; + bool runOnLoop(Loop *L, LPPassManager &LPM); + bool unrollLoop(Loop *L, unsigned Count, unsigned Threshold); BasicBlock *FoldBlockIntoPredecessor(BasicBlock *BB); /// This transformation requires natural loop information & requires that @@ -162,43 +176,137 @@ } bool LoopUnroll::runOnLoop(Loop *L, LPPassManager &LPM) { - bool Changed = false; LI = &getAnalysis(); + // Unroll the loop. + if (!unrollLoop(L, UnrollCount, UnrollThreshold)) + return false; + + // Update the loop information for this loop. + // If we completely unrolled the loop, remove it from the parent. + if (L->getNumBackEdges() == 0) + LPM.deleteLoopFromQueue(L); + + return true; +} + +/// Unroll the given loop by UnrollCount, or by a heuristically-determined +/// value if Count is zero. If Threshold is non-NULL, it points to +/// a Threshold value to limit code size expansion. If the loop size would +/// expand beyond the threshold value, unrolling is suppressed. The return +/// value is false if no transformations are performed. +/// +bool LoopUnroll::unrollLoop(Loop *L, unsigned Count, unsigned Threshold) { + assert(L->isLCSSAForm()); + BasicBlock *Header = L->getHeader(); BasicBlock *LatchBlock = L->getLoopLatch(); - BranchInst *BI = dyn_cast(LatchBlock->getTerminator()); - if (BI == 0) return Changed; // Must end in a conditional branch - ConstantInt *TripCountC = dyn_cast_or_null(L->getTripCount()); - if (!TripCountC) return Changed; // Must have constant trip count! + DOUT << "Loop Unroll: F[" << Header->getParent()->getName() + << "] Loop %" << Header->getName() << "\n"; - // Guard against huge trip counts. This also guards against assertions in - // APInt from the use of getZExtValue, below. - if (TripCountC->getValue().getActiveBits() > 32) - return Changed; // More than 2^32 iterations??? + if (!BI || BI->isUnconditional()) { + // The loop-rorate pass can be helpful to avoid this in many cases. + DOUT << " Can't unroll; loop not terminated by a conditional branch.\n"; + return false; + } - uint64_t TripCountFull = TripCountC->getZExtValue(); - if (TripCountFull == 0) - return Changed; // Zero iteraitons? + // Determine the trip count and/or trip multiple. A TripCount value of zero + // is used to mean an unknown trip count. The TripMultiple value is the + // greatest known integer multiple of the trip count. + unsigned TripCount = 0; + unsigned TripMultiple = 1; + if (Value *TripCountValue = L->getTripCount()) { + if (ConstantInt *TripCountC = dyn_cast(TripCountValue)) { + // Guard against huge trip counts. This also guards against assertions in + // APInt from the use of getZExtValue, below. + if (TripCountC->getValue().getActiveBits() <= 32) { + TripCount = (unsigned)TripCountC->getZExtValue(); + } + } else if (BinaryOperator *BO = dyn_cast(TripCountValue)) { + switch (BO->getOpcode()) { + case BinaryOperator::Mul: + if (ConstantInt *MultipleC = dyn_cast(BO->getOperand(1))) { + if (MultipleC->getValue().getActiveBits() <= 32) { + TripMultiple = (unsigned)MultipleC->getZExtValue(); + } + } + break; + default: break; + } + } + } + if (TripCount != 0) + DOUT << " Trip Count = " << TripCount << "\n"; + if (TripMultiple != 1) + DOUT << " Trip Multiple = " << TripMultiple << "\n"; + + // Automatically select an unroll count. + if (Count == 0) { + // Conservative heuristic: if we know the trip count, see if we can + // completely unroll (subject to the threshold, checked below); otherwise + // don't unroll. + if (TripCount != 0) { + Count = TripCount; + } else { + return false; + } + } - unsigned LoopSize = ApproximateLoopSize(L); - DOUT << "Loop Unroll: F[" << Header->getParent()->getName() - << "] Loop %" << Header->getName() << " Loop Size = " - << LoopSize << " Trip Count = " << TripCountFull << " - "; - uint64_t Size = (uint64_t)LoopSize*TripCountFull; - if (Size > UnrollThreshold) { - DOUT << "TOO LARGE: " << Size << ">" << UnrollThreshold << "\n"; - return Changed; + // Effectively "DCE" unrolled iterations that are beyond the tripcount + // and will never be executed. + if (TripCount != 0 && Count > TripCount) + Count = TripCount; + + assert(Count > 0); + assert(TripMultiple > 0); + assert(TripCount == 0 || TripCount % TripMultiple == 0); + + // Enforce the threshold. + if (Threshold != NoThreshold) { + unsigned LoopSize = ApproximateLoopSize(L); + DOUT << " Loop Size = " << LoopSize << "\n"; + uint64_t Size = (uint64_t)LoopSize*Count; + if (TripCount != 1 && Size > Threshold) { + DOUT << " TOO LARGE TO UNROLL: " + << Size << ">" << Threshold << "\n"; + return false; + } } - DOUT << "UNROLLING!\n"; - std::vector LoopBlocks = L->getBlocks(); + // Are we eliminating the loop control altogether? + bool CompletelyUnroll = Count == TripCount; + + // If we know the trip count, we know the multiple... + unsigned BreakoutTrip = 0; + if (TripCount != 0) { + BreakoutTrip = TripCount % Count; + TripMultiple = 0; + } else { + // Figure out what multiple to use. + BreakoutTrip = TripMultiple = + (unsigned)GreatestCommonDivisor64(Count, TripMultiple); + } - unsigned TripCount = (unsigned)TripCountFull; + if (CompletelyUnroll) { + DOUT << "COMPLETELY UNROLLING loop %" << Header->getName() + << " with trip count " << TripCount << "!\n"; + } else { + DOUT << "UNROLLING loop %" << Header->getName() + << " by " << Count; + if (TripMultiple == 0 || BreakoutTrip != TripMultiple) { + DOUT << " with a breakout at trip " << BreakoutTrip; + } else if (TripMultiple != 1) { + DOUT << " with " << TripMultiple << " trips per branch"; + } + DOUT << "!\n"; + } - BasicBlock *LoopExit = BI->getSuccessor(L->contains(BI->getSuccessor(0))); + std::vector LoopBlocks = L->getBlocks(); + + bool ContinueOnTrue = L->contains(BI->getSuccessor(0)); + BasicBlock *LoopExit = BI->getSuccessor(ContinueOnTrue); // For the first iteration of the loop, we should use the precloned values for // PHI nodes. Insert associations now. @@ -214,16 +322,12 @@ LastValueMap[I] = I; } - // Remove the exit branch from the loop - LatchBlock->getInstList().erase(BI); - std::vector Headers; std::vector Latches; Headers.push_back(Header); Latches.push_back(LatchBlock); - assert(TripCount != 0 && "Trip count of 0 is impossible!"); - for (unsigned It = 1; It != TripCount; ++It) { + for (unsigned It = 1; It != Count; ++It) { char SuffixBuffer[100]; sprintf(SuffixBuffer, ".%d", It); @@ -277,9 +381,18 @@ // we can insert the proper branches later. if (*BB == Header) Headers.push_back(New); - if (*BB == LatchBlock) + if (*BB == LatchBlock) { Latches.push_back(New); + // Also, clear out the new latch's back edge so that it doesn't look + // like a new loop, so that it's amenable to being merged with adjacent + // blocks later on. + TerminatorInst *Term = New->getTerminator(); + assert(L->contains(Term->getSuccessor(!ContinueOnTrue))); + assert(Term->getSuccessor(ContinueOnTrue) == LoopExit); + Term->setSuccessor(!ContinueOnTrue, NULL); + } + NewBlocks.push_back(New); } @@ -289,12 +402,11 @@ E = NewBlocks[i]->end(); I != E; ++I) RemapInstruction(I, LastValueMap); } - // The latch block exits the loop. If there are any PHI nodes in the // successor blocks, update them to use the appropriate values computed as the // last iteration of the loop. - if (TripCount > 1) { + if (Count != 1) { SmallPtrSet Users; for (Value::use_iterator UI = LatchBlock->use_begin(), UE = LatchBlock->use_end(); UI != UE; ++UI) @@ -316,29 +428,55 @@ } } - // Now loop over the PHI nodes in the original block, setting them to their - // incoming values. - BasicBlock *Preheader = L->getLoopPreheader(); - for (unsigned i = 0, e = OrigPHINode.size(); i != e; ++i) { - PHINode *PN = OrigPHINode[i]; - PN->replaceAllUsesWith(PN->getIncomingValueForBlock(Preheader)); - Header->getInstList().erase(PN); + // Now, if we're doing complete unrolling, loop over the PHI nodes in the + // original block, setting them to their incoming values. + if (CompletelyUnroll) { + BasicBlock *Preheader = L->getLoopPreheader(); + for (unsigned i = 0, e = OrigPHINode.size(); i != e; ++i) { + PHINode *PN = OrigPHINode[i]; + PN->replaceAllUsesWith(PN->getIncomingValueForBlock(Preheader)); + Header->getInstList().erase(PN); + } } - - // Insert the branches that link the different iterations together - for (unsigned i = 0; i < Latches.size()-1; ++i) { - new BranchInst(Headers[i+1], Latches[i]); - if (BasicBlock *Fold = FoldBlockIntoPredecessor(Headers[i+1])) { - std::replace(Latches.begin(), Latches.end(), Headers[i+1], Fold); - std::replace(Headers.begin(), Headers.end(), Headers[i+1], Fold); + + // Now that all the basic blocks for the unrolled iterations are in place, + // set up the branches to connect them. + for (unsigned i = 0, e = Latches.size(); i != e; ++i) { + // The original branch was replicated in each unrolled iteration. + BranchInst *Term = cast(Latches[i]->getTerminator()); + + // The branch destination. + unsigned j = (i + 1) % e; + BasicBlock *Dest = Headers[j]; + bool NeedConditional = true; + + // For a complete unroll, make the last iteration end with a branch + // to the exit block. + if (CompletelyUnroll && j == 0) { + Dest = LoopExit; + NeedConditional = false; + } + + // If we know the trip count or a multiple of it, we can safely use an + // unconditional branch for some iterations. + if (j != BreakoutTrip && (TripMultiple == 0 || j % TripMultiple != 0)) { + NeedConditional = false; + } + + if (NeedConditional) { + // Update the conditional branch's successor for the following + // iteration. + Term->setSuccessor(!ContinueOnTrue, Dest); + } else { + Term->setUnconditionalDest(Dest); + // Merge adjacent basic blocks, if possible. + if (BasicBlock *Fold = FoldBlockIntoPredecessor(Dest)) { + std::replace(Latches.begin(), Latches.end(), Dest, Fold); + std::replace(Headers.begin(), Headers.end(), Dest, Fold); + } } } - // Finally, add an unconditional branch to the block to continue into the exit - // block. - new BranchInst(LoopExit, Latches[Latches.size()-1]); - FoldBlockIntoPredecessor(LoopExit); - // At this point, the code is well formed. We now do a quick sweep over the // inserted code, doing constant propagation and dead code elimination as we // go. @@ -356,10 +494,7 @@ } } - // Update the loop information for this loop. - // Remove the loop from the parent. - LPM.deleteLoopFromQueue(L); - + NumCompletelyUnrolled += CompletelyUnroll; ++NumUnrolled; return true; } From djg at cray.com Fri May 11 15:59:47 2007 From: djg at cray.com (Dan Gohman) Date: Fri, 11 May 2007 15:59:47 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Instructions.h Message-ID: <200705112059.l4BKxl0k013335@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm: Instructions.h updated: 1.73 -> 1.74 --- Log message: Simplify BranchInst::getSuccessor, avoiding a conditional operator. --- Diffs of the changes: (+1 -2) Instructions.h | 3 +-- 1 files changed, 1 insertion(+), 2 deletions(-) Index: llvm/include/llvm/Instructions.h diff -u llvm/include/llvm/Instructions.h:1.73 llvm/include/llvm/Instructions.h:1.74 --- llvm/include/llvm/Instructions.h:1.73 Fri Apr 27 15:35:56 2007 +++ llvm/include/llvm/Instructions.h Fri May 11 15:59:29 2007 @@ -1323,8 +1323,7 @@ BasicBlock *getSuccessor(unsigned i) const { assert(i < getNumSuccessors() && "Successor # out of range for Branch!"); - return (i == 0) ? cast(getOperand(0)) : - cast(getOperand(1)); + return cast(getOperand(i)); } void setSuccessor(unsigned idx, BasicBlock *NewSucc) { From djg at cray.com Fri May 11 16:05:06 2007 From: djg at cray.com (Dan Gohman) Date: Fri, 11 May 2007 16:05:06 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Pass.h Message-ID: <200705112105.l4BL56ml013444@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm: Pass.h updated: 1.90 -> 1.91 --- Log message: Add explicit keywords to several constructors that now have one argument. --- Diffs of the changes: (+5 -5) Pass.h | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) Index: llvm/include/llvm/Pass.h diff -u llvm/include/llvm/Pass.h:1.90 llvm/include/llvm/Pass.h:1.91 --- llvm/include/llvm/Pass.h:1.90 Thu May 3 17:09:21 2007 +++ llvm/include/llvm/Pass.h Fri May 11 16:04:48 2007 @@ -86,7 +86,7 @@ void operator=(const Pass&); // DO NOT IMPLEMENT Pass(const Pass &); // DO NOT IMPLEMENT public: - Pass(intptr_t pid) : Resolver(0), PassID(pid) {} + explicit Pass(intptr_t pid) : Resolver(0), PassID(pid) {} virtual ~Pass(); /// getPassName - Return a nice clean name for a pass. This usually @@ -231,7 +231,7 @@ return PMT_ModulePassManager; } - ModulePass(intptr_t pid) : Pass(pid) {} + explicit ModulePass(intptr_t pid) : Pass(pid) {} // Force out-of-line virtual method. virtual ~ModulePass(); }; @@ -256,7 +256,7 @@ /// virtual bool runOnModule(Module &M) { return false; } - ImmutablePass(intptr_t pid) : ModulePass(pid) {} + explicit ImmutablePass(intptr_t pid) : ModulePass(pid) {} // Force out-of-line virtual method. virtual ~ImmutablePass(); }; @@ -272,7 +272,7 @@ /// class FunctionPass : public Pass { public: - FunctionPass(intptr_t pid) : Pass(pid) {} + explicit FunctionPass(intptr_t pid) : Pass(pid) {} /// doInitialization - Virtual method overridden by subclasses to do /// any necessary per-module initialization. @@ -323,7 +323,7 @@ /// class BasicBlockPass : public Pass { public: - BasicBlockPass(intptr_t pid) : Pass(pid) {} + explicit BasicBlockPass(intptr_t pid) : Pass(pid) {} /// doInitialization - Virtual method overridden by subclasses to do /// any necessary per-module initialization. From djg at cray.com Fri May 11 16:06:15 2007 From: djg at cray.com (Dan Gohman) Date: Fri, 11 May 2007 16:06:15 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Pass.h PassManager.h Message-ID: <200705112106.l4BL6F8o013486@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm: Pass.h updated: 1.91 -> 1.92 PassManager.h updated: 1.39 -> 1.40 --- Log message: Remove forward-declarations for classes that don't exist. --- Diffs of the changes: (+0 -3) Pass.h | 2 -- PassManager.h | 1 - 2 files changed, 3 deletions(-) Index: llvm/include/llvm/Pass.h diff -u llvm/include/llvm/Pass.h:1.91 llvm/include/llvm/Pass.h:1.92 --- llvm/include/llvm/Pass.h:1.91 Fri May 11 16:04:48 2007 +++ llvm/include/llvm/Pass.h Fri May 11 16:05:57 2007 @@ -45,8 +45,6 @@ class AnalysisUsage; class PassInfo; class ImmutablePass; -class BasicBlockPassManager; -class ModulePassManager; class PMStack; class AnalysisResolver; class PMDataManager; Index: llvm/include/llvm/PassManager.h diff -u llvm/include/llvm/PassManager.h:1.39 llvm/include/llvm/PassManager.h:1.40 --- llvm/include/llvm/PassManager.h:1.39 Fri Mar 23 13:44:11 2007 +++ llvm/include/llvm/PassManager.h Fri May 11 16:05:57 2007 @@ -26,7 +26,6 @@ class Module; class ModuleProvider; -class ModulePassManager; class PassManagerImpl; class FunctionPassManagerImpl; From djg at cray.com Fri May 11 16:11:17 2007 From: djg at cray.com (Dan Gohman) Date: Fri, 11 May 2007 16:11:17 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Utils/LCSSA.cpp Message-ID: <200705112111.l4BLBHvv013587@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Utils: LCSSA.cpp updated: 1.42 -> 1.43 --- Log message: Fix typos. --- Diffs of the changes: (+1 -1) LCSSA.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Transforms/Utils/LCSSA.cpp diff -u llvm/lib/Transforms/Utils/LCSSA.cpp:1.42 llvm/lib/Transforms/Utils/LCSSA.cpp:1.43 --- llvm/lib/Transforms/Utils/LCSSA.cpp:1.42 Sun May 6 08:37:16 2007 +++ llvm/lib/Transforms/Utils/LCSSA.cpp Fri May 11 16:10:54 2007 @@ -12,7 +12,7 @@ // the left into the right code: // // for (...) for (...) -// if (c) if(c) +// if (c) if (c) // X1 = ... X1 = ... // else else // X2 = ... X2 = ... From djg at cray.com Fri May 11 16:11:18 2007 From: djg at cray.com (Dan Gohman) Date: Fri, 11 May 2007 16:11:18 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp LoopRotation.cpp Message-ID: <200705112111.l4BLBIPK013594@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.764 -> 1.765 LoopRotation.cpp updated: 1.13 -> 1.14 --- Log message: Fix typos. --- Diffs of the changes: (+3 -3) InstructionCombining.cpp | 2 +- LoopRotation.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.764 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.765 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.764 Fri May 11 11:58:45 2007 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Fri May 11 16:10:54 2007 @@ -6373,7 +6373,7 @@ if (isa(Src)) // cast undef -> undef return ReplaceInstUsesWith(CI, UndefValue::get(CI.getType())); - // Many cases of "cast of a cast" are eliminable. If its eliminable we just + // Many cases of "cast of a cast" are eliminable. If it's eliminable we just // eliminate it now. if (CastInst *CSrc = dyn_cast(Src)) { // A->B->C cast if (Instruction::CastOps opc = Index: llvm/lib/Transforms/Scalar/LoopRotation.cpp diff -u llvm/lib/Transforms/Scalar/LoopRotation.cpp:1.13 llvm/lib/Transforms/Scalar/LoopRotation.cpp:1.14 --- llvm/lib/Transforms/Scalar/LoopRotation.cpp:1.13 Wed May 2 20:11:54 2007 +++ llvm/lib/Transforms/Scalar/LoopRotation.cpp Fri May 11 16:10:54 2007 @@ -116,7 +116,7 @@ return RotatedOneLoop; } -/// Rotate loop LP. Return true if it loop is rotated. +/// Rotate loop LP. Return true if the loop is rotated. bool LoopRotate::rotateLoop(Loop *Lp, LPPassManager &LPM) { L = Lp; @@ -130,7 +130,7 @@ return false; assert (OrigHeader && OrigLatch && OrigPreHeader && - "Loop is not in cannocial form"); + "Loop is not in canonical form"); // If loop header is not one of the loop exit block then // either this loop is already rotated or it is not From djg at cray.com Fri May 11 16:43:43 2007 From: djg at cray.com (Dan Gohman) Date: Fri, 11 May 2007 16:43:43 -0500 Subject: [llvm-commits] CVS: llvm/lib/VMCore/Instructions.cpp Message-ID: <200705112143.l4BLhh9r014267@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: Instructions.cpp updated: 1.91 -> 1.92 --- Log message: Update comments to say "vector" instead of "packed". --- Diffs of the changes: (+10 -10) Instructions.cpp | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-) Index: llvm/lib/VMCore/Instructions.cpp diff -u llvm/lib/VMCore/Instructions.cpp:1.91 llvm/lib/VMCore/Instructions.cpp:1.92 --- llvm/lib/VMCore/Instructions.cpp:1.91 Fri Apr 27 15:35:56 2007 +++ llvm/lib/VMCore/Instructions.cpp Fri May 11 16:43:24 2007 @@ -1189,7 +1189,7 @@ return false; // First operand of insertelement must be vector type. if (Elt->getType() != cast(Vec->getType())->getElementType()) - return false;// Second operand of insertelement must be packed element type. + return false;// Second operand of insertelement must be vector element type. if (Index->getType() != Type::Int32Ty) return false; // Third operand of insertelement must be uint. @@ -1500,7 +1500,7 @@ /// example, the following are all no-op casts: /// # bitcast uint %X, int /// # bitcast uint* %x, sbyte* -/// # bitcast packed< 2 x int > %x, packed< 4 x short> +/// # bitcast vector< 2 x int > %x, vector< 4 x short> /// # ptrtoint uint* %x, uint ; on 32-bit plaforms only /// @brief Determine if a cast is a no-op. bool CastInst::isNoopCast(const Type *IntPtrTy) const { @@ -1867,8 +1867,8 @@ const Value *Src, bool SrcIsSigned, const Type *DestTy, bool DestIsSigned) { // Get the bit sizes, we'll need these const Type *SrcTy = Src->getType(); - unsigned SrcBits = SrcTy->getPrimitiveSizeInBits(); // 0 for ptr/packed - unsigned DestBits = DestTy->getPrimitiveSizeInBits(); // 0 for ptr/packed + unsigned SrcBits = SrcTy->getPrimitiveSizeInBits(); // 0 for ptr/vector + unsigned DestBits = DestTy->getPrimitiveSizeInBits(); // 0 for ptr/vector // Run through the possibilities ... if (DestTy->isInteger()) { // Casting to integral @@ -1890,7 +1890,7 @@ return FPToUI; // FP -> uint } else if (const VectorType *PTy = dyn_cast(SrcTy)) { assert(DestBits == PTy->getBitWidth() && - "Casting packed to integer of different width"); + "Casting vector to integer of different width"); return BitCast; // Same size, no-op cast } else { assert(isa(SrcTy) && @@ -1913,7 +1913,7 @@ } } else if (const VectorType *PTy = dyn_cast(SrcTy)) { assert(DestBits == PTy->getBitWidth() && - "Casting packed to floating point of different width"); + "Casting vector to floating point of different width"); return BitCast; // same size, no-op cast } else { assert(0 && "Casting pointer or non-first class to float"); @@ -1921,12 +1921,12 @@ } else if (const VectorType *DestPTy = dyn_cast(DestTy)) { if (const VectorType *SrcPTy = dyn_cast(SrcTy)) { assert(DestPTy->getBitWidth() == SrcPTy->getBitWidth() && - "Casting packed to packed of different widths"); - return BitCast; // packed -> packed + "Casting vector to vector of different widths"); + return BitCast; // vector -> vector } else if (DestPTy->getBitWidth() == SrcBits) { - return BitCast; // float/int -> packed + return BitCast; // float/int -> vector } else { - assert(!"Illegal cast to packed (wrong type or size)"); + assert(!"Illegal cast to vector (wrong type or size)"); } } else if (isa(DestTy)) { if (isa(SrcTy)) { From sabre at nondot.org Fri May 11 17:40:52 2007 From: sabre at nondot.org (Chris Lattner) Date: Fri, 11 May 2007 17:40:52 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp Message-ID: <200705112240.l4BMeqYD017173@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: LoopStrengthReduce.cpp updated: 1.136 -> 1.137 --- Log message: significantly improve debug output of lsr --- Diffs of the changes: (+13 -6) LoopStrengthReduce.cpp | 19 +++++++++++++------ 1 files changed, 13 insertions(+), 6 deletions(-) Index: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp diff -u llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.136 llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.137 --- llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.136 Fri May 4 09:59:09 2007 +++ llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp Fri May 11 17:40:34 2007 @@ -592,11 +592,12 @@ while (isa(InsertPt)) ++InsertPt; } } - Value *NewVal = InsertCodeForBaseAtPosition(NewBase, Rewriter, InsertPt, L); // Replace the use of the operand Value with the new Phi we just created. Inst->replaceUsesOfWith(OperandValToReplace, NewVal); - DOUT << " CHANGED: IMM =" << *Imm << " Inst = " << *Inst; + DOUT << " CHANGED: IMM =" << *Imm; + DOUT << " \tNEWBASE =" << *NewBase; + DOUT << " \tInst = " << *Inst; return; } @@ -1078,7 +1079,7 @@ // Now that we know what we need to do, insert the PHI node itself. // DOUT << "INSERTING IV of TYPE " << *ReplacedTy << " of STRIDE " - << *Stride << " and BASE " << *CommonExprs << " :\n"; + << *Stride << " and BASE " << *CommonExprs << ": "; SCEVExpander Rewriter(*SE, *LI); SCEVExpander PreheaderRewriter(*SE, *LI); @@ -1120,6 +1121,8 @@ // Remember this in case a later stride is multiple of this. IVsByStride[Stride].addIV(Stride, CommonExprs, NewPHI, IncV); + + DOUT << " IV=%" << NewPHI->getNameStr() << " INC=%" << IncV->getNameStr(); } else { Constant *C = dyn_cast(CommonBaseV); if (!C || @@ -1130,6 +1133,7 @@ CommonBaseV = new BitCastInst(CommonBaseV, CommonBaseV->getType(), "commonbase", PreInsertPt); } + DOUT << "\n"; // We want to emit code for users inside the loop first. To do this, we // rearrange BasedUser so that the entries at the end have @@ -1166,12 +1170,15 @@ while (!UsersToProcess.empty()) { SCEVHandle Base = UsersToProcess.back().Base; - DOUT << " INSERTING code for BASE = " << *Base << ":\n"; - // Emit the code for Base into the preheader. Value *BaseV = PreheaderRewriter.expandCodeFor(Base, PreInsertPt, ReplacedTy); - + + DOUT << " INSERTING code for BASE = " << *Base << ":"; + if (BaseV->hasName()) + DOUT << " Result value name = %" << BaseV->getNameStr(); + DOUT << "\n"; + // If BaseV is a constant other than 0, make sure that it gets inserted into // the preheader, instead of being forward substituted into the uses. We do // this by forcing a BitCast (noop cast) to be inserted into the preheader From dpatel at apple.com Fri May 11 18:13:37 2007 From: dpatel at apple.com (Devang Patel) Date: Fri, 11 May 2007 18:13:37 -0500 Subject: [llvm-commits] CVS: llvm/test/CFrontend/2007-05-11-str-const.ll Message-ID: <200705112313.l4BNDbfx005049@zion.cs.uiuc.edu> Changes in directory llvm/test/CFrontend: 2007-05-11-str-const.ll added (r1.1) --- Log message: New test. --- Diffs of the changes: (+5 -0) 2007-05-11-str-const.ll | 5 +++++ 1 files changed, 5 insertions(+) Index: llvm/test/CFrontend/2007-05-11-str-const.ll diff -c /dev/null llvm/test/CFrontend/2007-05-11-str-const.ll:1.1 *** /dev/null Fri May 11 18:13:29 2007 --- llvm/test/CFrontend/2007-05-11-str-const.ll Fri May 11 18:13:19 2007 *************** *** 0 **** --- 1,5 ---- + // RUN: %llvmgcc -c -g %s -o /dev/null + + static unsigned char out[]={0,1}; + static const unsigned char str1[]="1"; + From dpatel at apple.com Fri May 11 18:15:02 2007 From: dpatel at apple.com (Devang Patel) Date: Fri, 11 May 2007 18:15:02 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/MachineModuleInfo.cpp Message-ID: <200705112315.l4BNF20j005091@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: MachineModuleInfo.cpp updated: 1.11 -> 1.12 --- Log message: Fix http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070507/049516.html --- Diffs of the changes: (+1 -1) MachineModuleInfo.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/CodeGen/MachineModuleInfo.cpp diff -u llvm/lib/CodeGen/MachineModuleInfo.cpp:1.11 llvm/lib/CodeGen/MachineModuleInfo.cpp:1.12 --- llvm/lib/CodeGen/MachineModuleInfo.cpp:1.11 Thu May 10 17:38:46 2007 +++ llvm/lib/CodeGen/MachineModuleInfo.cpp Fri May 11 18:14:43 2007 @@ -1323,7 +1323,7 @@ // Otherwise create and return a new string global. GlobalVariable *StrGV = new GlobalVariable(ConstStr->getType(), true, GlobalVariable::InternalLinkage, - ConstStr, "str", M); + ConstStr, ".str", M); StrGV->setSection("llvm.metadata"); // Convert to generic string pointer. Slot = ConstantExpr::getBitCast(StrGV, getStrPtrType()); From sabre at nondot.org Fri May 11 18:52:17 2007 From: sabre at nondot.org (Chris Lattner) Date: Fri, 11 May 2007 18:52:17 -0500 Subject: [llvm-commits] CVS: llvm/lib/Bitcode/Writer/BitcodeWriter.cpp Message-ID: <200705112352.l4BNqHwI005698@zion.cs.uiuc.edu> Changes in directory llvm/lib/Bitcode/Writer: BitcodeWriter.cpp updated: 1.52 -> 1.53 --- Log message: allow partially materialized modules to be written out, which just strips out the functions which haven't been read. --- Diffs of the changes: (+1 -0) BitcodeWriter.cpp | 1 + 1 files changed, 1 insertion(+) Index: llvm/lib/Bitcode/Writer/BitcodeWriter.cpp diff -u llvm/lib/Bitcode/Writer/BitcodeWriter.cpp:1.52 llvm/lib/Bitcode/Writer/BitcodeWriter.cpp:1.53 --- llvm/lib/Bitcode/Writer/BitcodeWriter.cpp:1.52 Tue May 8 00:38:01 2007 +++ llvm/lib/Bitcode/Writer/BitcodeWriter.cpp Fri May 11 18:51:59 2007 @@ -256,6 +256,7 @@ static unsigned getEncodedLinkage(const GlobalValue *GV) { switch (GV->getLinkage()) { default: assert(0 && "Invalid linkage!"); + case GlobalValue::GhostLinkage: // Map ghost linkage onto external. case GlobalValue::ExternalLinkage: return 0; case GlobalValue::WeakLinkage: return 1; case GlobalValue::AppendingLinkage: return 2; From reid at x10sys.com Fri May 11 19:17:45 2007 From: reid at x10sys.com (Reid Spencer) Date: Fri, 11 May 2007 19:17:45 -0500 Subject: [llvm-commits] CVS: llvm-www/DevMtgMay2007.html Message-ID: <200705120017.l4C0HjXI006249@zion.cs.uiuc.edu> Changes in directory llvm-www: DevMtgMay2007.html updated: 1.137 -> 1.138 --- Log message: Confirm Rafael. --- Diffs of the changes: (+4 -4) DevMtgMay2007.html | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) Index: llvm-www/DevMtgMay2007.html diff -u llvm-www/DevMtgMay2007.html:1.137 llvm-www/DevMtgMay2007.html:1.138 --- llvm-www/DevMtgMay2007.html:1.137 Fri May 11 14:10:13 2007 +++ llvm-www/DevMtgMay2007.html Fri May 11 19:17:26 2007 @@ -289,6 +289,7 @@ + @@ -335,17 +336,16 @@
    Unconfirmed Attendees
    NameOrganization
    Josh ConnerApple Inc.
    John CriswellUIUC
    Mike EnglerAdobe Systems Incorporated.
    Rafael EspindolaGoogle
    Tomas EvensenWind River
    Han GaoAdobe Systems Incorporated.
    Dan GohmanCray Inc.
    -

    Total confirmed: 45

    +

    Total confirmed: 46

    -
    Unconfirmed Attendees
    NameOrganization
    Rafael EspindolaGoogle
    Lang HamesUniversity of Sydney
    Michael McCrackenUCSD, Ph.D. Candidate
    Kelly WilsonUniversity of Calgary
    Unconfirmed 1NASA, Ames
    -

    Total unconfirmed: 5

    +

    Total unconfirmed: 4

    @@ -355,6 +355,6 @@ src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"> Valid HTML 4.01! -
    Last modified: $Date: 2007/05/11 19:10:13 $ +
    Last modified: $Date: 2007/05/12 00:17:26 $ From lauro.venancio at gmail.com Fri May 11 21:36:58 2007 From: lauro.venancio at gmail.com (Lauro Ramos Venancio) Date: Fri, 11 May 2007 21:36:58 -0500 Subject: [llvm-commits] CVS: llvm/docs/ReleaseNotes.html Message-ID: <200705120236.l4C2awCL008576@zion.cs.uiuc.edu> Changes in directory llvm/docs: ReleaseNotes.html updated: 1.373 -> 1.374 --- Log message: Add a known QEMU problem. --- Diffs of the changes: (+5 -2) ReleaseNotes.html | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) Index: llvm/docs/ReleaseNotes.html diff -u llvm/docs/ReleaseNotes.html:1.373 llvm/docs/ReleaseNotes.html:1.374 --- llvm/docs/ReleaseNotes.html:1.373 Thu May 10 03:26:24 2007 +++ llvm/docs/ReleaseNotes.html Fri May 11 21:36:41 2007 @@ -66,7 +66,7 @@
  • We took this as an opportunity to break backwards compatibility with the LLVM 1.x bytecode and .ll file format. If you have LLVM 1.9 .ll files that you would like to upgrade to LLVM 2.x, we -recommend the use of the stand alone llvm-upgrade +recommend the use of the stand alone llvm-upgrade tool. We intend to keep compatibility with .ll and .bc formats within the 2.x release series, like we did within the 1.x series.
  • There are several significant change to the LLVM IR and internal APIs, such @@ -349,6 +349,9 @@ results. (PR1388)
  • Compilation for ARM Linux OABI (old ABI) is supported, but not fully tested.
  • +
  • QEMU-ARM (<= 0.9.0) wrongly executes programs compiled with LLVM. A non-affected QEMU version must be used or this + +patch must be applied on QEMU.
  • @@ -599,7 +602,7 @@ src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!" /> The LLVM Compiler Infrastructure
    - Last modified: $Date: 2007/05/10 08:26:24 $ + Last modified: $Date: 2007/05/12 02:36:41 $ From sabre at nondot.org Fri May 11 22:23:58 2007 From: sabre at nondot.org (Chris Lattner) Date: Fri, 11 May 2007 22:23:58 -0500 Subject: [llvm-commits] CVS: llvm/docs/BitCodeFormat.html Message-ID: <200705120323.l4C3NwFI009573@zion.cs.uiuc.edu> Changes in directory llvm/docs: BitCodeFormat.html updated: 1.1 -> 1.2 --- Log message: first step --- Diffs of the changes: (+98 -28) BitCodeFormat.html | 126 +++++++++++++++++++++++++++++++++++++++++------------ 1 files changed, 98 insertions(+), 28 deletions(-) Index: llvm/docs/BitCodeFormat.html diff -u llvm/docs/BitCodeFormat.html:1.1 llvm/docs/BitCodeFormat.html:1.2 --- llvm/docs/BitCodeFormat.html:1.1 Sat Jan 20 17:21:08 2007 +++ llvm/docs/BitCodeFormat.html Fri May 11 22:23:40 2007 @@ -4,58 +4,128 @@ LLVM Bitcode File Format -
    LLVM Bitcode File Format
    1. Abstract
    2. -
    3. Concepts
    4. +
    5. Overview
    6. +
    7. Bitstream Format +
        +
      1. Magic Numbers
      2. +
      +
    8. +
    9. LLVM IR Encoding
    -

    Written by Reid Spencer and - Chris Lattner. +

    Written by Chris Lattner.

    + - + +
    -

    This document describes the LLVM bitcode file format. It specifies -the binary encoding rules of the bitcode file format so that -equivalent systems can encode bitcode files correctly. The LLVM -bitcode representation is used to store the intermediate -representation on disk in a compacted form.

    -

    This document supercedes the LLVM bytecode file format for the 2.0 -release.

    + +

    This document describes the LLVM bitstream file format and the encoding of +the LLVM IR into it.

    +
    + - + +
    -

    This section describes the general concepts of the bitcode file -format without getting into specific layout details. It is recommended -that you read this section thoroughly before interpreting the detailed -descriptions.

    + +

    +What is commonly known as the LLVM bitcode file format (also, sometimes +anachronistically known as bytecode) is actually two things: a bitstream container format +and an encoding of LLVM IR into the container format.

    + +

    +The bitstream format is an abstract encoding of structured data, like 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.

    + +

    This document first describes the LLVM bitstream format, then describes the +record structure used by LLVM IR files. +

    + +
    + + + + + +
    + +

    +The bitstream format is literally a stream of bits, with a very simple +structure. This structure consists of the following concepts: +

    + +
      +
    • A magic number that identifies the stream.
    • +
    • Encoding primitives like variable bit-rate integers.
    • +
    • Blocks, which define nested content.
    • +
    • Data Records, which describe entities within the file.
    • +
    • Abbreviations, which specify compression optimizations for the file.
    • +
    + +

    Note that the llvm-bcanalyzer tool can be +used to dump and inspect arbitrary bitstreams, which is very useful for +understanding the encoding.

    + +
    + + + + +
    + +

    LLVM

    + +
    + + + + + +
    + +

    blah +

    + +
    + + + + + +
    + +

    +
    + +
    Valid CSS! Valid HTML 4.01! -Reid Spencer and Chris Lattner
    + Chris Lattner
    The LLVM Compiler Infrastructure
    -Last modified: $Date: 2007/01/20 23:21:08 $ +Last modified: $Date: 2007/05/12 03:23:40 $
    From sabre at nondot.org Sat May 12 00:38:00 2007 From: sabre at nondot.org (Chris Lattner) Date: Sat, 12 May 2007 00:38:00 -0500 Subject: [llvm-commits] CVS: llvm/docs/BitCodeFormat.html Message-ID: <200705120538.l4C5c0J2011658@zion.cs.uiuc.edu> Changes in directory llvm/docs: BitCodeFormat.html updated: 1.2 -> 1.3 --- Log message: add a bunch of content. --- Diffs of the changes: (+214 -9) BitCodeFormat.html | 223 ++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 214 insertions(+), 9 deletions(-) Index: llvm/docs/BitCodeFormat.html diff -u llvm/docs/BitCodeFormat.html:1.2 llvm/docs/BitCodeFormat.html:1.3 --- llvm/docs/BitCodeFormat.html:1.2 Fri May 11 22:23:40 2007 +++ llvm/docs/BitCodeFormat.html Sat May 12 00:37:42 2007 @@ -1,4 +1,5 @@ - + @@ -13,6 +14,10 @@
  • Bitstream Format
    1. Magic Numbers
    2. +
    3. Primitives
    4. +
    5. Abbreviation IDs
    6. +
    7. Blocks
    8. +
    9. Data Records
  • LLVM IR Encoding
  • @@ -71,10 +76,13 @@

      -
    • A magic number that identifies the stream.
    • -
    • Encoding primitives like variable bit-rate integers.
    • -
    • Blocks, which define nested content.
    • -
    • Data Records, which describe entities within the file.
    • +
    • A "magic number" that identifies the contents of + the stream.
    • +
    • Encoding primitives like variable bit-rate + integers.
    • +
    • Blocks, which define nested content.
    • +
    • Data Records, which describe entities within the + file.
    • Abbreviations, which specify compression optimizations for the file.
    @@ -91,21 +99,218 @@
    -

    LLVM

    +

    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.

    + + + +
    + +

    +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 integer values. These +integers are are encoded in two ways: either as Fixed +Width Integers or as Variable Width +Integers. +

    + +
    + + + + +
    + +

    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. +

    + +
    - +
    -

    blah +

    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.

    + +

    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.

    + + + +
    + +

    6-bit characters encode common characters into a fixed 6-bit field. They +represent the following characters with the following 6-bit values: + +

      +
    • 'a' .. 'z' - 0 .. 25
    • +
    • 'A' .. 'Z' - 26 .. 52
    • +
    • '0' .. '9' - 53 .. 61
    • +
    • '.' - 62
    • +
    • '_' - 63
    • +
    + +

    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.

    + +
    + + + + +
    + +

    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.

    + +
    + + + + + +
    + +

    +A bitstream is a sequential series of Blocks and +Data Records. 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. +

    + +

    +The set of builtin abbrev IDs is: +

    + +
      +
    • 0 - END_BLOCK - This abbrev ID marks the end of the + current block.
    • +
    • 1 - ENTER_SUBBLOCK - This abbrev ID marks the + beginning of a new block.
    • +
    • 2 - DEFINE_ABBREV - This defines a new abbreviation.
    • +
    • 3 - UNABBREV_RECORD - This ID specifies the definition of an unabbreviated + record.
    • +
    + +

    Abbreviation IDs 4 and above are defined by the stream itself.

    + +
    + + + + +
    + +

    +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. +

    + +

    +When reading and encoding the stream, several properties are maintained for the +block. In particular, each block maintains: +

    + +
      +
    1. 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.
    2. + +
    3. A set of abbreviations. Abbreviations may be defined within a block, or + they may be associated with all blocks of a particular ID. +
    4. +
    + +

    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.

    + +
    + + + + +
    + +

    [ENTER_SUBBLOCK, blockidvbr8, newabbrevlenvbr4, + <align32bits>, blocklen32]

    + +

    +The ENTER_SUBBLOCK abbreviation ID specifies the start of a new block record. +The blockid value is encoded as a 8-bit VBR identifier, and indicates +the type of block being entered (which is application specific). The +newabbrevlen value is a 4-bit VBR which specifies the +abbrev id width for the sub-block. The blocklen 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. +

    + +
    + + + + +
    + +

    [END_BLOCK, <align32bits>]

    + +

    +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.

    + +
    + + + + + + +
    + +

    +blah +

    + +
    + + @@ -125,7 +330,7 @@ src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!"> Chris Lattner
    The LLVM Compiler Infrastructure
    -Last modified: $Date: 2007/05/12 03:23:40 $ +Last modified: $Date: 2007/05/12 05:37:42 $ From sabre at nondot.org Sat May 12 02:49:45 2007 From: sabre at nondot.org (Chris Lattner) Date: Sat, 12 May 2007 02:49:45 -0500 Subject: [llvm-commits] CVS: llvm/docs/BitCodeFormat.html Message-ID: <200705120749.l4C7njJb022597@zion.cs.uiuc.edu> Changes in directory llvm/docs: BitCodeFormat.html updated: 1.3 -> 1.4 --- Log message: continued description --- Diffs of the changes: (+109 -6) BitCodeFormat.html | 115 ++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 109 insertions(+), 6 deletions(-) Index: llvm/docs/BitCodeFormat.html diff -u llvm/docs/BitCodeFormat.html:1.3 llvm/docs/BitCodeFormat.html:1.4 --- llvm/docs/BitCodeFormat.html:1.3 Sat May 12 00:37:42 2007 +++ llvm/docs/BitCodeFormat.html Sat May 12 02:49:15 2007 @@ -18,6 +18,7 @@
  • Abbreviation IDs
  • Blocks
  • Data Records
  • +
  • Abbreviations
  • LLVM IR Encoding
  • @@ -213,12 +214,14 @@ current block.
  • 1 - ENTER_SUBBLOCK - This abbrev ID marks the beginning of a new block.
  • -
  • 2 - DEFINE_ABBREV - This defines a new abbreviation.
  • -
  • 3 - UNABBREV_RECORD - This ID specifies the definition of an unabbreviated - record.
  • +
  • 2 - DEFINE_ABBREV - This defines a new + abbreviation.
  • +
  • 3 - UNABBREV_RECORD - This ID specifies the + definition of an unabbreviated record.
  • -

    Abbreviation IDs 4 and above are defined by the stream itself.

    +

    Abbreviation IDs 4 and above are defined by the stream itself, and specify +an abbreviated record encoding.

    @@ -303,11 +306,111 @@
    +

    +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.

    + +
    + + + + +
    + +

    [UNABBREV_RECORD, codevbr6, numopsvbr6, + op0vbr6, op1vbr6, ...]

    + +

    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.

    + +

    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.

    + +
    + + + + +
    + +

    [<abbrevid>, fields...]

    + +

    An abbreviated record is a abbreviation id followed by a set of fields that +are encoded according to the abbreviation +definition. This allows records to be encoded significantly more densely +than records encoded with the UNABBREV_RECORD +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. +

    + +
    + + + +

    -blah +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.

    +

    +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. +

    +
    + + + + +
    + +

    [DEFINE_ABBREV, numabbrevopsvbr5, abbrevop0, abbrevop1, + ...]

    + +

    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).

    + +
      +
    1. Literal operands - [11, litvaluevbr8] - +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.
    2. +
    3. Encoding info without data - [01, encoding3] + - blah +
    4. +
    5. Encoding info with data - [01, encoding3, +valuevbr5] - + +
    6. +
    +
    @@ -330,7 +433,7 @@ src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!"> Chris Lattner
    The LLVM Compiler Infrastructure
    -Last modified: $Date: 2007/05/12 05:37:42 $ +Last modified: $Date: 2007/05/12 07:49:15 $ From sabre at nondot.org Sat May 12 02:50:32 2007 From: sabre at nondot.org (Chris Lattner) Date: Sat, 12 May 2007 02:50:32 -0500 Subject: [llvm-commits] CVS: llvm/docs/BitCodeFormat.html Message-ID: <200705120750.l4C7oWEw022675@zion.cs.uiuc.edu> Changes in directory llvm/docs: BitCodeFormat.html updated: 1.4 -> 1.5 --- Log message: fix typo --- Diffs of the changes: (+2 -2) BitCodeFormat.html | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/docs/BitCodeFormat.html diff -u llvm/docs/BitCodeFormat.html:1.4 llvm/docs/BitCodeFormat.html:1.5 --- llvm/docs/BitCodeFormat.html:1.4 Sat May 12 02:49:15 2007 +++ llvm/docs/BitCodeFormat.html Sat May 12 02:50:14 2007 @@ -162,7 +162,7 @@

    6-bit characters encode common characters into a fixed 6-bit field. They -represent the following characters with the following 6-bit values: +represent the following characters with the following 6-bit values:

    • 'a' .. 'z' - 0 .. 25
    • @@ -433,7 +433,7 @@ src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!"> Chris Lattner
      The LLVM Compiler Infrastructure
      -Last modified: $Date: 2007/05/12 07:49:15 $ +Last modified: $Date: 2007/05/12 07:50:14 $ From reid at x10sys.com Sat May 12 03:02:10 2007 From: reid at x10sys.com (Reid Spencer) Date: Sat, 12 May 2007 03:02:10 -0500 Subject: [llvm-commits] CVS: llvm/docs/BitCodeFormat.html Message-ID: <200705120802.l4C82A7N023039@zion.cs.uiuc.edu> Changes in directory llvm/docs: BitCodeFormat.html updated: 1.5 -> 1.6 --- Log message: Fix a grammaro. --- Diffs of the changes: (+2 -2) BitCodeFormat.html | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/docs/BitCodeFormat.html diff -u llvm/docs/BitCodeFormat.html:1.5 llvm/docs/BitCodeFormat.html:1.6 --- llvm/docs/BitCodeFormat.html:1.5 Sat May 12 02:50:14 2007 +++ llvm/docs/BitCodeFormat.html Sat May 12 03:01:52 2007 @@ -52,7 +52,7 @@ and an encoding of LLVM IR into the container format.

      -The bitstream format is an abstract encoding of structured data, like very +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 @@ -433,7 +433,7 @@ src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!"> Chris Lattner
      The LLVM Compiler Infrastructure
      -Last modified: $Date: 2007/05/12 07:50:14 $ +Last modified: $Date: 2007/05/12 08:01:52 $ From isanbard at gmail.com Sat May 12 05:37:21 2007 From: isanbard at gmail.com (Bill Wendling) Date: Sat, 12 May 2007 05:37:21 -0500 Subject: [llvm-commits] CVS: llvm-www/DevMtgMay2007.html Message-ID: <200705121037.l4CAbLsF026791@zion.cs.uiuc.edu> Changes in directory llvm-www: DevMtgMay2007.html updated: 1.138 -> 1.139 --- Log message: User HTML Entities. --- Diffs of the changes: (+6 -3) DevMtgMay2007.html | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) Index: llvm-www/DevMtgMay2007.html diff -u llvm-www/DevMtgMay2007.html:1.138 llvm-www/DevMtgMay2007.html:1.139 --- llvm-www/DevMtgMay2007.html:1.138 Fri May 11 19:17:26 2007 +++ llvm-www/DevMtgMay2007.html Sat May 12 05:37:03 2007 @@ -139,7 +139,10 @@ Processor Element.

    13:5014:10John CriswellSecure Virtual Architecture. A presentation on our research to create a virtual machine that operates below the operating system and a brief introduction to some of the novel security capabilities that our architecture can enable.Secure Virtual Architecture. A presentation on our research to + create a virtual machine that operates below the operating system and a + brief introduction to some of the novel security capabilities that our + architecture can enable.
    14:1014:30Jeff Cohen Using LLVM For The Jolt Compiler. Jeff will share his @@ -289,7 +292,7 @@
    Josh ConnerApple Inc.
    John CriswellUIUC
    Mike EnglerAdobe Systems Incorporated.
    Rafael EspindolaGoogle
    Rafael EspíndolaGoogle
    Tomas EvensenWind River
    Han GaoAdobe Systems Incorporated.
    Dan GohmanCray Inc.