Whamcloud - gitweb
LU-1869 build: gcc/ar utility can vary
authorAlex Zhuravlev <bzzz@whamcloud.com>
Mon, 10 Sep 2012 10:10:47 +0000 (14:10 +0400)
committerOleg Drokin <green@whamcloud.com>
Wed, 12 Sep 2012 05:52:42 +0000 (01:52 -0400)
- ar utility can vary depeding on build platform.
- do not call gcc directly, use $(CC)

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ia60752b40531886d805a095c9f571e565bcd0e88
Reviewed-on: http://review.whamcloud.com/3917
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Liu Xuezhao <xuezhao.liu@emc.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
configure.ac
lustre/utils/Makefile.am

index 9574d0c..d740004 100644 (file)
@@ -18,4 +18,6 @@ AC_PROG_CC
 
 AM_PROG_AS
 
 
 AM_PROG_AS
 
+AC_CHECK_TOOLS(AR, ar)
+
 LB_CONFIGURE
 LB_CONFIGURE
index f207536..359b690 100644 (file)
@@ -83,7 +83,7 @@ liblustreapitmp_a_SOURCES = liblustreapi.c $(L_IOCTL) $(L_KERNELCOMM)
 # build static and shared lib lustreapi
 liblustreapi.a : liblustreapitmp.a
        rm -f liblustreapi.a liblustreapi.so
 # build static and shared lib lustreapi
 liblustreapi.a : liblustreapitmp.a
        rm -f liblustreapi.a liblustreapi.so
-       gcc -shared -o liblustreapi.so `ar -t liblustreapitmp.a`
+       $(CC) $(LDFLAGS) -shared -o liblustreapi.so `$(AR) -t liblustreapitmp.a`
        mv liblustreapitmp.a liblustreapi.a
 
 install-exec-hook: liblustreapi.so
        mv liblustreapitmp.a liblustreapi.a
 
 install-exec-hook: liblustreapi.so