On Aug 3, 2012, Jeff Squyres <jsquy...@cisco.com> 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 autogen.pl. > > 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 code: # 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?