dos2unix-7.4.0-2.fc28.x86_64 has not been not linked with the standard Fedora linker flags (LDFLAGS) from redhat-rpm-config. Specifically, the build log contains: cc dos2unix.o querycp.o common.o -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -mcet -fcf-protection -o dos2unix cc unix2dos.o querycp.o common.o -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -mcet -fcf-protection -o unix2dos So CFLAGS are there, but LDFLAGS are not. See https://src.fedoraproject.org/rpms/redhat-rpm-config/blob/master/f/buildflags.md for information on RPM macros and environment variables provided by the build environment.
The Makefile adds environment variable RPM_OPT_FLAGS to CFLAGS. It also adds RPM_OPT_FLAGS to LDFLAGS, while it should add RPM_LD_FLAGS to LDFLAGS. See Makefile line 361. I will fix this in the next release of dos2unix. In the meantime the correct LDFLAGS can be set via dos2unix.spec by changing the build command to: make %{?_smp_mflags} LDFLAGS=%{build_ldflags}
Thanks for the hint. In fact it needed double-quotes around the macro, but it seems to work fine.
dos2unix-7.4.0-3.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-5d927eef64
dos2unix-7.4.0-3.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-5d927eef64
dos2unix-7.4.0-3.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.