Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

cc: -Xarch should not skip the next argument. #28985

Closed
wants to merge 2 commits into from
Closed

cc: -Xarch should not skip the next argument. #28985

wants to merge 2 commits into from

Conversation

MikeMcQuaid
Copy link
Member

The format is -Xarch_i386 as opposed to -Xarch i386 unliked -arch i386 so the next argument should not be skipped. This was causing issues for some formulae e.g. qt in which case it was skipping -m3dnow and -mmmx.

Also, remove Qt's superenv hacks now that this is fixed.

The format is -Xarch_i386 as opposed to -Xarch i386 unliked -arch i386
so the next argument should not be skipped. This was causing issues for
some formulae e.g. qt in which case it was skipping -m3dnow and -mmmx.
@jacknagel
Copy link
Contributor

The format is -Xarch_i386 as opposed to -Xarch i386 unliked -arch i386 so the next argument should not be skipped.

To clarify, -Xarch_<arch> takes an argument, e.g. -Xarch_<arch> -mmmx would be a single entity that means "only apply -mmmx on <arch>". So the next argument is relevant to the -Xarch_<arch> flag.

With this patch, consider the following:

  • wrapper invoked as cc -Xarch_i386 -some_flag -some_other_flag
  • wrapper sees -Xarch_i386, removes it
  • now -some_flag is being applied to all architectures instead of just i386

@jacknagel
Copy link
Contributor

Here's a very rough patch that should correctly preserve the -Xarch_<arch> context when looking at the next flag: https://github.com/jacknagel/homebrew/compare/superenv

@justinclift
Copy link
Contributor

@jacknagel No luck with that. Still getting this:

tools/qstring.cpp:3603:22: error: use of undeclared identifier '_SIDD_UWORD_OPS'
    const int mode = _SIDD_UWORD_OPS | _SIDD_CMP_RANGES | _SIDD_UNIT_MASK;
                     ^
tools/qstring.cpp:3603:40: error: use of undeclared identifier '_SIDD_CMP_RANGES'
    const int mode = _SIDD_UWORD_OPS | _SIDD_CMP_RANGES | _SIDD_UNIT_MASK;
                                       ^
tools/qstring.cpp:3603:59: error: use of undeclared identifier '_SIDD_UNIT_MASK'
    const int mode = _SIDD_UWORD_OPS | _SIDD_CMP_RANGES | _SIDD_UNIT_MASK;
                                                          ^
tools/qstring.cpp:3605:34: error: use of undeclared identifier '_mm_cmpestrm'
    const __m128i offLimitMask = _mm_cmpestrm(rangeMatch, 2, chunk, 8, mode);
                                 ^
tools/qstring.cpp:3608:13: error: use of undeclared identifier '_mm_blendv_epi8'
    chunk = _mm_blendv_epi8(chunk, questionMark, offLimitMask);
            ^
/private/tmp/qt-tyLy/qt-everywhere-opensource-src-4.8.6/bin/moc -DQT_SHARED -DQT_BUILD_CORE_LIB -DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT3_SUPPORT -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQLIBRARYINFO_EPOCROOT -DHB_EXPORT=Q_CORE_EXPORT -DQT_NO_DEBUG_PLUGIN_CHECK -DQT_NO_DEBUG -DQT_HAVE_MMX -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_HAVE_SSE3 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I../../mkspecs/unsupported/macx-clang -I. -I../../include -I../../include/QtCore -I.rcc/release-shared -Iglobal -I../../tools/shared -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -I.moc/release-shared -D__APPLE__ -D__GNUC__ io/qbuffer.h -o .moc/release-shared/moc_qbuffer.cpp
5 errors generated.
make[2]: *** [.obj/release-shared/qstring.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [release] Error 2
make: *** [sub-corelib-make_default-ordered] Error 2

Note, I tested that without @MikeMcQuaid's patch. Wasn't sure if yours is supposed to replace it or not, etc.

@justinclift
Copy link
Contributor

@MikeMcQuaid Just tested this PR, and qt 4.8.6 successfully installs on my system with it (Mac Mini server - OSX 10.7.5). Seems good to me. 😄

@MikeMcQuaid
Copy link
Member Author

@justinclift You'd need to test @jacknagel's branch with my branch's Qt patch.

@justinclift
Copy link
Contributor

@MikeMcQuaid I can't get his patch to cleanly apply to yours using the UI, and I don't have time atm to really look into this. Sorry. 😦

@dakcarto
Copy link
Contributor

dakcarto commented May 6, 2014

Applying @jacknagel commits and PR qt commit as patches worked on 10.7.5 to compile qt.

@jacknagel
Copy link
Contributor

Applied my changes + Mike's qt commit.

@jacknagel jacknagel closed this May 7, 2014
@justinclift
Copy link
Contributor

Yep, works here. 😄

@MikeMcQuaid MikeMcQuaid deleted the superenv-Xarch branch May 7, 2014 07:25
MikeMcQuaid added a commit that referenced this pull request May 8, 2014
@Homebrew Homebrew locked and limited conversation to collaborators Feb 17, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants