Index: b/package/util-linux/0006-avm-cflags-sysutils.patch =================================================================== --- /dev/null +++ b/package/util-linux/0006-avm-cflags-sysutils.patch @@ -0,0 +1,618 @@ +--- ./sys-utils/Makemodule.am.orig 2017-11-30 10:51:08.231314287 +0100 ++++ ./sys-utils/Makemodule.am 2017-11-30 10:53:34.694990158 +0100 +@@ -3,6 +3,8 @@ + dist_man_MANS += sys-utils/flock.1 + flock_SOURCES = sys-utils/flock.c lib/monotonic.c lib/timer.c + flock_LDADD = $(LDADD) libcommon.la $(REALTIME_LIBS) ++flock_CFLAGS = $(AM_CFLAGS) $(DEFAULT_CFLAGS_SRC) ++flock_LDFLAGS = $(AM_LDFLAGS) $(DEFAULT_LDFLAGS_APPL) + endif + + if BUILD_IPCMK +@@ -10,6 +12,8 @@ + dist_man_MANS += sys-utils/ipcmk.1 + ipcmk_SOURCES = sys-utils/ipcmk.c + ipcmk_LDADD = $(LDADD) libcommon.la ++ipcmk_CFLAGS = $(AM_CFLAGS) $(DEFAULT_CFLAGS_SRC) ++ipcmk_LDFLAGS = $(AM_LDFLAGS) $(DEFAULT_LDFLAGS_APPL) + endif + + if BUILD_IPCRM +@@ -17,6 +21,8 @@ + dist_man_MANS += sys-utils/ipcrm.1 + ipcrm_SOURCES = sys-utils/ipcrm.c + ipcrm_LDADD = $(LDADD) libcommon.la ++ipcrm_CFLAGS = $(AM_CFLAGS) $(DEFAULT_CFLAGS_SRC) ++ipcrm_LDFLAGS = $(AM_LDFLAGS) $(DEFAULT_LDFLAGS_APPL) + endif + + if BUILD_IPCS +@@ -26,6 +32,8 @@ + sys-utils/ipcutils.c \ + sys-utils/ipcutils.h + ipcs_LDADD = $(LDADD) libcommon.la ++ipcs_CFLAGS = $(AM_CFLAGS) $(DEFAULT_CFLAGS_SRC) ++ipcs_LDFLAGS = $(AM_LDFLAGS) $(DEFAULT_LDFLAGS_APPL) + endif + + if BUILD_LSIPC +@@ -35,25 +43,32 @@ + sys-utils/ipcutils.c \ + sys-utils/ipcutils.h + lsipc_LDADD = $(LDADD) libcommon.la libsmartcols.la +-lsipc_CFLAGS = $(AM_CFLAGS) -I$(ul_libsmartcols_incdir) ++lsipc_CFLAGS = $(AM_CFLAGS) -I$(ul_libsmartcols_incdir) $(DEFAULT_CFLAGS_SRC) ++lsipc_LDFLAGS = $(AM_LDFLAGS) $(DEFAULT_LDFLAGS_APPL) + endif + + if BUILD_RENICE + usrbin_exec_PROGRAMS += renice + dist_man_MANS += sys-utils/renice.1 + renice_SOURCES = sys-utils/renice.c ++renice_CFLAGS = $(AM_CFLAGS) $(DEFAULT_CFLAGS_SRC) ++renice_LDFLAGS = $(AM_LDFLAGS) $(DEFAULT_LDFLAGS_APPL) + endif + + if BUILD_SETSID + usrbin_exec_PROGRAMS += setsid + dist_man_MANS += sys-utils/setsid.1 + setsid_SOURCES = sys-utils/setsid.c ++setsid_CFLAGS = $(AM_CFLAGS) $(DEFAULT_CFLAGS_SRC) ++setsid_LDFLAGS = $(AM_LDFLAGS) $(DEFAULT_LDFLAGS_APPL) + endif + + if BUILD_READPROFILE + usrsbin_exec_PROGRAMS += readprofile + dist_man_MANS += sys-utils/readprofile.8 + readprofile_SOURCES = sys-utils/readprofile.c ++readprofile_CFLAGS = $(AM_CFLAGS) $(DEFAULT_CFLAGS_SRC) ++readprofile_LDFLAGS = $(AM_LDFLAGS) $(DEFAULT_LDFLAGS_APPL) + endif + + if BUILD_TUNELP +@@ -61,6 +76,8 @@ + dist_man_MANS += sys-utils/tunelp.8 + tunelp_SOURCES = sys-utils/tunelp.c sys-utils/lp.h + tunelp_LDADD = $(LDADD) libcommon.la ++tunelp_CFLAGS = $(AM_CFLAGS) $(DEFAULT_CFLAGS_SRC) ++tunelp_LDFLAGS = $(AM_LDFLAGS) $(DEFAULT_LDFLAGS_APPL) + endif + + if BUILD_FSTRIM +@@ -68,7 +85,8 @@ + dist_man_MANS += sys-utils/fstrim.8 + fstrim_SOURCES = sys-utils/fstrim.c + fstrim_LDADD = $(LDADD) libcommon.la libmount.la +-fstrim_CFLAGS = $(AM_CFLAGS) -I$(ul_libmount_incdir) ++fstrim_CFLAGS = $(AM_CFLAGS) -I$(ul_libmount_incdir) $(DEFAULT_CFLAGS_SRC) ++tunelp_LDFLAGS = $(AM_LDFLAGS) $(DEFAULT_LDFLAGS_APPL) + if HAVE_SYSTEMD + systemdsystemunit_DATA += \ + sys-utils/fstrim.service \ +@@ -84,11 +102,13 @@ + dist_man_MANS += sys-utils/dmesg.1 + dmesg_SOURCES = sys-utils/dmesg.c lib/monotonic.c + dmesg_LDADD = $(LDADD) libcommon.la libtcolors.la $(REALTIME_LIBS) +-dmesg_CFLAGS = $(AM_CFLAGS) ++dmesg_CFLAGS = $(AM_CFLAGS) $(DEFAULT_CFLAGS_SRC) ++dmesg_LDFLAGS = $(AM_LDFLAGS) $(DEFAULT_LDFLAGS_APPL) + check_PROGRAMS += test_dmesg + test_dmesg_SOURCES = $(dmesg_SOURCES) + test_dmesg_LDADD = $(dmesg_LDADD) +-test_dmesg_CFLAGS = -DTEST_DMESG $(dmesg_CFLAGS) ++test_dmesg_CFLAGS = -DTEST_DMESG $(dmesg_CFLAGS) $(DEFAULT_CFLAGS_SRC) ++test_dmesg_LDFLAGS = $(AM_LDFLAGS) $(DEFAULT_LDFLAGS_APPL) + endif + + if BUILD_CTRLALTDEL +@@ -96,12 +116,16 @@ + dist_man_MANS += sys-utils/ctrlaltdel.8 + ctrlaltdel_SOURCES = sys-utils/ctrlaltdel.c + ctrlaltdel_LDADD = $(LDADD) libcommon.la ++ctrlaltdel_CFLAGS = $(AM_CFLAGS) $(DEFAULT_CFLAGS_SRC) ++ctrlaltdel_LDFLAGS = $(AM_LDFLAGS) $(DEFAULT_LDFLAGS_APPL) + endif + + if BUILD_FSFREEZE + sbin_PROGRAMS += fsfreeze + dist_man_MANS += sys-utils/fsfreeze.8 + fsfreeze_SOURCES = sys-utils/fsfreeze.c ++fsfreeze_CFLAGS = $(AM_CFLAGS) $(DEFAULT_CFLAGS_SRC) ++fsfreeze_LDFLAGS = $(AM_LDFLAGS) $(DEFAULT_LDFLAGS_APPL) + endif + + if BUILD_BLKDISCARD +@@ -109,6 +133,8 @@ + dist_man_MANS += sys-utils/blkdiscard.8 + blkdiscard_SOURCES = sys-utils/blkdiscard.c lib/monotonic.c + blkdiscard_LDADD = $(LDADD) libcommon.la $(REALTIME_LIBS) ++blkdiscard_CFLAGS = $(AM_CFLAGS) $(DEFAULT_CFLAGS_SRC) ++blkdiscard_LDFLAGS = $(AM_LDFLAGS) $(DEFAULT_LDFLAGS_APPL) + endif + + if BUILD_LDATTACH +@@ -116,6 +142,8 @@ + dist_man_MANS += sys-utils/ldattach.8 + ldattach_SOURCES = sys-utils/ldattach.c + ldattach_LDADD = $(LDADD) libcommon.la ++ldattach_CFLAGS = $(AM_CFLAGS) $(DEFAULT_CFLAGS_SRC) ++ldattach_LDFLAGS = $(AM_LDFLAGS) $(DEFAULT_LDFLAGS_APPL) + endif + + if BUILD_RTCWAKE +@@ -124,6 +152,8 @@ + PATHFILES += sys-utils/rtcwake.8 + rtcwake_SOURCES = sys-utils/rtcwake.c + rtcwake_LDADD = $(LDADD) libcommon.la ++rtcwake_CFLAGS = $(AM_CFLAGS) $(DEFAULT_CFLAGS_SRC) ++rtcwake_LDFLAGS = $(AM_LDFLAGS) $(DEFAULT_LDFLAGS_APPL) + endif + + if BUILD_SETARCH +@@ -178,6 +208,8 @@ + + INSTALL_EXEC_HOOKS += install-exec-hook-setarch + UNINSTALL_HOOKS += uninstall-hook-setarch ++setarch_CFLAGS = $(AM_CFLAGS) $(DEFAULT_CFLAGS_SRC) ++setarch_LDFLAGS = $(AM_LDFLAGS) $(DEFAULT_LDFLAGS_APPL) + + endif # BUILD_SETARCH + +@@ -186,8 +218,9 @@ + usrbin_exec_PROGRAMS += eject + eject_SOURCES = sys-utils/eject.c lib/monotonic.c + eject_LDADD = $(LDADD) libmount.la libcommon.la $(REALTIME_LIBS) +-eject_CFLAGS = $(AM_CFLAGS) -I$(ul_libmount_incdir) ++eject_CFLAGS = $(AM_CFLAGS) -I$(ul_libmount_incdir) $(DEFAULT_CFLAGS_SRC) + dist_man_MANS += sys-utils/eject.1 ++eject_LDFLAGS = $(AM_LDFLAGS) $(DEFAULT_LDFLAGS_APPL) + endif + + +@@ -196,14 +229,15 @@ + dist_man_MANS += sys-utils/losetup.8 + losetup_SOURCES = sys-utils/losetup.c + losetup_LDADD = $(LDADD) libcommon.la libsmartcols.la +-losetup_CFLAGS = $(AM_CFLAGS) -I$(ul_libsmartcols_incdir) ++losetup_CFLAGS = $(AM_CFLAGS) -I$(ul_libsmartcols_incdir) $(DEFAULT_CFLAGS_SRC) ++losetup_LDFLAGS = $(AM_LDFLAGS) $(DEFAULT_LDFLAGS_APPL) + + if HAVE_STATIC_LOSETUP + bin_PROGRAMS += losetup.static + losetup_static_SOURCES = $(losetup_SOURCES) +-losetup_static_LDFLAGS = -all-static ++losetup_static_LDFLAGS = -all-static $(DEFAULT_LDFLAGS_APPL) + losetup_static_LDADD = $(losetup_LDADD) +-losetup_static_CFLAGS = $(AM_CFLAGS) -I$(ul_libsmartcols_incdir) ++losetup_static_CFLAGS = $(AM_CFLAGS) -I$(ul_libsmartcols_incdir) $(DEFAULT_CFLAGS_SRC) + endif + endif # BUILD_LOSETUP + +@@ -213,7 +247,8 @@ + dist_man_MANS += sys-utils/zramctl.8 + zramctl_SOURCES = sys-utils/zramctl.c + zramctl_LDADD = $(LDADD) libcommon.la libsmartcols.la +-zramctl_CFLAGS = $(AM_CFLAGS) -I$(ul_libsmartcols_incdir) ++zramctl_CFLAGS = $(AM_CFLAGS) -I$(ul_libsmartcols_incdir) $(DEFAULT_CFLAGS_SRC) ++zramctl_LDFLAGS = $(AM_LDFLAGS) $(DEFAULT_LDFLAGS_APPL) + endif + + +@@ -222,7 +257,8 @@ + dist_man_MANS += sys-utils/prlimit.1 + prlimit_SOURCES = sys-utils/prlimit.c + prlimit_LDADD = $(LDADD) libcommon.la libsmartcols.la +-prlimit_CFLAGS = $(AM_CFLAGS) -I$(ul_libsmartcols_incdir) ++prlimit_CFLAGS = $(AM_CFLAGS) -I$(ul_libsmartcols_incdir) $(DEFAULT_CFLAGS_SRC) ++prlimit_LDFLAGS = $(AM_LDFLAGS) $(DEFAULT_LDFLAGS_APPL) + endif + + +@@ -231,7 +267,8 @@ + dist_man_MANS += sys-utils/lsns.8 + lsns_SOURCES = sys-utils/lsns.c + lsns_LDADD = $(LDADD) libcommon.la libsmartcols.la +-lsns_CFLAGS = $(AM_CFLAGS) -I$(ul_libsmartcols_incdir) ++lsns_CFLAGS = $(AM_CFLAGS) -I$(ul_libsmartcols_incdir) $(DEFAULT_CFLAGS_SRC) ++lsns_LDFLAGS = $(AM_LDFLAGS) $(DEFAULT_LDFLAGS_APPL) + endif + + +@@ -248,26 +285,26 @@ + mount_SOURCES = sys-utils/mount.c + mount_LDADD = $(LDADD) libcommon.la libmount.la $(SELINUX_LIBS) + mount_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS) -I$(ul_libmount_incdir) +-mount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS) ++mount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS) $(DEFAULT_LDFLAGS_APPL) + + umount_SOURCES = sys-utils/umount.c + umount_LDADD = $(LDADD) libcommon.la libmount.la + umount_CFLAGS = $(AM_CFLAGS) $(SUID_CFLAGS) -I$(ul_libmount_incdir) +-umount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS) ++umount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS) $(DEFAULT_LDFLAGS_APPL) + + if HAVE_STATIC_MOUNT + bin_PROGRAMS += mount.static + mount_static_SOURCES = $(mount_SOURCES) +-mount_static_CFLAGS = $(mount_CFLAGS) +-mount_static_LDFLAGS = $(mount_LDFLAGS) -all-static ++mount_static_CFLAGS = $(mount_CFLAGS) $(DEFAULT_CFLAGS_SRC) ++mount_static_LDFLAGS = $(mount_LDFLAGS) -all-static $(DEFAULT_LDFLAGS_APPL) + mount_static_LDADD = $(mount_LDADD) $(SELINUX_LIBS_STATIC) + endif + + if HAVE_STATIC_UMOUNT + bin_PROGRAMS += umount.static + umount_static_SOURCES = $(umount_SOURCES) +-umount_static_CFLAGS = $(umount_CFLAGS) +-umount_static_LDFLAGS = $(umount_LDFLAGS) -all-static ++umount_static_CFLAGS = $(umount_CFLAGS) $(DEFAULT_CFLAGS_SRC) ++umount_static_LDFLAGS = $(umount_LDFLAGS) -all-static $(DEFAULT_LDFLAGS_APPL) + umount_static_LDADD = $(umount_LDADD) + endif + +@@ -296,12 +333,13 @@ + swapon_CFLAGS = $(AM_CFLAGS) \ + -I$(ul_libblkid_incdir) \ + -I$(ul_libmount_incdir) \ +- -I$(ul_libsmartcols_incdir) ++ -I$(ul_libsmartcols_incdir) $(DEFAULT_CFLAGS_SRC) + swapon_LDADD = $(LDADD) \ + libblkid.la \ + libcommon.la \ + libmount.la \ + libsmartcols.la ++swapon_LDFLAGS = $(AM_LDFLAGS) $(DEFAULT_LDFLAGS_APPL) + + swapoff_SOURCES = \ + sys-utils/swapoff.c \ +@@ -311,11 +349,12 @@ + include/swapprober.h + swapoff_CFLAGS = $(AM_CFLAGS) \ + -I$(ul_libblkid_incdir) \ +- -I$(ul_libmount_incdir) ++ -I$(ul_libmount_incdir) $(DEFAULT_CFLAGS_SRC) + swapoff_LDADD = $(LDADD) \ + libmount.la \ + libblkid.la \ + libcommon.la ++swapoff_LDFLAGS = $(AM_LDFLAGS) $(DEFAULT_LDFLAGS_APPL) + endif + + if BUILD_LSCPU +@@ -325,7 +364,8 @@ + sys-utils/lscpu.h \ + sys-utils/lscpu-dmi.c + lscpu_LDADD = $(LDADD) libcommon.la libsmartcols.la $(RTAS_LIBS) +-lscpu_CFLAGS = $(AM_CFLAGS) -I$(ul_libsmartcols_incdir) ++lscpu_CFLAGS = $(AM_CFLAGS) -I$(ul_libsmartcols_incdir) $(DEFAULT_CFLAGS_SRC) ++lscpu_LDFLAGS = $(AM_LDFLAGS) $(DEFAULT_LDFLAGS_APPL) + dist_man_MANS += sys-utils/lscpu.1 + endif + +@@ -333,6 +373,8 @@ + sbin_PROGRAMS += chcpu + chcpu_SOURCES = sys-utils/chcpu.c + chcpu_LDADD = $(LDADD) libcommon.la ++chcpu_CFLAGS = $(AM_CFLAGS) $(DEFAULT_CFLAGS_SRC) ++chcpu_LDFLAGS = $(AM_CFLAGS) $(DEFAULT_LDFLAGS_APPL) + dist_man_MANS += sys-utils/chcpu.8 + endif + +@@ -341,13 +383,15 @@ + dist_man_MANS += sys-utils/wdctl.8 + wdctl_SOURCES = sys-utils/wdctl.c + wdctl_LDADD = $(LDADD) libcommon.la libsmartcols.la +-wdctl_CFLAGS = $(AM_CFLAGS) -I$(ul_libsmartcols_incdir) ++wdctl_CFLAGS = $(AM_CFLAGS) -I$(ul_libsmartcols_incdir) $(DEFAULT_CFLAGS_SRC) ++wdctl_LDFLAGS = $(AM_LDFLAGS) $(DEFAULT_LDFLAGS_APPL) + endif + + if BUILD_MOUNTPOINT + bin_PROGRAMS += mountpoint + mountpoint_LDADD = $(LDADD) libmount.la +-mountpoint_CFLAGS = $(AM_CFLAGS) -I$(ul_libmount_incdir) ++mountpoint_CFLAGS = $(AM_CFLAGS) -I$(ul_libmount_incdir) $(DEFAULT_CFLAGS_SRC) ++mountpoint_LDFLAGS = $(AM_LDFLAGS) $(DEFAULT_LDFLAGS_APPL) + dist_man_MANS += sys-utils/mountpoint.1 + mountpoint_SOURCES = sys-utils/mountpoint.c + endif +@@ -357,17 +401,23 @@ + fallocate_SOURCES = sys-utils/fallocate.c + fallocate_LDADD = $(LDADD) libcommon.la + dist_man_MANS += sys-utils/fallocate.1 ++fallocate_CFLAGS = $(AM_CFLAGS) $(DEFAULT_CFLAGS_SRC) ++fallocate_LDFLAGS = $(AM_LDFLAGS) $(DEFAULT_LDFLAGS_APPL) + endif + + if BUILD_PIVOT_ROOT + sbin_PROGRAMS += pivot_root + dist_man_MANS += sys-utils/pivot_root.8 ++pivot_root_CFLAGS = $(AM_CFLAGS) $(DEFAULT_CFLAGS_SRC) ++pivot_root_LDFLAGS = $(AM_LDFLAGS) $(DEFAULT_LDFLAGS_APPL) + pivot_root_SOURCES = sys-utils/pivot_root.c + endif + + if BUILD_SWITCH_ROOT + sbin_PROGRAMS += switch_root + dist_man_MANS += sys-utils/switch_root.8 ++switch_root_CFLAGS = $(AM_CFLAGS) $(DEFAULT_CFLAGS_SRC) ++switch_root_LDFLAGS = $(AM_LDFLAGS) $(DEFAULT_LDFLAGS_APPL) + switch_root_SOURCES = sys-utils/switch_root.c + endif + +@@ -376,12 +426,13 @@ + dist_man_MANS += sys-utils/unshare.1 + unshare_SOURCES = sys-utils/unshare.c + unshare_LDADD = $(LDADD) libcommon.la +-unshare_CFLAGS = $(AM_CFLAGS) -I$(ul_libmount_incdir) ++unshare_CFLAGS = $(AM_CFLAGS) -I$(ul_libmount_incdir) $(DEFAULT_CFLAGS_SRC) ++unshare_LDFLAGS = $(AM_LDFLAGS) $(DEFAULT_LDFLAGS_APPL) + + if HAVE_STATIC_UNSHARE + usrbin_exec_PROGRAMS += unshare.static + unshare_static_SOURCES = $(unshare_SOURCES) +-unshare_static_LDFLAGS = -all-static ++unshare_static_LDFLAGS = -all-static $(DEFAULT_LDFLAGS_APPL) + unshare_static_LDADD = $(unshare_LDADD) + unshare_static_CFLAGS = $(unshare_CFLAGS) + endif +@@ -392,12 +443,14 @@ + dist_man_MANS += sys-utils/nsenter.1 + nsenter_SOURCES = sys-utils/nsenter.c + nsenter_LDADD = $(LDADD) libcommon.la $(SELINUX_LIBS) ++nsenter_CFLAGS = $(AM_CFLAGS) $(DEFAULT_CFLAGS_SRC) + + if HAVE_STATIC_NSENTER + usrbin_exec_PROGRAMS += nsenter.static + nsenter_static_SOURCES = $(nsenter_SOURCES) +-nsenter_static_LDFLAGS = -all-static ++nsenter_static_LDFLAGS = -all-static $(DEFAULT_LDFLAGS_APPL) + nsenter_static_LDADD = $(nsenter_LDADD) ++nsenter_static_CFLAGS = $(AM_CFLAGS) $(DEFAULT_CFLAGS_SRC) + endif + endif + +@@ -415,6 +468,8 @@ + hwclock_LDADD = $(LDADD) libcommon.la -lm + if HAVE_AUDIT + hwclock_LDADD += -laudit ++hwclock_CFLAGS = $(AM_CFLAGS) $(DEFAULT_CFLAGS_SRC) ++hwclock_LDFLAGS = $(AM_LDFLAGS) $(DEFAULT_LDFLAGS_APPL) + endif + endif # BUILD_HWCLOCK + +@@ -423,4 +478,6 @@ + dist_man_MANS += sys-utils/setpriv.1 + setpriv_SOURCES = sys-utils/setpriv.c + setpriv_LDADD = $(LDADD) -lcap-ng libcommon.la ++setpriv_CFLAGS = $(AM_CFLAGS) $(DEFAULT_LDFLAGS_APPL) ++setpriv_LDFLAGS = $(AM_LDFLAGS) $(DEFAULT_LDFLAGS_APPL) + endif +--- ./login-utils/Makemodule.am.orig 2017-12-01 11:11:16.746019181 +0100 ++++ ./login-utils/Makemodule.am 2017-12-01 11:19:38.529911370 +0100 +@@ -6,6 +6,8 @@ + login-utils/lastb.1 + last_SOURCES = login-utils/last.c lib/monotonic.c + last_LDADD = $(LDADD) libcommon.la $(REALTIME_LIBS) ++last_CFLAGS = $(AM_CFLAGS) $(DEFAULT_CFLAGS_SRC) ++last_LDFLAGS = $(AM_LDFLAGS) $(DEFAULT_LDFLAGS_APPL) + + install-exec-hook-last: + cd $(DESTDIR)$(usrbin_execdir) && ln -sf last lastb +@@ -21,6 +23,8 @@ + login-utils/sulogin-consoles.c \ + login-utils/sulogin-consoles.h + sulogin_LDADD = $(LDADD) libcommon.la ++sulogin_CFLAGS = $(AM_CFLAGS) $(DEFAULT_CFLAGS_SRC) ++sulogin_LDFLAGS = $(AM_LDFLAGS) $(DEFAULT_LDFLAGS_APPL) + + if HAVE_LIBCRYPT + sulogin_LDADD += -lcrypt +@@ -44,6 +48,8 @@ + login-utils/logindefs.c \ + login-utils/logindefs.h + login_LDADD = $(LDADD) libcommon.la -lpam ++login_CFLAGS = $(AM_CFLAGS) $(DEFAULT_CFLAGS_SRC) ++login_LDFLAGS = $(AM_LDFLAGS) $(DEFAULT_LDFLAGS_APPL) + if HAVE_LINUXPAM + login_LDADD += -lpam_misc + endif +@@ -60,6 +66,8 @@ + sbin_PROGRAMS += nologin + dist_man_MANS += login-utils/nologin.8 + nologin_SOURCES = login-utils/nologin.c ++nologin_CFLAGS = $(AM_CFLAGS) $(DEFAULT_CFLAGS_SRC) ++nologin_LDFLAGS = $(AM_LDFLAGS) $(DEFAULT_LDFLAGS_APPL) + endif + + +@@ -67,6 +75,8 @@ + usrbin_exec_PROGRAMS += utmpdump + dist_man_MANS += login-utils/utmpdump.1 + utmpdump_SOURCES = login-utils/utmpdump.c ++utmpdump_CFLAGS = $(AM_CFLAGS) $(DEFAULT_CFLAGS_SRC) ++utmpdump_LDFLAGS = $(AM_LDFLAGS) $(DEFAULT_LDFLAGS_APPL) + endif + + +@@ -158,6 +168,8 @@ + login-utils/logindefs.c \ + login-utils/logindefs.h + runuser_LDADD = $(LDADD) libcommon.la -lpam ++runuser_CFLAGS = $(AM_CFLAGS) $(DEFAULT_CFLAGS_SRC) ++runuser_LDFLAGS = $(AM_LDFLAGS) $(DEFAULT_LDFLAGS_APPL) + if HAVE_LINUXPAM + runuser_LDADD += -lpam_misc + endif +@@ -192,6 +204,8 @@ + lslogins_LDADD += $(SYSTEMD_LIBS) $(SYSTEMD_JOURNAL_LIBS) + lslogins_CFLAGS += $(SYSTEMD_CFLAGS) $(SYSTEMD_JOURNAL_CFLAGS) + endif ++lslogins_CFLAGS += $(DEFAULT_CFLAGS_SRC) ++lslogins_LDFLAGS = $(AM_LDFLAGS) $(DEFAULT_LDFLAGS_APPL) + endif # BUILD_LSLOGINS + + if BUILD_VIPW +@@ -203,6 +217,8 @@ + login-utils/vipw.c \ + login-utils/setpwnam.h + vipw_LDADD = $(LDADD) libcommon.la ++vipw_CFLAGS = $(AM_CFLAGS) $(DEFAULT_CFLAGS_SRC) ++vipw_LDFLAGS = $(AM_LDFLAGS) $(DEFAULT_LDFLAGS_APPL) + if HAVE_SELINUX + vipw_LDADD += -lselinux + endif +--- ./misc-utils/Makemodule.am.orig 2017-12-01 11:58:26.496777295 +0100 ++++ ./misc-utils/Makemodule.am 2017-12-01 12:05:51.773501316 +0100 +@@ -4,6 +4,8 @@ + cal_SOURCES = misc-utils/cal.c + cal_CFLAGS = $(AM_CFLAGS) $(NCURSES_CFLAGS) + cal_LDADD = $(LDADD) libcommon.la libtcolors.la $(NCURSES_LIBS) ++cal_CFLAGS += $(DEFAULT_CFLAGS_SRC) ++cal_LDFLAGS = $(DEFAULT_LDFLAGS_APPL) + endif # BUILD_CAL + + +@@ -16,6 +18,8 @@ + if HAVE_SYSTEMD + logger_LDADD += $(SYSTEMD_LIBS) $(SYSTEMD_DAEMON_LIBS) $(SYSTEMD_JOURNAL_LIBS) + logger_CFLAGS += $(SYSTEMD_CFLAGS) $(SYSTEMD_DAEMON_CFLAGS) $(SYSTEMD_JOURNAL_CFLAGS) ++logger_CFLAGS += $(DEFAULT_CFLAGS_SRC) ++logger_LDFLAGS = $(DEFAULT_LDFLAGS_APPL) + endif + + check_PROGRAMS += test_logger +@@ -29,6 +33,8 @@ + usrbin_exec_PROGRAMS += look + dist_man_MANS += misc-utils/look.1 + look_SOURCES = misc-utils/look.c ++look_CFLAGS = $(DEFAULT_CFLAGS_SRC) ++look_LDFLAGS = $(DEFAULT_LDFLAGS_APPL) + endif + + if BUILD_MCOOKIE +@@ -36,12 +42,16 @@ + dist_man_MANS += misc-utils/mcookie.1 + mcookie_SOURCES = misc-utils/mcookie.c lib/md5.c + mcookie_LDADD = $(LDADD) libcommon.la ++mcookie_CFLAGS = $(DEFAULT_CFLAGS_SRC) ++mcookie_LDFLAGS = $(DEFAULT_LDFLAGS_APPL) + endif + + if BUILD_NAMEI + usrbin_exec_PROGRAMS += namei + dist_man_MANS += misc-utils/namei.1 + namei_SOURCES = misc-utils/namei.c lib/strutils.c lib/idcache.c ++namei_CFLAGS = $(DEFAULT_CFLAGS_SRC) ++namei_LDFLAGS = $(DEFAULT_LDFLAGS_APPL) + endif + + if BUILD_WHEREIS +@@ -49,6 +59,8 @@ + dist_man_MANS += misc-utils/whereis.1 + whereis_SOURCES = misc-utils/whereis.c + whereis_LDADD = $(LDADD) libcommon.la ++whereis_CFLAGS = $(DEFAULT_CFLAGS_SRC) ++whereis_LDFLAGS = $(DEFAULT_LDFLAGS_APPL) + endif + + if BUILD_LSLOCKS +@@ -57,6 +69,8 @@ + lslocks_LDADD = $(LDADD) libcommon.la libmount.la libsmartcols.la + lslocks_SOURCES = misc-utils/lslocks.c + lslocks_CFLAGS = $(AM_CFLAGS) -I$(ul_libmount_incdir) -I$(ul_libsmartcols_incdir) ++lslocks_CFLAGS += $(DEFAULT_CFLAGS_SRC) ++lslocks_LDFLAGS = $(DEFAULT_LDFLAGS_APPL) + endif + + if BUILD_LSBLK +@@ -65,6 +79,8 @@ + lsblk_SOURCES = misc-utils/lsblk.c + lsblk_LDADD = $(LDADD) libblkid.la libmount.la libcommon.la libsmartcols.la + lsblk_CFLAGS = $(AM_CFLAGS) -I$(ul_libblkid_incdir) -I$(ul_libmount_incdir) -I$(ul_libsmartcols_incdir) ++lsblk_CFLAGS += $(DEFAULT_CFLAGS_SRC) ++lsblk_LDFLAGS = $(DEFAULT_LDFLAGS_APPL) + if HAVE_UDEV + lsblk_LDADD += -ludev + endif +@@ -76,6 +92,8 @@ + uuidgen_SOURCES = misc-utils/uuidgen.c + uuidgen_LDADD = $(LDADD) libuuid.la + uuidgen_CFLAGS = $(AM_CFLAGS) -I$(ul_libuuid_incdir) ++uuidgen_CFLAGS += $(DEFAULT_CFLAGS_SRC) ++uuidgen_LDFLAGS = $(DEFAULT_LDFLAGS_APPL) + endif + + if BUILD_UUIDD +@@ -85,6 +103,8 @@ + uuidd_CFLAGS = $(DAEMON_CFLAGS) $(AM_CFLAGS) -I$(ul_libuuid_incdir) + uuidd_LDFLAGS = $(DAEMON_LDFLAGS) $(AM_LDFLAGS) + uuidd_SOURCES = misc-utils/uuidd.c lib/monotonic.c lib/timer.c ++uuidd_CFLAGS += $(DEFAULT_CFLAGS_SRC) ++uuidd_LDFLAGS += $(DEFAULT_LDFLAGS_APPL) + if HAVE_SYSTEMD + uuidd_LDADD += $(SYSTEMD_LIBS) $(SYSTEMD_DAEMON_LIBS) + uuidd_CFLAGS += $(SYSTEMD_CFLAGS) $(SYSTEMD_DAEMON_CFLAGS) +@@ -111,6 +131,8 @@ + blkid_SOURCES = misc-utils/blkid.c + blkid_LDADD = $(LDADD) libblkid.la libcommon.la + blkid_CFLAGS = $(AM_CFLAGS) -I$(ul_libblkid_incdir) ++blkid_CFLAGS += $(DEFAULT_CFLAGS_SRC) ++blkid_LDFLAGS = $(DEFAULT_LDFLAGS_APPL) + + if HAVE_STATIC_BLKID + sbin_PROGRAMS += blkid.static +@@ -128,6 +150,8 @@ + findfs_LDADD = $(LDADD) libblkid.la + findfs_SOURCES = misc-utils/findfs.c + findfs_CFLAGS = $(AM_CFLAGS) -I$(ul_libblkid_incdir) ++findfs_CFLAGS += $(DEFAULT_CFLAGS_SRC) ++findfs_LDFLAGS = $(DEFAULT_LDFLAGS_APPL) + endif + + if BUILD_WIPEFS +@@ -136,6 +160,8 @@ + wipefs_SOURCES = misc-utils/wipefs.c + wipefs_LDADD = $(LDADD) libblkid.la libcommon.la + wipefs_CFLAGS = $(AM_CFLAGS) -I$(ul_libblkid_incdir) ++wipefs_CFLAGS += $(DEFAULT_CFLAGS_SRC) ++wipefs_LDFLAGS = $(DEFAULT_LDFLAGS_APPL) + endif + + if BUILD_FINDMNT +@@ -144,6 +170,8 @@ + findmnt_LDADD = $(LDADD) libmount.la libcommon.la libsmartcols.la + findmnt_CFLAGS = $(AM_CFLAGS) -I$(ul_libmount_incdir) -I$(ul_libsmartcols_incdir) + findmnt_SOURCES = misc-utils/findmnt.c ++findmnt_CFLAGS += $(DEFAULT_CFLAGS_SRC) ++findmnt_LDFLAGS = $(DEFAULT_LDFLAGS_APPL) + if HAVE_UDEV + findmnt_LDADD += -ludev + endif +@@ -154,6 +182,8 @@ + bin_PROGRAMS += kill + kill_SOURCES = misc-utils/kill.c + kill_LDADD = $(LDADD) libcommon.la ++kill_CFLAGS = $(DEFAULT_CFLAGS_SRC) ++kill_LDFLAGS = $(DEFAULT_LDFLAGS_APPL) + dist_man_MANS += misc-utils/kill.1 + endif + +@@ -161,12 +191,16 @@ + usrbin_exec_PROGRAMS += rename + dist_man_MANS += misc-utils/rename.1 + rename_SOURCES = misc-utils/rename.c ++rename_CFLAGS = $(DEFAULT_CFLAGS_SRC) ++rename_LDFLAGS = $(DEFAULT_LDFLAGS_APPL) + endif + + if BUILD_GETOPT + usrbin_exec_PROGRAMS += getopt + dist_man_MANS += misc-utils/getopt.1 + getopt_SOURCES = misc-utils/getopt.c ++getopt_CFLAGS = $(DEFAULT_CFLAGS_SRC) ++getopt_LDFLAGS = $(DEFAULT_LDFLAGS_APPL) + getoptexampledir = $(docdir)/getopt/ + dist_getoptexample_SCRIPTS = \ + misc-utils/getopt-parse.bash \