mirror of
https://github.com/cockpit-project/cockpit.git
synced 2026-11-03 21:49:50 -09:00
build: add -ffile-prefix-map to CFLAGS
Add -ffile-prefix-map to CFLAGS, which is a way to prevent the full absolute path of build-time source filenames from ending up in (the debugging symbols of) the binaries we install. The RHEL8 version of the code (in /usr/lib/rpm/find-debuginfo.sh) for scanning for the list of source files to include in the -debugsource package is confused by the remapping, so disable it.
This commit is contained in:
parent
2a1399d3df
commit
c66a65feac
1 changed files with 11 additions and 1 deletions
12
configure.ac
12
configure.ac
|
|
@ -247,13 +247,23 @@ AC_DEFINE_UNQUOTED([PATH_SSH_AGENT], ["$SSH_AGENT"], [Location of ssh-agent bina
|
|||
|
||||
changequote(,)dnl
|
||||
if test "x$GCC" = "xyes"; then
|
||||
if grep -q platform:el8 /usr/lib/os-release; then
|
||||
# /usr/lib/rpm/find-debuginfo.sh on RHEL 8 gets confused by
|
||||
# -fdebug-prefix-map, so disable it if we're building there
|
||||
strip_sourcefile_prefix="."
|
||||
else
|
||||
strip_sourcefile_prefix="$(realpath -s "${PWD}/${srcdir}")"
|
||||
fi
|
||||
|
||||
CFLAGS="-Wall \
|
||||
-Werror=strict-prototypes -Werror=missing-prototypes \
|
||||
-Werror=implicit-function-declaration \
|
||||
-Werror=pointer-arith -Werror=init-self \
|
||||
-Werror=format=2 \
|
||||
-Werror=return-type \
|
||||
-Werror=missing-include-dirs $CFLAGS"
|
||||
-Werror=missing-include-dirs \
|
||||
-ffile-prefix-map=${strip_sourcefile_prefix}=. \
|
||||
$CFLAGS"
|
||||
fi
|
||||
changequote([,])dnl
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue