[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#956146: lintian: check for rules enabling --as-needed



Package: lintian
Version: 2.63.0
Severity: wishlist

Hi,

if I understood correctly, the bullseye toolchain defaults to linking
with --as-needed. Therefore it should no longer be neccessary to inject
-Wl,--as-needed into the build process, allowing d/rules to be further
minimized.

Some common ways of adding --as-needed that I found in the (possibly
ancient) rules files on my local hard disk:

	export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
		(may include further flags)
		(may be quoted, spaced, wrapped)
		(may use :=)

	dh_autoreconf --as-needed

	LDFLAGS += -Wl,--as-needed
		(may include further flags)
		(may be quoted, spaced, wrapped)
		(may use =, :=, export)
	
	dh_auto_configure -- -DCMAKE_EXE_LINKER_FLAGS="-Wl,--as-needed"

	$(MAKE) -C ... ... CC='$(CC) $(CPPFLAGS) $(CFLAGS) -Wall -Wl,--as-needed $(LDFLAGS)' ...


Andreas


Reply to: