linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] fix static build
@ 2006-05-27 10:05 Dirk Jagdmann
  2006-05-27 13:54 ` Luca Berra
  0 siblings, 1 reply; 3+ messages in thread
From: Dirk Jagdmann @ 2006-05-27 10:05 UTC (permalink / raw)
  To: linux-raid

[-- Attachment #1: Type: text/plain, Size: 239 bytes --]

Hello developers and patch reviewers,

I just tried to update my (old) mdadm to 2.5 and had to apply this
small patch to build a static linked mdadm.

-- 
---> Dirk Jagdmann
----> http://cubic.org/~doj
-----> http://llg.cubic.org

[-- Attachment #2: staticbuild.patch --]
[-- Type: application/octet-stream, Size: 442 bytes --]

Index: mdadm-2.5/Makefile
===================================================================
--- mdadm-2.5.orig/Makefile
+++ mdadm-2.5/Makefile
@@ -88,7 +88,7 @@ mdadm : rmconf $(OBJS)
 	$(CC) $(LDFLAGS) -o mdadm $(OBJS) $(LDLIBS)
 
 mdadm.static : STATIC=-DSTATIC
-mdadm.static : rmconf $(OBJS)
+mdadm.static : rmconf $(OBJS) SHA1.o sha1.o
 	$(CC) $(LDFLAGS) -DSTATIC -static -o mdadm.static $(OBJS) SHA1.o sha1.o
 rmconf:
 	rm -f config.o

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

* Re: [patch] fix static build
  2006-05-27 10:05 [patch] fix static build Dirk Jagdmann
@ 2006-05-27 13:54 ` Luca Berra
  2006-05-27 22:17   ` Dirk Jagdmann
  0 siblings, 1 reply; 3+ messages in thread
From: Luca Berra @ 2006-05-27 13:54 UTC (permalink / raw)
  To: linux-raid

On Sat, May 27, 2006 at 12:05:56PM +0200, Dirk Jagdmann wrote:
>Hello developers and patch reviewers,
>
>I just tried to update my (old) mdadm to 2.5 and had to apply this
>small patch to build a static linked mdadm.
you should also fix the clean target.

L.

-- 
Luca Berra -- bluca@comedia.it
        Communication Media & Services S.r.l.
 /"\
 \ /     ASCII RIBBON CAMPAIGN
  X        AGAINST HTML MAIL
 / \

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

* Re: [patch] fix static build
  2006-05-27 13:54 ` Luca Berra
@ 2006-05-27 22:17   ` Dirk Jagdmann
  0 siblings, 0 replies; 3+ messages in thread
From: Dirk Jagdmann @ 2006-05-27 22:17 UTC (permalink / raw)
  To: linux-raid

[-- Attachment #1: Type: text/plain, Size: 239 bytes --]

Hello Luca,

> you should also fix the clean target.

you're right, I overlooked cleaning the additional two object files. A
new patch is attached.

-- 
---> Dirk Jagdmann
----> http://cubic.org/~doj
-----> http://llg.cubic.org

[-- Attachment #2: staticbuild.patch --]
[-- Type: application/octet-stream, Size: 1326 bytes --]

Index: mdadm-2.5/Makefile
===================================================================
--- mdadm-2.5.orig/Makefile	2006-05-28 00:11:46.000000000 +0200
+++ mdadm-2.5/Makefile	2006-05-28 00:15:45.000000000 +0200
@@ -72,6 +72,8 @@
 	Create.c Detail.c Examine.c Grow.c Monitor.c dlink.c Kill.c Query.c \
 	mdopen.c super0.c super1.c bitmap.c restripe.c sysfs.c
 
+STATICOBJS = SHA1.o sha1.o
+
 ASSEMBLE_SRCS := mdassemble.c Assemble.c config.c dlink.c util.c super0.c super1.c
 ASSEMBLE_FLAGS:= -DMDASSEMBLE
 ifdef MDASSEMBLE_AUTO
@@ -88,8 +90,9 @@
 	$(CC) $(LDFLAGS) -o mdadm $(OBJS) $(LDLIBS)
 
 mdadm.static : STATIC=-DSTATIC
-mdadm.static : rmconf $(OBJS)
-	$(CC) $(LDFLAGS) -DSTATIC -static -o mdadm.static $(OBJS) SHA1.o sha1.o
+mdadm.static : rmconf $(OBJS) $(STATICOBJS)
+	$(CC) $(LDFLAGS) -DSTATIC -static -o mdadm.static $(OBJS) $(STATICOBJS)
+
 rmconf:
 	rm -f config.o
 
@@ -149,7 +152,7 @@
 	$(INSTALL) -D -m 644 mdadm.conf.5 $(DESTDIR)$(MAN5DIR)/mdadm.conf.5
 
 clean : 
-	rm -f mdadm $(OBJS) core *.man mdadm.tcc mdadm.uclibc mdadm.static *.orig *.porig *.rej *.alt \
+	rm -f mdadm $(OBJS) $(STATICOBJS) core *.man mdadm.tcc mdadm.uclibc mdadm.static *.orig *.porig *.rej *.alt \
 	mdassemble mdassemble.static mdassemble.uclibc mdassemble.klibc swap_super \
 	init.cpio.gz mdadm.uclibc.static test_stripe
 

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

end of thread, other threads:[~2006-05-27 22:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-27 10:05 [patch] fix static build Dirk Jagdmann
2006-05-27 13:54 ` Luca Berra
2006-05-27 22:17   ` Dirk Jagdmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).