[Openmp-dev] Broken cmake logic after recent changes
Peyton, Jonathan L
jonathan.l.peyton at intel.com
Mon Jul 20 10:20:32 PDT 2015
> With that patch it works as expected, but is that fully correct?
Does the whole build now work or just the check?
I'm confused because it wasn't supposed to make it work :) It just leaves the files that do the check around so you can simulate what CMake is doing.
> Is this regenerating the cmake files on every run?
No, not even every CMake run because it has the result of the check in CMakeCache.txt. Also, the whole check_linker_flag function is guarded by checking if the boolean (LIBOMP_HAVE_XYZ_FLAG) is defined, similar to how the standard CMake function check_c_compiler_flag does it.
From: C Bergström [mailto:cbergstrom at pathscale.com]
Sent: Monday, July 20, 2015 12:04 PM
To: Peyton, Jonathan L
Cc: openmp-dev at dcs-maillist2.engr.illinois.edu
Subject: Re: [Openmp-dev] Broken cmake logic after recent changes
With that patch it works as expected, but is that fully correct?
Is this regenerating the cmake files on every run? (invocation of
make) If so that's not ideal.
On Mon, Jul 20, 2015 at 11:39 PM, Peyton, Jonathan L <jonathan.l.peyton at intel.com> wrote:
>> Is this missing an else block to catch the case where it is not win32 and is Apple?
> No, all the Apple linker flags have been "CMakeified" where CMake will either define them to be available or not based on the OS.
>> I have a doubt libomp_check_linker_flag is working as expected...
> Because I don't have a pathscale compiler, I will need some help debugging this issue with check_linker_flag. When looking at it closely, I don't see any issue with it when using clang or gcc.
> Can you do these steps to help me find out the problem?
> 1) apply the attached small patch.
> 2) create a build directory, call CMake with appropriate flags.
> 3) cd check_LIBOMP_HAVE_STATIC_LIBGCC_FLAG/build
> 4) make clean
> 5) make VERBOSE=1
> 6) echo $?
> If you could send me the output of steps 5) and 6) that would be of great help.
> -- Johnny
> -----Original Message-----
> From: openmp-dev-bounces at cs.uiuc.edu
> [mailto:openmp-dev-bounces at cs.uiuc.edu] On Behalf Of C Bergström
> Sent: Saturday, July 18, 2015 1:49 AM
> To: openmp-dev at dcs-maillist2.engr.illinois.edu
> Subject: [Openmp-dev] Broken cmake logic after recent changes
> Is this missing an else block to catch the case where it is not win32 and is Apple?
> # Check linker flags
> libomp_check_linker_flag(/SAFESEH LIBOMP_HAVE_SAFESEH_FLAG)
> elseif(NOT APPLE)
> I have a doubt libomp_check_linker_flag is working as expected.
> Our compiler does *not* support this flag and if you pass it to our compiler it will fail. However it's still being used and part of the reason the build is broken for us.
> Linking C shared library libomp.so
> pathcc ERROR parsing -static-libgcc: unknown flag
> I'll try to give more feedback on Power7, Power8, Aarch64 (native and cross compiler and Solaris after the above are fixed.
> It would be good if BSD, UH and or others could help test and see if things are actually working for them.
> Openmp-dev mailing list
> Openmp-dev at dcs-maillist2.engr.illinois.edu
More information about the Openmp-dev