Allow toolchain to determine ar

This commit is contained in:
Jory A. Pratt 2013-08-11 09:44:59 -05:00 committed by Jason Evans
parent 0ed518e5da
commit ad505e0ec6
2 changed files with 10 additions and 4 deletions

View File

@ -55,6 +55,8 @@ PIC_CFLAGS = @PIC_CFLAGS@
CTARGET = @CTARGET@ CTARGET = @CTARGET@
LDTARGET = @LDTARGET@ LDTARGET = @LDTARGET@
MKLIB = @MKLIB@ MKLIB = @MKLIB@
AR = @AR@
ARFLAGS = crus
CC_MM = @CC_MM@ CC_MM = @CC_MM@
ifeq (macho, $(ABI)) ifeq (macho, $(ABI))
@ -185,7 +187,7 @@ $(objroot)lib/$(LIBJEMALLOC)_s.$(A) : $(COBJS)
$(STATIC_LIBS): $(STATIC_LIBS):
@mkdir -p $(@D) @mkdir -p $(@D)
$(MKLIB) $+ $(AR) $(ARFLAGS) $@ $+
$(objroot)test/bitmap$(EXE): $(objroot)src/bitmap.$(O) $(objroot)test/bitmap$(EXE): $(objroot)src/bitmap.$(O)

View File

@ -226,9 +226,13 @@ PIC_CFLAGS='-fPIC -DPIC'
CTARGET='-o $@' CTARGET='-o $@'
LDTARGET='-o $@' LDTARGET='-o $@'
EXTRA_LDFLAGS= EXTRA_LDFLAGS=
MKLIB='ar crus $@'
CC_MM=1 CC_MM=1
AN_MAKEVAR([AR], [AC_PROG_AR])
AN_PROGRAM([ar], [AC_PROG_AR])
AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL(AR, ar, :)])
AC_PROG_AR
dnl Platform-specific settings. abi and RPATH can probably be determined dnl Platform-specific settings. abi and RPATH can probably be determined
dnl programmatically, but doing so is error-prone, which makes it generally dnl programmatically, but doing so is error-prone, which makes it generally
dnl not worth the trouble. dnl not worth the trouble.
@ -310,7 +314,8 @@ case "${host}" in
EXTRA_LDFLAGS="-link -DEBUG" EXTRA_LDFLAGS="-link -DEBUG"
CTARGET='-Fo$@' CTARGET='-Fo$@'
LDTARGET='-Fe$@' LDTARGET='-Fe$@'
MKLIB='lib -nologo -out:$@' AR='lib'
ARFLAGS='-nologo -out:'
CC_MM= CC_MM=
else else
importlib="${so}" importlib="${so}"
@ -403,7 +408,6 @@ AC_SUBST([enable_autogen])
AC_PROG_INSTALL AC_PROG_INSTALL
AC_PROG_RANLIB AC_PROG_RANLIB
AC_PATH_PROG([AR], [ar], [false], [$PATH])
AC_PATH_PROG([LD], [ld], [false], [$PATH]) AC_PATH_PROG([LD], [ld], [false], [$PATH])
AC_PATH_PROG([AUTOCONF], [autoconf], [false], [$PATH]) AC_PATH_PROG([AUTOCONF], [autoconf], [false], [$PATH])