]> git.ipfire.org Git - thirdparty/elfutils.git/commit
Prevent binaries in src from colliding with libc++ headers users/amerey/try-config
authorTristan Ross <tristan.ross@midstall.com>
Wed, 31 Jul 2024 04:03:03 +0000 (21:03 -0700)
committerAaron Merey <amerey@redhat.com>
Thu, 8 Aug 2024 15:14:38 +0000 (11:14 -0400)
commit232b9ede92cbecabbd61291c2fc9aaf3fc61061f
tree4dd115421130496a970712505667b9e4f3045602
parent87a60d22299c4ba7b94cbce04a32c2abf015f98a
Prevent binaries in src from colliding with libc++ headers

Discovered with Nix and LLVM 17. Headers inside of libc++ can easily
collide with binaries being linked in src. This results in clang trying
to include a binary as a header.

Fix this by removing '-I.' and '-I$(srcdir)' from AM_CPPFLAGS and
DEFAULT_INCLUDES in src/Makefile.am.

To facilitate this config/eu.am has been refactored.  New file
config/eu-common.am contains all of the old eu.am but with the
AM_CPPFLAGS definition removed. eu.am now includes eu-common.am and
contains the old AM_CPPFLAGS definition.

eu.am functionality does not change, but src/Makefile.am can instead
include eu-common.am and define its own AM_CPPFLAGS without causing a
"multiply defined" warning during autoreconf.

Signed-off-by: Tristan Ross <tristan.ross@midstall.com>
config/eu-common.am [new file with mode: 0644]
config/eu.am
src/Makefile.am