Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ squid_LDADD = \
if ENABLE_LOADABLE_MODULES
squid_SOURCES += $(LOADABLE_MODULES_SOURCES)
squid_LDADD += -L$(top_builddir) $(LIBLTDL)
squid_LDFLAGS = -export-dynamic -dlopen force
squid_LDFLAGS = $(AM_LDFLAGS) -export-dynamic -dlopen force
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR description (with emphasis added by me): "AM_LDFLAGS [is] the place for tools to add linker flags automatically determined to be needed".

Autotools documentation (with emphasis added by me): "This is the variable the Makefile.am author can use to pass in additional linker flags"

AFAICT, the two quotes above contradict each other.

If autotools documentation is correct, then this PR is not needed because we (i.e. Makefile.am authors) do not define AM_LDFLAGS; we apparently do not want to "pass additional linker flags" (at this time) and cannot tell whether future "additional linker flags" (if any) would need to be added when linking squid executable.

If PR description is proven to be correct, then more Makefile.am changes are needed in this PR because, in that case, we need to add AM_LDFLAGS to all ~36 executables that use custom linking commands (e.g., testMath and testMem) and, hence, do not get AM_LDFLAGS auto-added by autotools today.

Before making widespread changes, let's determine what documentation is correct and confirm the need for this PR: In your environment, what "tool" adds "linker flags automatically determined to be needed" to AM_LDFLAGS?

## when static module linking is supported and enabled:
## squid_LDFLAGS = -all-static -dlopen self
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If AM_LDFLAGS addition above is proven to be needed, please keep this commented out hint in sync (or remove it).

Suggested change
## squid_LDFLAGS = -all-static -dlopen self
## squid_LDFLAGS = $(AM_LDFLAGS) -all-static -dlopen self

##
Expand Down
Loading