https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67710
--- Comment #5 from Iain Sandoe <iains at gcc dot gnu.org> --- (In reply to r...@cebitec.uni-bielefeld.de from comment #4) > Unfortunately, it doesn't work on Mac OS X 10.11.2: every link test > FAILs with > > FAIL: 17_intro/freestanding.cc (test for excess errors) > Excess errors: > ld: warning: object file > (/var/folders/1d/k16rgv6d5039jhvlj8_dzk4h00021y/T//cc0iIoOX.o) was built for > newer OSX version (10.11.2) than being linked (10.11) > > I've found that while ld strips the micro version passed to > -mmacosx_version_min, clang does not, resulting in this mess. hum. > Given that ld(1) documents the version number format as <major>.<minor>, for > now it seems that gcc should only pass this to as and ld. ld < 85.2..ish didn't understand the minor. > Looking... Actually, I think it would be better to leave macosx-version-min alone, and push a new flag (the information is all there in darwin-driver.c). propose -mmacosx-major-version=10.xx If you're not going to tackle this in the short-term, I'll take a look.