mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
configure.ac: leave LDFLAGS resolving on make time
Use LDFLAGS separately with every use of CLDFLAGS and leave this flag only for handling versioning. This will reflect any LDFLAGS setting use during make.
This commit is contained in:
parent
5d23054cb3
commit
f022da9e5f
@ -57,7 +57,7 @@ AS_CASE(["$host_os"],
|
||||
FSADM="no"
|
||||
LVMIMPORTVDO="no"
|
||||
BLKDEACTIVATE="no"],
|
||||
[CLDFLAGS="${CLDFLAGS-"$LDFLAGS"}"])
|
||||
[])
|
||||
|
||||
################################################################################
|
||||
dnl -- Checks for programs.
|
||||
@ -836,7 +836,7 @@ AS_IF([test "$GCC" = "yes" && test "$symvers" = "gnu"], [
|
||||
[Define to use GNU versioning in the shared library.])
|
||||
AS_CASE(["$host_os"],
|
||||
[linux*], [
|
||||
CLDFLAGS="${CLDFLAGS-"$LDFLAGS"} -Wl,--version-script,.export.sym"
|
||||
CLDFLAGS="-Wl,--version-script,.export.sym"
|
||||
LDDEPS="$LDDEPS .export.sym"])
|
||||
])
|
||||
|
||||
|
@ -434,7 +434,7 @@ DEFS+=-D_FILE_OFFSET_BITS=64
|
||||
|
||||
%.so: %.o
|
||||
$(SHOW) " [CC] $(<F)"
|
||||
$(Q) $(CC) -c $(CFLAGS) $(CLDFLAGS) $< $(LIBS) -o $@
|
||||
$(Q) $(CC) -c $(CFLAGS) $(LDFLAGS) $(CLDFLAGS) $< $(LIBS) -o $@
|
||||
|
||||
ifneq (,$(LIB_SHARED))
|
||||
|
||||
@ -443,11 +443,11 @@ $(LIB_SHARED).$(LIB_VERSION): $(OBJECTS) $(LDDEPS)
|
||||
$(SHOW) " [CC] $@"
|
||||
ifeq ("@LIB_SUFFIX@","so")
|
||||
$(Q) $(CC) -shared -Wl,-soname,$(notdir $@) \
|
||||
$(CFLAGS) $(CLDFLAGS) $(OBJECTS) $(LIBS) -o $@
|
||||
$(CFLAGS) $(LDFLAGS) $(CLDFLAGS) $(OBJECTS) $(LIBS) -o $@
|
||||
endif
|
||||
ifeq ("@LIB_SUFFIX@","dylib")
|
||||
$(Q) $(CC) -dynamiclib -dylib_current_version,$(LIB_VERSION) \
|
||||
$(CFLAGS) $(CLDFLAGS) $(OBJECTS) $(LIBS) -o $@
|
||||
$(CFLAGS) $(LDFLAGS) $(CLDFLAGS) $(OBJECTS) $(LIBS) -o $@
|
||||
endif
|
||||
|
||||
$(LIB_SHARED): $(LIB_SHARED).$(LIB_VERSION)
|
||||
|
@ -508,7 +508,7 @@ DEFS+=-D_FILE_OFFSET_BITS=64
|
||||
|
||||
%.so: %.o
|
||||
$(SHOW) " [CC] $(<F)"
|
||||
$(Q) $(CC) -c $(CFLAGS) $(CLDFLAGS) $< $(LIBS) -o $@
|
||||
$(Q) $(CC) -c $(CFLAGS) $(LDFLAGS) $(CLDFLAGS) $< $(LIBS) -o $@
|
||||
|
||||
ifneq (,$(LIB_SHARED))
|
||||
|
||||
@ -517,11 +517,11 @@ $(LIB_SHARED).$(LIB_VERSION): $(OBJECTS) $(LDDEPS)
|
||||
$(SHOW) " [CC] $@"
|
||||
ifeq ("@LIB_SUFFIX@","so")
|
||||
$(Q) $(CC) -shared -Wl,-soname,$(notdir $@) \
|
||||
$(CFLAGS) $(CLDFLAGS) $(OBJECTS) $(LIBS) -o $@
|
||||
$(CFLAGS) $(LDFLAGS) $(CLDFLAGS) $(OBJECTS) $(LIBS) -o $@
|
||||
endif
|
||||
ifeq ("@LIB_SUFFIX@","dylib")
|
||||
$(Q) $(CC) -dynamiclib -dylib_current_version,$(LIB_VERSION) \
|
||||
$(CFLAGS) $(CLDFLAGS) $(OBJECTS) $(LIBS) -o $@
|
||||
$(CFLAGS) $(LDFLAGS) $(CLDFLAGS) $(OBJECTS) $(LIBS) -o $@
|
||||
endif
|
||||
|
||||
$(LIB_SHARED): $(LIB_SHARED).$(LIB_VERSION)
|
||||
|
@ -155,7 +155,7 @@ liblvm2cmd-static.a: $(top_builddir)/lib/liblvm-internal.a $(OBJECTS) lvmcmdlib.
|
||||
liblvm2cmd.$(LIB_SUFFIX): liblvm2cmd.a $(LDDEPS)
|
||||
$(SHOW) " [CC] $@"
|
||||
$(Q) $(CC) -shared -Wl,-soname,$@.$(LIB_VERSION) \
|
||||
$(CFLAGS) $(CLDFLAGS) -o $@ \
|
||||
$(CFLAGS) $(LDFLAGS) $(CLDFLAGS) -o $@ \
|
||||
@CLDWHOLEARCHIVE@ $< @CLDNOWHOLEARCHIVE@ \
|
||||
$(INTERNAL_LIBS) $(LVMLIBS)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user