Darwin test suite warns `ld64` on missing library paths for clean output.
The Darwin test suite now passes the `-w` flag to `ld64` to suppress warnings about missing library paths, preventing spurious test failures.
The GCC test suite on Darwin platforms now includes a fix for outputs.exp when using the ld64 linker. Previously, ld64 would issue warnings about missing paths provided to -L flags, which caused misleading test failures. This update resolves the issue by passing the -w flag to ld64 invocations, suppressing these irrelevant warnings and ensuring accurate test results.
In Details
This commit addresses a test suite issue within gcc.misc-tests/outputs.exp when running on Darwin with ld64. The ld64 linker generates warnings for non-existent paths provided via -L flags, which was causing spurious test failures. The fix involves adding the -w flag to ld64 invocations within the test script. This suppresses the linker's warnings, allowing the tests to pass cleanly without affecting the validity of the underlying compilation or linking process, but rather by ignoring non-critical diagnostic output.
For Context
When you write code that uses external libraries, you usually tell the compiler and linker where to find those libraries using flags like -L. On macOS (Darwin), the ld64 program is the linker that puts all your code pieces and libraries together. Sometimes, the test suite that verifies GCC (the compiler itself) might provide -L paths that don't actually exist on a particular system, perhaps because they're meant for a different configuration or are optional. By default, ld64 would complain about these non-existent paths with warnings, and these warnings were causing some of GCC's own tests to artificially fail. This change tells ld64 to ignore these specific warnings with the -w flag, so the GCC test suite only reports actual problems and not just minor informational messages from the linker.