Bug 2192886

Summary: kernel-tools: C99 compat fix for perf lexer/parser integration
Product: [Fedora] Fedora Reporter: Florian Weimer <fweimer>
Component: kernel-toolsAssignee: Florian Weimer <fweimer>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 39CC: acaringi, jforbes, jwboyer, lgoncalv, pbrobinson, ptalbert
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: kernel-tools-6.5.0-0.rc6.git0.1.fc40 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-11-15 18:33:36 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2137512    
Attachments:
Description Flags
kernel-tools-c99.patch
none
kernel-tools-c99.patch none

Description Florian Weimer 2023-05-03 12:14:58 UTC
tools/perf/util/Build b/tools/perf/util/Build enables implicit function declarations using -Wno-implicit-function-declaration, which likely will fail to have the desired effect with future GCC versions.

I've got a patch to fix this which I'm trying to upstream, but I have trouble posting it, and the perf upstream maintainer seems to have a non-mainline tree that happens to have semantic conflicts with my changes.

Reproducible: Always

Comment 1 Florian Weimer 2023-05-03 12:16:17 UTC
Created attachment 1961933 [details]
kernel-tools-c99.patch

I still hope to upstream this patch eventually, after rebasing it on top of the appropriate -next tree.

The maintainer receives my email messages, so vger dropping the patch should not be an issue.

Comment 2 Florian Weimer 2023-05-03 18:32:28 UTC
Created attachment 1962028 [details]
kernel-tools-c99.patch

New version, rebased on perf-next. Apparently still dropped by vger.kernel.org.

Comment 3 Fedora Release Engineering 2023-08-16 08:09:21 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 39 development cycle.
Changing version to 39.

Comment 4 Florian Weimer 2023-11-15 18:33:36 UTC
Fixed upstream via:

commit ddc8e4c966923ad1137790817157c8a5f0301aec
Author: Ian Rogers <irogers>
Date:   Thu Jul 27 23:49:16 2023 -0700

    perf build: Disable fewer bison warnings
    
    If bison is version 3.8.2, reduce the number of bison C warnings
    disabled. Earlier bison versions have all C warnings disabled. Avoid
    implicit declarations of yylex by adding the declaration in the C
    file. A header can't be included as a circular dependency would occur
    due to the lexer using the bison defined tokens.
    
    Committer notes:
    
    Some recent versions of gcc and clang (noticed on Alpine Linux 3.17,
    edge, clearlinux, fedora 37, etc.
    
    Signed-off-by: Ian Rogers <irogers>
    Cc: Adrian Hunter <adrian.hunter>
    Cc: Alexander Shishkin <alexander.shishkin.com>
    Cc: Andrii Nakryiko <andrii>
    Cc: Eduard Zingerman <eddyz87>
    Cc: Gaosheng Cui <cuigaosheng1>
    Cc: Ingo Molnar <mingo>
    Cc: Jiri Olsa <jolsa>
    Cc: Kan Liang <kan.liang.com>
    Cc: Mark Rutland <mark.rutland>
    Cc: Namhyung Kim <namhyung>
    Cc: Nathan Chancellor <nathan>
    Cc: Nick Desaulniers <ndesaulniers>
    Cc: Peter Zijlstra <peterz>
    Cc: Rob Herring <robh>
    Cc: Tom Rix <trix>
    Cc: bpf.org
    Cc: llvm.dev
    Link: https://lore.kernel.org/r/20230728064917.767761-6-irogers@google.com
    Signed-off-by: Arnaldo Carvalho de Melo <acme>