[MacPorts] #37732: cmake portgroup needs an option to disable use of CMAKE_OSX_ARCHITECTURES
MacPorts
noreply at macports.org
Fri Mar 20 09:12:10 PDT 2015
#37732: cmake portgroup needs an option to disable use of CMAKE_OSX_ARCHITECTURES
----------------------+--------------------------------
Reporter: mojca@… | Owner: macports-tickets@…
Type: defect | Status: reopened
Priority: High | Milestone:
Component: ports | Version:
Resolution: | Keywords:
Port: |
----------------------+--------------------------------
Comment (by mojca@…):
Replying to [comment:23 rjvbertin@…]:
> Replying to [comment:14 mojca@…]:
> > The CMake developers have confirmed the bug but aren't likely to act
on it any time soon. CMake simply applies the flag to any given compiler
on Mac OS X when CMAKE_OSX_ARCHITECTURES is present:
http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/5876.
>
> Is the location in the CMake source code (or the core .cmake files)
where this happens identified?
Yes. See the bug report:
* http://www.cmake.org/Bug/view.php?id=14252
> IIUC correcting the issue would require adding a list of compilers that
don't understand the -arch flag, and take appropriate action for those?
Adding `-arch` flags to `FFLAGS` is problematic in 99% cases anyway. If
they could be removed, that would solve almost all the problems out there.
> Alternatively, how about replacing `-arch i386` with `-m32` and `-arch
x86_64` with `-m64` for GCC compilers, on OS X versions where clang is the
default (10.7 and higher)?
And breaking most of universal builds?
We just need to solve a problem for a very small number of ports that use
a fortran compiler and cannot use the `-arch` flag. On the other hand it
might be that this is no longer an issue with fortran compilers from the
latest gcc versions. Maybe we should just test that and conclude that a
fix is no longer needed.
> The original comment states
> > It seems that one can use -m32 with both to get 32-bit i386 binaries,
but I cannot try it out without recompiling gcc with +universal
> is that because of (runtime) libraries that must be present in 32bit
version?
I'm not sure if I understand the question, but it's also possible that I
don't know the answer.
>> and I don't know yet how to make universal binaries with that approach.
Read as: one can get universal binaries with `xFLAGS="-arch i386 -arch
x86_64"`. Setting `xFLAGS="-m32 -m64"` probably doesn't give you universal
binaries?
--
Ticket URL: <https://trac.macports.org/ticket/37732#comment:24>
MacPorts <https://www.macports.org/>
Ports system for OS X
More information about the macports-tickets
mailing list