Created attachment 182007 [details] Failed build config log lang/gcc48 fails to build when CPUTYPE?=haswell is set in make.conf. After changing CPUTYPE to core2, it works fine. This is happening for me on both 11.0-RELEASE and 11-STABLE. At least gcc48-4.8.5_2 and gcc48-4.8.5_3 are affected. Checking multilib configuration for libgcc... mkdir x86_64-portbld-freebsd11.0 mkdir x86_64-portbld-freebsd11.0/libgcc Configuring in x86_64-portbld-freebsd11.0/libgcc configure: creating cache ./config.cache checking build system type... x86_64-portbld-freebsd11.0 checking host system type... x86_64-portbld-freebsd11.0 checking for --enable-version-specific-runtime-libs... no checking for a BSD-compatible install... /usr/bin/install -c checking for gawk... /usr/bin/awk checking for x86_64-portbld-freebsd11.0-ar... /usr/local/x86_64-portbld-freebsd11.0/bin/ar checking for x86_64-portbld-freebsd11.0-lipo... lipo checking for x86_64-portbld-freebsd11.0-nm... /usr/ports/lang/gcc48/work/.build/./gcc/nm checking for x86_64-portbld-freebsd11.0-ranlib... /usr/local/x86_64-portbld-freebsd11.0/bin/ranlib checking for x86_64-portbld-freebsd11.0-strip... /usr/local/x86_64-portbld-freebsd11.0/bin/strip checking whether ln -s works... yes checking for x86_64-portbld-freebsd11.0-gcc... /usr/ports/lang/gcc48/work/.build/./gcc/xgcc -B/usr/ports/lang/gcc48/work/.build/./gcc/ -B/usr/local/x86_64-portbld-freebsd11.0/bin/ -B/usr/local/x86_64-portbld-freebsd11.0/lib/ -isystem /usr/local/x86_64-portbld-freebsd11.0/include -isystem /usr/local/x86_64-portbld-freebsd11.0/sys-include checking for suffix of object files... configure: error: in `/usr/ports/lang/gcc48/work/.build/x86_64-portbld-freebsd11.0/libgcc': configure: error: cannot compute suffix of object files: cannot compile See `config.log' for more details. gmake[3]: *** [Makefile:10661: configure-target-libgcc] Error 1 gmake[3]: Leaving directory '/usr/ports/lang/gcc48/work/.build' gmake[2]: *** [Makefile:857: all] Error 2 gmake[2]: Leaving directory '/usr/ports/lang/gcc48/work/.build' ===> Compilation failed unexpectedly.
Yes, that is one of the reasons we have updated lang/gcc (the canonical version of GCC in the ports tree) to GCC 4.9 and later GCC 5. GCC 4.8 is an old version released more than four years ago, which has been end-of-lifed upstream. I recommend using more current ports instead which support newer Intel chips (and in general recommend using lang/gcc by default).
Today I experienced this problem again during a port upgrade. I totally agree that no one should use GCC 4.8 nowadays, but several ports still depend on it, such as memtest86+ and sysutils/uefi-edk2-bhyve which is required for EFI (and thus Windows) on bhyve. If this is not only happening to Haswell but also newer chips, many people might be affected by it without knowing the cause (the error message is not very self-explanatory). Would it be entirely wrong/bad practice to add some kind of workaround for this in the next release (e.g. if CPUTYPE == 'haswell' then CPUTYPE = 'core2')? Or perhaps just a warning message about it? That could possibly save a lot of people from getting headaches over this. :)
A commit references this bug: Author: gerald Date: Fri Nov 6 22:19:34 UTC 2020 New revision: 554330 URL: https://svnweb.freebsd.org/changeset/ports/554330 Log: Also remove -march=haswell from CFLAGS and CXXFLAGS since GCC 4.8 does not specifically support Intel Haswell. With that we should have covered all attempts people reported of setting CPUTYPE that GCC 4.8 does not support. PR: 218819 Changes: head/lang/gcc48/Makefile
I have done as you suggested, esh@. Hopefully, and I added two other common chip generations not supported by that old version of GCC, this is going to minimize users running into this again.