diff options
Diffstat (limited to 'sys-devel/llvm')
-rw-r--r-- | sys-devel/llvm/Manifest | 13 | ||||
-rw-r--r-- | sys-devel/llvm/files/6.0.1/0001-cmake-Append-Wl-rpath-link-conditionally-to-GNULD.patch (renamed from sys-devel/llvm/files/6.0.9999/0001-cmake-Append-Wl-rpath-link-conditionally-to-GNULD.patch) | 0 | ||||
-rw-r--r-- | sys-devel/llvm/files/6.0.1/0002-llvm-mc-Produce-R_X86_64_PLT32-for-call-jmp-foo.patch | 314 | ||||
-rw-r--r-- | sys-devel/llvm/llvm-5.0.2.ebuild | 2 | ||||
-rw-r--r-- | sys-devel/llvm/llvm-6.0.1-r1.ebuild (renamed from sys-devel/llvm/llvm-6.0.9999.ebuild) | 25 | ||||
-rw-r--r-- | sys-devel/llvm/llvm-6.0.1.ebuild | 2 | ||||
-rw-r--r-- | sys-devel/llvm/llvm-7.0.9999.ebuild | 5 | ||||
-rw-r--r-- | sys-devel/llvm/llvm-9999.ebuild | 5 |
8 files changed, 345 insertions, 21 deletions
diff --git a/sys-devel/llvm/Manifest b/sys-devel/llvm/Manifest index f99d03ec8b4a..d44a31274053 100644 --- a/sys-devel/llvm/Manifest +++ b/sys-devel/llvm/Manifest @@ -1,6 +1,7 @@ AUX 4.0.1/0001-cmake-Pass-Wl-z-nodelete-on-Linux-to-prevent-unloadi.patch 2408 BLAKE2B 92f396663629d0f1bc65833d4050f8e28044c25dec961981edac768b374c543d9084eb70ac51435554acfc5430c45035e4acae6e02f453bc679a3458979b53f3 SHA512 0424f35f12054a7e3e20d948c714979cfcf01200e8aac1cfab1b9fdd08718b4f4143a635eca9500e7ac77993ff390358cb630b8d97029cd9ec1e14c9cfaedfd2 AUX 5.0.2/0001-Fix-return-type-in-ORC-readMem-client-interface.patch 1299 BLAKE2B 486ead622d4885f9e218a6fb44496ace574950e9946455050ffdde7bfac56c0893a5dc62fa6ffe6e8e18cdd706073454f8e1f2bc75a8ad98cf5246449ffe4df2 SHA512 3e17e72508242172c59547eaa2a8238bd145cfb888d4323818a943f075645b9bc5a272656e39f37d9f7997a16491b6a3a3b5c51101465369d8570a0d078cd335 -AUX 6.0.9999/0001-cmake-Append-Wl-rpath-link-conditionally-to-GNULD.patch 1575 BLAKE2B 3a650b244c2b97fa6e76327348a7bb00ace08b18441a59af238ccf0cdea4409e2d0b46c0a381737d7d0879dbc5eb0f71007fee0c9f0f5b92369453223d25397d SHA512 f09bf2b2bbac1f875f32f8761697717fbbfda2939fcccb8b03ecb8e4e65377c875355a3523d54f81c53d11bfaf3557f80000918bea003cfdba0662469283563a +AUX 6.0.1/0001-cmake-Append-Wl-rpath-link-conditionally-to-GNULD.patch 1575 BLAKE2B 3a650b244c2b97fa6e76327348a7bb00ace08b18441a59af238ccf0cdea4409e2d0b46c0a381737d7d0879dbc5eb0f71007fee0c9f0f5b92369453223d25397d SHA512 f09bf2b2bbac1f875f32f8761697717fbbfda2939fcccb8b03ecb8e4e65377c875355a3523d54f81c53d11bfaf3557f80000918bea003cfdba0662469283563a +AUX 6.0.1/0002-llvm-mc-Produce-R_X86_64_PLT32-for-call-jmp-foo.patch 13865 BLAKE2B 03f677e386115c3c7333db39664f75b2b4c22e18c2e487e515dc2a55acaa1bf569d2945ae620420b4b4323fb2e4fb7d3c3313dcc7e648942afa25d055d36efc7 SHA512 2820793ef29f08b55b7d94ef700085dce02c6a029c5877a77c5296e9a05dfc9946d10ee66d2d3d8a150cd511e3346d2acf259b873aeed25c1b0aaefebe95790d AUX 9999/0007-llvm-config-Clean-up-exported-values-update-for-shar.patch 2626 BLAKE2B 6c3afe6941568119b6bbce1c66be913a29a2ac7853a881804c1c22e981075f1677ca7e4744738ad858f58a58c1a7295aeb5f1d87b3a2b2adfb971a54d76c04fb SHA512 34a84427c34fa8886f55e05cf0ffce258cdee8e98190e070eb40dc555a30784c49ebe4f946f7ea51b7d00fceb8071fc745007250dc5b5a61c4d2bb9910672ec5 AUX 9999/musl-fixes.patch 1258 BLAKE2B fe275412bc908884239ea71de9a9ddf1d2f64debaa1a9ada18170195a7775c41571600ed3666343bf967aff5f9117900f73155f60de5077bc4584cfc2f782f53 SHA512 314dcbe846a66312c9f1634f4ff3f4670b3db1d3210bb550f1d3877a423333ba042da2e90c8736918a36be4d4faf58dab8d3236d4f26df5af7f7f019b0e0ec8f DIST cfe-3.4.2.src.tar.gz 10612313 BLAKE2B 6a5d9f20d181b217f3ca72b6585bd953150cc0d207a203feb24aa9cb9b2e341ac6a2e152a1c40baf2d53e5a52c4e4e86a518a329bdda39c08986b3437b04cee8 SHA512 e01fa8e312e9b3b7b3cb572ac21349161aaa50078ecfe7bded273b75db4a0c44acde524f8fdfcbeec54c61eeeb8339e9917d1f205a8fda18e34fe7ccbe89c36d @@ -46,9 +47,9 @@ EBUILD llvm-3.6.2-r100.ebuild 7982 BLAKE2B fd247bb8877a421ec4f00ed499cddaa982ab7 EBUILD llvm-3.7.1-r3.ebuild 16384 BLAKE2B 79560163f422e3b897eefae8ec2ac905a18a4c2beb51ac04fa034fc2dc3a8ed953f4111c23049fe2f00b0dd54c15246be2779794475dfcb5d03904e6723631de SHA512 f791308bbb38b7f350d041c3a62aa46cb875c7df9baec011199933603c242c1d9760c5960b518ca28a5e2863fcdafed52362cec738f149738b0fd6bf0aa46073 EBUILD llvm-3.9.1-r1.ebuild 16317 BLAKE2B a4edb45656ae073f618d899787a339b0c5e7f8f0bab9a5030c33c85ba9761e9e510021b139aebc422902da55bf5b1ff2caf5c66604f338768eed359ad8bb84d5 SHA512 ee31d4f2612a413aafc906880ea4d7f06c276aa4a0dee9635ac9ec076539ee14c82ce4cc81cd689f6812ae74eaa421ca8648d3d143d5ec238aaf602692f99434 EBUILD llvm-4.0.1-r1.ebuild 6985 BLAKE2B e280f2ce69aeef46f6043c9ebb49205788045d796c294fe071d1776c63850ccb84378fa2bd7fc1f3023677672895dcd618073e6d3b67a95800dd247ceac6bdd5 SHA512 0a0c1f83f350cb8c86a39bcbc6b1678c12e3936369a3f24bae4b7aa5014896c09a45986e059f280eb5737a08c6d2dd1491fa6a11cf441d100c0a6506c2118410 -EBUILD llvm-5.0.2.ebuild 7798 BLAKE2B 84f50248cd66e39bfe7aa2d8d097117876f28c8f4e05182607c7b8fbbed5cb821a5771b894e32530cb0e503c03d1e3df69133bbab178c0c94bf831a6c4240931 SHA512 d8c3db1f4d6b624a9e6450b2f6d07d0dff1727e1259fd63b474f4dcc91ef63b8b0e3bc25b5b893684a47096c2155dd3a94d9b7d002b7e8cad85afb5ffe2edcc3 -EBUILD llvm-6.0.1.ebuild 7823 BLAKE2B 79893c4ecb5294b159ad4f5becff50eebbda81ce89cc7341544eda33f62579ebadd5babb446a606148e55f7ea8bb2d33f1d564ffc48881cc1af3810454188755 SHA512 3c747ebea10e942709e8e5f7a9010946f70075cb168fe9dea1162650ad605b0a1badb557082ac27c864b9fa1fbd4ea13029a83cf84c5f4938bcc29402da36415 -EBUILD llvm-6.0.9999.ebuild 7514 BLAKE2B 506aec86e9f4de12d00953a33e2cbd71a29bcfd57ec621d41da18aaceebfcc56b67b830d2d6fb60293651072447947c5851f5a9d1dee64a14ede9249e33b866d SHA512 2b11e3dfdd2eec988f01cde34c1dbaa9cdd0ab4aadddd7592f9e7d782201fb0dae564fd5e69942d8da5b674353e552c4f51d164305676daf871502bb05d88be9 -EBUILD llvm-7.0.9999.ebuild 7361 BLAKE2B 68f585ebe345c0e010a90fc111d504f56321e8a250c1aba0f623dde4ed13e471c4cdd62f72bfca21631044840997e7e910469220068ef886b4c89a7183ee9953 SHA512 960ba38ee105a797b6c28fe4bb44e9c3e1f3ddb1a72bd3e5c57381730340d44b8b1ecb20a8333e446a48df5740cb83f104fdd0b5e247cbddfa078c11637a7fe0 -EBUILD llvm-9999.ebuild 8213 BLAKE2B 3832405f867fed0b4a3902bae6367c0d877f7457259c85005573cd5f81c8b8269fd79af4748701142a909c51137cff7fe4dc0be2d4cc598a6ba23a62163303d7 SHA512 84e416065be278592efad7455405c7cca5b33fdcd3ce6be46767e4edae5557194d5d6cc6c18e633ca26dc1fdfca7f4c330b2ca2b51bc44d5a9ab9e9540c2a5a7 +EBUILD llvm-5.0.2.ebuild 7795 BLAKE2B d09a6cf50eb4da309e68ff7ac347da1ecea7c8f7f994cf7b69b5c98823d373a5e0e4023271a8b5b920d0eba79d5a70f865d2b4d50bf148731f93abf0991ed94d SHA512 3ce3fd983255ce1c1762c4e9186b06f26d4fc7cbf409709c9326b8ee6d9fab9e0a090560de3af87e544b4ae2ae631f55c76160de6a77109a0b02677345172ef1 +EBUILD llvm-6.0.1-r1.ebuild 7997 BLAKE2B d25f6f3d2814b66db41936b808d72f625f432393619d1a7658fa959918244c00ba94f63b959f0e2feddd71b7b0f1f8fd6fa0549cedfb5a4d0962c5c3aeb52293 SHA512 e8228d1f4d63052f3b5c56f8d2d36ada7815aa1758ea0264e92eec341a87b64db97d682fdf55e4fa2da11f0caf4e349083c0040bbc7ed6eae71ea40e50c8a7b8 +EBUILD llvm-6.0.1.ebuild 7820 BLAKE2B 0077de543904f588bf856b4f279d1ced9a06bfe77da0e7149469ff960b4d0c7c1e557d92074c4c0570a7054a0b14d8663d2a502678884581fb35060f8bb0397f SHA512 b1fc081efff6cc0c77230058b261c5880fe57641544b21e03ff55ab993d64c00b4df1b12a5af5fa4b5f5528a1bb0c04a3f056be2aa8b528fbac29ec484e7f35b +EBUILD llvm-7.0.9999.ebuild 7322 BLAKE2B 285a4798f539dad91bb406569731bbb59c69b7e46124431a532187f0dbdc705d9440c21a68ab6258b3bc46455df7a411a10222a7d4d89593c89d0aea2b1ff9e9 SHA512 a2c0e0afa9a3618e0d021680d12d96d739b49750279fcb8b435c6566ffebc9c83ef39428d7b4c197bbff16ea0314b519ed599d78beb83dd0f10b15b8e707e1a7 +EBUILD llvm-9999.ebuild 8174 BLAKE2B 2ad19fa2c09eb2114a8d072379164a6a2f6b80b8cc5250f25bf7974886eb12aa755c880f781c489190c7b623e034073b18663011d078eb643e43390e35b7ad00 SHA512 842c699901352029ff681857c0bf4a7c50f0fdf60469fa618eaf288dc16b40d723fa8a6579ecd8fa0cbc750f2cb9f64c15b27157cdc89c498c22a1071eabab73 MISC metadata.xml 2861 BLAKE2B 3102fbcb2d2fe9f173f01dddc4617115e8cd569b2ced486c45affcba348a922cf09974e1bf977f0ac5ec8bb42b9fb87b1005cebcf74120cdb96f03ad8a1ae406 SHA512 0ea8dc63287f86428f6c7cce5f5be821d16f2b473c2b8d09c2edcc1e1d3ed445e3eaba1c96aaedbd13163f61e0c1deaad9df5c410bf1e73d05ad1bace88ec95e diff --git a/sys-devel/llvm/files/6.0.9999/0001-cmake-Append-Wl-rpath-link-conditionally-to-GNULD.patch b/sys-devel/llvm/files/6.0.1/0001-cmake-Append-Wl-rpath-link-conditionally-to-GNULD.patch index 5d1f042164ec..5d1f042164ec 100644 --- a/sys-devel/llvm/files/6.0.9999/0001-cmake-Append-Wl-rpath-link-conditionally-to-GNULD.patch +++ b/sys-devel/llvm/files/6.0.1/0001-cmake-Append-Wl-rpath-link-conditionally-to-GNULD.patch diff --git a/sys-devel/llvm/files/6.0.1/0002-llvm-mc-Produce-R_X86_64_PLT32-for-call-jmp-foo.patch b/sys-devel/llvm/files/6.0.1/0002-llvm-mc-Produce-R_X86_64_PLT32-for-call-jmp-foo.patch new file mode 100644 index 000000000000..eac5fe44178e --- /dev/null +++ b/sys-devel/llvm/files/6.0.1/0002-llvm-mc-Produce-R_X86_64_PLT32-for-call-jmp-foo.patch @@ -0,0 +1,314 @@ +From 9ff352cb602d5dd68bcd7bf2ba4711c8568271a9 Mon Sep 17 00:00:00 2001 +From: George Rimar <grimar@accesssoftek.com> +Date: Tue, 20 Feb 2018 10:17:57 +0000 +Subject: [PATCH] [llvm-mc] - Produce R_X86_64_PLT32 for "call/jmp foo". + +For instructions like call foo and jmp foo patch changes +relocation produced from R_X86_64_PC32 to R_X86_64_PLT32. +Relocation can be used as a marker for 32-bit PC-relative branches. +Linker will reduce PLT32 relocation to PC32 if function is defined locally. + +Differential revision: https://reviews.llvm.org/D43383 + +git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325569 91177308-0d34-0410-b5e6-96231b3b80d8 +--- + lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp | 3 ++ + .../X86/MCTargetDesc/X86ELFObjectWriter.cpp | 3 ++ + lib/Target/X86/MCTargetDesc/X86FixupKinds.h | 1 + + .../X86/MCTargetDesc/X86MCCodeEmitter.cpp | 32 +++++++++++++++++-- + .../X86/MCTargetDesc/X86MachObjectWriter.cpp | 1 + + .../MCTargetDesc/X86WinCOFFObjectWriter.cpp | 1 + + test/CodeGen/X86/cmp.ll | 2 +- + test/CodeGen/X86/fma.ll | 8 ++--- + test/MC/ELF/basic-elf-64.s | 18 ++++++----- + test/MC/ELF/ifunc-reloc.s | 2 +- + test/MC/ELF/weak-diff.s | 2 +- + test/MC/ELF/weak-relocation.s | 2 +- + test/MC/ELF/weakref-reloc.s | 2 +- + 13 files changed, 58 insertions(+), 19 deletions(-) + +diff --git a/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp b/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp +index 34db5918926..b301722b535 100644 +--- a/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp ++++ b/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp +@@ -46,6 +46,7 @@ static unsigned getFixupKindLog2Size(unsigned Kind) { + case X86::reloc_signed_4byte: + case X86::reloc_signed_4byte_relax: + case X86::reloc_global_offset_table: ++ case X86::reloc_branch_4byte_pcrel: + case FK_SecRel_4: + case FK_Data_4: + return 2; +@@ -95,6 +96,7 @@ public: + {"reloc_signed_4byte_relax", 0, 32, 0}, + {"reloc_global_offset_table", 0, 32, 0}, + {"reloc_global_offset_table8", 0, 64, 0}, ++ {"reloc_branch_4byte_pcrel", 0, 32, MCFixupKindInfo::FKF_IsPCRel}, + }; + + if (Kind < FirstTargetFixupKind) +@@ -102,6 +104,7 @@ public: + + assert(unsigned(Kind - FirstTargetFixupKind) < getNumFixupKinds() && + "Invalid kind!"); ++ assert(Infos[Kind - FirstTargetFixupKind].Name && "Empty fixup name!"); + return Infos[Kind - FirstTargetFixupKind]; + } + +diff --git a/lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp b/lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp +index 4cdbae4d0d9..2ecbb80cd06 100644 +--- a/lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp ++++ b/lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp +@@ -75,6 +75,9 @@ static X86_64RelType getType64(unsigned Kind, + case X86::reloc_riprel_4byte_relax_rex: + case X86::reloc_riprel_4byte_movq_load: + return RT64_32; ++ case X86::reloc_branch_4byte_pcrel: ++ Modifier = MCSymbolRefExpr::VK_PLT; ++ return RT64_32; + case FK_PCRel_2: + case FK_Data_2: + return RT64_16; +diff --git a/lib/Target/X86/MCTargetDesc/X86FixupKinds.h b/lib/Target/X86/MCTargetDesc/X86FixupKinds.h +index dfdc9ec29ae..3c04b13e002 100644 +--- a/lib/Target/X86/MCTargetDesc/X86FixupKinds.h ++++ b/lib/Target/X86/MCTargetDesc/X86FixupKinds.h +@@ -30,6 +30,7 @@ enum Fixups { + // of the instruction. Used only + // for _GLOBAL_OFFSET_TABLE_. + reloc_global_offset_table8, // 64-bit variant. ++ reloc_branch_4byte_pcrel, // 32-bit PC relative branch. + // Marker + LastTargetFixupKind, + NumTargetFixupKinds = LastTargetFixupKind - FirstTargetFixupKind +diff --git a/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp b/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp +index 4ddc1f0ba42..608dc4acb04 100644 +--- a/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp ++++ b/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp +@@ -152,6 +152,8 @@ public: + + uint8_t DetermineREXPrefix(const MCInst &MI, uint64_t TSFlags, + int MemOperand, const MCInstrDesc &Desc) const; ++ ++ bool isPCRel32Branch(const MCInst &MI) const; + }; + + } // end anonymous namespace +@@ -276,6 +278,22 @@ static bool HasSecRelSymbolRef(const MCExpr *Expr) { + return false; + } + ++bool X86MCCodeEmitter::isPCRel32Branch(const MCInst &MI) const { ++ unsigned Opcode = MI.getOpcode(); ++ const MCInstrDesc &Desc = MCII.get(Opcode); ++ if ((Opcode != X86::CALL64pcrel32 && Opcode != X86::JMP_4) || ++ getImmFixupKind(Desc.TSFlags) != FK_PCRel_4) ++ return false; ++ ++ unsigned CurOp = X86II::getOperandBias(Desc); ++ const MCOperand &Op = MI.getOperand(CurOp); ++ if (!Op.isExpr()) ++ return false; ++ ++ const MCSymbolRefExpr *Ref = dyn_cast<MCSymbolRefExpr>(Op.getExpr()); ++ return Ref && Ref->getKind() == MCSymbolRefExpr::VK_None; ++} ++ + void X86MCCodeEmitter:: + EmitImmediate(const MCOperand &DispOp, SMLoc Loc, unsigned Size, + MCFixupKind FixupKind, unsigned &CurByte, raw_ostream &OS, +@@ -331,7 +349,8 @@ EmitImmediate(const MCOperand &DispOp, SMLoc Loc, unsigned Size, + FixupKind == MCFixupKind(X86::reloc_riprel_4byte) || + FixupKind == MCFixupKind(X86::reloc_riprel_4byte_movq_load) || + FixupKind == MCFixupKind(X86::reloc_riprel_4byte_relax) || +- FixupKind == MCFixupKind(X86::reloc_riprel_4byte_relax_rex)) ++ FixupKind == MCFixupKind(X86::reloc_riprel_4byte_relax_rex) || ++ FixupKind == MCFixupKind(X86::reloc_branch_4byte_pcrel)) + ImmOffset -= 4; + if (FixupKind == FK_PCRel_2) + ImmOffset -= 2; +@@ -1287,9 +1306,18 @@ encodeInstruction(const MCInst &MI, raw_ostream &OS, + EmitByte(BaseOpcode, CurByte, OS); + break; + } +- case X86II::RawFrm: ++ case X86II::RawFrm: { + EmitByte(BaseOpcode, CurByte, OS); ++ ++ if (!is64BitMode(STI) || !isPCRel32Branch(MI)) ++ break; ++ ++ const MCOperand &Op = MI.getOperand(CurOp++); ++ EmitImmediate(Op, MI.getLoc(), X86II::getSizeOfImm(TSFlags), ++ MCFixupKind(X86::reloc_branch_4byte_pcrel), CurByte, OS, ++ Fixups); + break; ++ } + case X86II::RawFrmMemOffs: + // Emit segment override opcode prefix as needed. + EmitSegmentOverridePrefix(CurByte, 1, MI, OS); +diff --git a/lib/Target/X86/MCTargetDesc/X86MachObjectWriter.cpp b/lib/Target/X86/MCTargetDesc/X86MachObjectWriter.cpp +index 965f7de809b..22773e64409 100644 +--- a/lib/Target/X86/MCTargetDesc/X86MachObjectWriter.cpp ++++ b/lib/Target/X86/MCTargetDesc/X86MachObjectWriter.cpp +@@ -94,6 +94,7 @@ static unsigned getFixupKindLog2Size(unsigned Kind) { + case X86::reloc_riprel_4byte_movq_load: + case X86::reloc_signed_4byte: + case X86::reloc_signed_4byte_relax: ++ case X86::reloc_branch_4byte_pcrel: + case FK_Data_4: return 2; + case FK_Data_8: return 3; + } +diff --git a/lib/Target/X86/MCTargetDesc/X86WinCOFFObjectWriter.cpp b/lib/Target/X86/MCTargetDesc/X86WinCOFFObjectWriter.cpp +index 5139bb46b56..291056e3526 100644 +--- a/lib/Target/X86/MCTargetDesc/X86WinCOFFObjectWriter.cpp ++++ b/lib/Target/X86/MCTargetDesc/X86WinCOFFObjectWriter.cpp +@@ -62,6 +62,7 @@ unsigned X86WinCOFFObjectWriter::getRelocType(MCContext &Ctx, + case X86::reloc_riprel_4byte_movq_load: + case X86::reloc_riprel_4byte_relax: + case X86::reloc_riprel_4byte_relax_rex: ++ case X86::reloc_branch_4byte_pcrel: + return COFF::IMAGE_REL_AMD64_REL32; + case FK_Data_4: + case X86::reloc_signed_4byte: +diff --git a/test/CodeGen/X86/cmp.ll b/test/CodeGen/X86/cmp.ll +index 1ab8421638d..244e651e182 100644 +--- a/test/CodeGen/X86/cmp.ll ++++ b/test/CodeGen/X86/cmp.ll +@@ -240,7 +240,7 @@ define i32 @test12() ssp uwtable { + ; CHECK-NEXT: pushq %rax # encoding: [0x50] + ; CHECK-NEXT: .cfi_def_cfa_offset 16 + ; CHECK-NEXT: callq test12b # encoding: [0xe8,A,A,A,A] +-; CHECK-NEXT: # fixup A - offset: 1, value: test12b-4, kind: FK_PCRel_4 ++; CHECK-NEXT: # fixup A - offset: 1, value: test12b-4, kind: reloc_branch_4byte_pcrel + ; CHECK-NEXT: testb %al, %al # encoding: [0x84,0xc0] + ; CHECK-NEXT: je .LBB12_2 # encoding: [0x74,A] + ; CHECK-NEXT: # fixup A - offset: 1, value: .LBB12_2-1, kind: FK_PCRel_1 +diff --git a/test/CodeGen/X86/fma.ll b/test/CodeGen/X86/fma.ll +index 611f707d64c..2c919e3ebc9 100644 +--- a/test/CodeGen/X86/fma.ll ++++ b/test/CodeGen/X86/fma.ll +@@ -137,7 +137,7 @@ define x86_fp80 @test_f80(x86_fp80 %a, x86_fp80 %b, x86_fp80 %c) #0 { + ; FMA64-NEXT: fstpt {{[0-9]+}}(%rsp) ## encoding: [0xdb,0x7c,0x24,0x10] + ; FMA64-NEXT: fstpt (%rsp) ## encoding: [0xdb,0x3c,0x24] + ; FMA64-NEXT: callq _fmal ## encoding: [0xe8,A,A,A,A] +-; FMA64-NEXT: ## fixup A - offset: 1, value: _fmal-4, kind: FK_PCRel_4 ++; FMA64-NEXT: ## fixup A - offset: 1, value: _fmal-4, kind: reloc_branch_4byte_pcrel + ; FMA64-NEXT: addq $56, %rsp ## encoding: [0x48,0x83,0xc4,0x38] + ; FMA64-NEXT: retq ## encoding: [0xc3] + ; +@@ -151,7 +151,7 @@ define x86_fp80 @test_f80(x86_fp80 %a, x86_fp80 %b, x86_fp80 %c) #0 { + ; FMACALL64-NEXT: fstpt {{[0-9]+}}(%rsp) ## encoding: [0xdb,0x7c,0x24,0x10] + ; FMACALL64-NEXT: fstpt (%rsp) ## encoding: [0xdb,0x3c,0x24] + ; FMACALL64-NEXT: callq _fmal ## encoding: [0xe8,A,A,A,A] +-; FMACALL64-NEXT: ## fixup A - offset: 1, value: _fmal-4, kind: FK_PCRel_4 ++; FMACALL64-NEXT: ## fixup A - offset: 1, value: _fmal-4, kind: reloc_branch_4byte_pcrel + ; FMACALL64-NEXT: addq $56, %rsp ## encoding: [0x48,0x83,0xc4,0x38] + ; FMACALL64-NEXT: retq ## encoding: [0xc3] + ; +@@ -165,7 +165,7 @@ define x86_fp80 @test_f80(x86_fp80 %a, x86_fp80 %b, x86_fp80 %c) #0 { + ; AVX512-NEXT: fstpt {{[0-9]+}}(%rsp) ## encoding: [0xdb,0x7c,0x24,0x10] + ; AVX512-NEXT: fstpt (%rsp) ## encoding: [0xdb,0x3c,0x24] + ; AVX512-NEXT: callq _fmal ## encoding: [0xe8,A,A,A,A] +-; AVX512-NEXT: ## fixup A - offset: 1, value: _fmal-4, kind: FK_PCRel_4 ++; AVX512-NEXT: ## fixup A - offset: 1, value: _fmal-4, kind: reloc_branch_4byte_pcrel + ; AVX512-NEXT: addq $56, %rsp ## encoding: [0x48,0x83,0xc4,0x38] + ; AVX512-NEXT: retq ## encoding: [0xc3] + ; +@@ -179,7 +179,7 @@ define x86_fp80 @test_f80(x86_fp80 %a, x86_fp80 %b, x86_fp80 %c) #0 { + ; AVX512VL-NEXT: fstpt {{[0-9]+}}(%rsp) ## encoding: [0xdb,0x7c,0x24,0x10] + ; AVX512VL-NEXT: fstpt (%rsp) ## encoding: [0xdb,0x3c,0x24] + ; AVX512VL-NEXT: callq _fmal ## encoding: [0xe8,A,A,A,A] +-; AVX512VL-NEXT: ## fixup A - offset: 1, value: _fmal-4, kind: FK_PCRel_4 ++; AVX512VL-NEXT: ## fixup A - offset: 1, value: _fmal-4, kind: reloc_branch_4byte_pcrel + ; AVX512VL-NEXT: addq $56, %rsp ## encoding: [0x48,0x83,0xc4,0x38] + ; AVX512VL-NEXT: retq ## encoding: [0xc3] + entry: +diff --git a/test/MC/ELF/basic-elf-64.s b/test/MC/ELF/basic-elf-64.s +index 01f020bd64b..ae0903ec8cd 100644 +--- a/test/MC/ELF/basic-elf-64.s ++++ b/test/MC/ELF/basic-elf-64.s +@@ -13,6 +13,7 @@ main: # @main + callq puts + xorl %eax, %eax + addq $8, %rsp ++ call foo@GOTPCREL + ret + .Ltmp0: + .size main, .Ltmp0-main +@@ -44,14 +45,15 @@ main: # @main + + // CHECK: Name: .rela.text + +-// CHECK: Relocations [ +-// CHECK: Section {{.*}} .rela.text { +-// CHECK: 0x5 R_X86_64_32 .rodata.str1.1 0x0 +-// CHECK: 0xA R_X86_64_PC32 puts 0xFFFFFFFFFFFFFFFC +-// CHECK: 0xF R_X86_64_32 .rodata.str1.1 0x6 +-// CHECK: 0x14 R_X86_64_PC32 puts 0xFFFFFFFFFFFFFFFC +-// CHECK: } +-// CHECK: ] ++// CHECK: Relocations [ ++// CHECK: Section {{.*}} .rela.text { ++// CHECK-NEXT: 0x5 R_X86_64_32 .rodata.str1.1 0x0 ++// CHECK-NEXT: 0xA R_X86_64_PLT32 puts 0xFFFFFFFFFFFFFFFC ++// CHECK-NEXT: 0xF R_X86_64_32 .rodata.str1.1 0x6 ++// CHECK-NEXT: 0x14 R_X86_64_PLT32 puts 0xFFFFFFFFFFFFFFFC ++// CHECK-NEXT: 0x1F R_X86_64_GOTPCREL foo 0xFFFFFFFFFFFFFFFC ++// CHECK-NEXT: } ++// CHECK-NEXT: ] + + // CHECK: Symbol { + // CHECK: Binding: Local +diff --git a/test/MC/ELF/ifunc-reloc.s b/test/MC/ELF/ifunc-reloc.s +index 6f1d79b22c4..b4917371b0f 100644 +--- a/test/MC/ELF/ifunc-reloc.s ++++ b/test/MC/ELF/ifunc-reloc.s +@@ -11,6 +11,6 @@ alias: + + // CHECK: Relocations [ + // CHECK-NEXT: Section {{.*}} .rela.text { +-// CHECK-NEXT: 0x1 R_X86_64_PC32 sym 0xFFFFFFFFFFFFFFFC ++// CHECK-NEXT: 0x1 R_X86_64_PLT32 sym 0xFFFFFFFFFFFFFFFC + // CHECK-NEXT: } + // CHECK-NEXT: ] +diff --git a/test/MC/ELF/weak-diff.s b/test/MC/ELF/weak-diff.s +index ded89b8f833..9785a2befb1 100644 +--- a/test/MC/ELF/weak-diff.s ++++ b/test/MC/ELF/weak-diff.s +@@ -2,7 +2,7 @@ + + // CHECK: Relocations [ + // CHECK-NEXT: Section ({{.*}}) .rela.text { +-// CHECK-NEXT: 0x1D R_X86_64_PC32 f2 0xFFFFFFFFFFFFFFFC ++// CHECK-NEXT: 0x1D R_X86_64_PLT32 f2 0xFFFFFFFFFFFFFFFC + // CHECK-NEXT: } + // CHECK-NEXT: ] + +diff --git a/test/MC/ELF/weak-relocation.s b/test/MC/ELF/weak-relocation.s +index 19153aa50da..defaf4e6a38 100644 +--- a/test/MC/ELF/weak-relocation.s ++++ b/test/MC/ELF/weak-relocation.s +@@ -9,6 +9,6 @@ bar: + + // CHECK: Relocations [ + // CHECK-NEXT: Section ({{[0-9]+}}) .rela.text { +-// CHECK-NEXT: 0x1 R_X86_64_PC32 foo 0xFFFFFFFFFFFFFFFC ++// CHECK-NEXT: 0x1 R_X86_64_PLT32 foo 0xFFFFFFFFFFFFFFFC + // CHECK-NEXT: } + // CHECK-NEXT: ] +diff --git a/test/MC/ELF/weakref-reloc.s b/test/MC/ELF/weakref-reloc.s +index baf80060c43..997aea0477a 100644 +--- a/test/MC/ELF/weakref-reloc.s ++++ b/test/MC/ELF/weakref-reloc.s +@@ -9,6 +9,6 @@ + // CHECK: Relocations [ + // CHECK-NEXT: Section ({{[0-9]+}}) {{[^ ]+}} { + // CHECK-NEXT: 0x1 R_X86_64_PLT32 zed 0xFFFFFFFFFFFFFFFC +-// CHECK-NEXT: 0x6 R_X86_64_PC32 foo 0xFFFFFFFFFFFFFFFC ++// CHECK-NEXT: 0x6 R_X86_64_PLT32 foo 0xFFFFFFFFFFFFFFFC + // CHECK-NEXT: } + // CHECK-NEXT: ] +-- +2.18.0 + diff --git a/sys-devel/llvm/llvm-5.0.2.ebuild b/sys-devel/llvm/llvm-5.0.2.ebuild index 02bf7d715a4b..a90d48e4c366 100644 --- a/sys-devel/llvm/llvm-5.0.2.ebuild +++ b/sys-devel/llvm/llvm-5.0.2.ebuild @@ -84,7 +84,7 @@ src_prepare() { cp {"${WORKDIR}/llvm-5.0.1-patchset",.}/test/tools/llvm-symbolizer/Inputs/print_context.o || die # Fix appending -Wl,-rpath-link on non-Linux (-> FreeBSD). - eapply "${FILESDIR}"/6.0.9999/0001-cmake-Append-Wl-rpath-link-conditionally-to-GNULD.patch + eapply "${FILESDIR}"/6.0.1/0001-cmake-Append-Wl-rpath-link-conditionally-to-GNULD.patch # gcc-8 build failure eapply "${FILESDIR}"/5.0.2/0001-Fix-return-type-in-ORC-readMem-client-interface.patch diff --git a/sys-devel/llvm/llvm-6.0.9999.ebuild b/sys-devel/llvm/llvm-6.0.1-r1.ebuild index b8768df35d5e..1d5d5a04df1d 100644 --- a/sys-devel/llvm/llvm-6.0.9999.ebuild +++ b/sys-devel/llvm/llvm-6.0.1-r1.ebuild @@ -8,15 +8,13 @@ EAPI=6 CMAKE_MIN_VERSION=3.7.0-r1 PYTHON_COMPAT=( python2_7 ) -inherit cmake-utils eapi7-ver flag-o-matic git-r3 multilib-minimal \ +inherit cmake-utils eapi7-ver flag-o-matic multilib-minimal \ multiprocessing pax-utils python-any-r1 toolchain-funcs DESCRIPTION="Low Level Virtual Machine" HOMEPAGE="https://llvm.org/" -SRC_URI="" -EGIT_REPO_URI="https://git.llvm.org/git/llvm.git - https://github.com/llvm-mirror/llvm.git" -EGIT_BRANCH="release_60" +SRC_URI="https://releases.llvm.org/${PV/_//}/${P/_/}.src.tar.xz + !doc? ( https://dev.gentoo.org/~mgorny/dist/llvm/${P}-manpages.tar.bz2 )" # Keep in sync with CMakeLists.txt ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430 @@ -34,7 +32,7 @@ ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) LICENSE="UoI-NCSA rc BSD public-domain llvm_targets_ARM? ( LLVM-Grant )" SLOT="$(ver_cut 1)" -KEYWORDS="" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-fbsd ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos" IUSE="debug doc gold libedit +libffi ncurses test xar xml kernel_Darwin ${ALL_LLVM_TARGETS[*]}" RESTRICT="!test? ( test )" @@ -72,6 +70,8 @@ PDEPEND="sys-devel/llvm-common REQUIRED_USE="${PYTHON_REQUIRED_USE} || ( ${ALL_LLVM_TARGETS[*]} )" +S=${WORKDIR}/${P/_/}.src + # least intrusive of all CMAKE_BUILD_TYPE=RelWithDebInfo @@ -81,7 +81,11 @@ src_prepare() { eapply "${FILESDIR}"/9999/0007-llvm-config-Clean-up-exported-values-update-for-shar.patch # Fix appending -Wl,-rpath-link on non-Linux (-> FreeBSD). - eapply "${FILESDIR}"/6.0.9999/0001-cmake-Append-Wl-rpath-link-conditionally-to-GNULD.patch + eapply "${FILESDIR}"/6.0.1/0001-cmake-Append-Wl-rpath-link-conditionally-to-GNULD.patch + + # Fix assembly compatibility with binutils-2.31.1 + # https://bugs.gentoo.org/663442 + eapply "${FILESDIR}"/6.0.1/0002-llvm-mc-Produce-R_X86_64_PLT32-for-call-jmp-foo.patch # disable use of SDK on OSX, bug #568758 sed -i -e 's/xcrun/false/' utils/lit/lit/util.py || die @@ -242,6 +246,13 @@ multilib_src_install_all() { _EOF_ doenvd "${T}/10llvm-${revord}" + # install pre-generated manpages + if ! use doc; then + # (doman does not support custom paths) + insinto "/usr/lib/llvm/${SLOT}/share/man/man1" + doins "${WORKDIR}/${P}-manpages/llvm"/*.1 + fi + docompress "/usr/lib/llvm/${SLOT}/share/man" } diff --git a/sys-devel/llvm/llvm-6.0.1.ebuild b/sys-devel/llvm/llvm-6.0.1.ebuild index 5df2671c3639..a1989293ef7b 100644 --- a/sys-devel/llvm/llvm-6.0.1.ebuild +++ b/sys-devel/llvm/llvm-6.0.1.ebuild @@ -81,7 +81,7 @@ src_prepare() { eapply "${FILESDIR}"/9999/0007-llvm-config-Clean-up-exported-values-update-for-shar.patch # Fix appending -Wl,-rpath-link on non-Linux (-> FreeBSD). - eapply "${FILESDIR}"/6.0.9999/0001-cmake-Append-Wl-rpath-link-conditionally-to-GNULD.patch + eapply "${FILESDIR}"/6.0.1/0001-cmake-Append-Wl-rpath-link-conditionally-to-GNULD.patch # disable use of SDK on OSX, bug #568758 sed -i -e 's/xcrun/false/' utils/lit/lit/util.py || die diff --git a/sys-devel/llvm/llvm-7.0.9999.ebuild b/sys-devel/llvm/llvm-7.0.9999.ebuild index 7e0077310f59..2777a3c503c1 100644 --- a/sys-devel/llvm/llvm-7.0.9999.ebuild +++ b/sys-devel/llvm/llvm-7.0.9999.ebuild @@ -230,14 +230,13 @@ multilib_src_install() { multilib_src_install_all() { local revord=$(( 9999 - ${SLOT} )) - cat <<-_EOF_ > "${T}/10llvm-${revord}" || die + newenvd - "10llvm-${revord}" <<-_EOF_ PATH="${EPREFIX}/usr/lib/llvm/${SLOT}/bin" # we need to duplicate it in ROOTPATH for Portage to respect... ROOTPATH="${EPREFIX}/usr/lib/llvm/${SLOT}/bin" MANPATH="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man" LDPATH="$( IFS=:; echo "${LLVM_LDPATHS[*]}" )" -_EOF_ - doenvd "${T}/10llvm-${revord}" + _EOF_ docompress "/usr/lib/llvm/${SLOT}/share/man" } diff --git a/sys-devel/llvm/llvm-9999.ebuild b/sys-devel/llvm/llvm-9999.ebuild index d5404d204a07..ed5dd0b817a7 100644 --- a/sys-devel/llvm/llvm-9999.ebuild +++ b/sys-devel/llvm/llvm-9999.ebuild @@ -256,14 +256,13 @@ multilib_src_install() { multilib_src_install_all() { local revord=$(( 9999 - ${SLOT} )) - cat <<-_EOF_ > "${T}/10llvm-${revord}" || die + newenvd - "10llvm-${revord}" <<-_EOF_ PATH="${EPREFIX}/usr/lib/llvm/${SLOT}/bin" # we need to duplicate it in ROOTPATH for Portage to respect... ROOTPATH="${EPREFIX}/usr/lib/llvm/${SLOT}/bin" MANPATH="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man" LDPATH="$( IFS=:; echo "${LLVM_LDPATHS[*]}" )" -_EOF_ - doenvd "${T}/10llvm-${revord}" + _EOF_ docompress "/usr/lib/llvm/${SLOT}/share/man" } |