Skip to content

Commit

Permalink
fix darwin with macports libtool
Browse files Browse the repository at this point in the history
the gnu/macports libtool does not understand -static.
Force to use darwin special /usr/bin/libtool
  • Loading branch information
Reini Urban committed Dec 1, 2012
1 parent 0c08da3 commit 7ce401e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion 3rdparty/dyncall/buildsys/bsdmake/osx.bsdmake
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ as_FLAGS =

LINK_DLL_CMD = $(CXX) -o $(.TARGET) -dynamiclib $(LDFLAGS) $(.ALLSRC) $(LIBS)
#LINK_DLL_CMD = $(LD) -o $(.TARGET) -dylib $(LDFLAGS) $(.ALLSRC) $(LIBS)
LINK_LIB_CMD = libtool -static -o $(.TARGET) $(.ALLSRC)
LINK_LIB_CMD = /usr/bin/libtool -static -o $(.TARGET) $(.ALLSRC)
#LINK_LIB_CMD = ar -r $(.TARGET) $(.ALLSRC)

.if $(BUILD_ARCH) == "universal"
TARGET_ARCH = -arch i386 -arch ppc -arch x86_64
Expand Down
3 changes: 2 additions & 1 deletion 3rdparty/dyncall/buildsys/gmake/os/darwin.gmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
DLL_PREFIX=lib
DLL_SUFFIX=.dylib

LIBTOOL_STATIC=libtool -static -o $@ $^
# darwin libtool only, not macports/gnu libtool
LIBTOOL_STATIC=/usr/bin/libtool -static -o $@ $^

ifdef BUILD_ARCH_universal
TARGET_ARCH?=-arch i386 -arch ppc -arch x86_64
Expand Down
2 changes: 1 addition & 1 deletion 3rdparty/dyncall/dyncall/Makefile.embedded
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ install: all
gzip -c dyncall.3 >${DESTDIR}${PREFIX}/man/man3/dyncall.3.gz
.PHONY: all clean install
osx-universal:
CFLAGS="${CFLAGS} -arch i386 -arch x86_64 -arch ppc" ASFLAGS="${ASFLAGS} -arch i386 -arch x86_64 -arch ppc" AR="libtool" ARFLAGS="-static -o" ${MAKE_CMD} all
CFLAGS="${CFLAGS} -arch i386 -arch x86_64 -arch ppc" ASFLAGS="${ASFLAGS} -arch i386 -arch x86_64 -arch ppc" AR="/usr/bin/libtool" ARFLAGS="-static -o" ${MAKE_CMD} all

0 comments on commit 7ce401e

Please sign in to comment.