public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* CFLAGS not taken while linking mkfs.xfs?
@ 2009-05-20 12:00 Milind
  2009-05-20 20:21 ` Arkadiusz Miskiewicz
  0 siblings, 1 reply; 2+ messages in thread
From: Milind @ 2009-05-20 12:00 UTC (permalink / raw)
  To: linux-fsdevel, xfs; +Cc: Theodore Tso

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

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: CFLAGS not taken while linking mkfs.xfs?
  2009-05-20 12:00 CFLAGS not taken while linking mkfs.xfs? Milind
@ 2009-05-20 20:21 ` Arkadiusz Miskiewicz
  0 siblings, 0 replies; 2+ messages in thread
From: Arkadiusz Miskiewicz @ 2009-05-20 20:21 UTC (permalink / raw)
  To: xfs

On Wednesday 20 of May 2009, Milind wrote:
> 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/

CFLAGS are meant for compilation
LDFLAGS for linking

-- 
Arkadiusz Miśkiewicz        PLD/Linux Team
arekm / maven.pl            http://ftp.pld-linux.org/

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-05-20 20:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-20 12:00 CFLAGS not taken while linking mkfs.xfs? Milind
2009-05-20 20:21 ` Arkadiusz Miskiewicz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox