Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CFLAGS_COMMON_ARCH isn't available on all architectures #18

Open
KexyBiscuit opened this issue Jul 28, 2024 · 1 comment
Open

CFLAGS_COMMON_ARCH isn't available on all architectures #18

KexyBiscuit opened this issue Jul 28, 2024 · 1 comment
Labels
bug Something isn't working enhancement New feature or request

Comments

@KexyBiscuit
Copy link
Member

KexyBiscuit commented Jul 28, 2024

Some build scripts in ABBS assumes CFLAGS_COMMON_ARCH exists1, but that's not the case for every architecture.

autobuild4 supports 20 actual architectures now, but only 16 of them define CFLAGS_COMMON_ARCH.

  • loongarch64.sh doesn't define CFLAGS_COMMON_ARCH, but defines CFLAGS_GCC_ARCH and CFLAGS_CLANG_ARCH separately, which should be outdated as of the writing, since LLVM 18 already supports LSX23?
  • loongson3.sh does the same thing as LA64, though I think Clang supports -mxgot4 for a long time?
  • ppc64el.sh doesn't define CFLAGS_COMMON_ARCH but defines both CFLAGS_GCC_ARCH and CFLAGS_CLANG_ARCH as the exact same string.
  • riscv64.sh has no CFLAGS* definition.

Should we...

  • Make CFLAGS_COMMON_ARCH exist on every architecture, assigning at least some common flags to them for architectures like LoongArch 64 and Loongson 3?
  • Remove inappropriate references to CFLAGS_COMMON_ARCH.

Also it might be time to review all these flags, I think this is a blocker of AOSC-Dev/aosc-os-abbs#5863.

Footnotes

  1. https://github.com/AOSC-Archive/aosc-os-core/commit/2b5ecbaedd4c8cec8811d9692f1341ec63f82f54

  2. https://releases.llvm.org/18.1.0/tools/clang/docs/ReleaseNotes.html#loongarch-support

  3. https://releases.llvm.org/18.1.0/tools/clang/docs/ClangCommandLineReference.html#cmdoption-clang-mlsx

  4. https://releases.llvm.org/18.1.0/tools/clang/docs/ClangCommandLineReference.html#cmdoption-clang-mxgot

@KexyBiscuit KexyBiscuit added bug Something isn't working enhancement New feature or request labels Jul 28, 2024
@KexyBiscuit
Copy link
Member Author

KexyBiscuit commented Jul 28, 2024

For some history on this variable: in early 2017, when @MingcongBai add it to the build script, there were just 8 architectures supported by autobuild3, and all of them had CFLAGS_COMMON_ARCH defined1.

Footnotes

  1. https://github.com/AOSC-Archive/autobuild3/tree/7f56b10e51bef8b27dca12964312c0eee747d828/arch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant