Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: Re: [OMPI devel] Repeated -Xclang flags (was: 1.6.1rc2)
From: P. Martin (mrsmiley98_at_[hidden])
Date: 2012-08-03 15:57:29

On Aug 3, 2012, Jeff Squyres <jsquyres_at_[hidden]> wrote:
> Mmm. Yes. I see the issue. Our configure script essentially does a "uniq" on compiler flags; assuming that any flag seen twice is redundant, and removes it.
> This functionality has been in Open MPI for a long, long time. Perhaps even back to 1.0 days. I'm surprised that this issue is only surfacing now. Did homebrew only recently start using a pair of -Xclang flags? Or did you have some other workaround?
> Regardless, can you try this patch and see if it solves the issue for you? You'll need to re-run
> Index: opal/config/opal_functions.m4
> [snip]

Thanks for the patch. Here's what happened:

configure:11646: checking if /usr/bin/clang supports -fno-strict-aliasing
configure:11662: /usr/bin/clang -c -DNDEBUG -Os -w -pipe -march=native -Xclang -target-feature -Xclang -aes -Qunused-arguments -mmacosx-version-min=10
.8 -finline-functions -fno-strict-aliasing -isystem /usr/local/include conftest.c >&5
configure:11662: $? = 0
configure:11669: result: yes
configure:11753: WARNING: -fno-strict-aliasing has been added to CFLAGS
configure:11887: checking if /usr/bin/clang supports __builtin_expect
configure:11904: /usr/bin/clang -o conftest -DNDEBUG -Os -w -pipe -march=native -Xclang -Xclang -aes -Qunused-arguments -mmacosx-version-min=10.8 -fin
line-functions -fno-strict-aliasing -isystem /usr/local/include -L/usr/local/lib conftest.c >&5
error: unknown argument: '-Xclang'
configure:11904: $? = 1

Apple recently updated XCode. The way it reacts to this issue may have changed.
Also Homebrew started using `-Xclang` in February when XCode-4.3 came out,
the first version from the app store. According to the comments in the Homebrew

    # Clang mistakenly enables AES-NI on plain Nehalem

They only set these CFLAGS on that specific CPU

    -XClang -target-feature -XClang -aes

Does that seem reasonable?