Commit a7c17431b9 attempted to fix a problem where the system
libraries might get used instead of local libraries for things like
-lcom_err. It tried to accomplish this by moving $(ELF_OTHER_LIBS) to
before $(LDFLAGS).
Unfortunately, this was the wrong fix; $(ELF_OTHER_LIBS) *MUST* be
after the object files, or the linker might not pull in the necessary
library and not include it into the DT_NEEDED section of the shared
library. The proper fix is to add a -L$(LIB) before $(LDFLAGS), and
then remove the -L option from all of the ELF_OTHER_LIBS definitions
in the library Makefiles.
Addresses-Sourceforge-Bug: #3554345
Cc: Olivier Blin <olivier.blin@softathome.com>
Reported-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
ELF_OTHER_LIBS usually contains local search dirs (-L ../..), but it
was added in link command after system search dirs from LDFLAGS.
Libraries and executables were linked with the system libraries if
present, and possibly using static archives instead of shared
libraries.
It could also make final executable link to fail when shared libraries
are enabled: if libext2fs.so is linked with a static libcom_err.a from
system, build system would attempt to link without -lpthread.
This fixes the issue by moving ELF_OTHER_LIBS before LDFLAGS in the
link command.
Addresses-Sourceforge-Bug: #3542572
Reported-by: Olivier Blin <blino@users.sourceforge.net>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Add a configure option, --enable-relative-symlinks, which will use
relative symlinks for the ELF shared library files.
Addresses-Sourceforge-Bug: #3520767
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
These options allow e2fsprogs to be built using symlinks instead of
hard links, and to be installed using symlinks instead of hard links,
respectively.
Addresses-Sourceforge-Bug: #1436294
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Some people don't want to see the concise "kernel-style" make output.
This configure option allows build engines that want to see the full
set of commands executed by the makefile to get what they want. Most
people will find this more distracting than useful, unless they need
to debug the Makefiles.
(It is not necessary to rerun configure to enable this verbose make
output temprarily; if a developer wants to do a quick debug of a
directory's makefile, he or she can simply edit the definition of the
$(E) and $(Q) variables in the Makefile; instructions can be found in
the MCONFIG file which is included in at the beginning of every
Makefile.)
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
When installing the ELF link library, avoid using absolute pathnames
if $(root_libdir) and $(libdir) are the same.
Addresses-Sourceforge-Bug: #1782913
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
The previous fix which fixed the problem with GNU make 3.81 building
all of the library object files caused GNU make 3.80 fail because the
subdirectories (such as elfshared) were not getting created. This fix
should allow the Makefiles to work with both GNU make 3.80 and GNU
make 3.81.
Fixing the problem of parallel builds sometimes not creating the library
subdirectories caused library object files to get constantly recompiled.
Fix this by remaping how the Makefile subdirectories decide to create
the subdirectories.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Makefile.elf-lib, Makefile.solaris-lib: Add $(LDFLAGS) to the command line
argument when generating the shared library, to allow cross-compile
and other builds that might need to specify -L paths to needed
libraries.
Addresses Sourceforge Bug #1261549
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
correctly.
Update Makefile dependencies.
Update "make depend" production so that it filters out comments
inserted by newer gcc compilers.
Remove sync from e2fsck's "make all" target.
super.c, e2fsck.h: Always declare e2fsck_get_device_size() as an
extern in e2fsck.h to prevent -Wall warnings.
pass4.c (e2fsck_pass4): Remove unused variable 'j'.
super.c (check_super_block): Fix broken superblock sanity check when
calculating blocks_per_group if s_log_frag_size != s_log_block_size.
Since we don't support fragments, this isn't a bug deal, but it's good
to get it fixed.
ChangeLog, Makefile.elf-lib:
Makefile.elf-lib (installdirs): Change use of DLL_INSTALL_DIR to
ELF_INSTALL_DIR. (Doesn't make a difference currently, but it's
correct this way.)
ChangeLog, fgetversion.c, getversion.c:
getversion.c (getversion): Return 0 if there's no error.
fgetversion.c (fgetversion): Pass the address of the temporary
variable instead of the unitialized variable to the
EXT2_IOC_GETVERSION ioctl.