1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
Commit Graph

37 Commits

Author SHA1 Message Date
Zdenek Kabelac
b0c0e8bd7a makefiles: change condition
Old system do not work well with -l% in findstring,
so use a different strategy to recognize whether -lreadline needs
another library (-ltinfo, -lncourses...)
(So we don't need to solve this via 'configure')

Also for now comment out -Wl,-z,pack-relative-relocs and leave it
for the package maintainer whether they want to use.
Possibly add some 'configure' autodetection for usable switch,
as it's relatively new feature..
2024-04-25 17:06:07 +02:00
Zdenek Kabelac
b14f29ab5b makefiles: comman escape needs this trick 2024-04-24 13:42:05 +02:00
Zdenek Kabelac
a8009f72bf makefiles: add as-needed only for newer systems
Add some -Wl flags separatly and avoid their duplication.
Also add --as-needed only when system is using 'newer' readline
library - on these older system the usage of '--as-needed'
seems to be causing some hard to solve problem - so avoid it.
2024-04-24 11:35:05 +02:00
Zdenek Kabelac
078445658c configure.ac: update ldflags args
Attach -Wl,-z,relro,-z,now,-z,pack-relative-relocs,--as-needed
to LDFLAGS, but only if LDFLAGS already doesn't contain 'relro'
(so it's not given repeatedly).

Also start to use -z,now linkage also when building libraries
with default compilation - this avoid calling symbol resolver
while library function are using function needing resolving.

Note: Fedora or RHEL rpm building is using:
CFLAGS=$(rpm --eval %{build_cflags})
LDFLAGS=$(rpm --eval %{build_ldflags})

Also split -DUSE_SD_NOTIFY into DEFS from CFLAGS.
2024-04-24 00:31:26 +02:00
Zdenek Kabelac
f022da9e5f 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.
2024-04-24 00:30:05 +02:00
Zdenek Kabelac
88ad83e3d6 makefiles: use SHOW 2024-04-08 14:52:23 +02:00
Zdenek Kabelac
b162475391 makefiles: fix missing libs
Recent commit  dc8837f079
became actually to strict - we always want to build lib.a files.
2023-10-13 16:34:48 +02:00
Adam Joseph
dc8837f079 configure.ac: handle --disable-shared flag
Since LVM 2.02 it appears that compiling LVM on a platform which
lacks a shared library linker/loader will fail to produce any
binaries (dmsetup, lvm2, etc).

Adds support for the standard --disable-shared flag, and
use it to disable attempts at building shared libraries.

Modified-by: zkabelac
2023-10-13 14:25:02 +02:00
Robin H. Johnson
c8868041d8 configure.ac: use pkg-config to detect static libs
Add some Gentoo based patches for better support of static linking.
This are not tested nor supported by upstream developers.
Usage requires presence of several libraries in their static form
which is however not commonly available.

Selinux modified by zkabelac to still work on older sofrware which
did not provided libselinux.pc at a time - see keep the old check
present and use pkg-config only when possible.
2023-02-23 16:46:35 +01:00
David Seifert
2b7fa40aac configure.ac: add STATIC_LDFLAGS
Add support for specif STATIC_LDFLAGS when linking static binaries.
2023-02-23 16:46:35 +01:00
Zdenek Kabelac
d106ac04ab configure.ac: use LIBSYSTEMD
Convert naming SYSTEMD_CFLAGS/LIB -> LIBSYSTEMD_CFLAGS/LIBS
to better fit library check for libsystemd.

Build lvmlockd with SD_NOTIFY when we have defined LIBSYSTEMD_LIBS.
2023-02-17 00:00:12 +01:00
Zdenek Kabelac
4791a4fc68 makefiles: allow using configure cppflags
Configure defines 'CPPFLAGS' and we should use defined value
for compilation.

Reported-by: debian
2023-02-13 13:41:59 +01:00
Samanta Navarro
aec5e573af doc: fix typos in documentation
Typos found with codespell.
2023-01-03 16:09:58 +01:00
David Seifert
3dee7b7266 configure: allow for overriding of readelf
This allows users to use e.g. `llvm-readelf`
on systems with binutils as default.

Bug: https://bugs.gentoo.org/840628
2022-11-25 15:54:57 +01:00
Zdenek Kabelac
2c7b913049 make: update make.tmpl
Add new define 'newline' for use in 'foreach()'
Add new $(SHOW) for makefile printing output
Add 'make print-VAR' for easier debugging of Makefiles' variables.
2022-09-07 14:58:01 +02:00
Zdenek Kabelac
ebf33323b9 makefiles: deps also for cxx
Generate deps also for .cxx.
Remove include dir deps - there is nothing to build.
2021-04-12 09:54:16 +02:00
Zdenek Kabelac
aee0cd6530 makefiles: static linking enhancements 2021-04-12 09:54:15 +02:00
Zdenek Kabelac
e86cd9c5ba makefiles: remove unneeded var changes 2021-04-06 22:02:31 +02:00
Zdenek Kabelac
40b277ae17 makefiles: slight change in .export.sym
Avoid emitting Local symbol and sort symbols from
start and add dependency on previous version
Should not change anything, just better followup
linkage guidlines.
2021-04-06 21:26:57 +02:00
Zdenek Kabelac
3d26bde1c0 make: cflow target works again
Restored 'make cflow' functinality.
Produces some quick referece of function chaining and usage.
2021-03-20 00:05:01 +01:00
Zdenek Kabelac
e86798203e make: simplify dependency loading
No need for extra ifdefs around.
2021-03-19 23:21:18 +01:00
Zdenek Kabelac
48d04afaa2 make: restore buildir != srcdir support
Our new faster deps generation missed support for
buildirs != srcdir - as it can be usable to have
several builds from unchanged directory with sources.
2021-03-19 23:21:18 +01:00
Zdenek Kabelac
6846af6612 makefiles: retry faster deps again
From commit 29abba3785 we have hopefully
fixed most of troubles for deps tracking we had in past - so retry
again.

Drop explicit configure.h from DEPS - as it's automatically gathered
by gcc dependency tracking anyway.
2021-03-02 22:54:40 +01:00
Zdenek Kabelac
39eee85fff makefiles: better logging
Show only filename instead of full path name when building
in builddir != srcdir
2021-03-02 22:54:40 +01:00
Zdenek Kabelac
8bfa4439e1 makefiles: fix pofile generation
If there is any user of --enable-nls  and wants to get
usable .po language file  -  use 'make pofile'
2021-03-02 22:54:40 +01:00
Zdenek Kabelac
5509e764f1 makefiles: add alias for device-mapper
Support also 'make device_mapper' so user is less confused.
2021-03-02 22:54:40 +01:00
Bastian Germann
168e2ffbcd lvm: add readline alternative editline
LVM2 is distributed under GPLv2 only. The readline library changed its
license long ago to GPLv3. Given that those licenses are incompatible
and you follow the FSF in their interpretation that dynamically linking
creates a derivative work, distributing LVM2 linked against a current
readline version might be legally problematic.

Add support for the BSD licensed editline library as an alternative for
readline.

Link: https://thrysoee.dk/editline
2020-09-29 10:13:24 +02:00
Zdenek Kabelac
f2489d9dda make: support comments in exported symbols
Now the lines starting with '#' in exported symbols files are treated as
comments (ignored).
2019-08-09 12:57:07 +02:00
Zdenek Kabelac
18aa541ca2 configure: avoid repeative inclusion of configure.h
Since configure.h is a generated header and it's missing traditional
ifdefs preambule - it can be included & parsed multiple times.
Normally compiler is fine when defines have same value and there is
no warning - yet we don't need to parse this several times
and by adding -include  directive we can ensure every file
in the package is rightly compile with configure.h as the
first header file.
2018-12-21 19:19:50 +01:00
Zdenek Kabelac
143c8dcd7f makefiles: no longer used define
Not used anymore -D_BUILDING_LVM
2018-12-17 10:51:01 +01:00
Zdenek Kabelac
73bef5e3dd makefiles: some leftovers from lvmetad 2018-12-14 15:14:48 +01:00
Zdenek Kabelac
0f5bdd4d31 makefiles: correct libdm dependency
Correcting dependency tracking for libdm internal files.
2018-12-14 15:14:32 +01:00
Zdenek Kabelac
ceb2f0ad3b makefiles: updates for less verbosity 2018-11-29 23:05:43 +01:00
Zdenek Kabelac
a457566e91 build: drop some lvm references from libdm making
Some simplification, more may follow...
2018-06-14 22:02:01 +02:00
Joe Thornber
232918fb86 build: libbase.a 2018-06-04 13:53:07 +01:00
Joe Thornber
29abba3785 build: get separate builddir working again 2018-06-04 13:22:14 +01:00
Joe Thornber
ccc35e2647 device-mapper: Fork libdm internally.
The device-mapper directory now holds a copy of libdm source.  At
the moment this code is identical to libdm.  Over time code will
migrate out to appropriate places (see doc/refactoring.txt).

The libdm directory still exists, and contains the source for the
libdevmapper shared library, which we will continue to ship (though
not neccessarily update).

All code using libdm should now use the version in device-mapper.
2018-05-16 13:00:50 +01:00