mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* problem with ccflags := -Werror in Makefiles when building with gcc 4.6.0
@ 2011-03-09 16:28 Douglas Mencken
  2011-03-09 17:22 ` Joe Perches
  0 siblings, 1 reply; 3+ messages in thread
From: Douglas Mencken @ 2011-03-09 16:28 UTC (permalink / raw)
  To: linux-kernel

When building with gcc 4.6.0 with the new type of warnings introduced,
-Wunused-but-set-variable, many directories with ccflags set to
-Werror in Makefile fail to build.

Example:
> arch/powerpc/kernel/align.c:704:33: error: variable 'instruction' set but not used [-Werror=unused-but-set-variable]
> cc1: all warnings being treated as errors

I'm currently using the following workaround to get rid of `-Werror':

list_of_makefiles=`find . -name Makefile -print0 | xargs -0 grep -H
"ccflags" | grep "\-Werror" | \
                   sed "s/Makefile:/Makefile@\t/g" | cut -d'@' -f1`
echo "${list_of_makefiles}" | while read the_makefile
do
  sed -i 's/-Werror//g' "${the_makefile}"
done

I wish to be personally CC'ed the answers/comments posted to the list
in response.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-03-09 18:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-09 16:28 problem with ccflags := -Werror in Makefiles when building with gcc 4.6.0 Douglas Mencken
2011-03-09 17:22 ` Joe Perches
2011-03-09 18:00   ` Sam Ravnborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®