https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71286
Bug ID: 71286 Summary: 6.1.0: compiling djgpp programs with LTO emits "visibility attribute not supported in this configuration" warnings Product: gcc Version: 6.1.0 Status: UNCONFIRMED Severity: minor Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: felix.von.s at posteo dot de Target Milestone: --- Host: x86_64-pc-linux-gnu Target: i686-pc-msdosdjgpp Build: x86_64-pc-linux-gnu Compiling djgpp programs with LTO enabled makes gcc emit diagnostics like: error: visibility attribute not supported in this configuration; ignored [-Werror=attributes] The source code doesn't even contain __attribute__((visibility(...))) anywhere, however. I believe a similar problem is worked around in the MinGW target by defining a custom TARGET_ASM_ASSEMBLE_VISIBILITY. (Also, getting LTO to work in the first place required me to apply this:) --- configure +++ configure @@ -6177,7 +6177,7 @@ # Among non-ELF, only Windows platforms support the lto-plugin so far. # Build it unless LTO was explicitly disabled. case $target in - *-cygwin* | *-mingw*) build_lto_plugin=$enable_lto ;; + *-cygwin* | *-mingw* | *djgpp*) build_lto_plugin=$enable_lto ;; *) ;; esac (The comment needs updating too, by the way.)