# --- T2-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # T2 SDE: package/.../gcc/no-ld-error.patch # Copyright (C) 2004 - 2006 The T2 SDE Project # # More information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # --- T2-COPYRIGHT-NOTE-END --- When we pass -Wl,--as-needed to gcc, it will print and error or better warning that the linker input was not used for compilations withotu link. That would, aside from the warning in the log, not be a big deal, if some configure (such as zlib and others) would interpret any output as failure ... - Rene Rebe --- gcc-3.4.3/gcc/gcc.c.orig 2005-04-01 17:51:06.958704192 +0200 +++ gcc-3.4.3/gcc/gcc.c 2005-04-01 17:53:23.563937040 +0200 @@ -6324,8 +6324,12 @@ struct compiler *compiler = lookup_compiler (name, strlen (name), infiles[i].language); if (compiler == NULL) +#ifdef ERROR_QUICKLY error ("%s: linker input file unused because linking not done", name); +#else + ; +#endif else if (lang_n_infiles > 0 && compiler != input_file_compiler) fatal ("cannot specify -o with -c or -S and multiple languages"); else @@ -6440,11 +6444,13 @@ /* If options said don't run linker, complain about input files to be given to the linker. */ +#ifdef ERROR_QUICKLY if (! linker_was_run && error_count == 0) for (i = 0; (int) i < n_infiles; i++) if (explicit_link_files[i]) error ("%s: linker input file unused because linking not done", outfiles[i]); +#endif /* Delete some or all of the temporary files we made. */