This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug translator/12895] New: stapconf should be using -nostdinc


http://sourceware.org/bugzilla/show_bug.cgi?id=12895

           Summary: stapconf should be using -nostdinc
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: translator
        AssignedTo: systemtap@sourceware.org
        ReportedBy: jistone@redhat.com


The gcc tests performed for stapconf.h should be using -nostdinc, as expected
for any kernel build.  For some reason, we're not getting the exact same
flags...

The particular issue brought up on IRC was a user had a newer kernel-headers
than their running kernel / kernel-devel.  The files of kernel-headers are all
under /usr/include, where they shouldn't matter for kernel compiles.  However,
the stapconf for blk_types.h was finding it under /usr/include/linux/, even
though it did not exist in the running kernel-devel.  That led to an error when
the actual module compiled with -nostdinc, and didn't have the header.

My system doesn't have that package mismatch, but you can still see that
-nostdinc is missing from the stapconf line:

if gcc -D__KERNEL__  -Iinclude 
-I/usr/src/kernels/2.6.32-131.2.1.el6.i686/arch/x86/include -include
include/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs
-fno-strict-aliasing -fno-common -Werror-implicit-function-declaration
-Wno-format-security -fno-delete-null-pointer-checks -O2 -m32 -msoft-float
-mregparm=3 -freg-struct-return -mpreferred-stack-boundary=2 -march=i686
-mtune=generic -Wa,-mtune=generic32 -ffreestanding -fstack-protector
-DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -pipe -Wno-sign-compare
-fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow
-Wframe-larger-than=1024 -fomit-frame-pointer -g -Wdeclaration-after-statement
-Wno-pointer-sign -fno-strict-overflow -fno-dwarf2-cfi-asm -fconserve-stack   
-DKBUILD_BASENAME=\"stap_fb2dd8eb33f49f0de60e6243fd4f3b36_545\" -Werror -S -o
/dev/null -xc  "/usr/share/systemtap/runtime"/autoconf-blk-types.c; then echo
"#define STAPCONF_BLK_TYPES 1"; fi >>
/tmp/stapzPh1tB/stapconf_9cd19ccf4e156cfdb23f0ac67cc4ce71_497.h

vs.

gcc -Wp,-MD,/tmp/stapzPh1tB/.stap_fb2dd8eb33f49f0de60e6243fd4f3b36_545.o.d 
-nostdinc -isystem /usr/lib/gcc/i686-redhat-linux/4.4.5/include -Iinclude 
-I/usr/src/kernels/2.6.32-131.2.1.el6.i686/arch/x86/include -include
include/linux/autoconf.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes
-Wno-trigraphs -fno-strict-aliasing -fno-common
-Werror-implicit-function-declaration -Wno-format-security
-fno-delete-null-pointer-checks -O2 -m32 -msoft-float -mregparm=3
-freg-struct-return -mpreferred-stack-boundary=2 -march=i686 -mtune=generic
-Wa,-mtune=generic32 -ffreestanding -fstack-protector -DCONFIG_AS_CFI=1
-DCONFIG_AS_CFI_SIGNAL_FRAME=1 -pipe -Wno-sign-compare
-fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow
-Wframe-larger-than=1024 -fomit-frame-pointer -g -Wdeclaration-after-statement
-Wno-pointer-sign -fno-strict-overflow -fno-dwarf2-cfi-asm -fconserve-stack
-Iinclude2/asm/mach-default -include
/tmp/stapzPh1tB/stapconf_9cd19ccf4e156cfdb23f0ac67cc4ce71_497.h -ftime-report
-Q -freorder-blocks -Wframe-larger-than=256 -Wno-unused -Werror
-I"/usr/share/systemtap/runtime"  -DMODULE -D"KBUILD_STR(s)=#s"
-D"KBUILD_BASENAME=KBUILD_STR(stap_fb2dd8eb33f49f0de60e6243fd4f3b36_545)" 
-D"KBUILD_MODNAME=KBUILD_STR(stap_fb2dd8eb33f49f0de60e6243fd4f3b36_545)"
-D"DEBUG_HASH=14" -D"DEBUG_HASH2=42" -c -o
/tmp/stapzPh1tB/.tmp_stap_fb2dd8eb33f49f0de60e6243fd4f3b36_545.o
/tmp/stapzPh1tB/stap_fb2dd8eb33f49f0de60e6243fd4f3b36_545.c

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]