GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Lots of new compiler warnings: `unknown warning option '-Wtrampolines' [-Wunknown-warning-option]` · Issue #121026 · python/cpython

Lots of new compiler warnings: unknown warning option '-Wtrampolines' [-Wunknown-warning-option] #121026

New issue
Copy link
New issue
Copy link
Closed
Closed
Lots of new compiler warnings: unknown warning option '-Wtrampolines' [-Wunknown-warning-option]#121026
Copy link
Assignees
corona10
Labels
OS-macbuildThe build process and cross-buildThe build process and cross-buildtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@sobolevn
sobolevn
opened on Jun 26, 2024
Issue body actions

Bug report

I am building CPython on macos 14.5, m2 chip, gcc:

» gcc --version
Apple clang version 15.0.0 (clang-1500.3.9.4)
Target: arm64-apple-darwin23.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

I have lots of warnings like

gcc  -fno-strict-overflow -Wimplicit-fallthrough -fstack-protector-strong -Wtrampolines -Wsign-compare -g -Og -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include  -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden  -I./Include/internal -I./Include/internal/mimalloc  -I. -I./Include -I/opt/homebrew/opt/openssl/include -I/opt/homebrew/opt/openssl/include   -c ./Modules/_testmultiphase.c -o Modules/_testmultiphase.o
gcc  -fno-strict-overflow -Wimplicit-fallthrough -fstack-protector-strong -Wtrampolines -Wsign-compare -g -Og -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include  -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden  -I./Include/internal -I./Include/internal/mimalloc  -I. -I./Include -I/opt/homebrew/opt/openssl/include -I/opt/homebrew/opt/openssl/include   -c ./Modules/_testsinglephase.c -o Modules/_testsinglephase.o
warning: unknown warning option '-Wtrampolines' [-Wunknown-warning-option]
warning: unknown warning option '-Wtrampolines' [-Wunknown-warning-option]
warning: unknown warning option '-Wtrampolines' [-Wunknown-warning-option]
1 warning generated.
1 warning generated.
warning: unknown warning option '-Wtrampolines' [-Wunknown-warning-option]
gcc  -fno-strict-overflow -Wimplicit-fallthrough -fstack-protector-strong -Wtrampolines -Wsign-compare -g -Og -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include  -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden  -I./Include/internal -I./Include/internal/mimalloc  -I. -I./Include -I/opt/homebrew/opt/openssl/include -I/opt/homebrew/opt/openssl/include   -c ./Modules/_testexternalinspection.c -o Modules/_testexternalinspection.o
gcc  -fno-strict-overflow -Wimplicit-fallthrough -fstack-protector-strong -Wtrampolines -Wsign-compare -g -Og -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include  -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden  -I./Include/internal -I./Include/internal/mimalloc  -I. -I./Include -I/opt/homebrew/opt/openssl/include -I/opt/homebrew/opt/openssl/include   -c ./Modules/_ctypes/_ctypes_test.c -o Modules/_ctypes/_ctypes_test.o
warning: unknown warning option '-Wtrampolines' [-Wunknown-warning-option]
warning: unknown warning option '-Wtrampolines' [-Wunknown-warning-option]
1 warning generated.
1 warning generated.

Things I've tried:

  • Clean build with make clean
  • Latest main

Looks like #120975 is the cause.
Please, note that buildbots of m1 workers also failed on this PR.

CC @nohlson @corona10

Linked PRs

  • gh-121026: Fix build error of macOS due to invalid compiler option #121029
  • gh-121026: Include -Werror with new compiler flag checks to ensure compatibility #121030

Activity

  1. sobolevn
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    OS-mac
    buildThe build process and cross-buildThe build process and cross-build
    on Jun 26, 2024
  2. hugovk
    changed the title [-]Lots of new copiler warnings: `unknown warning option '-Wtrampolines' [-Wunknown-warning-option]`[/-] [+]Lots of new compiler warnings: `unknown warning option '-Wtrampolines' [-Wunknown-warning-option]`[/+] on Jun 26, 2024
  3. corona10 commented on Jun 26, 2024

    @corona10
    corona10
    on Jun 26, 2024
    Member
    More actions

    ah this is because apple gcc is alias of clang, we should exclude macOS case. I will submit the patch today.

    Reacted by sobolevn and Nate Ohlson
  4. corona10
    self-assigned this
    on Jun 26, 2024
  5. corona10
    added 2 commits that reference this issue on Jun 26, 2024

    pythongh-121026: Fix build error of macOS due to invalid compiler option

    c945409

    pythongh-121026: Fix build error of macOS due to invalid compiler option

    c9d0561
  6. nohlson commented on Jun 26, 2024

    @nohlson
    nohlson
    on Jun 26, 2024
    Contributor
    More actions

    ah this is because apple gcc is alias of clang, we should exclude macOS case. I will submit the patch today.

    I was wondering if simply using the fourth argument of AX_CHECK_COMPILE_FLAG to include -Werror would be a better solution than making the special case for apple gcc. That way any system compiling with clang would not include -Wtrampolines and could remove the check for $CC that wraps it:

    AX_CHECK_COMPILE_FLAG([-Wtrampolines], [BASECFLAGS="$BASECFLAGS -Wtrampolines"], [AC_MSG_WARN([-Wtrampolines not supported])], [-Werror])

    Reacted by Donghee Na
  7. mokko commented on Jun 26, 2024

    @mokko
    mokko
    on Jun 26, 2024
    More actions

    Related commit?

    7fb32e0

  8. corona10 commented on Jun 26, 2024

    @corona10
    corona10
    on Jun 26, 2024
    Member
    More actions

    @nohlson You can submit the patch if you want!

  9. nohlson commented on Jun 26, 2024

    @nohlson
    nohlson
    on Jun 26, 2024
    Contributor
    More actions

    @corona10 I will submit a patch that makes all these additions to BASEFLAGS include -Werror when checking for each flag.

    Reacted by Donghee Na
  10. corona10 commented on Jun 26, 2024

    @corona10
    corona10
    on Jun 26, 2024
    Member
    More actions

    @nohlson Please ping me once you submit the patch, we should run build bot too :)

  11. nohlson commented on Jun 26, 2024

    @nohlson
    nohlson
    on Jun 26, 2024
    Contributor
    More actions

    @corona10 new PR #121030

  12. corona10
    added a commit that references this issue on Jun 26, 2024

    gh-121026: Include -Werror with new compiler flag checks to ensure co…

    d8f8243
  13. corona10
    closed this as completedon Jun 26, 2024
  14. mrahtz
    added a commit that references this issue on Jun 30, 2024

    pythongh-121026: Include -Werror with new compiler flag checks to ens…

    ecf8482
  15. estyxx
    added a commit that references this issue on Jul 17, 2024

    pythongh-121026: Include -Werror with new compiler flag checks to ens…

    3b79259
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @corona10
    corona10

Labels

OS-macbuildThe build process and cross-buildThe build process and cross-buildtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402520 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.