Permalink
Browse files

use -arch not -m for osx architecture selection

  • Loading branch information...
1 parent 56e1ef4 commit d1f60e7bd0ee28535f8138f800003390adb0e765 @mpapis mpapis committed Aug 1, 2013
Showing with 4 additions and 6 deletions.
  1. +4 −6 core/internal/shell/package/functions
@@ -340,16 +340,14 @@ __sm.package.set.cflags()
{
trace_filter package || set -o xtrace
export CFLAGS
- if
- ! __sm.string.contains.word "-I${active_path}/include" "${CFLAGS}"
- then
+ __sm.string.contains.word "-I${active_path}/include" "${CFLAGS}" ||
CFLAGS="-I${active_path}/include${CFLAGS:+ }${CFLAGS:-}"
- fi
if
- ! __sm.string.match " -m" " ${CFLAGS}" &&
__sm.os.type.is darwin && __sm.os.arch.type.is x86_64
then
- CFLAGS="-m64${CFLAGS:+ }${CFLAGS:-}"
+ __sm.string.match " -m" " ${CFLAGS}" ||
+ __sm.string.contains.word "-arch" "${CFLAGS}" ||
+ CFLAGS="-arch x86_64${CFLAGS:+ }${CFLAGS:-}"
fi
}

0 comments on commit d1f60e7

Please sign in to comment.