From: Karel Zak Date: Thu, 5 Nov 2009 14:58:20 +0000 (+0100) Subject: build-sys: cleanup static building X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=10a43146c3666dba07fea1f8c3742fa51f645a3a;p=util-linux build-sys: cleanup static building Signed-off-by: Karel Zak --- diff --git a/config/include-Makefile.am b/config/include-Makefile.am index f0077695..ae641421 100644 --- a/config/include-Makefile.am +++ b/config/include-Makefile.am @@ -3,6 +3,9 @@ AM_CPPFLAGS = -include $(top_builddir)/config.h -I$(top_srcdir)/include \ AM_CFLAGS = -fsigned-char AM_LDFLAGS = +# generic libtool options for static programs +LT_STATIC_LDFLAGS = -all-static + # Automake (at least up to 1.10) mishandles dist_man_MANS inside conditionals. # Unlike with other dist primaries, the files are not distributed if the # conditional is false. diff --git a/fdisk/Makefile.am b/fdisk/Makefile.am index 20906b52..e238afc0 100644 --- a/fdisk/Makefile.am +++ b/fdisk/Makefile.am @@ -21,7 +21,7 @@ fdisk_SOURCES = fdisk.c fdiskbsdlabel.c fdisksgilabel.c \ if HAVE_STATIC_FDISK sbin_PROGRAMS += fdisk.static fdisk_static_SOURCES = $(fdisk_SOURCES) -fdisk_static_LDFLAGS = $(LDFLAGS_STATIC) +fdisk_static_LDFLAGS = $(LT_STATIC_LDFLAGS) endif if !ARCH_SPARC @@ -33,7 +33,7 @@ sfdisk_SOURCES = sfdisk.c partname.c $(fdisk_common) if HAVE_STATIC_SFDISK sbin_PROGRAMS += sfdisk.static sfdisk_static_SOURCES = $(sfdisk_SOURCES) -sfdisk_static_LDFLAGS = $(LDFLAGS_STATIC) +sfdisk_static_LDFLAGS = $(LT_STATIC_LDFLAGS) endif if USE_SLANG diff --git a/misc-utils/Makefile.am b/misc-utils/Makefile.am index b95447ba..4acf88cb 100644 --- a/misc-utils/Makefile.am +++ b/misc-utils/Makefile.am @@ -45,7 +45,7 @@ wipefs_CFLAGS = -I$(ul_libblkid_srcdir) if HAVE_STATIC_BLKID sbin_PROGRAMS += blkid.static blkid_static_SOURCES = $(blkid_SOURCES) -blkid_static_LDFLAGS = "-all-static" # libtool option +blkid_static_LDFLAGS = $(LT_STATIC_LDFALGS) blkid_static_LDADD = $(ul_libblkid_la) blkid_static_CFLAGS = -I$(ul_libblkid_srcdir) endif diff --git a/mount/Makefile.am b/mount/Makefile.am index d5bbf201..dea572ad 100644 --- a/mount/Makefile.am +++ b/mount/Makefile.am @@ -24,9 +24,7 @@ srcs_mount = fstab.c mount_mntent.c getusername.c lomount.c devname.c devname.h ldadd_common = ldadd_static = cflags_common = - -# generic libtool options for all static programs -ldflags_static ="-all-static" +ldflags_static = $(LT_STATIC_LDFLAGS) mount_SOURCES = mount.c $(srcs_mount) ../lib/setproctitle.c mount_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS) $(cflags_common)