[MacPorts] #50309: clang-3.7 @3.7.1_2+analyzer+openmp patch failure

MacPorts noreply at macports.org
Tue Jan 12 18:46:32 PST 2016


#50309: clang-3.7 @3.7.1_2+analyzer+openmp patch failure
-------------------------+------------------------
  Reporter:  mopihopi@…  |      Owner:  eborisch@…
      Type:  defect      |     Status:  new
  Priority:  Normal      |  Milestone:
 Component:  ports       |    Version:  2.3.4
Resolution:              |   Keywords:
      Port:  clang-3.7   |
-------------------------+------------------------

Comment (by braumann@…):

 Thanks, apparently your correction for `openmp-locations.patch` has
 worked, however, I run into more trouble, when I try to install `clang-3.7
 @3.7.1_2` with the same variants as I did for `3.7.0_2`:


 {{{
 $ sudo port -s patch clang-3.7 +analyzer +assertions +openmp
 ...
 :info:patch patching file
 lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp
 :info:patch Reversed (or previously applied) patch detected!  Assume -R?
 [n]
 :info:patch Apply anyway? [n]
 :info:patch Skipping patch.
 :info:patch 2 out of 2 hunks ignored -- saving rejects to file
 lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp.rej
 :info:patch Command failed:  cd
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_llvm-3.7/clang-3.7/work/llvm-3.7.1.src"
 && /usr/bin/patch -p1 <
 '/opt/local/var/macports/sources/rsync.macports.org/release/ports/lang/llvm-3.7/files/0001
 -Set-the-Mach-O-CPU-Subtype-to-ppc7400-when-targeting.patch'
 :info:patch Exit code: 1
 ...
 }}}

 Inside
 `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_llvm-3.7/clang-3.7/work/llvm-3.7.1.src/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp.rej`
 I found:

 {{{
 ***************
 *** 201,216 ****
   // FIXME: This should be in a separate file.
   namespace {
     class DarwinPPCAsmBackend : public PPCAsmBackend {
     public:
 -     DarwinPPCAsmBackend(const Target &T) : PPCAsmBackend(T, false) { }

       MCObjectWriter *createObjectWriter(raw_pwrite_stream &OS) const
 override {
         bool is64 = getPointerSize() == 8;
         return createPPCMachObjectWriter(
             OS,
             /*Is64Bit=*/is64,
             (is64 ? MachO::CPU_TYPE_POWERPC64 : MachO::CPU_TYPE_POWERPC),
 -           MachO::CPU_SUBTYPE_POWERPC_ALL);
       }
     };

 --- 201,223 ----
   // FIXME: This should be in a separate file.
   namespace {
     class DarwinPPCAsmBackend : public PPCAsmBackend {
 +     Triple TheTriple;
     public:
 +     DarwinPPCAsmBackend(const Target &T, const Triple &TT) :
 PPCAsmBackend(T, false), TheTriple(TT) { }

       MCObjectWriter *createObjectWriter(raw_pwrite_stream &OS) const
 override {
         bool is64 = getPointerSize() == 8;
 +       MachO::CPUSubTypePowerPC CS = MachO::CPU_SUBTYPE_POWERPC_ALL;
 +
 +       if (TheTriple.isOSDarwin() && !TheTriple.isMacOSXVersionLT(10,5))
 {
 +           CS = MachO::CPU_SUBTYPE_POWERPC_7400;
 +       }
 +
         return createPPCMachObjectWriter(
             OS,
             /*Is64Bit=*/is64,
             (is64 ? MachO::CPU_TYPE_POWERPC64 : MachO::CPU_TYPE_POWERPC),
 +           CS);
       }
     };

 ***************
 *** 232,238 ****
                                           const MCRegisterInfo &MRI,
                                           const Triple &TT, StringRef CPU)
 {
     if (TT.isOSDarwin())
 -     return new DarwinPPCAsmBackend(T);

     uint8_t OSABI = MCELFObjectTargetWriter::getOSABI(TT.getOS());
     bool IsLittleEndian = TT.getArch() == Triple::ppc64le;
 --- 239,245 ----
                                           const MCRegisterInfo &MRI,
                                           const Triple &TT, StringRef CPU)
 {
     if (TT.isOSDarwin())
 +     return new DarwinPPCAsmBackend(T, TT);

     uint8_t OSABI = MCELFObjectTargetWriter::getOSABI(TT.getOS());
     bool IsLittleEndian = TT.getArch() == Triple::ppc64le;
 }}}

 Hope you have an idea on how to fix this problem, thanks.

-- 
Ticket URL: <https://trac.macports.org/ticket/50309#comment:8>
MacPorts <https://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list