mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-06 21:00:32 +01:00
build: configure.ac: replace NM_COMPILER_FLAG with CC_CHECK_FLAG_APPEND
This commit is contained in:
parent
54b873a475
commit
76eca6aca9
1 changed files with 11 additions and 7 deletions
18
configure.ac
18
configure.ac
|
|
@ -954,13 +954,17 @@ fi
|
|||
|
||||
AC_ARG_ENABLE(ld-gc, AS_HELP_STRING([--enable-ld-gc], [Enable garbage collection of unused symbols on linking (default: auto)]))
|
||||
if (test "${enable_ld_gc}" != "no"); then
|
||||
NM_COMPILER_FLAG([-fdata-sections -ffunction-sections -Wl,--gc-sections], [enable_ld_gc='yes'], [
|
||||
if (test "${enable_ld_gc}" = "yes"); then
|
||||
AC_MSG_ERROR([Unused symbol eviction requested but not supported.])
|
||||
else
|
||||
enable_ld_gc='no'
|
||||
fi
|
||||
])
|
||||
CC_CHECK_FLAG_APPEND([ld_gc_flags], [CFLAGS], [-fdata-sections -ffunction-sections -Wl,--gc-sections])
|
||||
if (test -n "${ld_gc_flags}"); then
|
||||
enable_ld_gc="yes"
|
||||
CFLAGS="$CFLAGS $ld_gc_flags"
|
||||
else
|
||||
if (test "${enable_ld_gc}" = "yes"); then
|
||||
AC_MSG_ERROR([Unused symbol eviction requested but not supported.])
|
||||
else
|
||||
enable_ld_gc="no"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl -------------------------
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue