This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Use of -Werror in systemtap Module Makefiles
- From: David Wilder <dwilder at us dot ibm dot com>
- To: systemtap at sources dot redhat dot com
- Date: Mon, 02 Oct 2006 10:49:00 -0700
- Subject: Use of -Werror in systemtap Module Makefiles
I am testing stap on SLES10 s390, and have run into the following issue:
We are using -Werror in the tap modules Makefile causing the following
error during module builds.
[...]
cc1: warnings being treated as errors
/usr/local/share/systemtap/runtime/vsprintf.c: In function '_stp_vsnprintf':
/usr/local/share/systemtap/runtime/vsprintf.c:428: warning: frame size
of '_stp_vsnprintf' is 256 bytes
make[1]: *** [/tmp/stapKvDWR6/stap_31450.o] Error 1
make: *** [_module_/tmp/stapKvDWR6] Error 2
Using -Werror causes the warning to be treated as errors so the module
build fails.
The SUSE kernel config has CONFIG_WARN_STACK_SIZE=256 that get used by
the Makefile as so:
-mwarn-framesize=$(CONFIG_WARN_STACK_SIZE)
I could argue that SUSE's config needs to change, but is that the right
thing to do? Should systemtap be dependent on a distros config (other
than CONFIG_KPROBES)? Should -Werror be removed from the systemtap
module build?
A related issue:
I also get the following warning (treated and as an error)
[...]
/usr/local/share/systemtap/runtime/stack.c: In function
'_stp_stack_sprintj':
/usr/local/share/systemtap/runtime/stack.c:338: warning: 'stack' may be
used uninitialized in this function
[...]
In this case the uninitialized value wont cause a problem as "stack" is
only passed as a pointer to another function to return a value in. I
don't see the error on i386 so I am assuming some gcc option in the SUSE
S390 kernel Makefile causes the warning (I am not sure what option
yet). It is easy to fix by initializing "stack" but again should a
distros kernel Makefiles cause systemtap module builds to fail?
Comments? Suggestions?
--
David Wilder
IBM Linux Technology Center
Beaverton, Oregon, USA
dwilder@us.ibm.com
(503)578-3789