[linux-yocto] [linux-yocto v4.14&v4.18] arm/Makefile: Fix systemtap
Bruce Ashfield
bruce.ashfield at gmail.com
Tue Apr 16 08:28:08 PDT 2019
Thanks Kevin,
This is now merged:
b219eb2a436e..48a345e3b61e v4.14/standard/arm-versatile-926ejs ->
v4.14/standard/arm-versatile-926ejs
f596fd1d802b..5252513a39b4 v4.14/standard/base -> v4.14/standard/base
6fb7bd59037a..c67809688bd2 v4.14/standard/beaglebone ->
v4.14/standard/beaglebone
873e1c6f41f1..d8fb40cd0e99 v4.14/standard/edgerouter ->
v4.14/standard/edgerouter
a7112232cd38..258ee8228e0a v4.14/standard/fsl-mpc8315e-rdb ->
v4.14/standard/fsl-mpc8315e-rdb
a3626e91a9d1..9ed70333fac9 v4.14/standard/intel -> v4.14/standard/intel
f755b9ed57cb..5f4bd2042396 v4.14/standard/mti-malta32 ->
v4.14/standard/mti-malta32
6a090aa71e6c..5c1de80e91e5 v4.14/standard/mti-malta64 ->
v4.14/standard/mti-malta64
c7220ecfe9ba..d86ed237d7cf v4.14/standard/preempt-rt/base ->
v4.14/standard/preempt-rt/base
879cc62ecb5e..ee960be9307e v4.14/standard/preempt-rt/intel ->
v4.14/standard/preempt-rt/intel
b71379749760..a8169837aaf2 v4.14/standard/qemuarm64 ->
v4.14/standard/qemuarm64
5022a07d7bdb..2c7af1ccbae2 v4.14/standard/qemuppc -> v4.14/standard/qemuppc
29ed04baa16b..aa7571ecc313 v4.14/standard/tiny/base ->
v4.14/standard/tiny/base
1371fce2aedb..fb22c2913bb0 v4.14/standard/tiny/common-pc ->
v4.14/standard/tiny/common-pc
868e38925dce..508a14e6f02b v4.14/standard/tiny/intel ->
v4.14/standard/tiny/intel
8492e08afbe7..0163da6ef132 v4.18/standard/arm-versatile-926ejs ->
v4.18/standard/arm-versatile-926ejs
dce546f5a33b..b24d9d2146d4 v4.18/standard/base -> v4.18/standard/base
dce546f5a33b..b24d9d2146d4 v4.18/standard/beaglebone ->
v4.18/standard/beaglebone
dce546f5a33b..b24d9d2146d4 v4.18/standard/edgerouter ->
v4.18/standard/edgerouter
32e53bb51eef..0802dc980cbc v4.18/standard/fsl-mpc8315e-rdb ->
v4.18/standard/fsl-mpc8315e-rdb
dce546f5a33b..b24d9d2146d4 v4.18/standard/intel -> v4.18/standard/intel
45ab7de40ef2..fd55b7eb9074 v4.18/standard/intel-socfpga ->
v4.18/standard/intel-socfpga
dce546f5a33b..b24d9d2146d4 v4.18/standard/intel-x86 ->
v4.18/standard/intel-x86
ecec6866c67a..c755c4907708 v4.18/standard/mti-malta32 ->
v4.18/standard/mti-malta32
9de1e96b7587..a5b2107abcdb v4.18/standard/mti-malta64 ->
v4.18/standard/mti-malta64
82e47952e138..c92f5f6097c7 v4.18/standard/preempt-rt/base ->
v4.18/standard/preempt-rt/base
8d5b34b7c091..e171fe1b498c v4.18/standard/preempt-rt/intel ->
v4.18/standard/preempt-rt/intel
b96ed399bd53..9a24c2c31a7b v4.18/standard/preempt-rt/intel-x86 ->
v4.18/standard/preempt-rt/intel-x86
dce546f5a33b..b24d9d2146d4 v4.18/standard/qemuarm64 ->
v4.18/standard/qemuarm64
dce546f5a33b..b24d9d2146d4 v4.18/standard/qemuppc -> v4.18/standard/qemuppc
6163aadae99c..adc7d47598fd
v4.18/standard/tiny/arm-versatile-926ejs ->
v4.18/standard/tiny/arm-versatile-926ejs
dce546f5a33b..b24d9d2146d4 v4.18/standard/tiny/base ->
v4.18/standard/tiny/base
dce546f5a33b..b24d9d2146d4 v4.18/standard/tiny/common-pc ->
v4.18/standard/tiny/common-pc
dce546f5a33b..b24d9d2146d4 v4.18/standard/tiny/intel ->
v4.18/standard/tiny/intel
Bruce
On Mon, Apr 15, 2019 at 4:10 AM Kevin Hao <kexin.hao at windriver.com> wrote:
>
> From: Richard Purdie <richard.purdie at linuxfoundation.org>
>
> Currently systemtap fails to operate correctly on armv7 systems such as beaglebone and
> soon, qemuarm.
>
> root at qemuarm:/usr/src/kernel# env -uARCH -uKBUILD_EXTMOD -uCROSS_COMPILE -uKBUILD_IMAGE -uKCONFIG_CONFIG -uINSTALL_PATH -uLD_LIBRARY_PATH PATH=/usr/bin:/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin make -C /lib/modules/4.19.19-yocto-standard/build M=/tmp/staptcNU6M modules CONFIG_DEBUG_INFO= CONFIG_STACK_VALIDATION= ARCH=arm stap_4321_src.i --no-print-directory -j2 V=1
> test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( \
> echo >&2; \
> echo >&2 " ERROR: Kernel configuration is invalid."; \
> echo >&2 " include/generated/autoconf.h or include/config/auto.conf are missing.";\
> echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it."; \
> echo >&2 ; \
> /bin/false)
> mkdir -p /tmp/staptcNU6M/.tmp_versions ; rm -f /tmp/staptcNU6M/.tmp_versions/*
> make -f ./scripts/Makefile.build obj=/tmp/staptcNU6M
> (cat /dev/null; echo kernel//tmp/staptcNU6M/stap_4321.ko;) > /tmp/staptcNU6M/modules.order
> gcc -Wp,-MD,/tmp/staptcNU6M/.stap_4321_src.o.d -nostdinc -isystem /usr/lib/gcc/arm-poky-linux-gnueabi/8.3.0/include -I./arch/arm/include -I./arch/arm/include/generated -I./include -I./arch/arm/include/uapi -I./arch/arm/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -mlittle-endian -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-PIE -DCC_HAVE_ASM_GOTO -fno-dwarf2-cfi-asm -fno-omit-frame-pointer -mapcs -mno-sched-prolog -fno-ipa-sra -mabi=aapcs-linux -mfpu=vfp -funwind-tables -marm -Wa,-mno-warn-deprecated -D__LINUX_ARM_ARCH__=7 -march=armv5t -Wa,-march=armv7-a -msoft-float -Uarm -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-int-in-bool-context -Os -Wno-maybe-uninitialized --param=allow-store
> -data-races=0 -Wframe-larger-than=1024 -fstack-protector-strong -Wno-unused-but-set-variable -Wno-unused-const-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -pg -Wdeclaration-after-statement -Wno-pointer-sign -Wno-stringop-truncation -fno-strict-overflow -fno-merge-all-constants -fmerge-constants -fno-stack-check -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -fmacro-prefix-map=./= -Wno-packed-not-aligned -Iinclude2/asm/mach-default -I/lib/modules/4.19.19-yocto-standard/build -include /tmp/staptcNU6M/stapconf_4321.h -D "STP_NO_VELREL_CHECK" -freorder-blocks -fasynchronous-unwind-tables -Wframe-larger-than=512 -fno-ipa-icf -Wno-unused -Wno-tautological-compare -Werror -I/usr/share/systemtap/runtime -DMODULE -DKBUILD_BASENAME='"stap_4321_src"' -DKBUILD_MODNAME='"stap_4321"' -c -o /tmp/staptcNU6M/stap_4321_src.o /tmp/staptcNU6M/stap_4321_s
> rc.c
> /tmp/ccaE9CMG.s: Assembler messages:
> /tmp/ccaE9CMG.s:49: Error: selected processor does not support `dmb ish' in ARM mode
> /tmp/ccaE9CMG.s:52: Error: architectural extension `mp' is not allowed for the current b
>
> (which was from running the stap command with -v -v -v -k and then being able to run the command individually)
>
> Note that it says armv5t above.
>
> That comes from the code this patch changes
>
> root at qemuarm:/usr/src/kernel# gcc -march=armv7-a /tmp/staptcNU6M/stap_4321_aux_0.c
> cc1: error: -mfloat-abi=hard: selected processor lacks an FPU
>
> which makes me wonder if cc-option fails unless -mfpu-vfp is on the commandline too.
>
> Since we have a gcc which accepts the armv7-a arch, just remove the cc-option
> wrapper unconditionally here.
>
> Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
> Signed-off-by: Bruce Ashfield <bruce.ashfield at gmail.com>
> ---
> Backport a kernel patch from v5.0 to v4.14&v4.18 kernel in order to fix
> the same issue on Yocto 2.6.
>
> arch/arm/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/Makefile b/arch/arm/Makefile
> index 1f95ede8063f..9253b7533cb1 100644
> --- a/arch/arm/Makefile
> +++ b/arch/arm/Makefile
> @@ -64,7 +64,7 @@ KBUILD_CFLAGS += $(call cc-option,-fno-ipa-sra)
> # macro, but instead defines a whole series of macros which makes
> # testing for a specific architecture or later rather impossible.
> arch-$(CONFIG_CPU_32v7M) =-D__LINUX_ARM_ARCH__=7 -march=armv7-m -Wa,-march=armv7-m
> -arch-$(CONFIG_CPU_32v7) =-D__LINUX_ARM_ARCH__=7 $(call cc-option,-march=armv7-a,-march=armv5t -Wa$(comma)-march=armv7-a)
> +arch-$(CONFIG_CPU_32v7) =-D__LINUX_ARM_ARCH__=7 -march=armv7-a -Wa$(comma)-march=armv7-a
> arch-$(CONFIG_CPU_32v6) =-D__LINUX_ARM_ARCH__=6 $(call cc-option,-march=armv6,-march=armv5t -Wa$(comma)-march=armv6)
> # Only override the compiler option if ARMv6. The ARMv6K extensions are
> # always available in ARMv7
> --
> 2.14.4
>
> --
> _______________________________________________
> linux-yocto mailing list
> linux-yocto at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/linux-yocto
--
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
More information about the linux-yocto
mailing list