Re: [MacPorts] #54616: orc @0.4.27: error: can't find a register in class ‘BREG’ while reloading ‘asm’

MacPorts noreply at macports.org
Wed Aug 16 14:01:26 UTC 2017


#54616: orc @0.4.27: error: can't find a register in class ‘BREG’ while reloading
‘asm’
---------------------+-----------------
  Reporter:  Umo022  |      Owner:
      Type:  defect  |     Status:  new
  Priority:  Normal  |  Milestone:
 Component:  ports   |    Version:
Resolution:          |   Keywords:
      Port:  orc     |
---------------------+-----------------

Comment (by ryandesign):

 Ken, I don't intend to change the compiler, when gcc-4.2 was able to
 compile the code before. I intend to fix the build system so that gcc-4.2
 can once again compile it.

 The reporter was right: the wrong path in the `#if` statement is being
 used. The `HAVE_AMD64` path is being used even when the 32-bit part is
 being built and the `HAVE_I386` path should be used. The code in question
 changed between 0.4.26 and 0.4.27 in the following way:

 {{{#!diff
 --- orc-0.4.26/orc/orccpu-x86.c 2014-10-19 01:57:28.000000000 -0500
 +++ orc-0.4.27/orc/orccpu-x86.c 2017-05-16 03:40:58.000000000 -0500
 @@ -88,14 +88,14 @@
  {
    *a = op;
    *c = init_ecx;
 -#ifdef __i386__
 +#if defined(HAVE_I386)
    __asm__ (
        "  pushl %%ebx\n"
        "  cpuid\n"
        "  mov %%ebx, %%esi\n"
        "  popl %%ebx\n"
        : "+a" (*a), "=S" (*b), "+c" (*c), "=d" (*d));
 -#elif defined(__amd64__)
 +#elif defined(HAVE_AMD64)
    __asm__ (
        "  cpuid\n"
        : "+a" (*a), "=b" (*b), "+c" (*c), "=d" (*d));
 }}}

 So the code changed from using reliable compiler-defined constants to
 using unreliable project-defined constants. The project-defined constants
 were already defined in previous versions and were used in other places.

 The project-defined constants appear to be based on the `--host` configure
 parameter. We years ago came to the conclusion that relying on that
 parameter is unreliable and so MacPorts doesn't set it and we expect
 configure scripts not to care about it. But this configure script does, so
 we must set it correctly.

 Since the configure script behaves incorrectly when `--host` has not been
 set, this means that even when it appeared to compile correctly on Lion
 and later, the result is most likely not correct, so I'll revbump to make
 sure everybody rebuilds it correctly.

--
Ticket URL: <https://trac.macports.org/ticket/54616#comment:3>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list