From mboxrd@z Thu Jan 1 00:00:00 1970 From: Milind Subject: CFLAGS not taken while linking mkfs.xfs? Date: Wed, 20 May 2009 17:30:27 +0530 Message-ID: <1242820827.3457.21.camel@alhena> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: Theodore Tso To: linux-fsdevel@vger.kernel.org, xfs@oss.sgi.com Return-path: Received: from padma.gslab.com ([59.163.66.102]:43414 "HELO padma.gslab.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1754644AbZETMAc (ORCPT ); Wed, 20 May 2009 08:00:32 -0400 Sender: linux-fsdevel-owner@vger.kernel.org List-ID: My CFLAGS are -Wl,--dynamic-linker,/home/beehive/toolchain/x86_64-unknown-linux-gnu/glibc-2.7/lib/ld-linux-x86-64.so.2,--rpath,/home/beehive/toolchain/x86_64-unknown-linux-gnu/glibc-2.7/lib/ when I cross compile xfsprogs and do ldd on mkfs/mkfs.xfs I see following thing linux-vdso.so.1 => (0x00007fff8e5fe000) libuuid.so.1 => /home/miline/toolchain/x86_64-unknown-linux-gnu/glibc-2.7/lib/libuuid.so.1 (0x00007f4386030000) librt.so.1 => /home/miline/toolchain/x86_64-unknown-linux-gnu/glibc-2.7/lib/librt.so.1 (0x00007f4385e15000) libpthread.so.0 => /home/miline/toolchain/x86_64-unknown-linux-gnu/glibc-2.7/lib/libpthread.so.0 (0x00007f4385bfa000) libc.so.6 => /home/miline/toolchain/x86_64-unknown-linux-gnu/glibc-2.7/lib/libc.so.6 (0x00007f43858b1000) /lib64/ld-linux-x86-64.so.2 (0x00007f4386236000) shouldn't mkfs.xfs be dependant on /home/miline/toolchain/x86_64-unknown-linux-gnu/glibc-2.7/lib/ld-linux-x86-64.so.2 rather than /lib64/ld-linux-x86-64.so.2 (0x00007f4386236000)? When do following changes it works. ifdef LTCOMMAND $(LTCOMMAND) : $(SUBDIRS) $(OBJECTS) $(LTDEPENDENCIES) - $(LTLINK) -o $@ $(LDFLAGS) $(OBJECTS) $(LDLIBS) + $(LTLINK) -o $@ $(CFLAGSS) $(LDFLAGS) $(OBJECTS) $(LDLIBS) endif linking of mkfs.xfs happes as follows with above change libtool: link: gcc -Wl,--dynamic-linker,/home/miline/toolchain/x86_64-unknown-linux-gnu/glibc-2.7/lib/ld-linux-x86-64.so.2, --rpath,/home/miline/toolchain/x86_64-unknown-linux-gnu/glibc-2.7/lib -o mkfs.xfs maxtrres.o proto.o xfs_mkfs.o ../libxfs/.libs/libxfs.a -luuid ../libdisk/.libs/libdisk.a -lrt -lpthread above problem is seen for other binaries too. Like xfs_io, xfs_copy. -Miline