[PATCH] perf tools: Fix static building
With commit e3d09ec8126f ("tools lib traceevent: Export dynamic symbols used by traceevent plugins") we started to add "--dynamic-list" in LDFLAGS. One side-effect of that was inability to build really statically-linked perf. I.e. even if "LDFLAGS=-static" were passed on perf building command-line it had no effect and perf was built dynamically. This change disables setup of "--dynamic-list" if LDFLAGS contains "-static" option. Signed-off-by: Alexey Brodkin Cc: Arnaldo Carvalho de Melo Cc: Vineet Gupta Cc: Wang Nan Cc: Jiri Olsa Cc: He Kuang Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Zefan Li Cc: pi3or...@163.com --- tools/perf/Makefile.perf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index 2d908750..e9acc7c 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -236,7 +236,9 @@ LIBTRACEEVENT = $(TE_PATH)libtraceevent.a export LIBTRACEEVENT LIBTRACEEVENT_DYNAMIC_LIST = $(TE_PATH)libtraceevent-dynamic-list +ifeq ($(filter -static,$(LDFLAGS)),) LIBTRACEEVENT_DYNAMIC_LIST_LDFLAGS = -Xlinker --dynamic-list=$(LIBTRACEEVENT_DYNAMIC_LIST) +endif LIBAPI = $(API_PATH)libapi.a export LIBAPI -- 2.7.4 ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
ARC stable backport request
Hi Stable Team, Could you please backport upstream 20d780374c81c ("ARC: build: Better way to detect ISA compatible toolchain") This is needed to let kernel building with newer gcc 6.x based tools. Thx, -Vineet ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
Re: [PATCH] tools lib: Reinstate strlcpy() header guard with __UCLIBC__
Hi Arnaldo, On Fri, 2016-08-19 at 20:02 -0300, Arnaldo Carvalho de Melo wrote: > Em Fri, Aug 19, 2016 at 06:42:07PM -0300, Arnaldo Carvalho de Melo escreveu: > > > > Em Fri, Aug 19, 2016 at 02:27:58PM -0700, Vineet Gupta escreveu: > > > > > > On 08/19/2016 02:10 PM, Arnaldo Carvalho de Melo wrote: > > > > > > > > > > > > > > But one question: when you test build, do you have any extra devel > > > > > > > > > > > > packages installed besides what is in this prebuilt toolchain > > > > > > tarball? > > > > > > > > > > > > I'll add at least zlib and elfutils to the mix, building it in the > > > > > > docker image creation process, and then testing with/without > > > > > > NO_LIBELF=1, as I do to other cross-building images: > > > > Trying to build elfutils 0.166: > > > > > > > > checking whether gcc accepts -Wduplicated-cond... no > > > > checking whether gcc accepts -Wnull-dereference... no > > > > configure: WARNING: "libc does not have argp" > > > > checking for argp_parse in -largp... no > > > > configure: error: "no libargp found" > > > > > > > > > > > > > > > > will go errands now, will try to check what is needed to build elfutils > > > > with uclibc, ideas? > > > > > > So back in 3.2 days I ran into these issues with elfutils - the > > > workaround was to > > > use the standalone libelf > > > http://www.mr511.de/software/libelf-0.8.9.tar.gz. > > > > Ok, so I'll git it a try with libelf, lets see... > > Argh, give up, now it is refusing to build shared libraries: > > checking for native ELF system... no > configure: warning: shared libraries not supported for arc-snps-linux-uclibc > > And also it says ELF64 isn't support and thus GElf, some more details, > anyway. > > > > > > > > > Not sure if you will be willing to take that path. > > > > > > OTOH, you could use standalone argp @ > > > http://www.lysator.liu.se/~nisse/archive but > > > it seems that requires a bunch of patches too - from looking into the > > > > > > > > > corresponding buildroot package folder. Give this a shot - otherwise it > > > is easier > > > to just build a custom toolchain with pre-req packages from buildroot. Or > > > can be > > > provided if you so deem fit ! > > Please, if you do that, then I'll be able to test more stuff, I already > had enough fun trying to get elfutils, argp-standalone and libelf built > on this env :-\ Please find a tarball with prebuilt toolchain for ARC HS38 by that link: https://www.dropbox.com/s/uvqla26pmq03h5u/br-2016.08-rc2-65-g11109fd-archs38.tar.gz?dl=0 Just FYI I built it from today's BR sources, i.e. this is gcc6 based with all latest fixes for ARC on top of vanilla gcc 6.1.1. That's a defconfig I used in Buildroot: >8- BR2_arcle=y BR2_archs38=y BR2_TOOLCHAIN_BUILDROOT_INET_RPC=y BR2_TOOLCHAIN_BUILDROOT_LOCALE=y BR2_PACKAGE_ELFUTILS=y >8- -Alexey ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
[GIT PULL] ARC fixes for 4.8 rc4
Hi Linus, Please pull. Thx, -Vineet > The following changes since commit 29b4817d4018df78086157ea3a55c1d9424a7cfc: Linux 4.8-rc1 (2016-08-07 18:18:00 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc.git/ tags/arc-4.8-rc4-fixes for you to fetch changes up to c57653dc94d0db7bf63067433ceaa97bdcd0a312: ARC: export __udivdi3 for modules (2016-08-19 14:09:33 -0700) ARC Fixes for 4.8-rc4 - Support for Syscall ABI v4 with upstream gcc 6.x - Lockdep fix (Daniel Mentz) - gdb register clobber (Liav Rehana) - Couple of missing exports for modules - Other fixes here and there Daniel Mentz (1): ARC: Call trace_hardirqs_on() before enabling irqs Liav Rehana (1): ARC: use correct offset in pt_regs for saving/restoring user mode r25 Vineet Gupta (5): ARC: Elide redundant setup of DMA callbacks ARC: Support syscall ABI v4 ARC: export kmap ARC: mm: fix build breakage with STRICT_MM_TYPECHECKS ARC: export __udivdi3 for modules arch/arc/include/asm/entry.h| 4 ++-- arch/arc/include/asm/irqflags-compact.h | 2 +- arch/arc/include/asm/pgtable.h | 2 +- arch/arc/include/uapi/asm/elf.h | 11 +-- arch/arc/kernel/arcksyms.c | 2 ++ arch/arc/kernel/process.c | 2 +- arch/arc/kernel/setup.c | 6 -- arch/arc/mm/cache.c | 9 + arch/arc/mm/highmem.c | 1 + 9 files changed, 30 insertions(+), 9 deletions(-) ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
Re: [PATCH] tools lib: Reinstate strlcpy() header guard with __UCLIBC__
Em Mon, Aug 22, 2016 at 06:01:08PM +, Alexey Brodkin escreveu: > On Fri, 2016-08-19 at 20:02 -0300, Arnaldo Carvalho de Melo wrote: > > Em Fri, Aug 19, 2016 at 06:42:07PM -0300, Arnaldo Carvalho de Melo escreveu: > > > Em Fri, Aug 19, 2016 at 02:27:58PM -0700, Vineet Gupta escreveu: > > > > corresponding buildroot package folder. Give this a shot - otherwise it > > > > is easier > > > > to just build a custom toolchain with pre-req packages from buildroot. > > > > Or can be > > > > provided if you so deem fit ! > > Please, if you do that, then I'll be able to test more stuff, I already > > had enough fun trying to get elfutils, argp-standalone and libelf built > > on this env :-\ > Please find a tarball with prebuilt toolchain for ARC HS38 by that link: > https://www.dropbox.com/s/uvqla26pmq03h5u/br-2016.08-rc2-65-g11109fd-archs38.tar.gz?dl=0 Thanks for that, I'm behind a slow connection right now, will try later, but can you consider leaving this on a permanent location? At some point I'll publish my Dockerfiles, probably on the kernel sources, so that other people can replicate my test build environment, and then it would be nice for them to be able to audit what is in there, where the toolchains/packages come from, etc. For reference, this is how I have the ARC-uclibc set up right now, with the previous toolchain Vineet provided me: [root@jouet perf]# cat fedora/24/x-ARC-uClibc/Dockerfile # docker.io/acmel/linux-perf-tools-build-fedora:24-x-ARC-uClibc FROM docker.io/fedora:24 MAINTAINER Arnaldo Carvalho de Melo ENV TOOLCHAIN=arc_gnu_2016.03_prebuilt_uclibc_le_archs_linux_install ENV CROSS=arc-linux- # binutils for ar, used without cross compiler prefix in libelf build RUN SOURCEFILE=${TOOLCHAIN}.tar.gz && \ dnf -y install make flex bison binutils wget tar bzip2 && \ dnf -y clean all && \ mkdir -m 777 -p /tmp/build/perf && \ curl -OL https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases/download/arc-2016.03/${SOURCEFILE} && \ tar xf ${SOURCEFILE} && \ rm -f ${SOURCEFILE} && \ export TARGET=arc-snps-linux-uclibc && \ export INSTALLDIR=/${TOOLCHAIN}/${TARGET}/sysroot/ && \ export PATH=/${TOOLCHAIN}/bin:$PATH && \ export TARGETMACH=${TARGET} && \ export CC=${CROSS}gcc && \ export LD=${CROSS}ld && \ export AS=${CROSS}as && \ export AR=${CROSS}ar && \ wget -q http://zlib.net/zlib-1.2.8.tar.gz && \ tar xf zlib-1.2.8.tar.gz && \ cd zlib-1.2.8 && \ ./configure --prefix=${INSTALLDIR} && \ make && \ make install && \ cd .. && \ rm -rf zlib-1.2.8 && \ rm -f zlib-1.2.8.tar.gz && \ dnf -y remove tar wget bzip2 binutils && \ groupadd -r perfbuilder && \ useradd -r -g perfbuilder perfbuilder USER perfbuilder ENTRYPOINT make -C /git/linux/tools/perf O=/tmp/build/perf NO_LIBBPF=1 ARCH=arc CROSS_COMPILE=/${TOOLCHAIN}/bin/${CROSS} - Arnaldo > Just FYI I built it from today's BR sources, i.e. this is gcc6 based with all > latest fixes > for ARC on top of vanilla gcc 6.1.1. > > That's a defconfig I used in Buildroot: > >8- > BR2_arcle=y > BR2_archs38=y > BR2_TOOLCHAIN_BUILDROOT_INET_RPC=y > BR2_TOOLCHAIN_BUILDROOT_LOCALE=y > BR2_PACKAGE_ELFUTILS=y > >8- > > -Alexey ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
Re: ARC stable backport request
On Mon, Aug 22, 2016 at 10:36:20AM -0700, Vineet Gupta wrote: > Hi Stable Team, > > Could you please backport upstream 20d780374c81c ("ARC: build: Better way to > detect ISA compatible toolchain") > > This is needed to let kernel building with newer gcc 6.x based tools. > > Thx, > -Vineet What's the version range? It looks to me like it depends on 1f6ccfff6 ("ARCv2: Support for ARCv2 ISA and HS38x cores") which means 4.2+? -- Thanks, Sasha ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
Re: ARC stable backport request
On 08/22/2016 11:14 AM, Levin, Alexander wrote: > On Mon, Aug 22, 2016 at 10:36:20AM -0700, Vineet Gupta wrote: >> Hi Stable Team, >> >> Could you please backport upstream 20d780374c81c ("ARC: build: Better way to >> detect ISA compatible toolchain") >> >> This is needed to let kernel building with newer gcc 6.x based tools. >> >> Thx, >> -Vineet > > What's the version range? It looks to me like it depends on 1f6ccfff6 > ("ARCv2: Support for ARCv2 ISA and HS38x cores") which means 4.2+? > Correct - I realized that I missed out mentioning the range after pressing send. Thx, -Vineet ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc