mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
configure.ac: add STATIC_LDFLAGS
Add support for specif STATIC_LDFLAGS when linking static binaries.
This commit is contained in:
parent
2b592a67d6
commit
2b7fa40aac
@ -32,6 +32,7 @@ AS_CASE(["$host_os"],
|
||||
[linux*], [
|
||||
# equivalent to -rdynamic
|
||||
ELDFLAGS="-Wl,--export-dynamic"
|
||||
STATIC_LDFLAGS="-Wl,--no-export-dynamic"
|
||||
# FIXME Generate list and use --dynamic-list=.dlopen.sym
|
||||
CLDWHOLEARCHIVE="-Wl,-whole-archive"
|
||||
CLDNOWHOLEARCHIVE="-Wl,-no-whole-archive"
|
||||
@ -1884,6 +1885,7 @@ AC_SUBST(SELINUX_PC)
|
||||
AC_SUBST(SILENT_RULES)
|
||||
AC_SUBST(SNAPSHOTS)
|
||||
AC_SUBST(STATICDIR)
|
||||
AC_SUBST(STATIC_LDFLAGS)
|
||||
AC_SUBST(STATIC_LINK)
|
||||
AC_SUBST(SYSCONFDIR)
|
||||
AC_SUBST(SYSTEMD_RUN_CMD)
|
||||
|
@ -76,7 +76,7 @@ dmeventd: $(LIB_SHARED) dmeventd.o
|
||||
|
||||
dmeventd.static: $(LIB_STATIC) dmeventd.o
|
||||
@echo " [CC] $@"
|
||||
$(Q) $(CC) $(CFLAGS) $(LDFLAGS) -static dmeventd.o \
|
||||
$(Q) $(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static dmeventd.o \
|
||||
-o $@ $(DL_LIBS) $(DMEVENT_LIBS) $(LIBS) $(STATIC_LIBS)
|
||||
|
||||
ifeq ("@PKGCONFIG@", "yes")
|
||||
|
@ -63,7 +63,7 @@ dmsetup: dmsetup.o $(LIBDM_SHARED)
|
||||
|
||||
dmsetup.static: dmsetup.o $(LIBDM_STATIC)
|
||||
@echo " [CC] $@"
|
||||
$(Q) $(CC) $(CFLAGS) $(LDFLAGS) -static \
|
||||
$(Q) $(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static \
|
||||
-o $@ $< $(LIBDM_LIBS) $(LIBS) $(STATIC_LIBS)
|
||||
|
||||
install_dmsetup_dynamic: dmsetup
|
||||
@ -84,7 +84,7 @@ dmfilemapd: dmfilemapd.o $(LIBDM_SHARED)
|
||||
|
||||
dmfilemapd.static: dmfilemapd.o $(LIBDM_STATIC)
|
||||
@echo " [CC] $@"
|
||||
$(Q) $(CC) $(CFLAGS) $(LDFLAGS) -static \
|
||||
$(Q) $(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static \
|
||||
-o $@ $< $(LIBDM_LIBS) $(LIBS) $(STATIC_LIBS)
|
||||
|
||||
install_dmfilemapd_dynamic: dmfilemapd
|
||||
|
@ -59,6 +59,7 @@ DEFS += @DEFS@
|
||||
# FIXME set this only where it's needed, not globally?
|
||||
CFLAGS ?= @COPTIMISE_FLAG@ @CFLAGS@
|
||||
LDFLAGS ?= @LDFLAGS@
|
||||
STATIC_LDFLAGS += @STATIC_LDFLAGS@
|
||||
CPPFLAGS ?= @CPPFLAGS@
|
||||
CLDFLAGS += @CLDFLAGS@
|
||||
ELDFLAGS += @ELDFLAGS@
|
||||
|
Loading…
Reference in New Issue
Block a user